{"action":"opened","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/14441","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/14441/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/14441/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/14441/events","html_url":"https://github.com/godotengine/godot/issues/14441","id":280706457,"number":14441,"title":"Windows export with rcedit: support running it from WINE on macOS/Linux","user":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"labels":[{"id":73330066,"url":"https://api.github.com/repos/godotengine/godot/labels/enhancement","name":"enhancement","color":"44bbff","default":true},{"id":279097326,"url":"https://api.github.com/repos/godotengine/godot/labels/platform:linux","name":"platform:linux","color":"dddddd","default":false},{"id":279097780,"url":"https://api.github.com/repos/godotengine/godot/labels/platform:osx","name":"platform:osx","color":"dddddd","default":false},{"id":279098219,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:editor","name":"topic:editor","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/4","html_url":"https://github.com/godotengine/godot/milestone/4","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/4/labels","id":1449702,"number":4,"title":"3.0","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":366,"closed_issues":4104,"state":"open","created_at":"2015-12-08T11:42:08Z","updated_at":"2017-12-09T10:00:07Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-12-09T10:00:07Z","updated_at":"2017-12-09T10:00:07Z","closed_at":null,"author_association":"OWNER","body":"**Operating system or device, Godot version, GPU Model and driver (if graphics related):**\r\nmacOS/Linux, Godot master 3fd1c0c76\r\n\r\n**Issue description:**\r\nThanks to #14437, we can now set some PE data for Windows exports using the thirdparty [rcedit](https://github.com/electron/rcedit) tool by GitHub. It's Windows-only, but runs fine via WINE on Linux (and likely macOS).\r\n\r\nStill, currently it won't work out of the box (at least on some Linux) since we give the path to the .exe and try to execute it, but this can't work:\r\n```\r\n./rcedit-x64.exe \r\nbash: ./rcedit-x64.exe: cannot execute binary file: Format error for exec()\r\n```\r\n\r\nWhat we need is to actually run `wine ./rcedit-x64.exe [args]`, provided wine is installed on the system. If not, we need to abort.\r\n\r\nSuggestions welcome on how to fix this properly. I guess we could:\r\n- Override OS::execute on macOS/Linux so that if the file has .exe extension, it tries to locate `wine` in PATH and prefix it to the actual command (ugly IMO, we shouldn't mess with OS::execute this way)\r\n- Since we have only this use case for now, add the \"find wine and prefix it\" logic to the Windows export code, so that it does the right command line tweaks before running OS::execute (much better IMO)\r\n- Make it optional in the `export/windows` editor settings, with the possibility to opt-in for Wine usage and pass Wine path (more cumbersome IMO - though an option to set the wine path might be good for option 2 too)"}}
{"actor":{"display_login":"akien-mga"}}