From 0a4a0cce99e9392dff9f78b5b7a67ca2841b31eb Mon Sep 17 00:00:00 2001 From: Joe Stanley Date: Sun, 4 Sep 2022 20:20:14 -0700 Subject: [PATCH] initial updates - will this build? --- .gitignore | 6 +++++- Jenkinsfile | 4 ++-- README.md | 7 +++++++ main.spec | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 main.spec diff --git a/.gitignore b/.gitignore index 5d381cc..1edf730 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,11 @@ 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 +#*.spec +# Normally, we wouldn't want these tracked - but here, we do! +# We need them, because the build-system will utilize them. +# See https://github.com/cdrx/docker-pyinstaller for more information. +# Joe Stanley - 09/04/2022 # Installer logs pip-log.txt diff --git a/Jenkinsfile b/Jenkinsfile index f86a307..621234d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,12 +13,12 @@ node ('master') { // Prep Stage - Clone the Repository and Configure System as Needed. stage('Prep') { - sh "echo nothing" + sh "docker pull cdrx/pyinstaller-windows:python3" } // Build Stage - Run the PyInstaller Steps to Generate an Executable. stage('Build') { - sh "echo \"build stage - todo\"" + sh """docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3""" } // Wrap Up - Archive the Generated Executables, Tear Down the Build System. diff --git a/README.md b/README.md index f625d70..3680c9f 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,10 @@ Builds are generated by Stanley Solutions Jenkins; they can be accessed here: [S | **Branch** | **Build Status** | |------------|------------------| | Main | [![Master Branch Build Status](https://jenkins.stanleysolutionsnw.com/buildStatus/icon?job=Potlatch+Loggers+Organization%2FComputerKeeper%2Fmain)](https://jenkins.stanleysolutionsnw.com/job/Potlatch%20Loggers%20Organization/job/ComputerKeeper/job/main/) | + + +## PyInstaller Command + +```shell +pyinstaller --noconfirm --onefile --windowed "./main.py" +``` \ No newline at end of file diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..dda2119 --- /dev/null +++ b/main.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['./main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + 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='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +)