Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental Mobile Support #1

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
15eb04c
feat: initial ios support (bad)
SpikeHD May 12, 2024
4d259ed
fix: force landscape
SpikeHD May 12, 2024
86b87f5
fix: actually force landscape
SpikeHD May 12, 2024
8e9c65c
fix: more mobile stuff
SpikeHD May 12, 2024
96df6fc
feat: android scaffolding
SpikeHD May 12, 2024
6dbfdaf
fix: remove autogen config
SpikeHD May 12, 2024
c1331e9
fix: remove test stuff
SpikeHD May 12, 2024
bf97989
fix: dep updates
SpikeHD May 13, 2024
555aa7f
feat: begin android build action
SpikeHD May 20, 2024
9256b74
fix: only one entry
SpikeHD May 20, 2024
ce0dfd1
fix: no need for --release
SpikeHD May 20, 2024
6d033fe
fix: add android target
SpikeHD May 20, 2024
0186837
fix: install other targets, add ios build
SpikeHD May 20, 2024
bb3c37a
fix: ios fake devteam
SpikeHD May 20, 2024
2296249
fix: different devteam spec
SpikeHD May 20, 2024
6e30243
fix: merge main
SpikeHD Sep 10, 2024
5c2e084
fix: tweak android build
SpikeHD Sep 10, 2024
9102151
fix: binary name
SpikeHD Sep 10, 2024
0ab74b4
fix: android openssl
SpikeHD Sep 10, 2024
c4cfdf3
fix: windows binary name
SpikeHD Sep 10, 2024
65cfa59
fix: pr trigger
SpikeHD Sep 10, 2024
750676e
fix: vcpkg git hash
SpikeHD Sep 10, 2024
7cc9fcd
fix: vcpkgs triplet
SpikeHD Sep 10, 2024
b1d16d8
fix: openssl path
SpikeHD Sep 10, 2024
cdf3504
fix: openssl dir
SpikeHD Sep 10, 2024
d1e1cc0
fix: fullscreen on android
SpikeHD Sep 10, 2024
99b32a6
fix: allow warnings
SpikeHD Sep 10, 2024
08cc769
feat: upload APK
SpikeHD Sep 10, 2024
fb39b5a
fix: android upload
SpikeHD Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 114 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- 'package.json'
- 'src-tauri/**/*'
- 'src/**/*'
branches:
- main
pull_request:
paths:
- '.github/workflows/build.yml'
Expand Down Expand Up @@ -169,8 +171,7 @@ jobs:
# For lite installs
- name: (Online) Create empty resource
if: matrix.features != 'offline'
run: |
touch game.dat
run: touch game.dat

- name: (Most) Build
# If we are compiling for Windows ARM, we can only support NSIS
Expand Down Expand Up @@ -204,21 +205,21 @@ jobs:

# paths:
# Windows:
# - src-tauri/target/${{ matrix.config.target }}/release/PokeRogue.exe
# - src-tauri/target/${{ matrix.config.target }}/release/roguetop.exe
# Ubuntu:
# - src-tauri/target/${{ matrix.config.target }}/release/pokerogue
# MacOS:
# - src-tauri/target/${{ matrix.config.target }}/release/bundle/macos/PokeRogue.app
- name: (Windows) Compress build
if: matrix.config.platform == 'windows-latest'
run: cd src-tauri/target/${{ matrix.config.target }}/release && 7z a -tzip -mx9 RogueTop.zip
PokeRogue.exe
roguetop.exe
config.json
_up_

- name: (Linux) Compress build
if: matrix.config.platform == 'ubuntu-latest'
run: cd src-tauri/target/${{ matrix.config.target }}/release && tar -czvf roguetop.tar.gz poke-rogue config.json _up_
run: cd src-tauri/target/${{ matrix.config.target }}/release && tar -czvf roguetop.tar.gz roguetop config.json _up_

# Windows portable
- name: (Windows) Upload portable
Expand Down Expand Up @@ -282,6 +283,114 @@ jobs:
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-dmg
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/dmg/*.dmg

build_android:
runs-on: ubuntu-latest
steps:
- uses: actions-rust-lang/[email protected]
- uses: pnpm/action-setup@v3
with:
version: latest

- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da'

- name: Install using vcpkg
run: vcpkg install --triplet arm64-android --x-install-root ${{ github.workspace }}/packages

- name: Set OPENSSL_DIR
run: echo "OPENSSL_DIR=${{ github.workspace }}/packages/arm64-android/" >> $GITHUB_ENV

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install NDK with SDK
run: sdkmanager --install ndk-bundle

- name: Set NDK_HOME
run: echo "NDK_HOME=$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk | head -1)" >> $GITHUB_ENV

- name: Add Android targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Create empty game.dat
run: touch game.dat

- name: Install dependencies
run: pnpm install

- name: Build injection extension
run: pnpm build:ext

- name: Build for Android
run: pnpm tauri android build
env:
RUSTFLAGS: -Awarnings

- name: Upload universal APK
uses: actions/upload-artifact@v3
with:
name: roguetop-android-universal-apk
path: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk

- name: Upload universal ABB
uses: actions/upload-artifact@v3
with:
name: roguetop-android-universal-aab
path: src-tauri/gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab

build_ios:
runs-on: macos-latest
steps:
- uses: actions-rust-lang/[email protected]
- uses: pnpm/action-setup@v3
with:
version: latest

- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Add iOS target
run: rustup target add aarch64-apple-ios

- name: Install cocoapods
run: brew install cocoapods

- name: Install dependencies
run: pnpm install

- name: Build injection extension
run: pnpm build:ext

- name: Create empty game.dat
run: touch game.dat

- name: Build for iOS
run: pnpm tauri ios build

- name: DEBUG find the ipa
run: find ./src-tauri/target/aarch64-apple-ios/release -name '*.ipa'

release:
needs: build
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" style="height: 100%; width: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"lint:fix": "eslint --fix ./src ./ext/**/*.ts"
},
"dependencies": {
"@tauri-apps/api": ">=2.0.0-beta.0",
"@tauri-apps/plugin-shell": ">=2.0.0-beta.0",
"preact": "^10.16.0"
"@tauri-apps/api": "next",
"@tauri-apps/plugin-shell": "2.0.0-beta.4",
"preact": "^10.21.0"
},
"devDependencies": {
"@preact/preset-vite": "^2.5.0",
"@tauri-apps/cli": ">=2.0.0-beta.0",
"esbuild": "^0.21.1",
"@preact/preset-vite": "^2.8.2",
"@tauri-apps/cli": "next",
"esbuild": "^0.21.2",
"eslint": "^8.57.0",
"globals": "^15.1.0",
"globals": "^15.2.0",
"internal-ip": "^7.0.0",
"typescript": "^5.0.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0",
"vite": "^5.0.0"
"vite": "^5.2.11"
}
}
Loading
Loading