schorschii / Simple-Signer

Sign and certify PDF files on Linux with optional visual stamp using a .p12/.pfx certificate file
GNU General Public License v3.0
43 stars 8 forks source link

Trying to compile with Windows, but fails #13

Closed SirLouen closed 7 months ago

SirLouen commented 7 months ago

I'm trying to compile following the README notes that say:

pyinstaller.exe -F --noconsole simple-signer.py --add-data="lang/de.qm;lang" --add-data="C:\Users\vm2\AppData\Roaming\Python\Python38\site-packages\endesive\pdf\PyPDF2_annotate\fonts\Helvetica.ttf;endesive/pdf/PyPDF2_annotate/fonts"
  1. First, I've supposed that simply-signer.py has to be switched by setup.py. If I run the command with simple-signer.py both in the root folder or inside the simple-signer folder, it returns a not found error
  2. I have installed via pip the libraries endesive and PyMuPDF and PyQt5
  3. I also changed de.qm to de.ts because there is no de.qm file there.

So with these, I have run the compiler and these are the results.

pyinstaller.exe -F --noconsole setup.py --add-data="lang/de.ts;lang" --add-data="C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\endesive\pdf\PyPDF2_annotate\fonts\Helvetica.ttf;endesive/pdf/PyPDF2_annotate/fonts"
213 INFO: PyInstaller: 6.3.0
213 INFO: Python: 3.11.7
219 INFO: Platform: Windows-10-10.0.22631-SP0
219 INFO: wrote C:\Users\user\Simple-Signer\setup.spec
221 INFO: Extending PYTHONPATH with paths
['C:\\Users\\user\\Desarrollo\\Learning\\Simple-Signer']
384 INFO: Appending 'datas' from .spec
384 INFO: checking Analysis
385 INFO: Building Analysis because Analysis-00.toc is non existent
385 INFO: Initializing module dependency graph...
386 INFO: Caching module graph hooks...
404 INFO: Analyzing base_library.zip ...
1320 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
2151 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
2828 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3049 INFO: Caching module dependency graph...
3103 INFO: Running Analysis Analysis-00.toc
3103 INFO: Looking for Python shared library...
3103 INFO: Using Python shared library: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\python311.dll
3103 INFO: Analyzing C:\Users\user\Simple-Signer\setup.py
3104 INFO: Processing pre-safe import module hook distutils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-distutils.py'.
3108 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
3467 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3507 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3542 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3656 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
4870 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5620 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5653 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5765 INFO: Loading module hook 'hook-packaging.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
6241 INFO: Processing module hooks...
6250 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
6835 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7024 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7381 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7742 INFO: Loading module hook 'hook-setuptools._distutils.command.check.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7928 INFO: Performing binary vs. data reclassification (4 entries)
7933 INFO: Looking for ctypes DLLs
7968 INFO: Analyzing run-time hooks ...
7971 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
7976 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_setuptools.py'
7981 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
7986 INFO: Processing pre-find module path hook _pyi_rth_utils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.
7993 INFO: Loading module hook 'hook-_pyi_rth_utils.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7995 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
8000 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
8010 INFO: Looking for dynamic libraries
8274 INFO: Extra DLL search directories (AddDllDirectory): []
8274 INFO: Extra DLL search directories (PATH): []
8371 INFO: Warnings written to C:\Users\user\Simple-Signer\build\setup\warn-setup.txt
8401 INFO: Graph cross-reference written to C:\Users\user\Simple-Signer\build\setup\xref-setup.html
8434 INFO: checking PYZ
8434 INFO: Building PYZ because PYZ-00.toc is non existent
8434 INFO: Building PYZ (ZlibArchive) C:\Users\user\Simple-Signer\build\setup\PYZ-00.pyz
8900 INFO: Building PYZ (ZlibArchive) C:\Users\user\Simple-Signer\build\setup\PYZ-00.pyz completed successfully.
8907 INFO: checking PKG
8907 INFO: Building PKG because PKG-00.toc is non existent
8907 INFO: Building PKG (CArchive) setup.pkg
10267 INFO: Building PKG (CArchive) setup.pkg completed successfully.
10268 INFO: Bootloader C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe
10268 INFO: checking EXE
10269 INFO: Building EXE because EXE-00.toc is non existent
10269 INFO: Building EXE from EXE-00.toc
10269 INFO: Copying bootloader EXE to C:\Users\user\Simple-Signer\dist\setup.exe
10272 INFO: Copying icon to EXE
10275 INFO: Copying 0 resources to EXE
10275 INFO: Embedding manifest in EXE
10278 INFO: Appending PKG archive to EXE
10284 INFO: Fixing EXE headers
10345 INFO: Building EXE from EXE-00.toc completed successfully.

Then I run /dist/setup.exe

And here is the result:

Rv7q03p 1

What I could be missing?

schorschii commented 7 months ago

The Windows build instructions were outdated, I fixed them. Please try again and give a feedback.

SirLouen commented 7 months ago

Works, only a minor issue, I've sent you the pull request to sort it.

schorschii commented 7 months ago

Can I close the issue or is there anything left unclear?