Slashbunny / gog-galaxy-plugin-downloader

Downloads and Updates GOG Galaxy 2.0 Plugins/Integrations
GNU General Public License v3.0
268 stars 20 forks source link

Builded exe doesn't work (PyInstaller > 4.x) #17

Closed LukasThyWalls closed 3 years ago

LukasThyWalls commented 3 years ago

Hello.

I downloaded the last version of the repository (0ba914e, not the last official release from Nov 2019), and executing with python works fine, but when i tried to build the exe, that exe doesn't work:

>gog-plugins-downloader.exe
Traceback (most recent call last):
  File "download.py", line 9, in <module>
ModuleNotFoundError: No module named 'yaml'
[4648] Failed to execute script download

The requeriments are satisfied (PyYAML==5.*) and there isn't any error or warning compiling:

>build-win.bat

(...)\gog-galaxy-plugin-downloader-master>pip install pyinstaller
Requirement already satisfied: pyinstaller in c:\python\lib\site-packages (4.2)
Requirement already satisfied: altgraph in c:\python\lib\site-packages (from pyinstaller) (0.17)
Requirement already satisfied: pefile>=2017.8.1 in c:\python\lib\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: setuptools in c:\python\lib\site-packages (from pyinstaller) (49.2.1)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\python\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\python\lib\site-packages (from pyinstaller) (2021.1)
Requirement already satisfied: future in c:\python\lib\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)

(...)\gog-galaxy-plugin-downloader-master>pyinstaller download.py -n gog-plugins-downloader --onefile
216 INFO: PyInstaller: 4.2
223 INFO: Python: 3.9.2
223 INFO: Platform: Windows-10-10.0.19041-SP0
223 INFO: wrote (...)\gog-galaxy-plugin-downloader-master\gog-plugins-downloader.spec
223 INFO: UPX is not available.
239 INFO: Extending PYTHONPATH with paths
['(...)\\gog-galaxy-plugin-downloader-master',
 '(...)\\gog-galaxy-plugin-downloader-master']
254 INFO: checking Analysis
317 INFO: checking PYZ
355 INFO: checking PKG
371 INFO: Building because (...)\gog-galaxy-plugin-downloader-master\build\gog-plugins-downloader\gog-plugins-downloader.exe.manifest changed
371 INFO: Building PKG (CArchive) PKG-00.pkg
2816 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
2816 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
2816 INFO: checking EXE
2838 INFO: Building because icon changed
2838 INFO: Building EXE from EXE-00.toc
2854 INFO: Copying icons from ['c:\\python\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico']
3001 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
3001 INFO: Writing RT_ICON 1 resource with 3752 bytes
3001 INFO: Writing RT_ICON 2 resource with 2216 bytes
3017 INFO: Writing RT_ICON 3 resource with 1384 bytes
3017 INFO: Writing RT_ICON 4 resource with 37019 bytes
3017 INFO: Writing RT_ICON 5 resource with 9640 bytes
3017 INFO: Writing RT_ICON 6 resource with 4264 bytes
3017 INFO: Writing RT_ICON 7 resource with 1128 bytes
3457 INFO: Updating manifest in (...)\gog-galaxy-plugin-downloader-master\build\gog-plugins-downloader\run.exe.f6mzol3_
3473 INFO: Updating resource type 24 name 1 language 0
3504 INFO: Appending archive to EXE (...)\gog-galaxy-plugin-downloader-master\dist\gog-plugins-downloader.exe
3731 INFO: Building EXE from EXE-00.toc completed successfully.

(...)\gog-galaxy-plugin-downloader-master>COPY gog-plugins.bat dist\
        1 archivo(s) copiado(s).

Thanks.

Slashbunny commented 3 years ago

I updated PyInstaller to the latest version, 4.2, and I got the same error. I'm not sure why newer versions of PyInstaller don't work. I will do a bit of research because I have only ever used PyInstaller for this project.

However, the release from November 2019 is the latest version. All the commits since then have been plugin manifest updates (updates to plugins.yaml), which the .exe file downloads when running to determine the latest version of each plugin.

Slashbunny commented 3 years ago

I locked the pyinstaller version to 3.6 to fix the issue for now (at least on my system): 68e3b2e082e8bb5d6611a0fca1cb4728a0cdf777

LukasThyWalls commented 3 years ago

However, the release from November 2019 is the latest version. All the commits since then have been plugin manifest updates (updates to plugins.yaml), which the .exe file downloads when running to determine the latest version of each plugin.

Oh, i thought that release didn't have the info from other repositories updated, because there isn't any info anywhere about that. That's why i tried to build myself. Maybe the script itself should tell something when executed of how updated the plugins info are. Thanks!

LukasThyWalls commented 3 years ago

I locked the pyinstaller version to 3.6 to fix the issue for now (at least on my system): 68e3b2e

Confirming, at least with this the builded .exe works.