Skip to content

Commit

Permalink
add exit on error to install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Sep 2, 2024
1 parent eab3c18 commit 9d1a33d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
1 change: 1 addition & 0 deletions release/linux/build_installer_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e -u

# Build the installer for Linux.
# This script must be run from the root of the repository.
Expand Down
2 changes: 1 addition & 1 deletion release/linux/build_package_linux.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -u -e
set -e -u

# Build the install package for Linux.
# This script must be run from the root of the repository after running build_installer_linux.sh
Expand Down
2 changes: 1 addition & 1 deletion release/macos/build_installer_macos.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -e -u

# Build the installer for MacOS.
# This script must be run from the root of the repository.


rm -rf dist
rm -rf build

Expand Down
18 changes: 10 additions & 8 deletions release/macos/build_package_macos.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -u -e
set -e -u

# Build the install package for MacOS.
# This script must be run from the root of the repository after running build_installer_macos.sh
Expand All @@ -12,13 +12,15 @@ rm -rf ${BUILD_NAME}.pkg
# cp ../../peptdeep/data/*.fasta dist/peptdeep/data

# Wrapping the pyinstaller folder in a .pkg package
mkdir -p dist/${PACKAGE_NAME}/Contents/Resources
cp release/logos/alpha_logo.icns dist/${PACKAGE_NAME}/Contents/Resources
mv dist/peptdeep_gui dist/${PACKAGE_NAME}/Contents/MacOS
cp release/macos/Info.plist dist/${PACKAGE_NAME}/Contents
cp release/macos/peptdeep_terminal dist/${PACKAGE_NAME}/Contents/MacOS
cp LICENSE.txt dist/${PACKAGE_NAME}/Contents/Resources/LICENSE.txt
cp release/logos/alpha_logo.png dist/${PACKAGE_NAME}/Contents/Resources/alpha_logo.png
CONTENTS_FOLDER=dist/${PACKAGE_NAME}/Contents

mkdir -p ${CONTENTS_FOLDER}/Resources
cp release/logos/alpha_logo.icns ${CONTENTS_FOLDER}/Resources
mv dist/peptdeep_gui ${CONTENTS_FOLDER}/MacOS
cp release/macos/Info.plist ${CONTENTS_FOLDER}
cp release/macos/peptdeep_terminal ${CONTENTS_FOLDER}/MacOS
cp LICENSE.txt ${CONTENTS_FOLDER}/Resources/LICENSE.txt
cp release/logos/alpha_logo.png ${CONTENTS_FOLDER}/Resources/alpha_logo.png
chmod 777 release/macos/scripts/*

pkgbuild --root dist/${PACKAGE_NAME} --identifier de.mpg.biochem.${PACKAGE_NAME}.app --version 1.2.1 --install-location /Applications/${PACKAGE_NAME}.app --scripts release/macos/scripts ${PACKAGE_NAME}.pkg
Expand Down
5 changes: 0 additions & 5 deletions release/windows/build_installer_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ pip install "dist/peptdeep-1.2.1-py3-none-any.whl[stable]"
# Creating the stand-alone pyinstaller folder
pip install pyinstaller
pyinstaller release/pyinstaller/peptdeep.spec -y

# for some reason, the installer builder expects the files here
mv dist/* release/windows/dist
mkdir release/windows/dist/peptdeep
mv release/windows/dist/peptdeep.exe release/windows/dist/peptdeep
6 changes: 6 additions & 0 deletions release/windows/build_package_windows.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Build the install package for Windows.
# This script must be run from the root of the repository after running build_installer_windows.ps1


# Apparently, ISCC uses the directory of the .iss input file as the working directory.
mv dist/* release/windows/dist
mkdir release/windows/dist/peptdeep
mv release/windows/dist/peptdeep.exe release/windows/dist/peptdeep

# Wrapping the pyinstaller folder in a .exe package
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" .\release\windows\peptdeep_innoinstaller.iss

0 comments on commit 9d1a33d

Please sign in to comment.