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

improve the MS Windows build script #4394

Closed
totaam opened this issue Oct 16, 2024 · 1 comment
Closed

improve the MS Windows build script #4394

totaam opened this issue Oct 16, 2024 · 1 comment
Labels
enhancement New feature or request packaging win32 MS Windows OS

Comments

@totaam
Copy link
Collaborator

totaam commented Oct 16, 2024

Let's rewrite it in Python to make it more readable and manageable.

This will also help with SBOM (#4050).

See also #2400 and #3941.

@totaam totaam added enhancement New feature or request win32 MS Windows OS packaging labels Oct 16, 2024
totaam added a commit that referenced this issue Oct 16, 2024
totaam added a commit that referenced this issue Oct 18, 2024
totaam added a commit that referenced this issue Oct 19, 2024
totaam added a commit that referenced this issue Oct 19, 2024
@totaam
Copy link
Collaborator Author

totaam commented Oct 19, 2024

Much better, the output is also much more readable.
Most subcommands send their output to a dedicated log file.
More diagnostics can be included using the --verbose command line switch.

$ python3.11 ./packaging/MSWindows/BUILD.py --no-msi --no-zip --no-installer
* 00:16:26 Collecting version information
    Python 3.11.10 (main, Sep 10 2024, 13:02:13)  [GCC 14.2.0 64 bit (AMD64)]
    Xpra-Light 6.3-r36787
    using 4 cpus
* 00:16:31 locating `signtool`
* 00:16:31 Cleaning output directories and generated files
* 00:16:34 Building Cython modules
* 00:17:24 Generating installation directory
* 00:18:57 Fixups: paths, etc
* 00:18:59 Fixup GStreamer
* 00:18:59 Fixup DLLs
* 00:19:35 Deleting unnecessary DLLs
* 00:19:35 Removing unnecessary Python modules
* 00:19:35 Removing unnecessary files
* 00:19:39 Removing unnecessary PIL plugins
* 00:19:39 Removing empty directories
* 00:19:40 cuda: False
* 00:19:40 numpy: False
* 00:19:40 zipping up some Python modules
Warning: glob 'lib/pynvml' did not match any files!
* 00:19:45 Deleting unnecessary `share/` files
Warning: glob 'share/gst-plugin-base' did not match any files!
Warning: glob 'qt.conf' did not match any files!
* 00:19:46 Removing empty icon directories
* 00:19:46 Adding EXE manifests
* 00:19:46 Generating gdk pixbuf loaders cache
* 00:19:46 Generating icons and theme cache

We can also run the build script against different python versions on the same system, ie:
python3.12 ./packaging/MSWindows/BUILD.py (currently failing for unknown reasons)
python3.11 ./packaging/MSWindows/BUILD.py

The packaging script now also adds its own settings to xpra/build_info.py:

And the size is comparable to the bash version:

# bash:
73	Xpra-Light-x86_64_6.2.0-r0.zip
51	Xpra-Light-x86_64_Setup_6.2.0-r0.exe
211	Xpra-x86_64_6.2.0-r3.zip
151	Xpra-x86_64_Setup_6.2.0-r3.exe
# python:
75	Xpra-Light-x86_64_6.3-r36792.zip
52	Xpra-Light-x86_64_Setup_6.3-r36792.exe
206	Xpra-x86_64_6.3-r36792.zip
146	Xpra-x86_64_Setup_6.3-r36792.exe

Closing, next step is to add the SBOM structured data (#4050).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request packaging win32 MS Windows OS
Projects
None yet
Development

No branches or pull requests

1 participant