diff --git a/.github/workflows/build_win_pkg.yml b/.github/workflows/build_win_pkg.yml new file mode 100644 index 0000000..d8e651d --- /dev/null +++ b/.github/workflows/build_win_pkg.yml @@ -0,0 +1,45 @@ +name: Build Windows Release Package + +on: + pull_request: + push: + tags: + - 'build*' # Push events to matching build* tags + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Build Executable + run: | + pyinstaller build_win_pkg.spec + + - name: Add Release Resource to Package + run: | + Move-Item -Path "./input" -Destination "./dist" + Move-Item -Path "./logos" -Destination "./dist" + Move-Item -Path "./fonts" -Destination "./dist" + Move-Item -Path "./config.yaml" -Destination "./dist/config.yaml" + New-Item -Path "./dist/exiftool" -ItemType "directory" -Force | Out-Null + Invoke-WebRequest -Uri "https://github.com/leslievan/semi-utils/raw/exiftool/exiftool/exiftool.exe" -OutFile "./dist/exiftool/exiftool.exe" + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: semi-utils-latest_win_amd64_pkg + path: dist diff --git a/build_win_pkg.spec b/build_win_pkg.spec new file mode 100644 index 0000000..d6153ff --- /dev/null +++ b/build_win_pkg.spec @@ -0,0 +1,38 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='semi-utils', + icon='logo.ico', + 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, +) diff --git a/config.yaml b/config.yaml index 34221bb..6b5bad7 100644 --- a/config.yaml +++ b/config.yaml @@ -65,7 +65,7 @@ logo: path: ./logos/hasselblad.png huawei: id: HUAWEI - path: ./logos/xmage.jpg + path: ./logos/xmage.png leica: id: leica path: ./logos/leica_logo.png diff --git a/logo.ico b/logo.ico new file mode 100644 index 0000000..cd5e332 Binary files /dev/null and b/logo.ico differ diff --git a/logos/xmage.jpg b/logos/xmage.jpg deleted file mode 100644 index 8cae89e..0000000 Binary files a/logos/xmage.jpg and /dev/null differ diff --git a/logos/xmage.png b/logos/xmage.png new file mode 100644 index 0000000..f8553bb Binary files /dev/null and b/logos/xmage.png differ