mbari-org / vars-gridview

VARS GridView is a tool for reviewing and correcting VARS localizations in bulk.
MIT License
2 stars 0 forks source link

Package VARS GridView #50

Closed kevinsbarnard closed 11 months ago

kevinsbarnard commented 1 year ago

It would be nice to have VARS GridView available as a standalone application. Potential solution: fman build system

hohonuuli commented 1 year ago

@kevinsbarnard It's likely you'll need to do code signing. If needed, contact Joe Gomez about getting added to MBARI's Apple Development team so you can get a signing certificate. See also https://developer.apple.com/developer-id/

kevinsbarnard commented 11 months ago

Moving forward with PyInstaller. Currently setting up application build spec with relevant metadata.

So far, I've been able to get gridview built as either a single-file and single-folder windowed app on Linux and macOS. Looking into code signing and packaging into a DMG.

kevinsbarnard commented 11 months ago

Resource for multi-OS PyInstaller build a la GitHub Action: https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions/

kevinsbarnard commented 11 months ago

Relevant gist for macOS code signing: https://gist.github.com/txoof/0636835d3cc65245c6288b2374799c43

kevinsbarnard commented 11 months ago

Awaiting addition to Apple development team from Joe

kevinsbarnard commented 11 months ago

Added; I've generated a Developer ID Application signing certificate for this. Now experimenting with code signing via PyInstaller and testing on M1 Mac mini.

@hohonuuli I need to pick a bundle identifier for VARS GridView; I see that you're using org.mbari.vars.ui for VARS Annotation, so following from that, do you think org.mbari.vars.gridview is alright?

hohonuuli commented 11 months ago

do you think org.mbari.vars.gridview is alright?

👍🏻 That's a good choice

kevinsbarnard commented 11 months ago

I added a first bundled and signed (though not yet notarized) version of VARS GridView in v0.8.1. I'll set up notarization next, but looks like it's working!

hohonuuli commented 11 months ago

Just in case you need this, here's the steps for notarizing Mondrian:

export MAC_CODE_SIGNER="Developer ID Application: Monterey Bay Aquarium Research Institute (<our id>)"

cd mondrian

# Java build stuff
./gradlew clean jpackage --info

cd mondrian/build/jpackage/

# Zipped app is easy to notarize
ditto -c -k --keepParent "Mondrian.app" "Mondrian.zip"

# Do the notarize thing
xcrun notarytool submit "Mondrian.zip" \
    --wait \
    --team-id <our id> \
    --apple-id brian@mbari.org \
    --password "xxxxxxx"

# Staple the notarization onto the app
xcrun stapler staple "Mondrian.app"

rm "Mondrian.zip"

# Repacked for distribution
ditto -c -k --keepParent "Mondrian.app" "Mondrian-$(git describe --tags).zip"
kevinsbarnard commented 11 months ago

Thanks @hohonuuli! That reference worked great; I just set up a script to invoke the PyInstaller build (which performs deep code signing properly) and run the notarization + stapling. All seems to be working.