Skip to content

Commit

Permalink
Merge pull request #102 from compomics/fix/publish-action
Browse files Browse the repository at this point in the history
Fix build of Windows PyInstaller
  • Loading branch information
RalfG authored Oct 25, 2023
2 parents fea1df1 + 4af2776 commit 598ec54
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Publish
on:
release:
types: [created]
workflow_dispatch:

jobs:
python-package:
Expand Down Expand Up @@ -56,7 +57,7 @@ jobs:
pip install . pyinstaller
- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v1
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup -y --allow-unofficial --force

Expand All @@ -67,7 +68,7 @@ jobs:
run: dist/ms2rescore/ms2rescore.exe

- name: Run Inno Setup
run: ISCC.exe ./ms2rescore_innosetup.iss /DMyAppVersion=${{ github.ref_name }}
run: ISCC.exe ./ms2rescore_innosetup.iss /DAppVersion=${{ github.ref_name }}

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test-python-package:
Expand Down
3 changes: 2 additions & 1 deletion ms2rescore.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ requirements = {
for req in requirements
if "; extra ==" not in req # Exclude optional dependencies
}
requirements.update([project])
requirements.update([project, "xgboost"])

hidden_imports = set()
datas = []
binaries = []
Expand Down
32 changes: 16 additions & 16 deletions ms2rescore_innosetup.iss
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#define MyAppName "MS2Rescore"
#define MyAppPublisher "CompOmics"
#define MyAppURL "https://github.com/compomics/ms2rescore"
#define MyAppExeName "ms2rescore.exe"
#define AppName "MS2Rescore"
#define AppPublisher "CompOmics"
#define AppURL "https://github.com/compomics/ms2rescore"
#define AppExeName "ms2rescore.exe"

[Setup]
AppId={{2D3D12BD-3AE2-426E-8DE8-092148C12071}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
AppId={2D3D12BD-3AE2-426E-8DE8-092148C12071}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
DefaultDirName={autopf}\{#AppName}
DisableProgramGroupPage=yes
LicenseFile=.\LICENSE
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir="dist"
OutputBaseFilename="{#MyAppName}-{#MyAppVersion}-Windows64bit"
OutputBaseFilename="{#AppName}-{#AppVersion}-Windows64bit"
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Expand All @@ -32,8 +32,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Source: "dist\ms2rescore\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{autoprograms}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

0 comments on commit 598ec54

Please sign in to comment.