Palats / mapshot

Factorio mod to export maps as zoomable html
Apache License 2.0
77 stars 12 forks source link

Option ‘disable-audio’ does not exist #22

Closed Kariton closed 2 years ago

Kariton commented 2 years ago

I just got your Linux binary for my headless RHEL 8 Server and run into this error:

$ # xvfb-run ./mapshot render --factorio_datadir /opt/factorio/data/ --factorio_binary /opt/factorio/bin/x64/factorio /opt/factorio/saves/MPsave.zip --alsologtostderr --factorio_verbose
I1125 23:56:54.765740   24994 factorio.go:282] Found factorio data dir: /opt/factorio/data/
I1125 23:56:54.765955   24994 factorio.go:289] Using Factorio data dir: /opt/factorio/data/
I1125 23:56:54.765962   24994 factorio.go:282] Found factorio data dir: /opt/factorio/data/
I1125 23:56:54.765965   24994 factorio.go:289] Using Factorio data dir: /opt/factorio/data/
I1125 23:56:54.765972   24994 factorio.go:355] Factorio binary found: /opt/factorio/bin/x64/factorio
I1125 23:56:54.765974   24994 factorio.go:362] Using Factorio binary: /opt/factorio/bin/x64/factorio
I1125 23:56:54.765982   24994 render.go:105] runid: 566c1847-f44e-4c9b-acea-fc09e8b47511
I1125 23:56:54.766013   24994 root.go:30] temp dir: /tmp/mapshot3901792460
I1125 23:56:54.766021   24994 factorio.go:110] Looking for save "/opt/factorio/saves/MPsave.zip"; /opt/factorio/saves/MPsave.zip exists.
Generating mapshot "MPsave" using file /opt/factorio/saves/MPsave.zip
I1125 23:56:54.771201   24994 render.go:125] copied save from "/opt/factorio/saves/MPsave.zip" to "/tmp/mapshot3901792460/MPsave.zip"
I1125 23:56:54.771314   24994 factorio.go:183] copying mod mod-list.json from /opt/factorio/data/mods/mod-list.json to /tmp/mapshot3901792460/mods/mod-list.json
I1125 23:56:54.771391   24994 factorio.go:206] created mod-list.json
I1125 23:56:54.771761   24994 render.go:141] mod created at "/tmp/mapshot3901792460/mods/mapshot"
I1125 23:56:54.771843   24994 render.go:94] overrides file created at "/tmp/mapshot3901792460/mods/mapshot/overrides.lua"
I1125 23:56:54.771860   24994 render.go:155] removed done-file "/opt/factorio/data/script-output/mapshot-done-566c1847-f44e-4c9b-acea-fc09e8b47511": remove /opt/factorio/data/script-output/mapshot-done-566c1847-f44e-4c9b-acea-fc09e8b47511: no such file or directory
Starting Factorio...
I1125 23:56:54.771917   24994 factorio.go:124] Running factorio with args: [--disable-audio --disable-prototype-history --load-game /tmp/mapshot3901792460/MPsave.zip --mod-directory /tmp/mapshot3901792460/mods]
Option ‘disable-audio’ does not exist

Usage:
  factorio [OPTION...]

 General options:
  -h, --help                    display help
      --version                 show version information
  -v, --verbose                 enable verbose logging
  -c, --config PATH             config file to use
      --no-log-rotation         don't rotate log file
      --mod-directory PATH      Mod directory to use
      --check-unused-prototype-data
                                Print a warning for all prototype values that
                                were not accessed.
      --executable-path PATH    Override autodetected __PATH__executable.
                                Usually not needed except on very weird systems.

 Running options:
  -s, --map2scenario arg        map to scenario conversion
  -m, --scenario2map arg        scenario to map conversion
      --apply-update arg        immediately apply update package
      --create FILE             create a new map
      --map-gen-settings FILE   Map generation settings for use with
                                --create, --start-server-load-scenario or
                                --generate-map-preview. See
                                data/map-gen-settings.example.json
      --map-gen-seed SEED       Map generation seed for use with --create,
                                --start-server-load-scenario or
                                --generate-map-preview. Will override seed specified in map
                                gen settings
      --map-gen-seed-max SEED   Map generation seed for use with
                                --generate-map-preview to generate multiple previews using
                                every second seed in the interval from
                                map-gen-seed to map-gen-seed-max.
      --map-settings FILE       Map settings for use with --create or
                                --start-server-load-scenario. See
                                data/base/prototypes/map-settings.lua
      --preset arg              Name of the map generation preset to be used.
      --generate-map-preview PATH
                                Generate preview images of the map; PATH
                                should name a PNG file or end with a '/' or '\' to
                                indicate a directory.
      --generate-map-preview-random COUNT
                                Number of maps to generate with a random seed
                                using --generate-map-preview.
      --map-preview-size SCALE  Size (in pixels) of map preview (default:
                                1024)
      --map-preview-scale SCALE
                                Scale (meters per pixel) of map preview
                                (default: 1)
      --map-preview-offset X,Y  Offset of the center of the map, in meters
                                (default: 0,0)
      --noise-outputs TAG,TAG...
                                Indicate which variables of noise program to
                                output
      --slope-shading SHADEAMOUNT
                                Apply elevation shading to map preview
      --slope-shade-property SHADEPROP
                                Property to apply slope shading to (default:
                                elevation)
      --report-quantities PROTOTYPE,...
                                When generating map preview, report
                                approximate quantities of the named entity prototypes
      --threads THREADCOUNT     Number of threads to use when generating map
                                previews
      --disable-migration-window
                                Disables the gui that is shown when opening a
                                save with migrated content
      --instrument-mod arg      Name of a mod to enable Instrument Mode
      --start-server FILE       start a multiplayer server
      --start-server-load-scenario [MOD/]NAME
                                start a multiplayer server and load the
                                specified scenario. The scenario is looked for
                                inside the given mod. If no mod is given, it is
                                looked for in the top-level scenarios directory.
      --start-server-load-latest
                                start a multiplayer server and load the
                                latest available save
      --until-tick TICK         run a save until given map tick
      --benchmark FILE          load save and run benchmark
      --benchmark-ticks N       number of ticks for benchmarking. Default is
                                1000 (default: 1000)
      --benchmark-runs N        how often the number of ticks will be run,
                                map will reload after each run. Default is 1
                                (default: 1)
      --benchmark-verbose timings
                                comma separated list of timings to output
                                each tick. "all", "timestamp" as well as all
                                other values seen in the debug view are allowed
                                here. An empty string disabled verbose
                                benchmarking. (default: )
      --benchmark-sanitize      only output the final benchmark results
      --benchmark-ignore-paused
                                leaves the game paused if it was paused when
                                saved. By default the game is unpaused when a
                                benchmark starts.
      --output-perf-stats FILE  path of file to which rendering performance
                                statistics measurements should be saved.
                                Special tags {api}, {hw}, {time} and {tag} will be
                                replaced.

 Server options:
      --port N                  network port to use
      --bind ADDRESS[:PORT]     IP address (and optionally port) to bind to
      --rcon-port N             Port to use for RCON
      --rcon-bind ADDRESS:PORT  IP address and port to use for RCON
      --rcon-password PASSWORD  Password for RCON
      --server-settings FILE    Path to file with server settings. See
                                data/server-settings.example.json
      --use-server-whitelist    If the whitelist should be used.
      --use-authserver-bans     Verify that connecting players are not banned
                                from multiplayer and inform Factorio.com
                                about ban/unban commands.
      --server-whitelist FILE   Path to file with server whitelist.
      --server-banlist FILE     Path to file with server banlist.
      --server-adminlist FILE   Path to file with server adminlist.
      --console-log FILE        Path to file where a copy of the server's log
                                will be stored
      --server-id FILE          Path where server ID will be stored or read
                                from

I1125 23:56:54.776065   24994 factorio.go:151] Factorio returned: exit status 1
I1125 23:56:54.787064   24994 root.go:37] temp dir "/tmp/mapshot3901792460" removed
Error: factorio exited early: exit status 1

Factorio Version:

$# /opt/factorio/bin/x64/factorio --version
Version: 1.1.48 (build 59155, linux64, headless)
Binary version: 64
Map input version: 0.18.0-0
Map output version: 1.1.48-0

Can I fix that myself? I mean.. without recompiling. :)

Kariton commented 2 years ago

I also needed to create a empty json for mod-list.json

{
    "mods": [
        {
        }
    ]
}

you may could make that file optional?

Palats commented 2 years ago

The disable-audio flag is just a symptom here. Unfortunately, it seems that you have the headless version of Factorio, which is not supported. This is also not fixable - headless version is compiled in a way which does not support any graphic rendering. If you use a full version install, it should do the right thing.