mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 06:19:25 +03:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42caa232fa | ||
|
|
26e3205b8a |
No files matched your search
@@ -0,0 +1,75 @@
|
||||
name: CI (Android)
|
||||
|
||||
# Only trigger workflow when Android-specific code could have changed.
|
||||
# This includes C/C++ files that have __ANDROID__ ifdefs.
|
||||
# If adding new ifdefs, make sure to update these lists.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "desktop_version/CMakeLists.txt"
|
||||
- "desktop_version/src/ButtonGlyphs.cpp"
|
||||
- "desktop_version/src/FileSystemUtils.cpp"
|
||||
- "desktop_version/src/Screen.cpp"
|
||||
- "desktop_version/src/Vlogging.c"
|
||||
- "desktop_version/VVVVVV-android/gradlew"
|
||||
- "desktop_version/VVVVVV-android/gradlew.bat"
|
||||
- "desktop_version/VVVVVV-android/**/CMakeLists.txt"
|
||||
- "desktop_version/VVVVVV-android/**.java"
|
||||
- "desktop_version/VVVVVV-android/**.xml"
|
||||
- "desktop_version/VVVVVV-android/**.pro"
|
||||
- "desktop_version/VVVVVV-android/**.mk"
|
||||
- "desktop_version/VVVVVV-android/**.gradle"
|
||||
- "desktop_version/VVVVVV-android/**.jar"
|
||||
- "desktop_version/VVVVVV-android/**.properties"
|
||||
- ".github/workflows/android.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "desktop_version/CMakeLists.txt"
|
||||
- "desktop_version/src/ButtonGlyphs.cpp"
|
||||
- "desktop_version/src/FileSystemUtils.cpp"
|
||||
- "desktop_version/src/Screen.cpp"
|
||||
- "desktop_version/src/Vlogging.c"
|
||||
- "desktop_version/VVVVVV-android/gradlew"
|
||||
- "desktop_version/VVVVVV-android/gradlew.bat"
|
||||
- "desktop_version/VVVVVV-android/**/CMakeLists.txt"
|
||||
- "desktop_version/VVVVVV-android/**.java"
|
||||
- "desktop_version/VVVVVV-android/**.xml"
|
||||
- "desktop_version/VVVVVV-android/**.pro"
|
||||
- "desktop_version/VVVVVV-android/**.mk"
|
||||
- "desktop_version/VVVVVV-android/**.gradle"
|
||||
- "desktop_version/VVVVVV-android/**.jar"
|
||||
- "desktop_version/VVVVVV-android/**.properties"
|
||||
- ".github/workflows/android.yml"
|
||||
|
||||
env:
|
||||
SRC_DIR_PATH: VVVVVV/desktop_version/VVVVVV-android
|
||||
SDL_VERSION: 3.4.18
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build (Android)
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
path: 'VVVVVV'
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Get SDL3-${SDL_VERSION}.aar
|
||||
run: |
|
||||
cd ${SRC_DIR_PATH}/app/libs
|
||||
wget https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VERSION}/SDL3-devel-${SDL_VERSION}-android.zip
|
||||
unzip SDL3-devel-${SDL_VERSION}-android.zip SDL3-${SDL_VERSION}.aar
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd ${SRC_DIR_PATH}
|
||||
./gradlew build
|
||||
@@ -9,21 +9,12 @@ general).
|
||||
How to Build
|
||||
------------
|
||||
|
||||
The recommended way is to install Android Studio and Maven. These instructions are for
|
||||
SDL 2.30.8; adapt your SDL version accordingly.
|
||||
The recommended way is to install Android Studio. These instructions are for
|
||||
SDL 3.4.18; adapt your SDL version accordingly.
|
||||
|
||||
1. Place a copy of `data.zip` in `desktop_version/VVVVVV-android/app/src/main/assets/`.
|
||||
(If the `assets/` folder doesn't exist, then create it.)
|
||||
2. Obtain the SDL 2.30.8 Maven package. As of writing, SDL currently does not publish
|
||||
Maven packages, so here is one way to obtain them (other methods are possible):
|
||||
|
||||
1. Download the SDL 2.30.8 source code.
|
||||
2. Run the `build-scripts/android-prefab.sh` script in the SDL repository.
|
||||
3. After building, run `mvn install:install-file
|
||||
-Dfile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.aar
|
||||
-DpomFile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.pom` to install it to
|
||||
Maven Local.
|
||||
|
||||
2. Place a copy of `SDL3-3.4.18.aar` in `desktop_version/VVVVVV-android/app/libs/`. It can be download from https://github.com/libsdl-org/SDL/releases/download/release-3.4.18/SDL3-devel-3.4.18-android.zip
|
||||
3. Open the `desktop_version/VVVVVV-android/` folder in Android Studio.
|
||||
4. Click 'Build'.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ android {
|
||||
}
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
minSdkVersion 29
|
||||
minSdkVersion 28
|
||||
targetSdkVersion 34
|
||||
versionCode 20005000
|
||||
versionName "2.5"
|
||||
@@ -110,5 +110,5 @@ dependencies {
|
||||
implementation 'org.jetbrains:annotations:15.0'
|
||||
implementation 'androidx.core:core:1.10.1'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.3.6'
|
||||
implementation 'org.libsdl.android:SDL2:2.30.8'
|
||||
implementation files('libs/SDL3-3.4.18.aar')
|
||||
}
|
||||
Whitespace-only changes.
@@ -37,8 +37,8 @@
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
<!-- Allow downloading to the external storage on Android 9 and older -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ public class VVVVVV extends SDLActivity {
|
||||
@Override
|
||||
protected String[] getLibraries() {
|
||||
return new String[] {
|
||||
"SDL2",
|
||||
"SDL3",
|
||||
"VVVVVV"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
#include <emscripten.h>
|
||||
#include <emscripten/html5.h>
|
||||
#elif defined(SDL_PLATFORM_WINDOWS)
|
||||
#elif defined(SDL_PLATFORM_WINDOWS) || defined(SDL_PLATFORM_ANDROID)
|
||||
#include <SDL3/SDL_main.h>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user