mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-18 05:11:15 +00:00
get building
This commit is contained in:
parent
658903d8b6
commit
64b44bf245
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,12 +6,14 @@ Release/
|
|||||||
/.idea
|
/.idea
|
||||||
.env
|
.env
|
||||||
.venv
|
.venv
|
||||||
|
.gradle
|
||||||
env/
|
env/
|
||||||
venv/
|
venv/
|
||||||
ENV/
|
ENV/
|
||||||
VENV/
|
VENV/
|
||||||
env.bak/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
|
local.properties
|
||||||
/build/
|
/build/
|
||||||
/build_debug/
|
/build_debug/
|
||||||
/legobin/
|
/legobin/
|
||||||
|
|||||||
@ -73,22 +73,27 @@ if (DOWNLOAD_DEPENDENCIES)
|
|||||||
# FetchContent downloads and configures dependencies
|
# FetchContent downloads and configures dependencies
|
||||||
message(STATUS "Fetching SDL3 and iniparser. This might take a while...")
|
message(STATUS "Fetching SDL3 and iniparser. This might take a while...")
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
if (WINDOWS_STORE)
|
# FIXME: properly build and source the .aar
|
||||||
FetchContent_Declare(
|
if (NOT ANDROID)
|
||||||
SDL3
|
if (WINDOWS_STORE)
|
||||||
GIT_REPOSITORY "https://github.com/Helloyunho/SDL3-uwp.git"
|
FetchContent_Declare(
|
||||||
GIT_TAG "main"
|
|
||||||
EXCLUDE_FROM_ALL
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
FetchContent_Declare(
|
|
||||||
SDL3
|
SDL3
|
||||||
GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git"
|
GIT_REPOSITORY "https://github.com/Helloyunho/SDL3-uwp.git"
|
||||||
GIT_TAG "main"
|
GIT_TAG "main"
|
||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
FetchContent_Declare(
|
||||||
|
SDL3
|
||||||
|
GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git"
|
||||||
|
GIT_TAG "main"
|
||||||
|
EXCLUDE_FROM_ALL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
FetchContent_MakeAvailable(SDL3)
|
||||||
|
else()
|
||||||
|
find_package(SDL3 CONFIG REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
FetchContent_MakeAvailable(SDL3)
|
|
||||||
|
|
||||||
# if(ANDROID)
|
# if(ANDROID)
|
||||||
# FetchContent_GetProperties(SDL3)
|
# FetchContent_GetProperties(SDL3)
|
||||||
@ -524,8 +529,7 @@ endif()
|
|||||||
if (ISLE_BUILD_APP)
|
if (ISLE_BUILD_APP)
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
# SDL applications need to be built as a shared library
|
function(add_executable TARGET PLATFORM)
|
||||||
function(add_executable TARGET)
|
|
||||||
add_library(${TARGET} SHARED ${ARGN})
|
add_library(${TARGET} SHARED ${ARGN})
|
||||||
endfunction()
|
endfunction()
|
||||||
endif()
|
endif()
|
||||||
@ -609,6 +613,11 @@ if (ISLE_BUILD_APP)
|
|||||||
ISLE/ios/config.cpp
|
ISLE/ios/config.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
if (ANDROID)
|
||||||
|
target_sources(isle PRIVATE
|
||||||
|
ISLE/android/config.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(Python3_FOUND)
|
if(Python3_FOUND)
|
||||||
if(NOT DEFINED PYTHON_PIL_AVAILABLE)
|
if(NOT DEFINED PYTHON_PIL_AVAILABLE)
|
||||||
execute_process(
|
execute_process(
|
||||||
|
|||||||
@ -72,7 +72,7 @@
|
|||||||
#include "ios/config.h"
|
#include "ios/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef ANDROID
|
||||||
#include "android/config.h"
|
#include "android/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ bool IsleApp::LoadConfig()
|
|||||||
#ifdef IOS
|
#ifdef IOS
|
||||||
IOS_SetupDefaultConfigOverrides(dict);
|
IOS_SetupDefaultConfigOverrides(dict);
|
||||||
#endif
|
#endif
|
||||||
#ifdef __ANDROID__
|
#ifdef ANDROID
|
||||||
Android_SetupDefaultConfigOverrides(dict);
|
Android_SetupDefaultConfigOverrides(dict);
|
||||||
#endif
|
#endif
|
||||||
iniparser_dump_ini(dict, iniFP);
|
iniparser_dump_ini(dict, iniFP);
|
||||||
@ -1236,7 +1236,7 @@ bool IsleApp::LoadConfig()
|
|||||||
|
|
||||||
iniparser_freedict(dict);
|
iniparser_freedict(dict);
|
||||||
delete[] iniConfig;
|
delete[] iniConfig;
|
||||||
#ifndef IOS
|
#if !defined(IOS) && !defined(ANDROID)
|
||||||
SDL_free(prefPath);
|
SDL_free(prefPath);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
2
android-project/.gitignore
vendored
2
android-project/.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
.cxx
|
.cxx
|
||||||
.gradle
|
.gradle
|
||||||
local.properties
|
local.properties
|
||||||
|
build
|
||||||
|
*.aar
|
||||||
|
|||||||
@ -3,11 +3,11 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "org.legoisland.Isle"
|
namespace "org.legoisland.isle"
|
||||||
compileSdk 35
|
compileSdk 35
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId 'org.legoisland.lego-island'
|
applicationId 'org.legoisland.isle'
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 35
|
targetSdk 35
|
||||||
versionCode 1
|
versionCode 1
|
||||||
@ -15,9 +15,7 @@ android {
|
|||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_STL=c++_shared'
|
arguments '-DANDROID_STL=c++_shared', '-DCMAKE_BUILD_TYPE=Release', '-DISLE_USE_DX5=false', '-DISLE_BUILD_CONFIG=false', '-DENABLE_CLANG_TIDY=false', '-DISLE_WERROR=true', '-DISLE_DEBUG=false', '-Werror=dev', '-DCMAKE_MESSAGE_LOG_LEVEL=STATUS'
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
||||||
// abiFilters 'arm64-v8a'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,10 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<!-- OpenGL ES 2.0 -->
|
<!-- OpenGL ES 3.0 -->
|
||||||
<uses-feature android:glEsVersion="0x00020000" />
|
<uses-feature
|
||||||
|
android:glEsVersion="0x00030000"
|
||||||
|
android:required="true" />
|
||||||
|
|
||||||
<!-- Touchscreen support -->
|
<!-- Touchscreen support -->
|
||||||
<uses-feature
|
<uses-feature
|
||||||
@ -31,18 +33,13 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
<activity
|
<activity
|
||||||
android:name="org.libsdl.helloworld.HelloWorldActivity"
|
android:name="org.legoisland.isle.IsleActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
|
||||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||||
android:preferMinimalPostProcessing="true">
|
android:preferMinimalPostProcessing="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package org.legoisland.Isle;
|
package org.legoisland.isle;
|
||||||
|
|
||||||
import org.libsdl.app.SDLActivity;
|
import org.libsdl.app.SDLActivity;
|
||||||
|
|
||||||
public class HelloWorldActivity extends SDLActivity {
|
public class IsleActivity extends SDLActivity {
|
||||||
protected String[] getLibraries() {
|
protected String[] getLibraries() {
|
||||||
return new String[] { "SDL3", "lego1", "isle" };
|
return new String[] { "SDL3", "lego1", "isle" };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,5 +12,5 @@ dependencyResolutionManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "lego-island"
|
rootProject.name = "legoisland"
|
||||||
include ':app'
|
include ':app'
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if(NOT WINDOWS_STORE)
|
|||||||
message(STATUS "🧩 OpenGL 1.x support not enabled — needs OpenGL")
|
message(STATUS "🧩 OpenGL 1.x support not enabled — needs OpenGL")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(OPENGL_ES3_LIBRARY NAMES GLESv2)
|
find_library(OPENGL_ES3_LIBRARY NAMES GLESv3 GLESv2)
|
||||||
if(EMSCRIPTEN OR OPENGL_ES3_LIBRARY)
|
if(EMSCRIPTEN OR OPENGL_ES3_LIBRARY)
|
||||||
message(STATUS "Found OpenGL: enabling OpenGL ES 3.x renderer")
|
message(STATUS "Found OpenGL: enabling OpenGL ES 3.x renderer")
|
||||||
target_sources(miniwin PRIVATE src/d3drm/backends/opengles3/renderer.cpp)
|
target_sources(miniwin PRIVATE src/d3drm/backends/opengles3/renderer.cpp)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user