Skip to content

Commit

Permalink
New Windows installer (NatronGitHub#596)
Browse files Browse the repository at this point in the history
* tools/MINGW-packages: added new installer
  • Loading branch information
rodlie authored Apr 3, 2021
1 parent b9b2cda commit f5412fb
Show file tree
Hide file tree
Showing 10 changed files with 493 additions and 8 deletions.
1 change: 1 addition & 0 deletions tools/MINGW-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ mingw-w64-libheif
mingw-w64-imagemagick
mingw-w64-openimageio
mingw-w64-breakdown
mingw-w64-natron-setup
mingw-w64-natron-sdk
"
for pkg in $PKGS; do
Expand Down
5 changes: 3 additions & 2 deletions tools/MINGW-packages/mingw-w64-natron-sdk/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname=natron-sdk
pkgver=2020
pkgrel=3
pkgver=2021
pkgrel=1
pkgdesc='Meta package for the Natron Windows SDK'
url='https://github.com/NatronGitHub'
arch=('any')
Expand Down Expand Up @@ -242,6 +242,7 @@ ${MINGW_PACKAGE_PREFIX}-zlib
${MINGW_PACKAGE_PREFIX}-snappy
${MINGW_PACKAGE_PREFIX}-libmad
${MINGW_PACKAGE_PREFIX}-breakdown
${MINGW_PACKAGE_PREFIX}-natron-setup
)


339 changes: 339 additions & 0 deletions tools/MINGW-packages/mingw-w64-natron-setup/LICENSE.txt

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions tools/MINGW-packages/mingw-w64-natron-setup/Natron.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
; NATRON WINDOWS INSTALLER

#define MyAppName "Natron"
#define MyAppPublisher "The Natron developers"
#define MyAppURL "https://natrongithub.github.io"
#define MyAppURLSupport "https://github.com/NatronGitHub/Natron/issues"
#define MyAppURLUpdates "https://github.com/NatronGitHub/Natron/releases"
#define MyAppExeName "Natron.exe"
#define MyAppAssocName MyAppName + " Project"
#define MyAppAssocExt ".ntp"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt

[Setup]
AppId={{B1D54C04-B15B-4015-831A-CA5DACA60BD0}
AppName={#MyAppName}
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURLSupport}
AppUpdatesURL={#MyAppURLUpdates}
DefaultDirName={autopf64}\{#MyAppName}
DefaultGroupName={#MyAppName}
PrivilegesRequiredOverridesAllowed=dialog
ChangesAssociations=yes
LicenseFile=LICENSE.txt
OutputDir=output
OutputBaseFilename=Setup
SetupIconFile=natronIcon256_windows.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
WizardImageFile=WizardImageFile.bmp
WizardSmallImageFile=WizardSmallImageFile.bmp
WizardImageStretch=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Components]
Name: "natron"; Description: "Natron"; Types: full compact custom; Flags: fixed
;Name: "docs"; Description: "Natron Documentation"; Types: full
Name: "pyplugs"; Description: "Natron PyPlugs"; Types: full
Name: "ocio"; Description: "OpenColorIO Configs"; Types: full
Name: "io"; Description: "OpenFX IO"; Types: full compact custom; Flags: fixed
Name: "misc"; Description: "OpenFX Misc"; Types: full compact custom; Flags: fixed
Name: "cimg"; Description: "OpenFX CImg"; Types: full
Name: "stoy"; Description: "OpenFX Shadertoy"; Types: full
Name: "arena"; Description: "OpenFX Arena"; Types: full
Name: "gmic"; Description: "OpenFX G'MIC"; Types: full
Name: "sgl"; Description: "OpenGL Software Renderer (FOR LEGACY HARDWARE ONLY)"

[Files]
Source: "{src}\bin\*"; DestDir: "{app}\bin\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\docs\*"; DestDir: "{app}\docs\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\lib\*"; DestDir: "{app}\lib\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external

Source: "{src}\Plugins\PySide\*"; DestDir: "{app}\Plugins\PySide\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\PyPlugs\*"; DestDir: "{app}\Plugins\PyPlugs\"; Components: pyplugs; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\Arena.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\Arena.ofx.bundle\"; Components: arena; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\CImg.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\CImg.ofx.bundle\"; Components: cimg; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\GMIC.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\GMIC.ofx.bundle\"; Components: gmic; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\IO.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\IO.ofx.bundle\"; Components: io; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\Misc.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\Misc.ofx.bundle\"; Components: misc; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Plugins\OFX\Natron\Shadertoy.ofx.bundle\*"; DestDir: "{app}\Plugins\OFX\Natron\Shadertoy.ofx.bundle\"; Components: stoy; Flags: ignoreversion recursesubdirs createallsubdirs external

Source: "{src}\Resources\docs\*"; DestDir: "{app}\Resources\docs\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Resources\etc\*"; DestDir: "{app}\Resources\etc\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Resources\OpenColorIO-Configs\*"; DestDir: "{app}\Resources\OpenColorIO-Configs\"; Components: ocio; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Resources\pixmaps\*"; DestDir: "{app}\Resources\pixmaps\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Resources\poppler\*"; DestDir: "{app}\Resources\poppler\"; Components: arena; Flags: ignoreversion recursesubdirs createallsubdirs external
Source: "{src}\Resources\stylesheets\*"; DestDir: "{app}\Resources\stylesheets\"; Components: natron; Flags: ignoreversion recursesubdirs createallsubdirs external

Source: "{src}\bin\mesa\opengl32.dll"; DestDir: "{app}\bin\"; Components: sgl; Flags: ignoreversion external

[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Resources\pixmaps\natronProjectIcon_windows.ico,0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\{#MyAppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: "{#MyAppAssocExt}"; ValueData: ""

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\{#MyAppName}"; Filename: "{app}\bin\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon

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

41 changes: 41 additions & 0 deletions tools/MINGW-packages/mingw-w64-natron-setup/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainer: [email protected]

#
# Inno Setup must be installed prior to build
# Binary: https://files.jrsoftware.org/is/6/innosetup-6.1.2.exe
# Source: https://github.com/jrsoftware/issrc/archive/refs/tags/is-6_1_2.zip
#

_realname=natron-setup
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.0
pkgrel=3
pkgdesc="Natron Inno Setup"
arch=('any')
url="https://github.com/jrsoftware/issrc"
license=('custom:Modified BSD license')
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
options=('!strip')
source=('LICENSE.txt'
'Natron.iss'
'natronIcon256_windows.ico'
'WizardImageFile.bmp'
'WizardSmallImageFile.bmp'
)
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)

build() {
cd "${srcdir}"
/c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe Natron.iss
}

package() {
cp "${srcdir}/output/Setup.exe" "${pkgdir}/"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 11 additions & 6 deletions tools/jenkins/build-Windows-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,8 @@ ZIP_INSTALL_DIR="compressed_no_installer"

mkdir -p "${BUILD_ARCHIVE_DIRECTORY}/$BUNDLED_INSTALL_DIR"


if [ "$WITH_ONLINE_INSTALLER" = "1" ]; then
# Online installer (legacy)
if [ "$WITH_ONLINE_INSTALLER" = "1" ] && [ ! -f "/Setup.exe" ]; then
mkdir -p "${BUILD_ARCHIVE_DIRECTORY}/$ONLINE_INSTALL_DIR"
mkdir -p "${BUILD_ARCHIVE_DIRECTORY}/$ONLINE_INSTALL_DIR/packages"

Expand All @@ -517,13 +517,18 @@ if [ "$WITH_ONLINE_INSTALLER" = "1" ]; then
"$SDK_HOME/bin/binarycreator" -v -n -p "$INSTALLER_PATH/packages" -c "$INSTALLER_PATH/config/config.xml" "${BUILD_ARCHIVE_DIRECTORY}/$ONLINE_INSTALL_DIR/${INSTALLER_BASENAME}-online.exe"
fi

# Offline installer
"$SDK_HOME/bin/binarycreator" -v -f -p "$INSTALLER_PATH/packages" -c "$INSTALLER_PATH/config/config.xml" -i "${PACKAGES}" "${BUILD_ARCHIVE_DIRECTORY}/$BUNDLED_INSTALL_DIR/${INSTALLER_BASENAME}.exe"
# Offline installer (legacy)
if [ ! -f "/Setup.exe" ]; then
"$SDK_HOME/bin/binarycreator" -v -f -p "$INSTALLER_PATH/packages" -c "$INSTALLER_PATH/config/config.xml" -i "${PACKAGES}" "${BUILD_ARCHIVE_DIRECTORY}/$BUNDLED_INSTALL_DIR/${INSTALLER_BASENAME}.exe"
fi

# Portable zip (+ setup if found)
if [ "$DISABLE_PORTABLE_ARCHIVE" != "1" ]; then
mkdir -p "${BUILD_ARCHIVE_DIRECTORY}/$ZIP_INSTALL_DIR"
# Portable zip
(cd "${TMP_BINARIES_PATH}" && zip -q -r "${PORTABLE_DIRNAME}.zip" "${PORTABLE_DIRNAME}"; mv "${PORTABLE_DIRNAME}.zip" "${BUILD_ARCHIVE_DIRECTORY}/$ZIP_INSTALL_DIR/${PORTABLE_DIRNAME}.zip")
if [ -f "/Setup.exe" ]; then
cp -a /Setup.exe "${TMP_BINARIES_PATH}/${PORTABLE_DIRNAME}/"
fi
(cd "${TMP_BINARIES_PATH}" && zip -9 -q -r "${PORTABLE_DIRNAME}.zip" "${PORTABLE_DIRNAME}"; mv "${PORTABLE_DIRNAME}.zip" "${BUILD_ARCHIVE_DIRECTORY}/$ZIP_INSTALL_DIR/${PORTABLE_DIRNAME}.zip")
fi

echo "*** Artifacts:"
Expand Down
6 changes: 6 additions & 0 deletions tools/jenkins/launchBuildMain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,12 @@ if [ "$COMPILE_TYPE" = "debug" ]; then
INSTALLER_BASENAME="${INSTALLER_BASENAME}-debug"
fi
PORTABLE_DIRNAME="${INSTALLER_BASENAME}-no-installer"

if [ "$PKGOS" = "Windows" ] && [ -f "/Setup.exe" ]; then
# Windows portable has installer, don't append "no-installer"
PORTABLE_DIRNAME="$INSTALLER_BASENAME"
fi

setBuildOption "INSTALLER_BASENAME" "$INSTALLER_BASENAME"
setBuildOption "PORTABLE_DIRNAME" "$PORTABLE_DIRNAME"
setBuildOption "TMP_PORTABLE_DIR" "${TMP_BINARIES_PATH}/$PORTABLE_DIRNAME"
Expand Down

0 comments on commit f5412fb

Please sign in to comment.