Skip to content

Commit

Permalink
Merge pull request #536 from saalfeldlab/fix/ubuntuInstaller
Browse files Browse the repository at this point in the history
fix: postinst, version
ci: fix mac installer
  • Loading branch information
cmhulbert authored May 31, 2024
2 parents b59097d + 9c28a3f commit 2a6fca3
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
if: ${{ env.MACOS_CERTIFICATE == null && (matrix.os == 'macos-latest' || matrix.os == 'macos-14') }}
run: mvn -B clean install -DskipTests -Pbuild-installer "-Dmatrix.os=${{ matrix.os }}" --file pom.xml
run: mvn -B clean install -DskipTests -Pbuild-installer -Djavafx.platform=mac "-Dmatrix.os=${{ matrix.os }}" --file pom.xml

- name: Upload Installers
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

<main-class>org.janelia.saalfeldlab.paintera.Paintera</main-class>
<app.name>Paintera</app.name>
<app.version>1.2.3</app.version>
<jvm.modules>javafx.base,javafx.controls,javafx.fxml,javafx.media,javafx.swing,javafx.web,javafx.graphics,java.naming,java.management,java.sql</jvm.modules>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<windows.upgrade.uuid>f918b6f9-8685-4b50-9fbd-9be7a1209249</windows.upgrade.uuid>
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/linux/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: paintera
Version: 1.0
Version: 1.2.3
Section: misc
Maintainer: Caleb Hulbert <[email protected]>
Priority: optional
Expand Down
1 change: 1 addition & 0 deletions src/packaging/linux/jpackage.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--verbose
--name ${app.name}
--app-version ${app.version}
--icon "${project.basedir}/img/icons/icon-draft.png"
--dest "${project.build.directory}/installer-${matrix.os}"
--main-class ${main-class}
Expand Down
41 changes: 40 additions & 1 deletion src/packaging/linux/postinst
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
ln -s /opt/paintera-convert/bin/paintera /usr/local/bin/paintera
#!/bin/sh
# postinst script for APPLICATION_PACKAGE
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

package_type=deb
LAUNCHER_AS_SERVICE_SCRIPTS

case "$1" in
configure)
DESKTOP_COMMANDS_INSTALL
ln -s /opt/paintera/bin/paintera /usr/local/bin/paintera
LAUNCHER_AS_SERVICE_COMMANDS_INSTALL
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

exit 0

34 changes: 33 additions & 1 deletion src/packaging/linux/postrm
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
rm /usr/local/bin/paintera
#!/bin/sh
# postrm script for APPLICATION_PACKAGE
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
rm /usr/local/bin/paintera
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

exit 0

1 change: 1 addition & 0 deletions src/packaging/osx/jpackage.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--name ${app.name}
--app-version ${app.version}
--icon "${project.basedir}/img/icons/icon-draft.icns"
--dest "${project.build.directory}/installer-${matrix.os}"
--main-class ${main-class}
Expand Down
1 change: 1 addition & 0 deletions src/packaging/windows/jpackage.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--type msi
--name ${app.name}
--app-version ${app.version}
--win-menu
--win-menu-group ${windows.vendor}
--vendor ${windows.vendor}
Expand Down

0 comments on commit 2a6fca3

Please sign in to comment.