Skip to content

Commit

Permalink
Merge branch 'develop' into 'ms6'
Browse files Browse the repository at this point in the history
breaking: New installers using install4j

See merge request Griefed/ServerPackCreator!582
  • Loading branch information
Griefed committed Feb 25, 2024
2 parents 8dd53f8 + 7f2e307 commit f69ddc5
Show file tree
Hide file tree
Showing 97 changed files with 8,377 additions and 1,611 deletions.
338 changes: 29 additions & 309 deletions .github/workflows/github-prerelease.yml

Large diffs are not rendered by default.

337 changes: 29 additions & 308 deletions .github/workflows/github_release.yml

Large diffs are not rendered by default.

248 changes: 14 additions & 234 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
jar:
jar-and-media:
strategy:
matrix:
# and run on both Linux and Windows
Expand Down Expand Up @@ -36,16 +36,22 @@ jobs:
with:
gradle-version: wrapper

- uses: luangong/setup-install4j@v1
with:
version: 10.0.7
license: ${{ secrets.INSTALL4J_LICENSE }}

- name: Build with Gradle
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} build --info --full-stacktrace
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} build media --info --full-stacktrace
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: build-artifacts-${{ matrix.os }}
name: jar-and-media-${{ matrix.os }}
path: |
media
build
buildSrc/build
serverpackcreator-api/build
Expand All @@ -57,233 +63,7 @@ jobs:
serverpackcreator-plugin-example/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

mac-01:
runs-on: macos-latest
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0

# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper

- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage --info --full-stacktrace
- name: Rename
run: mv serverpackcreator-app/build/dist/* serverpackcreator-app/build/dist/ServerPackCreator-Installer-MacOS-dev.pkg

# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: mac-01-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

windows-01:
runs-on: windows-latest
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0

# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper

- name: Prepare wix-toolset
if: matrix.os == 'windows-latest'
run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage --info --full-stacktrace
- name: Rename
run: mv serverpackcreator-app/build/dist/* serverpackcreator-app/build/dist/ServerPackCreator-Installer-Windows-dev.msi

# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-01-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ig

windows-02:
runs-on: windows-latest
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0

# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
id: java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper

- name: Prepare wix-toolset
if: matrix.os == 'windows-latest'
run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Prepare
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar --info --full-stacktrace
- name: Build Image
run: |
jpackage `
--app-version "6.6.6" `
--copyright "Copyright (C) 2024 Griefed" `
--description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." `
--dest "serverpackcreator-app\build\dist" `
--icon "serverpackcreator-app\jpackagerResources\app.ico" `
--input "serverpackcreator-app\build\jars" `
--java-options "-Dfile.encoding=UTF-8" `
--java-options "-Dlog4j2.formatMsgNoLookups=true" `
--main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt `
--main-jar serverpackcreator-app-dev.jar `
--name ServerPackCreator `
--resource-dir "serverpackcreator-app\jpackagerResources" `
--runtime-image "${{ steps.java.outputs.path }}" `
--temp "serverpackcreator-app\build\tmp\jpackager" `
--type "app-image" `
--vendor "griefed.de" `
--verbose
- name: List
if: ${{ always() }}
run: dir serverpackcreator-app\build\dist

- name: Archive
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: serverpackcreator-app/build/dist
path: 'ServerPackCreator'
filename: 'ServerPackCreator-Portable-Windows.zip'

- name: List
run: dir serverpackcreator-app\build\dist

# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-02-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-Portable-Windows.zip
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

ubuntu-01:
runs-on: ubuntu-latest
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0

# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper

- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage --info --full-stacktrace
- name: Rename
run: mv serverpackcreator-app/build/dist/* serverpackcreator-app/build/dist/ServerPackCreator-Installer-Ubuntu-dev-amd64.deb

# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-01-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

ubuntu-02:
appimage:
runs-on: ubuntu-latest
steps:
# GET THE LATEST CODE
Expand Down Expand Up @@ -315,7 +95,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.branch-name.outputs.current_branch }} generateLicenseReport --info --full-stacktrace
./gradlew build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar --info --full-stacktrace
./gradlew build --info --full-stacktrace
- name: Build Image
run: |
Expand All @@ -325,10 +105,10 @@ jobs:
--description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." \
--dest serverpackcreator-app/build/dist \
--icon serverpackcreator-app/jpackagerResources/app.png \
--input serverpackcreator-app/build/jars \
--input serverpackcreator-app/build/libs \
--java-options "-Dfile.encoding=UTF-8" \
--java-options "-Dlog4j2.formatMsgNoLookups=true" \
--main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt \
--main-class org.springframework.boot.loader.launch.JarLauncher \
--main-jar serverpackcreator-app-dev.jar \
--name ServerPackCreator \
--resource-dir serverpackcreator-app/jpackagerResources \
Expand Down Expand Up @@ -380,7 +160,7 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-02-artifacts
name: appimage
path: |
serverpackcreator-app/build/dist/ServerPackCreator-Portable-Linux-x86_64.AppImage
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,4 @@ serverpackcreator-api/src/jvmTest/resources/fabric_tests_server_pack.zip
serverpackcreator-api/src/jvmTest/resources/forge_tests_server_pack.zip
serverpackcreator-api/src/jvmTest/resources/quilt_tests_server_pack.zip

/media/
46 changes: 0 additions & 46 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -456,49 +456,3 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.

<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice

That's all there is to it!
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,15 @@ Huge shoutout and thank you!**

## ✨ Thanks to all of my Supporters and Sponsors ✨

### Sponsors

<!-- sponsors --><a href="https://github.com/kreezxil"><img src="https://github.com/kreezxil.png" width="60px" alt="" /></a><!-- sponsors -->

### Contributors

<!-- contributors -->
<!-- contributors end-->

---

## 7. Libraries and Licenses
Expand Down
Loading

0 comments on commit f69ddc5

Please sign in to comment.