-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What's new: - Added the new `--custom-latest-buildid` and `--custom-latest-beta` arguments. - Added `--no-restore` and `--serial` arguments. - Redesigned tabbed pane (again) - The log window is now in the "Controls" tab - Detect selected arguments not included in FutureRestore binary and parse the errors - If a shell script is included in a FutureRestore download, prompt to run it - The GUI knows if it's a prerelease and will prompt for prerelease updates - Release versions will continue to only get full release updates - The "Current Task" text pane is now scrollable horizontally, in case the output is too long ### Bug fixes: - Fixed argument boxes not appearing immediately after enabling the corresponding checkbox. ### Known issues: - [x] ~~Resizing the window can cause flickering in sizing of elements in the "Files" and "Controls" tab.~~
- Loading branch information
1 parent
f6490be
commit 1f8c7a1
Showing
14 changed files
with
1,278 additions
and
639 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,317 @@ | ||
name: Build, Pack, Prerelease | ||
|
||
# Controls when the action will run. | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-create-draft: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Parse version | ||
id: parse-version | ||
run: | | ||
version=$(cat src/main/java/Main.java | grep -Po '(?<=futureRestoreGUIVersion = \").*(?=\")') | ||
echo $version > version.txt | ||
echo "::set-output name=version::$version" | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build Jar | ||
run: ./gradlew shadowJar | ||
# Upload this built jar | ||
- name: Upload final jar | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: fat-jar | ||
path: ./build/libs/FutureRestore GUI-1.0-all.jar | ||
|
||
- name: Upload version | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: version | ||
path: version.txt | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.parse-version.outputs.version }} | ||
release_name: FutureRestore GUI Prerelease — v${{ steps.parse-version.outputs.version }} | ||
draft: true | ||
prerelease: true | ||
|
||
- name: Create upload URL file | ||
env: | ||
UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }} | ||
run: echo $UPLOAD_URL > upload-url.txt | ||
- name: Upload release's upload URL | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: upload-url | ||
path: upload-url.txt | ||
|
||
- name: Create release ID file | ||
env: | ||
RELEASE_ID: ${{ steps.create_release.outputs.id }} | ||
run: echo $RELEASE_ID > release-id.txt | ||
- name: Upload release's upload URL | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-id | ||
path: release-id.txt | ||
|
||
ubuntu-pack: | ||
needs: [ build-and-create-draft ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
|
||
- name: Download final jar | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: fat-jar | ||
path: ./input | ||
|
||
- name: Download version | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: version | ||
- name: Output version | ||
id: output-version | ||
run: | | ||
version=$(tail version.txt) | ||
echo "::set-output name=version::$version" | ||
- name: Run JPackage deb | ||
env: | ||
RUN_NUMBER: ${{ github.run_number }} | ||
VERSION: ${{ steps.output-version.outputs.version }} | ||
run: jpackage --input ./input --name "FutureRestore GUI" --main-jar "FutureRestore GUI-1.0-all.jar" --main-class Main --type deb --icon ./.github/workflows/ubuntu/Icon-1024.png --copyright "© CoocooFroggy 2021" --verbose --name "FutureRestore GUI" --module-path ./.github/workflows/ubuntu/javafx-jmods-11.0.2 --add-modules javafx.swing,java.logging,java.sql,java.base,jdk.crypto.ec,java.naming --app-version $VERSION 2>&1 | tee /tmp/jpackoutput.txt | ||
- name: Grep DEB name | ||
id: grep_deb_name | ||
run: | | ||
deb_name=$(grep -Po '(?<=Package \(.deb\) saved to: ).*(?=.)' /tmp/jpackoutput.txt) | ||
echo "::set-output name=deb_filename::$deb_name" | ||
- name: Run JPackage app-image | ||
env: | ||
RUN_NUMBER: ${{ github.run_number }} | ||
VERSION: ${{ steps.output-version.outputs.version }} | ||
run: jpackage --input ./input --name "FutureRestore GUI" --main-jar "FutureRestore GUI-1.0-all.jar" --main-class Main --type app-image --icon ./.github/workflows/ubuntu/Icon-1024.png --copyright "© CoocooFroggy 2021" --verbose --name "FutureRestore GUI" --module-path ./.github/workflows/ubuntu/javafx-jmods-11.0.2 --add-modules javafx.swing,java.logging,java.sql,java.base,jdk.crypto.ec,java.naming --app-version $VERSION | ||
|
||
- name: Zip app-image and script | ||
run: | | ||
cp ./.github/workflows/ubuntu/"Run FutureRestore GUI.sh" ./ | ||
zip -r FutureRestore-GUI-Linux-Universal.zip "FutureRestore GUI" "Run FutureRestore GUI.sh" | ||
- name: Download URL to upload to | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: upload-url | ||
# Make it usable in Github actions | ||
- name: Set output for upload-url | ||
id: set_upload_url | ||
run: | | ||
upload_url=$(tail upload-url.txt) | ||
echo "::set-output name=upload-url::$upload_url" | ||
- name: Upload DEB to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.set_upload_url.outputs.upload-url }} | ||
asset_path: ${{ steps.grep_deb_name.outputs.deb_filename }} | ||
asset_name: FutureRestore-GUI-Debian-${{ steps.output-version.outputs.version }}.deb | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload app-image zip to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.set_upload_url.outputs.upload-url }} | ||
asset_path: FutureRestore-GUI-Linux-Universal.zip | ||
asset_name: FutureRestore-GUI-Linux-Universal-${{ steps.output-version.outputs.version }}.zip | ||
asset_content_type: application/zip | ||
|
||
|
||
|
||
|
||
macos-pack: | ||
needs: [ build-and-create-draft ] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
|
||
- name: Install create-dmg | ||
run: brew install create-dmg | ||
|
||
- name: Download final jar | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: fat-jar | ||
path: ./input | ||
|
||
- name: Download version | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: version | ||
- name: Output version | ||
id: output-version | ||
run: | | ||
version=$(tail version.txt) | ||
echo "::set-output name=version::$version" | ||
- name: Run JPackage and remove signature | ||
env: | ||
RUN_NUMBER: ${{ github.run_number}} | ||
VERSION: ${{ steps.output-version.outputs.version }} | ||
run: | | ||
jpackage --input ./input --main-jar "FutureRestore GUI-1.0-all.jar" --main-class Main --type app-image --icon ./.github/workflows/mac/FutureRestoreGUIIcons.icns --copyright "© CoocooFroggy 2021" --verbose --mac-package-identifier com.coocoofroggy.futurerestoregui --name "FutureRestore GUI" --module-path ./.github/workflows/mac/javafx-jmods-11.0.2 --add-modules javafx.swing,java.logging,java.sql,java.base,jdk.crypto.ec,java.naming --app-version $VERSION | ||
codesign --remove-signature FutureRestore\ GUI.app | ||
mkdir dmg-input | ||
mv "FutureRestore GUI.app" dmg-input | ||
- name: Create DMG from .app | ||
run: | | ||
create-dmg --hdiutil-quiet --volname "FutureRestore GUI Installer" --volicon ".github/workflows/mac/DMG Images/FRGUI-Drive-Icon.icns" --background ".github/workflows/mac/DMG Images/DMG-Background.png" --window-pos 200 120 --window-size 600 342 --icon-size 100 --icon "FutureRestore GUI.app" 80 200 --hide-extension "FutureRestore GUI.app" --app-drop-link 450 200 "FutureRestore GUI Installer.dmg" "dmg-input/" | ||
# - name: Zip .app | ||
# id: zip_app | ||
# run: zip -r FutureRestore-GUI-Mac.zip "FutureRestore GUI.app" | ||
|
||
- name: Download URL to upload to | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: upload-url | ||
# Make it usable in Github actions | ||
- name: Set output for upload-url | ||
id: set_upload_url | ||
run: | | ||
upload_url=$(tail upload-url.txt) | ||
echo "::set-output name=upload-url::$upload_url" | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.set_upload_url.outputs.upload-url }} | ||
asset_path: FutureRestore GUI Installer.dmg | ||
asset_name: FutureRestore-GUI-Mac-${{ steps.output-version.outputs.version }}.dmg | ||
asset_content_type: application/octet-stream | ||
|
||
windows-pack: | ||
needs: [ build-and-create-draft ] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
|
||
- name: Download final jar | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: fat-jar | ||
path: ./input | ||
|
||
- name: Download version | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: version | ||
- name: Output version | ||
id: output-version | ||
run: | | ||
FOR /F "tokens=*" %%g IN ('tail version.txt') do (SET version=%%g) | ||
echo ::set-output name=version::%version% | ||
shell: cmd | ||
|
||
- name: Run JPackage | ||
env: | ||
RUN_NUMBER: ${{ github.run_number }} | ||
VERSION: ${{ steps.output-version.outputs.version }} | ||
run: jpackage --input ./input --name "FutureRestore GUI" --main-jar "FutureRestore GUI-1.0-all.jar" --main-class Main --type msi --icon ./.github/workflows/windows/FRWindows.ico --copyright "© CoocooFroggy 2021" --vendor "CoocooFroggy" --verbose --name "FutureRestore GUI" --win-shortcut --win-menu --module-path ./.github/workflows/windows/javafx-jmods-11.0.2 --add-modules javafx.swing,java.logging,java.sql,java.base,jdk.crypto.ec,java.naming --app-version %VERSION% | ||
shell: cmd | ||
|
||
- name: Find MSI name | ||
id: grep_msi_name | ||
run: | | ||
FOR /F "tokens=*" %%g IN ('ls *.msi') do (SET msi_name=%%g) | ||
echo ::set-output name=msi_filename::%msi_name% | ||
# Otherwise it tries powershell | ||
shell: cmd | ||
|
||
- name: Download URL to upload to | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: upload-url | ||
# Make it usable in Github actions | ||
- name: Set output for upload-url | ||
id: set_upload_url | ||
run: | | ||
FOR /F "tokens=*" %%g IN ('tail upload-url.txt') do (SET upload_url=%%g) | ||
echo ::set-output name=upload-url::%upload_url% | ||
# Otherwise it tries powershell | ||
shell: cmd | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.set_upload_url.outputs.upload-url }} | ||
asset_path: ${{ steps.grep_msi_name.outputs.msi_filename }} | ||
asset_name: FutureRestore-GUI-Windows-${{ steps.output-version.outputs.version }}.msi | ||
asset_content_type: application/octet-stream | ||
|
||
# publish-release: | ||
# needs: [ ubuntu-pack, macos-pack, windows-pack ] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Download release ID | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: release-id | ||
# - name: Output release ID | ||
# id: output-release-id | ||
# run: | | ||
# release_id=$(tail release-id.txt) | ||
# echo "::set-output name=release-id::$release_id" | ||
|
||
# # - name: Publish release from draft | ||
# # uses: StuYarrow/publish-release@v1 | ||
# # env: | ||
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# # with: | ||
# # id: ${{ steps.output-release-id.outputs.release-id }} |
Oops, something went wrong.