Skip to content

Commit

Permalink
#331: abandoned approaches taken so far in favour of a signed AppleSc…
Browse files Browse the repository at this point in the history
…ript application
  • Loading branch information
dbenn committed Jun 1, 2023
1 parent 2b93464 commit 126598c
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 167 deletions.
69 changes: 48 additions & 21 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,26 @@

<target name="mac" depends="dist,javadoc" description="Create a standalone distribution archive for Mac">
<echo message="Creating Mac app and DMG" />

<!--
<copy todir="${dist_mac}/VStar.app">
<fileset dir="${install_files}/mac/VStar.app" />
</copy>

-->
<!--
<exec executable="chmod">
<arg line="ugo+x ${dist_mac}/VStar.app/Contents/MacOS/JavaAppLauncher"/>
</exec>

<copy file="${dist}/vstar.jar" todir="${dist_mac}/VStar.app/Contents/Java" />
-->
<!--
<copy file="VStar.sh" todir="${dist_mac}/VStar.app/Contents/MacOS" />
<copy todir="${dist_mac}/VStar.app/Contents/Java">
<mkdir dir="${dist_mac}/VStar.app/Contents/MacOS/dist"/>
<copy file="${dist}/vstar.jar" todir="${dist_mac}/VStar.app/Contents/MacOS/dist" />
<mkdir dir="${dist_mac}/VStar.app/Contents/MacOS/extlib"/>
<copy todir="${dist_mac}/VStar.app/Contents/MacOS/extlib">
<fileset dir="${extlib}">
<include name="commons-math-2.2.jar" />
<include name="javacsv.jar" />
Expand All @@ -226,54 +234,69 @@
<include name="vstaricon.png" />
</fileset>
</copy>

-->
<exec executable="./script/create_mac_app.sh" />

<echo message="codesign: signing" />
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/commons-math-2.2.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/commons-math-2.2.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/javacsv.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/javacsv.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/jfreechart-1.5.2.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/jfreechart-1.5.2.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/jmathplot.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/jmathplot.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/antlr-runtime-4.5.3.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/antlr-runtime-4.5.3.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/nico-camargo-toolbar-icons-4.0.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/nico-camargo-toolbar-icons-4.0.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/vstaricon.png" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/extlib/vstaricon.png" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Java/vstar.jar" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/dist/vstar.jar" />
</exec>
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app" />
</exec>

<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/MacOS/applet" />
</exec>

<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
<arg value="${dist_mac}/VStar.app/Contents/Resources/applet.icns" />
</exec>

<!--
<exec executable="codesign">
<arg value="-s" />
<arg value="${mac_identity}" />
Expand All @@ -283,10 +306,11 @@
<echo message="codesign: verifying" />
<exec executable="codesign">
<arg value="-d" />
<arg value="--verbose=4" />
<arg value="${dist_mac}/VStar.app" />
</exec>

-->

<echo message="spctl" />
<exec executable="spctl">
<arg value="--assess" />
Expand Down Expand Up @@ -464,11 +488,14 @@
<fileset dir="${javadoc}" includes="**/*" />
<fileset file="${javadoc}.zip" />
<fileset file="vstar*.zip" />
<fileset dir="VStar.app" includes="**/*" />
<dirset dir="VStar.app" />
<fileset file="*.dmg" />
<fileset file="*.exe" />
<fileset file="*.bat" />
<fileset file="*.dmg" />
<fileset file="*.exe" />
<fileset file="*.bat" />
</delete>
<!-- succeeeds where including VStar.app fileset or dirset above does not -->
<exec failifexecutionfails="no" failonerror="no" executable="rm">
<arg value="-rf" />
<arg value="VStar.app" />
</exec>
</target>
</project>
111 changes: 71 additions & 40 deletions install-files/mac/VStar.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -1,45 +1,76 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>JavaAppLauncher</string>
<key>CFBundleIconFile</key>
<string>vstaricon.icns</string>
<key>CFBundleIdentifier</key>
<string>org.aavso.tools.vstar.ui.VStar</string>
<key>CFBundleDisplayName</key>
<string>VStar</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VStar</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
<true/>
<key>JVMMainClassName</key>
<string>org.aavso.tools.vstar.ui.VStar</string>
<key>JVMOptions</key>
<array>
<string>-Xms800m</string>
<string>-Xmx8g</string>
<string>-splash:$APP_ROOT/Contents/Java/vstaricon.png</string>
</array>
<key>JVMArguments</key>
<array>
<string>$*</string>
</array>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.ScriptEditor.id.VStar</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VStar</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This script needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This script needs access to your music to run.</string>
<key>NSCalendarsUsageDescription</key>
<string>This script needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This script needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This script needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This script needs access to your HomeKit Home to run.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This script needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This script needs access to your photos to run.</string>
<key>NSRemindersUsageDescription</key>
<string>This script needs access to your reminders to run.</string>
<key>NSSiriUsageDescription</key>
<string>This script needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This script needs access to administer this system to run.</string>
<key>OSAAppletShowStartupScreen</key>
<false/>
<key>WindowState</key>
<dict>
<key>bundleDividerCollapsed</key>
<true/>
<key>bundlePositionOfDivider</key>
<real>0.0</real>
<key>dividerCollapsed</key>
<false/>
<key>eventLogLevel</key>
<integer>2</integer>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>443</real>
<key>savedFrame</key>
<string>76 161 700 678 0 0 1440 875 </string>
<key>selectedTab</key>
<string>description</string>
</dict>
</dict>
</plist>

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion install-files/mac/VStar.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
APPL????
APPLaplt
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{\rtf1\ansi\ansicpg1252\cocoartf2639
\cocoatextscaling0\cocoaplatform0{\fonttbl}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
}

This file was deleted.

Loading

0 comments on commit 126598c

Please sign in to comment.