rodyager / RWTS-PDFwriter

An OSX print to pdf-file printer driver
GNU General Public License v2.0
823 stars 78 forks source link

Use `open -b au.rwts.PDFWriter-Utility` #27

Closed kbernhagen closed 1 year ago

kbernhagen commented 1 year ago

This is theoretical, because I couldn't get buildscript.sh to run. I recommend you fully test before merging.

Added a common line to bail if command line install. Used open with bundle id. This will not block until Utility exits, and works if Utility has been relocated. Using sudo instead of su.

After changing signing in Xcode, I tried

xcodebuild -alltargets
./build/buildscript.sh -s "$SIGN_ID_INSTALLER" -n "$NOTARIZE_PROFILE"

Got

#### making directory structure
#### populating directory structure
cp: pdfwriter: No such file or directory
cp: PDFWriter Utility.app: No such file or directory
chmod: pkgroot/Library/Printers/RWTS/PDFwriter/pdfwriter: No such file or directory
#### building installer package
#### building distribution file
#### building product
./build/buildscript.sh: line 77: [: too many arguments
#### cleaning up
rm: PDFWriter Utility.app: No such file or directory
rm: pdfwriter: No such file or directory

A top-level Makefile might be handy.

kbernhagen commented 1 year ago

Note that a typical signing string will have spaces and possibly special characters.

kbernhagen commented 1 year ago

You need double quotes around $SIGNSTRING and $NOTARYSTRING.

kbernhagen commented 1 year ago

Added quotes.

I think you're also missing some signing options required for successful notarization. I will add them if you hold this PR.

kbernhagen commented 1 year ago

Nevermind. --timestamp is default for a Developer ID identity.

I'm assuming Xcode signs binaries with --timestamp --options runtime, which is required for notarization.

I did replace some tabs with 4 spaces.

rodyager commented 1 year ago

Thanks.