Fixed PSP building
This commit is contained in:
@@ -57,7 +57,7 @@ jobs:
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
|
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp
|
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp -DENABLE_TESTS=OFF
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -- -j$(nproc)
|
run: cmake --build build -- -j$(nproc)
|
||||||
- name: Move EBOOT.PBP to Dusk subfolder
|
- name: Move EBOOT.PBP to Dusk subfolder
|
||||||
|
|||||||
@@ -11,11 +11,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod
|
|||||||
|
|
||||||
option(ENABLE_TESTS "Enable tests" ON)
|
option(ENABLE_TESTS "Enable tests" ON)
|
||||||
|
|
||||||
|
|
||||||
# Set target system
|
# Set target system
|
||||||
if(NOT DEFINED DUSK_TARGET_SYSTEM)
|
if(NOT DEFINED DUSK_TARGET_SYSTEM)
|
||||||
set(DUSK_TARGET_SYSTEM "linux")
|
# set(DUSK_TARGET_SYSTEM "linux")
|
||||||
# set(DUSK_TARGET_SYSTEM "psp")
|
set(DUSK_TARGET_SYSTEM "psp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Prep cache
|
# Prep cache
|
||||||
@@ -85,7 +84,7 @@ if(DUSK_TARGET_SYSTEM STREQUAL "linux")
|
|||||||
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
SDL2
|
SDL2
|
||||||
OpenGL::GL
|
OpenGL::GL
|
||||||
@@ -99,6 +98,9 @@ elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
|||||||
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
|
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
|
||||||
${SDL2_INCLUDE_DIRS}
|
${SDL2_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Force turn tests off for now
|
||||||
|
set(ENABLE_TESTS OFF CACHE BOOL "Enable tests" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add code
|
# Add code
|
||||||
@@ -130,11 +132,11 @@ target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
|||||||
# Postbuild
|
# Postbuild
|
||||||
if(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
if(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
create_pbp_file(
|
create_pbp_file(
|
||||||
TARGET "${DUSK_LIBRARY_TARGET_NAME}"
|
TARGET "${DUSK_BINARY_TARGET_NAME}"
|
||||||
ICON_PATH NULL
|
ICON_PATH NULL
|
||||||
BACKGROUND_PATH NULL
|
BACKGROUND_PATH NULL
|
||||||
PREVIEW_PATH NULL
|
PREVIEW_PATH NULL
|
||||||
TITLE "${DUSK_LIBRARY_TARGET_NAME}"
|
TITLE "${DUSK_BINARY_TARGET_NAME}"
|
||||||
PSAR_PATH ${DUSK_BUILD_DIR}/dusk.dsk
|
PSAR_PATH ${DUSK_BUILD_DIR}/dusk.dsk
|
||||||
VERSION 01.00
|
VERSION 01.00
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "script/scriptcontext.h"
|
#include "script/scriptcontext.h"
|
||||||
#include "input/input.h"
|
#include "input/input.h"
|
||||||
|
|
||||||
int32_t moduleInputBind(lua_State *L) {
|
int moduleInputBind(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
// Requires action and button.
|
// Requires action and button.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "assert/assert.h"
|
#include "assert/assert.h"
|
||||||
#include "rpg/world/map.h"
|
#include "rpg/world/map.h"
|
||||||
|
|
||||||
int32_t moduleMapLoad(lua_State *L) {
|
int moduleMapLoad(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
if(!lua_isstring(L, 1)) {
|
if(!lua_isstring(L, 1)) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "script/scriptcontext.h"
|
#include "script/scriptcontext.h"
|
||||||
#include "scene/scenemanager.h"
|
#include "scene/scenemanager.h"
|
||||||
|
|
||||||
int32_t moduleSceneSetScene(lua_State *L) {
|
int moduleSceneSetScene(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
assertTrue(lua_isstring(L, 1), "Expected string scene name");
|
assertTrue(lua_isstring(L, 1), "Expected string scene name");
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "util/string.h"
|
#include "util/string.h"
|
||||||
#include "script/scriptmodule.h"
|
#include "script/scriptmodule.h"
|
||||||
|
|
||||||
int32_t moduleSysPrint(lua_State *L) {
|
int moduleSysPrint(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
int n = lua_gettop(L);
|
int n = lua_gettop(L);
|
||||||
@@ -33,7 +33,7 @@ int32_t moduleSysPrint(lua_State *L) {
|
|||||||
return 0; // no values returned to Lua
|
return 0; // no values returned to Lua
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t moduleSysInclude(lua_State *L) {
|
int moduleSysInclude(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
if(!lua_isstring(L, 1)) {
|
if(!lua_isstring(L, 1)) {
|
||||||
@@ -82,7 +82,7 @@ int32_t moduleSysInclude(lua_State *L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t moduleSysModule(lua_State *L) {
|
int moduleSysModule(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
if(!lua_isstring(L, 1)) {
|
if(!lua_isstring(L, 1)) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "rpg/entity/entity.h"
|
#include "rpg/entity/entity.h"
|
||||||
#include "assert/assert.h"
|
#include "assert/assert.h"
|
||||||
|
|
||||||
int32_t scriptFuncEntityAdd(lua_State *L) {
|
int scriptFuncEntityAdd(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
assertTrue(lua_isinteger(L, 1), "Expected integer entity type");
|
assertTrue(lua_isinteger(L, 1), "Expected integer entity type");
|
||||||
@@ -50,7 +50,7 @@ int32_t scriptFuncEntityAdd(lua_State *L) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t scriptFuncEntitySetX(lua_State *L) {
|
int scriptFuncEntitySetX(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
||||||
@@ -75,7 +75,7 @@ int32_t scriptFuncEntitySetX(lua_State *L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t scriptFuncEntitySetY(lua_State *L) {
|
int scriptFuncEntitySetY(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
||||||
@@ -100,7 +100,7 @@ int32_t scriptFuncEntitySetY(lua_State *L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t scriptFuncEntitySetZ(lua_State *L) {
|
int scriptFuncEntitySetZ(lua_State *L) {
|
||||||
assertNotNull(L, "Lua state cannot be NULL");
|
assertNotNull(L, "Lua state cannot be NULL");
|
||||||
|
|
||||||
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
assertTrue(lua_isinteger(L, 1), "Expected integer entity id");
|
||||||
|
|||||||
Reference in New Issue
Block a user