Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,38 @@ jobs:
cd ${RUNNER_WORKSPACE}/build-antimony
ctest -C ${{ matrix.platform.build_type }} --output-on-failure --verbose --extra-verbose --progress

# Only the windows-latest-release leg has a QTAntimony.exe built with
# the exact Qt version (5.15.2, see 'Install Qt' above) win32/antimonyInstaller.iss
# expects, so the installer is only packaged there. InstallDir points
# iscc at this leg's actual install prefix (see 'Configure CMake for
# Antimony' above) rather than the '..\install-release' sibling
# directory the .iss defaults to for local/manual runs.
- name: Install Inno Setup
if: matrix.platform.name == 'windows-latest-release'
shell: bash
run: choco install innosetup --no-progress -y

- name: Build QTAntimony installer
if: matrix.platform.name == 'windows-latest-release'
shell: bash
# MSYS_NO_PATHCONV=1: Git Bash auto-converts any argument that looks
# like a POSIX path (starts with '/') into a Windows path before
# handing it to a native .exe. iscc's /D switches start with '/' and
# aren't paths at all, so without this they get mangled and iscc
# fails with 'You may not specify more than one script filename.'
run: |
cd ${RUNNER_WORKSPACE}/build-antimony
ANTIMONY_VERSION=$(cat antimony_version.txt)
cd ${GITHUB_WORKSPACE}/win32
MSYS_NO_PATHCONV=1 iscc "/DInstallDir=${RUNNER_WORKSPACE}/install-antimony" "/DMyAppVersion=${ANTIMONY_VERSION}" antimonyInstaller.iss

- name: Upload QTAntimony installer
if: matrix.platform.name == 'windows-latest-release'
uses: actions/upload-artifact@main
with:
name: antimonyInstaller-windows
path: win32/antimonyInstaller_v*.exe

# Valgrind is Linux-only (no Windows support, weak/no Apple Silicon
# support), so this only runs on one leg of the matrix rather than
# across every platform/config combination. See MEMORYCHECK_* in the
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ INCLUDE(CPack)

SET(LIBANTIMONY_VERSION_STRING "v${LIBANTIMONY_VERSION_MAJOR}.${LIBANTIMONY_VERSION_MINOR}${LIBANTIMONY_VERSION_PATCH}${LIBANTIMONY_VERSION_RELEASE}")

# Bare version (no leading 'v'), written to a file so tooling outside of
# CMake itself -- e.g. the GitHub Actions step that packages
# win32/antimonyInstaller.iss via 'iscc /DMyAppVersion=...' -- can pick up
# the current version without parsing this file.
SET(LIBANTIMONY_VERSION_STRING_BARE "${LIBANTIMONY_VERSION_MAJOR}.${LIBANTIMONY_VERSION_MINOR}${LIBANTIMONY_VERSION_PATCH}${LIBANTIMONY_VERSION_RELEASE}")
file(WRITE "${CMAKE_BINARY_DIR}/antimony_version.txt" "${LIBANTIMONY_VERSION_STRING_BARE}")


option(BUILD_SHARED_LIBS "Build shared library (Set to OFF to build static libraries)" ON)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS are used), Debug, Release, RelWithDebInfo, MinSizeRel" )
Expand Down Expand Up @@ -681,7 +688,7 @@ if (WITH_QTANTIMONY)
add_definitions(${QT_DEFINITIONS})
set(MACOSX_BUNDLE_ICON_FILE ${QTANTIMONY_SRC_DIR}antimony.icns)
install(TARGETS QTAntimony DESTINATION bin)
install(FILES ${QTANTIMONY_SRC_DIR}antimony.ico ${QTANTIMONY_SRC_DIR}antimony_ico.png DESTINATION bin)
install(FILES ${QTANTIMONY_SRC_DIR}antimony.ico ${QTANTIMONY_SRC_DIR}antimony_ico.png ${CMAKE_SOURCE_DIR}/win32/README.txt DESTINATION bin)

set_target_properties(QTAntimony PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/QTAntimony/$<0:>")

Expand Down
50 changes: 27 additions & 23 deletions win32/antimonyInstaller.iss
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#define MinimalSetupInstaller "AntimonyPythonBindings-2.12.0-win32.exe"
#define MyAppName "QTAntimony"
#define MyAppVersion "2.12.0"
#ifndef MyAppVersion
#define MyAppVersion "3.1.3"
#endif
#define MyAppSetupIconFile "..\QTAntimony_src\antimony.ico"

; Defaults to the relative layout a local 'cmake --install' with the
; convention used elsewhere in this repo (an install-release/ dir sibling to
; win32/) produces. CI overrides this via 'iscc /DInstallDir=...' to point at
; wherever its own install step actually put things.
#ifndef InstallDir
#define InstallDir "..\install-release"
#endif

[Setup]
AppId={{9F5DF3DE-FBE7-4AC4-9AFD-357A1C256847}
DefaultGroupName=Antimony
Expand All @@ -20,32 +29,27 @@ Name: {group}\{cm:UninstallProgram, QTAntimony}; Filename: {uninstallexe}
Name: {group}\QTAntimony; Filename: {app}\QTAntimony.exe; WorkingDir: {userdocs}
Name: {group}\README; Filename: {app}\README.txt
[Run]
Filename: "{tmp}\{#MinimalSetupInstaller}"; Description: Run libantimonypython installer;
; Flags: ignoreversion
Filename: {app}\README.txt; Description: View the README file; Flags: postinstall shellexec skipifsilent
Filename: {app}\QTAntimony.exe; WorkingDir: {userdocs}; Flags: postinstall unchecked
[Dirs]
Name: {app}\biomodels
[Files]
Source: "{#MinimalSetupInstaller}"; DestDir: "{tmp}"; Flags: ignoreversion onlyifdoesntexist
Source: ..\install-release\bindings\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ..\install-release\bin\QTAntimony.exe; DestDir: {app}
Source: ..\install-release\bin\Qt5Core.dll; DestDir: {app}
Source: ..\install-release\bin\Qt5Gui.dll; DestDir: {app}
Source: ..\install-release\bin\Qt5PrintSupport.dll; DestDir: {app}
Source: ..\install-release\bin\Qt5Widgets.dll; DestDir: {app}
Source: ..\install-release\bin\platforms\qwindows.dll; DestDir: {app}\platforms
Source: ..\install-release\bin\README.txt; DestDir: {app}
Source: ..\install-release\bin\antimony.ico; DestDir: {app}
Source: ..\install-release\bin\antimony_ico.png; DestDir: {app}
Source: ..\install-release\bin\antimony2sbml.exe; DestDir: {app}
Source: ..\install-release\bin\libxml2.dll; DestDir: {app}
Source: ..\install-release\bin\rehashantimony.exe; DestDir: {app}
Source: ..\install-release\bin\sbml2antimony.exe; DestDir: {app}
Source: ..\install-release\bin\sbtranslate.exe; DestDir: {app}
Source: ..\install-release\bin\testantimony.exe; DestDir: {app}
Source: ..\install-release\lib\libantimony.dll; DestDir: {app}
Source: ..\install-release\lib\libantimony.lib; DestDir: {app}
Source: {#InstallDir}\bin\QTAntimony.exe; DestDir: {app}
Source: {#InstallDir}\bin\Qt5Core.dll; DestDir: {app}
Source: {#InstallDir}\bin\Qt5Gui.dll; DestDir: {app}
Source: {#InstallDir}\bin\Qt5PrintSupport.dll; DestDir: {app}
Source: {#InstallDir}\bin\Qt5Widgets.dll; DestDir: {app}
Source: {#InstallDir}\bin\platforms\qwindows.dll; DestDir: {app}\platforms
Source: {#InstallDir}\bin\README.txt; DestDir: {app}
Source: {#InstallDir}\bin\antimony.ico; DestDir: {app}
Source: {#InstallDir}\bin\antimony_ico.png; DestDir: {app}
Source: {#InstallDir}\bin\antimony2sbml.exe; DestDir: {app}
Source: {#InstallDir}\bin\rehashantimony.exe; DestDir: {app}
Source: {#InstallDir}\bin\sbml2antimony.exe; DestDir: {app}
Source: {#InstallDir}\bin\sbtranslate.exe; DestDir: {app}
Source: {#InstallDir}\bin\testantimony.exe; DestDir: {app}
Source: {#InstallDir}\lib\libantimony.dll; DestDir: {app}
Source: {#InstallDir}\lib\libantimony.lib; DestDir: {app}
Source: ..\doc\examples\ex_antimony_output.txt; DestDir: {app}
Source: ..\doc\examples\ex_sbml_input.xml; DestDir: {app}
Source: ..\doc\examples\ex_sbml_output___main_sbml.xml; DestDir: {app}
Expand Down
Loading