EDMarketConnector icon indicating copy to clipboard operation
EDMarketConnector copied to clipboard

Build both 32-bit and 64-bit installers

Open Athanasius opened this issue 3 years ago • 2 comments

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 avatar Dec 30 '22 19:12 Athanasius

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)

NoFoolLikeOne avatar Dec 30 '22 22:12 NoFoolLikeOne

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 avatar Dec 31 '22 10:12 Athanasius