From 2902e3c709ce6c0f0f04621ef606d7c80a668b1c Mon Sep 17 00:00:00 2001 From: Jakub Andrysek Date: Sun, 22 Sep 2024 23:26:08 +0200 Subject: [PATCH] Refactor .gitignore and pyinstaller-gui.spec files --- .gitignore | 1 - ForrestHub-app/pyinstaller-gui.spec | 64 +++++++++++++++++++++++++++++ ForrestHub-app/pyinstaller.spec | 63 ++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 ForrestHub-app/pyinstaller-gui.spec create mode 100644 ForrestHub-app/pyinstaller.spec diff --git a/.gitignore b/.gitignore index c13dabb..9fad821 100644 --- a/.gitignore +++ b/.gitignore @@ -163,7 +163,6 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest -*.spec # Installer logs pip-log.txt diff --git a/ForrestHub-app/pyinstaller-gui.spec b/ForrestHub-app/pyinstaller-gui.spec new file mode 100644 index 0000000..d92164d --- /dev/null +++ b/ForrestHub-app/pyinstaller-gui.spec @@ -0,0 +1,64 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +a = Analysis( + ['gui-logs.py'], + pathex=['.'], + binaries=[], + datas=[ + ('templates', 'templates'), + ('assets', 'assets'), + ('pages', 'pages'), + ('config.py', '.'), + ('app', 'app'), + ('data.json', '.'), # Include your data file + ], + hiddenimports=[ + 'app.custom_loader', + 'app.database', + 'app.errors', + 'app.routes', + 'app.socketio_events', + 'app.utils', + 'engineio.async_drivers.threading', + 'socketio', + 'flask_socketio', + 'eventlet', + 'dns', + 'dns.resolver', + 'engineio', + ], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='ForrestHub', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon='assets/img/forrestHub.ico' +) diff --git a/ForrestHub-app/pyinstaller.spec b/ForrestHub-app/pyinstaller.spec new file mode 100644 index 0000000..9fa7de0 --- /dev/null +++ b/ForrestHub-app/pyinstaller.spec @@ -0,0 +1,63 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +a = Analysis( + ['run.py'], + pathex=['.'], + binaries=[], + datas=[ + ('templates', 'templates'), + ('assets', 'assets'), + ('games', 'games'), + ('config.py', '.'), + ('app', 'app'), + ], + hiddenimports=[ + 'app.custom_loader', + 'app.database', + 'app.errors', + 'app.routes', + 'app.socketio_events', + 'app.utils', + 'engineio.async_drivers.threading', + 'socketio', + 'flask_socketio', + 'eventlet', + 'dns', + 'dns.resolver', + 'engineio', + ], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='ForrestHub', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon='assets/img/forrestHubIcon.ico' +) \ No newline at end of file