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

[3.x] Add support for repackaging the generated UWP APPX file with makeappx #79544

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Conversation

panreyes
Copy link

@panreyes panreyes commented Jul 16, 2023

This solves #79278

This commit makes Godot 3.5 use makeappx.exe to repack the APPX file generated when exporting for UWP platform.

Currently the integrated exporter has some unknown packaging error. I have tried to figure it out without success and, after that, I considered that the fastest and most practical solution is to just use Microsoft's official tool to repackage it.

How to make it work:

  • In Editor Settings/UWP, we include the path to makeappx.exe.
  • When exporting to the UWP platform, Godot 3.5 will use makeappx.exe to repack the APPX file correctly.

Requiring the use of makeappx.exe is not a big problem, since to sign the packages we also need the signtool.exe tool. Both tools are part of the Windows 10/11 SDK.

With this change, and this one godotengine/godot-build-scripts#80 (comment) , Godot 3.5 will correctly be able to export to UWP format for XBOX. I have tested it and it works flawlessly for most 2D games at least.

Production edit: Closes #30558

@panreyes panreyes requested a review from a team as a code owner July 16, 2023 11:22
@panreyes
Copy link
Author

I just learnt about clang formatting and git reset 😅 Hopefully, checks will pass this time :)

@YuriSizov YuriSizov changed the title Added support for repackaging the generated UWP APPX file with makeappx. Add support for repackaging the generated UWP APPX file with makeappx Jul 18, 2023
@YuriSizov YuriSizov added this to the 3.x milestone Jul 18, 2023
@panreyes
Copy link
Author

I also wrote a PowerShell script that solves this issue outside of Godot.
https://github.com/panreyes/godot-appx-repackager

It's not an embedded solution, but it's probably compatible with all UWP Godot 3.x releases.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have time to review in depth, but since it's working fine for @panreyes to ship games, I think we can merge.

@akien-mga akien-mga modified the milestones: 3.x, 3.6 Sep 18, 2023
@akien-mga akien-mga added the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Sep 18, 2023
@akien-mga akien-mga changed the title Add support for repackaging the generated UWP APPX file with makeappx [3.x] Add support for repackaging the generated UWP APPX file with makeappx Sep 18, 2023
@akien-mga akien-mga merged commit ccf662c into godotengine:3.x Sep 18, 2023
13 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.3.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Sep 24, 2023
@dannygaray60
Copy link

I tried @panreyes script with the godot generated appx and I got this error:

The path (/p) parameter is: "\?\D:\Godot Exports\toziuha_oota\uwp_free\toziuha_oota.appx"
The content directory (/d) parameter is: "\?\C:\Users\Danny\AppData\Local\Temp\appx-repack\game"
Enumerating files from directory "\?\C:\Users\Danny\AppData\Local\Temp\appx-repack\game"
Packing 2539 file(s) in "\?\C:\Users\Danny\AppData\Local\Temp\appx-repack\game" (content directory) to "\?\D:\Godot Exports\toziuha_oota\uwp_free\toziuha_oota.appx" (output file name).
Memory limit defaulting to 4235565056 bytes.
MakeAppx : error: You must include a valid app package manifest file named AppxManifest.xml in the source.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080203 - The specified package format is not valid: The file is not a valid app package because it is missing a required footprint file.
Error: Could not repackage the APPX file.

godot version: v3.5.3.stable.official [6c81413]

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

Successfully merging this pull request may close these issues.

4 participants