Skip to content

Commit

Permalink
Merge branch 'windows_installer' into devel-0.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
arnobaer committed Sep 19, 2024
2 parents b37999b + 08fa5be commit 2d0c3e9
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/windows-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: sqc-artifact
path: dist
- name: Build installer
run: |
$VERSION = python -c "import sqc; print(sqc.__version__)"
ISCC.exe /DVersion=$VERSION innosetup.iss
- name: Publish installer
uses: actions/upload-artifact@v4
with:
name: sqc-setup-artifact
path: dist/sqc*.exe
41 changes: 41 additions & 0 deletions innosetup.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
; Inno Setup template

#ifndef Version
#error The define variable Version is not set! Use /D Version=value to set it.
#endif

#define Organization "HEPHY"
#define Name "SQC"
#define ExeName "sqc.exe"

[Setup]
AppId={#Organization}_{#Name}_{#Version}
AppName={#Name}
AppVersion={#Version}
AppPublisher=HEPHY Detector Development
AppPublisherURL=https://github.com/hephy-dd/
DefaultDirName={userappdata}\{#Organization}\sqc\{#Version}
DefaultGroupName={#Name}
OutputDir=dist
OutputBaseFilename=sqc-{#Version}-win-x64-setup
SetupIconFile=src\sqc\assets\icons\sqc.ico
UninstallDisplayIcon={app}\{#ExeName}
Compression=lzma
SolidCompression=yes
PrivilegesRequired=lowest

[Files]
Source: "dist\sqc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{userdesktop}\{#Name} {#Version}"; Filename: "{app}\{#ExeName}"
Name: "{group}\{#Name} {#Version}"; Filename: "{app}\{#ExeName}"; WorkingDir: "{app}"

[Run]
Filename: "{app}\{#ExeName}"; Description: "{cm:LaunchProgram,{#Name} {#Version}}"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: filesandordirs; Name: "{app}"

[UninstallRun]
Filename: "{app}\uninstall.exe"
2 changes: 1 addition & 1 deletion pyinstaller/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ wheel
pyusb==1.2.1
pyserial==3.5
gpib-ctypes==0.3.0
pyinstaller==5.13.2
pyinstaller==6.7.0
pyinstaller-versionfile==2.1.1
21 changes: 16 additions & 5 deletions pyinstaller/windows_app.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ from pyinstaller_versionfile import create_versionfile
import sqc

version = sqc.__version__
filename = f"sqc-{version}.exe"
bundle = "sqc"
filename = "sqc.exe"
console = False
debug = False
block_cipher = None

package_root = os.path.join(os.path.dirname(sqc.__file__))
Expand Down Expand Up @@ -58,13 +60,11 @@ pyz = PYZ(
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
exclude_binaries=True,
name=filename,
version=version_info,
debug=False,
debug=debug,
bootloader_ignore_signals=False,
strip=False,
upx=True,
Expand All @@ -73,3 +73,14 @@ exe = EXE(
console=console,
icon=package_icon,
)

coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name=bundle,
)

0 comments on commit 2d0c3e9

Please sign in to comment.