Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Rcedit error returns exit 1 and interrupts Github Actions Workflow #62874

Closed
nabware opened this issue Jul 10, 2022 · 5 comments · Fixed by #62907
Closed

Windows Rcedit error returns exit 1 and interrupts Github Actions Workflow #62874

nabware opened this issue Jul 10, 2022 · 5 comments · Fixed by #62907

Comments

@nabware
Copy link

nabware commented Jul 10, 2022

Godot version

4.0.alpha11 (afdae67)

System information

Manjaro Linux 21.3.2, Vulkan API 1.2.0, NVIDIA GeForce GTX 1070 (515.57)

Issue description

I'm exporting windows builds on Github Actions "ubuntu-latest" runners. Godot returns an exit 1 code which interrupts the workflow. Otherwise, the build successfully exports, so I use continue-on-error: true to keep the workflow going. However, this will hide other errors I might be concerned about. I prefer to use Github's linux runners because they are half as expensive as windows.

I believe the Rcedit error is causing this because I receive the other warnings on linux/macos builds and they return exit 0. I haven't set "application/icon" or changed any other settings besides "custom_template/release", "export_path" and encryption.

I expect an exit code 0 since the exported executable works and I don't want to use Rcedit to "change the icon or app information data".

WARNING: Custom cursor shape not supported by this display server.
     at: cursor_set_custom_image (servers/display_server.cpp:425)
WARNING: FBX file import is enabled, but no FBX2glTF path is configured. FBX files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:92)
WARNING: Resources Modification: Could not start rcedit executable, configure rcedit path in the Editor Settings (Export > Windows > Rcedit).
     at: add_message (editor/editor_export.h:271)
ERROR: Project export for preset "windows" completed with errors.
   at: _fs_changed (editor/editor_node.cpp:989)
Godot Engine v4.0.alpha11.official.afdae67cc - https://godotengine.org/
# export_presets.cfg

...
[preset.1]

name="windows"
platform="Windows Desktop"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=1
script_encryption_key=""

[preset.1.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
binary_format/64_bits=true
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""

[preset.2]
...

Steps to reproduce

  • run: |
    sed -i -e 's|export_path=.|export_path="bin/windows/Game.exe"|g'
    -e 's|custom_template/release=.
    |custom_template/release="godot-export-templates/windows-latest/godot.windows.opt.64.exe"|g'
    export_presets.cfg

  • run: ./godot-binary --headless --export windows
    continue-on-error: true

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Jul 10, 2022

The rcedit warning was added in #57350.

If resource modification with rcedit is attempted, it's likely because your export_presets.cfg has defined at least one field to modify in the Windows export options (such as icon, description or copyright).

As for the error exit code, I assume the export system wasn't retrofitted to take the new warning system into account. There used to only be errors, but now that there can be warnings, the final export line should be modified to take this into account and print Project export for preset "windows" completed with N warnings., while not affecting the exit code.

cc @bruvzg

@bruvzg
Copy link
Member

bruvzg commented Jul 10, 2022

I expect an exit code 0 since the exported executable works and I don't want to use Rcedit to "change the icon or app information data".

There is a new export config option to disable rcedit, application/modify_resources (change it to false to disable rcedit).

@bruvzg
Copy link
Member

bruvzg commented Jul 10, 2022

the final export line should be modified to take this into account and print Project export for preset "windows" completed with N warnings.

It's already doing something like this, message is either Project export for preset \"%s\" failed. or Project export for preset \"%s\" completed with errors.

As for exit code, it will be -1 if there's any export warning (other two warning in the log are completely unrelated to the export process). I do not think it should be 0, but I guess it might be better to return different values for failed export and export with warnings.

@nabware
Copy link
Author

nabware commented Jul 10, 2022

I expect an exit code 0 since the exported executable works and I don't want to use Rcedit to "change the icon or app information data".

There is a new export config option to disable rcedit, application/modify_resources (change it to false to disable rcedit).

Thanks @bruvzg, that fixes my problem. I'll close this since application/modify_resources is the solution to this use case.

@akien-mga
Copy link
Member

Fixed by #62907.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants