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

Build both 32-bit and 64-bit installers #1790

Open
Athanasius opened this issue Dec 30, 2022 · 2 comments
Open

Build both 32-bit and 64-bit installers #1790

Athanasius opened this issue Dec 30, 2022 · 2 comments
Labels
enhancement Installer Related to the Windows installer
Milestone

Comments

@Athanasius
Copy link
Contributor

As we have develop working for both 32-bit and 64-bit now it's time to enable building 64-bit on GitHub. However, until 64-bit builds have been more widely tested we will still want to release 32-bit versions as well.

  1. Tweak the current setup to add an explicit x86 to the installer file name.
  2. Tweak the build script to take an 'arch' or similar CL arg to choose which bit-ness to build.
    1. This will entail changes to the WiX file(s) as a 64-bit version should be installed to Program Files, not Program Files (x86). Most likely we'll end up with two skeleton/template files, one for each, or splitting further ?
  3. Tweak the GH build workflow to build both. Pay attention to WinSparkle.dll ! This means we'll have a single build, two .msi artifacts, and both should be added to the draft release. The hashes.sum should of course cover both.
@Athanasius Athanasius added enhancement Installer Related to the Windows installer labels Dec 30, 2022
@Athanasius Athanasius added this to the 5.8.0 milestone Dec 30, 2022
@NoFoolLikeOne
Copy link

So my other plugins seem to be working ok but PIL has broken on EDMC Screenshot again.

It seems it will need to be aware of whether it is 64 bit or 32?

2022-12-30 22:25:09.874 UTC - ERROR - 16788:18388:18388 plug.Plugin.__init__:76: : Failed for Plugin "EDMC-Screenshot"
Traceback (most recent call last):
  File "plug.pyc", line 64, in __init__
  File "<frozen importlib._bootstrap_external>", line 605, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1120, in load_module
  File "<frozen importlib._bootstrap_external>", line 945, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\load.py", line 21, in <module>
    from Libs.PIL311 import Image
  File "C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\Libs\PIL311\Image.py", line 100, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging' from 'Libs.PIL311' (C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\Libs\PIL311\__init__.py)
2022-12-30 22:25:09.898 UTC - ERROR - 16788:18388:18388 plug.load_plugins:188: Failure loading found Plugin "EDMC-Screenshot"
Traceback (most recent call last):
  File "plug.pyc", line 186, in load_plugins
  File "plug.pyc", line 64, in __init__
  File "<frozen importlib._bootstrap_external>", line 605, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1120, in load_module
  File "<frozen importlib._bootstrap_external>", line 945, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\load.py", line 21, in <module>
    from Libs.PIL311 import Image
  File "C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\Libs\PIL311\Image.py", line 100, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging' from 'Libs.PIL311' (C:\Users\Paulo Rodrigues\AppData\Local\EDMarketConnector\plugins\EDMC-Screenshot\Libs\PIL311\__init__.py)

@Athanasius
Copy link
Contributor Author

Yes, if you want to have a single release that supports both then you'll probably have to just double up the PIL, i.e. PIL311 and PIL311_64 and import from the correct one with something like:

import platform

# No, Ath doesn't have the 'match' syntax in his head yet
if platform.architecture()[0] == '64bit':
	from Libs.PIL311_64 import Image
	...
elif platform.architecture()[0] == '32bit':
	from Libs.PIL311 import Image
	...
else:
	print("Panic!")
	...

@Athanasius Athanasius modified the milestones: 5.9.0, Future Release with major code changes Jan 21, 2023
@Rixxan Rixxan removed this from the Future Release with major code changes milestone Aug 4, 2023
@Rixxan Rixxan added this to the 6.0.0 milestone Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Installer Related to the Windows installer
Projects
Status: Pending
Development

No branches or pull requests

3 participants