-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edc0815
commit 347b3f9
Showing
5 changed files
with
139 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# test | ||
name: Publish package to GitHub Packages | ||
on: | ||
push: | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Build | ||
run: bash package-linux_x64.sh | ||
- name: Upload math result for job Linux | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-lib | ||
path: release/* | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- uses: microsoft/[email protected] | ||
- name: Build | ||
run: bash package-windows_x86_64.sh | ||
- name: Upload math result for job Windows | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: win-lib | ||
path: release/* | ||
macos-arm: | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Build | ||
run: bash package-macos.sh | ||
- name: Upload math result for job Mac | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mac-lib-arm | ||
path: release/* | ||
macos: | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Build | ||
run: bash package-macos.sh | ||
- name: Upload math result for job Mac | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mac-lib-x86 | ||
path: release/* | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#https://cdn.azul.com/zulu/bin/zulu17.50.19-ca-fx-jdk17.0.11-macosx_x64.tar.gz | ||
NAME=BowlerLauncher | ||
VERSION=1.0.1 | ||
MAIN=com.commonwealthrobotics.HatRackMain | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
ARCH=x86_64 | ||
JVM=zulu17.50.19-ca-fx-jdk17.0.11-macosx_x64 | ||
if [[ $(uname -m) == 'arm64' ]]; then | ||
ARCH=arm46 | ||
echo "M1 Mac detected https://cdn.azul.com/zulu/bin/zulu17.50.19-ca-fx-jdk17.0.11-macosx_aarch64.tar.gz" | ||
JVM=zulu17.50.19-ca-fx-jdk17.0.11-macosx_aarch64 | ||
else | ||
echo "x86 Mac detected https://cdn.azul.com/zulu/bin/zulu17.50.19-ca-fx-jdk17.0.11-macosx_x64.tar.gz" | ||
|
||
fi | ||
set -e | ||
ZIP=$JVM.tar.gz | ||
export JAVA_HOME=$HOME/bin/java17/ | ||
if test -d $JAVA_HOME/$JVM/; then | ||
echo "$JAVA_HOME exists." | ||
else | ||
rm -rf $JAVA_HOME | ||
mkdir -p $JAVA_HOME | ||
curl https://cdn.azul.com/zulu/bin/$ZIP -o $ZIP | ||
tar -xvzf $ZIP -C $JAVA_HOME | ||
mv $JAVA_HOME/$JVM/* $JAVA_HOME/ | ||
fi | ||
|
||
./gradlew jar | ||
|
||
|
||
ICON=$NAME.png | ||
cp BowlerStudioIcon.png $ICON | ||
rm -rf $SCRIPT_DIR/$NAME | ||
rm -rf $SCRIPT_DIR/$NAME.AppDir | ||
BUILDDIR=lib/build/libs/ | ||
TARGETJAR=lib.jar | ||
rm -rf *.dmg | ||
echo "Building DMG..." | ||
MACIMAGE=MacIconSourceImage.png | ||
mkdir $NAME.iconset | ||
sips -z 16 16 $MACIMAGE --out $NAME.iconset/icon_16x16.png | ||
sips -z 32 32 $MACIMAGE --out $NAME.iconset/[email protected] | ||
sips -z 32 32 $MACIMAGE --out $NAME.iconset/icon_32x32.png | ||
sips -z 64 64 $MACIMAGE --out $NAME.iconset/[email protected] | ||
sips -z 128 128 $MACIMAGE --out $NAME.iconset/icon_128x128.png | ||
sips -z 256 256 $MACIMAGE --out $NAME.iconset/[email protected] | ||
sips -z 256 256 $MACIMAGE --out $NAME.iconset/icon_256x256.png | ||
sips -z 512 512 $MACIMAGE --out $NAME.iconset/[email protected] | ||
sips -z 512 512 $MACIMAGE --out $NAME.iconset/icon_512x512.png | ||
cp $MACIMAGE $NAME.iconset/[email protected] | ||
iconutil -c icns $NAME.iconset | ||
rm -R $NAME.iconset | ||
|
||
$JAVA_HOME/bin/jpackage --input $BUILDDIR \ | ||
--name $NAME \ | ||
--main-jar $TARGETJAR \ | ||
--main-class $MAIN \ | ||
--type dmg \ | ||
--copyright "Creative Commons" \ | ||
--vendor "Common Wealth Robotics" \ | ||
--icon $NAME.icns \ | ||
--app-version "$VERSION" \ | ||
--java-options '--enable-preview' | ||
ls -al | ||
rm -rf release | ||
mkdir release | ||
mv *.dmg release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters