Skip to content

Commit

Permalink
Mac installer
Browse files Browse the repository at this point in the history
  • Loading branch information
iazarny committed Mar 2, 2024
1 parent 0e74d85 commit 1ae6c71
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 63 deletions.
21 changes: 17 additions & 4 deletions ge-mac-installer.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
#!/bin/sh
mkdir app
mv target/gitember-2.5-spring-boot.jar app

jpackage --verbose --input shade/ --name Gitember2 --vendor "Igor Azarny" --main-jar gitember.jar --app-version 2.5 --main-class com.az.gitember.GitemberLauncher --type "dmg" --icon src/main/resources/icon/gitember.icns
#jpackage --verbose --input build --name i2Brain --main-jar i2brain.jar --app-version 3.3.2 --type app-image --runtime-image ./smalljre
mv Gitember2-1.0.dmg Gitember2.dmg
jpackage \
--input app/ --name Gitember2 --vendor "Igor Azarny" \
--main-jar gitember-2.5-spring-boot.jar --app-version 2.5 \
--icon src/main/resources/icon/gitember.icns \
--type "dmg" \
--mac-sign \
--mac-package-signing-prefix "com.az.gitember" \
--mac-signing-key-user-name "Igor Azarny (3........8)"

mv Gitember2-2.5.dmg Gitember2.5.dmg

#export PATH="/Users/ec2-user/jdk-16.0.1.jdk/Contents/Home/bin:/Users/ec2-user/apache-maven-3.8.1/bin:$PATH"
# .dmg signing is required for notarization.
codesign --timestamp -s "3H6449CVS8" "Gitember2.5.dmg"

####### notarization #######
xcrun notarytool submit "Gitember2.5.dmg" --wait --keychain-profile "Igor Azarny"
xcrun stapler staple "Gitember2.5.dmg"
spctl -a -t open --context context:primary-signature -vv "Gitember2.5.dmg"

73 changes: 14 additions & 59 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

<groupId>com.az</groupId>
<artifactId>gitember</artifactId>
<version>2.0-SNAPSHOT</version>
<version>2.5</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<jgit.version>6.8.0.202311291450-r</jgit.version>
<apache.tika.version>1.28.5</apache.tika.version>
<slf4j.version>2.0.11</slf4j.version>

<javafx.version>20.0.2</javafx.version>
</properties>

Expand Down Expand Up @@ -245,6 +244,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.2.3</version>
</dependency>

</dependencies>
<build>
Expand Down Expand Up @@ -273,75 +277,26 @@
<jlinkZipName>gitember2</jlinkZipName> -->
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
<goal>repackage</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>project-classifier</shadedClassifierName>
<outputFile>shade\${project.artifactId}.jar</outputFile>
<transformers>
<transformer implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.az.gitember.GitemberLauncher</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<classifier>spring-boot</classifier>
<mainClass>
com.az.gitember.GitemberLauncher
</mainClass>
</configuration>
</execution>
</executions>
</plugin>


<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.az.gitember.App</mainClass>
</transformer>
</transformers>
<filters>
<filter>
&lt;!&ndash; filter out signature files from signed dependencies, else repackaging fails with security ex &ndash;&gt;
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>-->

</plugins>
</build>
</project>

0 comments on commit 1ae6c71

Please sign in to comment.