diff options
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/pom.xml | 27 | ||||
-rw-r--r-- | pdf-over-gui/src/main/resources/installer-mac/background.png | bin | 0 -> 2389 bytes | |||
-rw-r--r-- | pdf-over-gui/src/main/resources/installer-mac/signscript.sh | 62 |
3 files changed, 89 insertions, 0 deletions
diff --git a/pdf-over-gui/pom.xml b/pdf-over-gui/pom.xml index 5f017bc5..591b6b2b 100644 --- a/pdf-over-gui/pom.xml +++ b/pdf-over-gui/pom.xml @@ -463,6 +463,7 @@ <resource> <directory>src/main/resources</directory> <excludes> + <exclude>installer-mac/*</exclude> <exclude>izpack-linux/*</exclude> <exclude>scripts/*</exclude> <exclude>ReadMe.txt</exclude> @@ -649,6 +650,32 @@ <pdfover-build.os-name>mac</pdfover-build.os-name> <pdfover-build.output-filename>pdf-over_mac-x86_64.zip</pdfover-build.output-filename> </properties> + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.4.2</version> + <executions> + <execution> + <id>copy-mac-resources</id> + <phase>validate</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <encoding>UTF-8</encoding> + <outputDirectory>${pdfover-build.staging-dir}</outputDirectory> + <resources> + <resource> + <directory>src/main/resources/installer-mac</directory> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </profile> <profile> <id>mac-aarch64</id> diff --git a/pdf-over-gui/src/main/resources/installer-mac/background.png b/pdf-over-gui/src/main/resources/installer-mac/background.png Binary files differnew file mode 100644 index 00000000..0d6edaf3 --- /dev/null +++ b/pdf-over-gui/src/main/resources/installer-mac/background.png diff --git a/pdf-over-gui/src/main/resources/installer-mac/signscript.sh b/pdf-over-gui/src/main/resources/installer-mac/signscript.sh new file mode 100644 index 00000000..f9ee49f6 --- /dev/null +++ b/pdf-over-gui/src/main/resources/installer-mac/signscript.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +# from: https://developer.apple.com/forums/thread/130855 +# Fail if any command fails. + +set -e + +# Check and unpack the arguments. + +if [ $# -ne 1 ] +then + echo "usage: package-archive.sh /path/to.xcarchive" > /dev/stderr + exit 1 +fi +ARCHIVE="$1" + +# Establish a work directory, create a disk image root directory within +# that, and then copy the app there. +# +# Note we use `-R`, not `-r`, to preserve symlinks. + +WORKDIR="pdf-over-`date '+%Y-%m-%d_%H.%M.%S'`" +DMGROOT="${WORKDIR}/PDF-Over" +APP="${WORKDIR}/PDF-Over/PDF-Over.app" +DMG="${WORKDIR}/pdf-over.dmg" + +mkdir -p "${DMGROOT}" +cp -R "${ARCHIVE}/PDF-Over.app" "${DMGROOT}/" + +# When you use `-f` to replace a signature, `codesign` prints `replacing +# existing signature`. There's no option to suppress that. The message +# goes to `stderr` so you don't want to redirect it to `/dev/null` because +# there might be other interesting stuff logged to `stderr`. One way to +# prevent it is to remove the signature beforehand, as shown by the +# following lines. It does slow things down a bunch though, so I've made +# it easy to disable them. + +if true +then + codesign --remove-signature "${APP}/Contents/MacOS/PDF-Over" + codesign --remove-signature "${APP}" +fi + + + +codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f -vvvv --timestamp -o runtime "${APP}/Contents/MacOS/PDF-Over" +#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre6.libosxj2pcsc.dylib" +#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre8.libosxj2pcsc.dylib" +#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre7.libosxj2pcsc.dylib" +codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}" + + +# Create a disk image from our disk image root directory. + +hdiutil create -srcFolder "${DMGROOT}" -quiet -o "${DMG}" + +# Sign that. + +codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -vvvv --timestamp -i at.egiz.PDF-Over "${DMG}" + +echo "finished signing script!" +echo "${DMG}" |