Skip to content

Commit

Permalink
switch to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jan 21, 2025
1 parent 66823a7 commit 5d4a3ed
Show file tree
Hide file tree
Showing 26 changed files with 1,149 additions and 477 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
java-version: 11
distribution: temurin
cache: maven
cache: gradle
- uses: ilammy/msvc-dev-cmd@v1 # for nmake
with:
arch: x64
Expand All @@ -44,7 +44,7 @@ jobs:
cd detours/src
nmake
- name: build launcher
run: mvn verify -B -P $env:RUNELITE_PROFILE
run: ./gradlew build -P RUNELITE_BUILD=$env:RUNELITE_PROFILE --no-daemon
- name: x64 installer
shell: bash
run: ./build-win64.sh
Expand Down Expand Up @@ -75,17 +75,17 @@ jobs:
with:
java-version: 11
distribution: temurin
cache: maven
cache: gradle
- name: build
run: mvn verify -B -P $RUNELITE_PROFILE
run: ./gradlew build -P RUNELITE_BUILD=$RUNELITE_PROFILE
- name: linux-x64
run: ./build-linux-x86_64.sh
- name: linux-aarch64
run: ./build-linux-aarch64.sh
- uses: actions/upload-artifact@v4
with:
name: jar
path: target/RuneLite.jar
path: build/libs/RuneLite.jar
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
Expand All @@ -108,9 +108,9 @@ jobs:
with:
java-version: 11
distribution: temurin
cache: maven
cache: gradle
- name: build
run: mvn verify -B -P $RUNELITE_PROFILE
run: ./gradlew build -P RUNELITE_BUILD=$RUNELITE_PROFILE
- name: clone create-dmg
run: git clone https://github.com/runelite/create-dmg -b runelite-1.0
- name: build create-dmg
Expand Down Expand Up @@ -140,4 +140,4 @@ jobs:
name: macos-app
path: |
app.tar
if-no-files-found: error
if-no-files-found: error
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
target
nbactions.xml
nb-configuration.xml
/nbproject/
project.properties
*.iml
.idea/
.project
.settings/
.classpath
dependency-reduced-pom.xml
.gradle
build
.idea
RuneLiteSetup*.exe
6 changes: 3 additions & 3 deletions appimage/runelite.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=${project.build.finalName}
Comment=${project.description}
Exec=${project.build.finalName}
Name=${project.finalName}
Comment=${project.launcherDescription}
Exec=${project.finalName}
Icon=runelite
Terminal=false
Type=Application
Expand Down
9 changes: 6 additions & 3 deletions build-linux-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
sha256sum build/libs/RuneLite.jar

pushd native
cmake -DCMAKE_TOOLCHAIN_FILE=arm64-linux-gcc.cmake -B build-aarch64 .
cmake --build build-aarch64 --config Release
Expand All @@ -25,12 +28,12 @@ echo "$LINUX_AARCH64_CHKSUM linux_aarch64_jre.tar.gz" | sha256sum -c
# Note: Host umask may have checked out this directory with g/o permissions blank
chmod -R u=rwX,go=rX appimage
# ...ditto for the build process
chmod 644 target/RuneLite.jar
chmod 644 build/libs/RuneLite.jar

cp native/build-aarch64/src/RuneLite build/linux-aarch64/
cp target/RuneLite.jar build/linux-aarch64/
cp build/libs/RuneLite.jar build/linux-aarch64/
cp packr/linux-aarch64-config.json build/linux-aarch64/config.json
cp target/filtered-resources/runelite.desktop build/linux-aarch64/
cp build/filtered-resources/runelite.desktop build/linux-aarch64/
cp appimage/runelite.png build/linux-aarch64/

tar zxf linux_aarch64_jre.tar.gz
Expand Down
9 changes: 6 additions & 3 deletions build-linux-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
sha256sum build/libs/RuneLite.jar

pushd native
cmake -B build-x64 .
cmake --build build-x64 --config Release
Expand All @@ -25,12 +28,12 @@ echo "$LINUX_AMD64_CHKSUM linux64_jre.tar.gz" | sha256sum -c
# Note: Host umask may have checked out this directory with g/o permissions blank
chmod -R u=rwX,go=rX appimage
# ...ditto for the build process
chmod 644 target/RuneLite.jar
chmod 644 build/libs/RuneLite.jar

cp native/build-x64/src/RuneLite build/linux-x64/
cp target/RuneLite.jar build/linux-x64/
cp build/libs/RuneLite.jar build/linux-x64/
cp packr/linux-x64-config.json build/linux-x64/config.json
cp target/filtered-resources/runelite.desktop build/linux-x64/
cp build/filtered-resources/runelite.desktop build/linux-x64/
cp appimage/runelite.png build/linux-x64/

tar zxf linux64_jre.tar.gz
Expand Down
7 changes: 5 additions & 2 deletions build-osx-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
shasum -a 256 build/libs/RuneLite.jar

APPBASE="build/macos-aarch64/RuneLite.app"

build() {
Expand All @@ -24,9 +27,9 @@ build() {
mkdir -p $APPBASE/Contents/{MacOS,Resources}

cp native/build-aarch64/src/RuneLite $APPBASE/Contents/MacOS/
cp target/RuneLite.jar $APPBASE/Contents/Resources/
cp build/libs/RuneLite.jar $APPBASE/Contents/Resources/
cp packr/macos-aarch64-config.json $APPBASE/Contents/Resources/config.json
cp target/filtered-resources/Info.plist $APPBASE/Contents/
cp build/filtered-resources/Info.plist $APPBASE/Contents/
cp osx/runelite.icns $APPBASE/Contents/Resources/icons.icns

tar zxf mac_aarch64_jre.tar.gz
Expand Down
7 changes: 5 additions & 2 deletions build-osx-x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
shasum -a 256 build/libs/RuneLite.jar

APPBASE="build/macos-x64/RuneLite.app"

build() {
Expand All @@ -24,9 +27,9 @@ build() {
mkdir -p $APPBASE/Contents/{MacOS,Resources}

cp native/build-x64/src/RuneLite $APPBASE/Contents/MacOS/
cp target/RuneLite.jar $APPBASE/Contents/Resources/
cp build/libs/RuneLite.jar $APPBASE/Contents/Resources/
cp packr/macos-x64-config.json $APPBASE/Contents/Resources/config.json
cp target/filtered-resources/Info.plist $APPBASE/Contents/
cp build/filtered-resources/Info.plist $APPBASE/Contents/
cp osx/runelite.icns $APPBASE/Contents/Resources/icons.icns

tar zxf mac64_jre.tar.gz
Expand Down
7 changes: 5 additions & 2 deletions build-win-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
sha256sum build/libs/RuneLite.jar

cmake -S liblauncher -B liblauncher/buildaarch64 -A ARM64
cmake --build liblauncher/buildaarch64 --config Release

Expand Down Expand Up @@ -82,7 +85,7 @@ jlink \
--add-modules jdk.zipfs

cp native/build-aarch64/src/Release/RuneLite.exe build/win-aarch64/
cp target/RuneLite.jar build/win-aarch64/
cp build/libs/RuneLite.jar build/win-aarch64/
cp packr/win-aarch64-config.json build/win-aarch64/config.json
cp liblauncher/buildaarch64/Release/launcher_aarch64.dll build/win-aarch64/

Expand All @@ -92,4 +95,4 @@ sha256sum build/win-aarch64/RuneLite.exe
dumpbin //HEADERS build/win-aarch64/RuneLite.exe

# We use the filtered iss file
iscc target/filtered-resources/runeliteaarch64.iss
iscc build/filtered-resources/runeliteaarch64.iss
7 changes: 5 additions & 2 deletions build-win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
sha256sum build/libs/RuneLite.jar

cmake -S liblauncher -B liblauncher/build32 -A Win32
cmake --build liblauncher/build32 --config Release

Expand All @@ -22,7 +25,7 @@ fi
echo "$WIN32_CHKSUM win32_jre.zip" | sha256sum -c

cp native/build-x86/src/Release/RuneLite.exe build/win-x86/
cp target/RuneLite.jar build/win-x86/
cp build/libs/RuneLite.jar build/win-x86/
cp packr/win-x86-config.json build/win-x86/config.json
cp liblauncher/build32/Release/launcher_x86.dll build/win-x86/

Expand All @@ -35,4 +38,4 @@ sha256sum build/win-x86/RuneLite.exe
dumpbin //HEADERS build/win-x86/RuneLite.exe

# We use the filtered iss file
iscc target/filtered-resources/runelite32.iss
iscc build/filtered-resources/runelite32.iss
7 changes: 5 additions & 2 deletions build-win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

echo Launcher sha256sum
sha256sum build/libs/RuneLite.jar

cmake -S liblauncher -B liblauncher/build64 -A x64
cmake --build liblauncher/build64 --config Release

Expand All @@ -22,7 +25,7 @@ fi
echo "$WIN64_CHKSUM win64_jre.zip" | sha256sum -c

cp native/build-x64/src/Release/RuneLite.exe build/win-x64/
cp target/RuneLite.jar build/win-x64/
cp build/libs/RuneLite.jar build/win-x64/
cp packr/win-x64-config.json build/win-x64/config.json
cp liblauncher/build64/Release/launcher_amd64.dll build/win-x64/

Expand All @@ -35,4 +38,4 @@ sha256sum build/win-x64/RuneLite.exe
dumpbin //HEADERS build/win-x64/RuneLite.exe

# We use the filtered iss file
iscc target/filtered-resources/runelite.iss
iscc build/filtered-resources/runelite.iss
Loading

0 comments on commit 5d4a3ed

Please sign in to comment.