mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-06-10 03:57:28 +00:00
Some checks are pending
CI / clang-format (push) Waiting to run
CI / ${{ matrix.name }} (false, --toolchain $GITHUB_WORKSPACE/CMake/i586-pc-msdosdjgpp.cmake, false, true, false, Ninja, DOS, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, --toolchain /usr/local/vitasdk/share/vita.toolchain.cmake, false, false, Ninja, Vita, ubuntu-latest, true, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0, false, false, Visual Studio 18 2026, true, Xbox One, windows-latest, amd64, false, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake, false, devkitpro/devkitarm:latest, false, Ninja, true, Nintendo 3DS, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake, false, devkitpro/devkita64:latest, false, Ninja, Nintendo Switch, true, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, emcmake, false, false, true, Ninja, Emscripten, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, false, false, Ninja, true, MSVC (arm64), windows-latest, amd64_arm64, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, false, true, Ninja, true, MSVC (x86), windows-latest, amd64_x86, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, true, false, Ninja, true, MSVC (x64), windows-latest, amd64, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, true, true, false, Ninja, true, MSVC (x64 Debug), windows-latest, amd64, false) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, -DCMAKE_SYSTEM_NAME=iOS, false, false, Xcode, true, iOS, macos-15, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, false, false, Ninja, Android, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, true, false, Ninja, macOS, macos-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, false, Ninja, true, mingw-w64-x86_64, mingw64, msys2 mingw64, windows-latest, msys2 {0}, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, true, false, Ninja, true, Linux (Debug), ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, true, false, Ninja, true, Linux, ubuntu-latest, true) (push) Waiting to run
CI / FreeBSD (push) Waiting to run
CI / Flatpak (${{ matrix.arch }}) (aarch64, ubuntu-22.04-arm) (push) Waiting to run
CI / Flatpak (${{ matrix.arch }}) (x86_64, ubuntu-latest) (push) Waiting to run
CI / C++ (push) Waiting to run
CI / Release (push) Blocked by required conditions
Docker / Publish web port (push) Waiting to run
* Rescale save-loaded textures to runtime texture dimensions `LegoTextureInfo::LoadBits` sized its memcpy from the destination DirectDraw surface and assumed the source bits matched. They don't when the save was made under a different renderer than the current one: HW mode squares non-square assets in `LegoImage::Read` (e.g. 128x32 -> 128x128 via row duplication), SW mode keeps the original dimensions, and `ReadNamedTexture` always loads with `p_square=0`, so saved bits keep whatever size they had at save time. SW save loaded under HW caused an OOB read in `LoadBits`; HW save loaded under SW silently truncated the source and rendered a distorted texture. Add `LegoImage::Resize(width, height)` (nearest-neighbor, handles both up- and down-scale) and call it in `LoadFromNamedTexture` to match the runtime `LegoTextureInfo` surface dimensions before binding. Save format unchanged; `LoadBits` signature unchanged. Square textures and matching-mode loads short-circuit on the fast-path. * ci: bump Android SDL3 download + Xbox One generator for VS 18 - Android: SDL3's `build-release.py` started requiring `download` before `android` so it can fetch the new gameinput dependency. (build-release.py is technically internal SDL tooling; longer-term we may want to invoke a different SDL3 build entry point.) - Xbox One: windows-latest now ships VS 18, so the `Visual Studio 17 2022` generator can no longer find a VS install. Bump to `Visual Studio 18 2026`.
102 lines
3.1 KiB
Groovy
102 lines
3.1 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
}
|
|
def androidProject = projectDir.parentFile
|
|
|
|
android {
|
|
namespace "org.legoisland.isle"
|
|
compileSdk 35
|
|
|
|
defaultConfig {
|
|
applicationId 'org.legoisland.isle'
|
|
minSdk 21
|
|
targetSdk 35
|
|
versionCode 1
|
|
versionName '1.0'
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DANDROID_STL=c++_shared', "-DFETCHCONTENT_BASE_DIR=${androidProject}/build/_deps"
|
|
if (project.hasProperty('cmakeArgs')) {
|
|
project.cmakeArgs.split(" ").each {arg -> arguments arg}
|
|
}
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
}
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
version "3.30.5"
|
|
path '../../CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
register("release") {
|
|
enableV4Signing = true
|
|
keyAlias = System.getenv("SIGNING_KEY_ALIAS")
|
|
keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
|
|
System.getenv("SIGNING_STORE_FILE")?.with { storeFile = file(it) }
|
|
storePassword = System.getenv("SIGNING_STORE_PASSWORD")
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
signingConfig = signingConfigs.getByName("release")
|
|
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
buildFeatures {
|
|
prefab true
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
def androidPath = System.getenv("ANDROID_HOME") ?: android.sdkDirectory
|
|
def ndkPath = System.getenv("ANDROID_NDK_HOME") ?: android.ndkDirectory
|
|
|
|
tasks.named('compileSDL3AndroidArchive').configure {
|
|
environment "ANDROID_HOME", androidPath
|
|
environment "ANDROID_NDK_HOME", ndkPath
|
|
}
|
|
}
|
|
|
|
def aarDest = project.providers.provider { file("${projectDir}/libs/SDL3.aar") }
|
|
tasks.register('downloadSDL3', Exec) {
|
|
workingDir = androidProject
|
|
commandLine 'cmake', '-P', 'downloadSDL3.cmake'
|
|
}
|
|
tasks.register('compileSDL3AndroidArchive', Exec) {
|
|
workingDir = androidProject
|
|
dependsOn(downloadSDL3)
|
|
|
|
def sdl3Dir = "build/_deps/sdl3-src"
|
|
commandLine 'python', "${sdl3Dir}/build-scripts/build-release.py",
|
|
'--actions', 'download', 'android',
|
|
'--fast', '--force',
|
|
"--root=${sdl3Dir}", "--android-api=${android.defaultConfig.minSdk}"
|
|
|
|
doLast {
|
|
def aarFile = file("${androidProject}/${sdl3Dir}/build-android").listFiles().find {
|
|
it.name.endsWith(".aar")
|
|
}
|
|
aarDest.get().parentFile.mkdirs()
|
|
aarFile.renameTo(aarDest.get())
|
|
}
|
|
}
|
|
tasks.register('ensureSDL3') {
|
|
// if DOWNLOAD_DEPENDENCIES=OFF download the version appropriate
|
|
// 'devel android zip' and place the .aar at `aarDest`
|
|
if (aarDest.get().exists()) { return false }
|
|
dependsOn(compileSDL3AndroidArchive)
|
|
}
|
|
|
|
dependencies {
|
|
implementation files('libs/SDL3.aar').builtBy(ensureSDL3)
|
|
}
|