Moved build stuff to docker
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
docker build -t myapp:latest -f .ci/dolphin/Dockerfile .
|
|
||||||
docker run -it -v ./:/workdir myapp:latest /bin/bash -c ' \
|
|
||||||
export PATH="$DEVKITPPC/bin:$PATH" && \
|
|
||||||
cd /workdir && \
|
|
||||||
rm -rf build-gamecube && \
|
|
||||||
mkdir -p build-gamecube && \
|
|
||||||
# cmake -S. -Bbuild-gamecube -DDUSK_TARGET_SYSTEM=gamecube -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/GameCube.cmake" && \
|
|
||||||
cmake -S. -Bbuild-gamecube -DDUSK_TARGET_SYSTEM=wii -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/Wii.cmake" && \
|
|
||||||
cd build-gamecube && \
|
|
||||||
make -j$(nproc) VERBOSE=1 && \
|
|
||||||
cp ./Dusk.dol ./boot.dol
|
|
||||||
'
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
docker build -t myapp:latest -f .ci/dolphin/Dockerfile .
|
|
||||||
docker run -v ./:/workdir myapp:latest /bin/bash -c ' \
|
|
||||||
export PATH="$DEVKITPPC/bin:$PATH" && \
|
|
||||||
cd /workdir && \
|
|
||||||
rm -rf build-wii && \
|
|
||||||
mkdir -p build-wii && \
|
|
||||||
cmake -S. -Bbuild-wii -DDUSK_TARGET_SYSTEM=wii -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/Wii.cmake" && \
|
|
||||||
cd build-wii && \
|
|
||||||
make -j$(nproc) VERBOSE=1 && \
|
|
||||||
mv ./Dusk.dol ./boot.dol
|
|
||||||
'
|
|
||||||
# docker run -it -v ./:/workdir myapp:latest /bin/bash
|
|
||||||
@@ -67,7 +67,7 @@ if(ENABLE_TESTS)
|
|||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(DUSK_LIBRARY_TARGET_NAME "${DUSK_BINARY_TARGET_NAME}" CACHE INTERNAL ${DUSK_CACHE_TARGET})
|
set(DUSK_LIBRARY_TARGET_NAME "${DUSK_BINARY_TARGET_NAME}" CACHE INTERNAL ${DUSK_CACHE_TARGET})
|
||||||
add_executable(${DUSK_BINARY_TARGET_NAME} ${DUSK_SOURCES_DIR}/dusk/null.c)
|
add_executable(${DUSK_BINARY_TARGET_NAME} ${DUSK_SOURCES_DIR}/null.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Toolchains
|
# Toolchains
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
# Copyright (c) 2025 Dominic Masters
|
|
||||||
#
|
|
||||||
# This software is released under the MIT License.
|
|
||||||
# https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
if(NOT cglm_FOUND)
|
|
||||||
find_package(cglm REQUIRED)
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC cglm)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT libzip_FOUND)
|
|
||||||
find_package(libzip REQUIRED)
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC zip)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT Lua_FOUND)
|
|
||||||
find_package(Lua REQUIRED)
|
|
||||||
if(Lua_FOUND AND NOT TARGET Lua::Lua)
|
|
||||||
add_library(Lua::Lua INTERFACE IMPORTED)
|
|
||||||
set_target_properties(
|
|
||||||
Lua::Lua
|
|
||||||
PROPERTIES
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}"
|
|
||||||
INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC Lua::Lua)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Libs
|
|
||||||
|
|
||||||
# Includes
|
|
||||||
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Sources
|
|
||||||
|
|
||||||
# Main Binary Source
|
|
||||||
target_sources(${DUSK_BINARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
main.c
|
|
||||||
)
|
|
||||||
|
|
||||||
# Defs
|
|
||||||
dusk_env_to_h(duskdefs.env duskdefs.h)
|
|
||||||
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Subdirs
|
|
||||||
add_subdirectory(assert)
|
|
||||||
add_subdirectory(asset)
|
|
||||||
add_subdirectory(debug)
|
|
||||||
add_subdirectory(display)
|
|
||||||
add_subdirectory(engine)
|
|
||||||
add_subdirectory(error)
|
|
||||||
add_subdirectory(event)
|
|
||||||
add_subdirectory(input)
|
|
||||||
add_subdirectory(item)
|
|
||||||
add_subdirectory(locale)
|
|
||||||
add_subdirectory(map)
|
|
||||||
add_subdirectory(scene)
|
|
||||||
add_subdirectory(script)
|
|
||||||
add_subdirectory(story)
|
|
||||||
add_subdirectory(time)
|
|
||||||
add_subdirectory(ui)
|
|
||||||
add_subdirectory(util)
|
|
||||||
|
|
||||||
if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "psp")
|
|
||||||
add_subdirectory(thread)
|
|
||||||
endif()
|
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
# https://opensource.org/licenses/MIT
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
cglm
|
cglm
|
||||||
GIT_REPOSITORY https://git.wish.moe/YourWishes/cglm.git
|
# GIT_REPOSITORY https://git.wish.moe/YourWishes/cglm.git
|
||||||
|
GIT_REPOSITORY https://github.com/recp/cglm.git
|
||||||
GIT_TAG v0.9.6
|
GIT_TAG v0.9.6
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
# Find link platform-specific libraries
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
SDL2
|
SDL2
|
||||||
pthread
|
pthread
|
||||||
OpenGL::GL
|
OpenGL::GL
|
||||||
GL
|
GL
|
||||||
m
|
m
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TEST
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
include(./dolphin.cmake)
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
FROM devkitpro/devkitppc
|
FROM devkitpro/devkitppc
|
||||||
|
WORKDIR /workdir
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install -y python3 python3-pip python3-polib python3-pil python3-dotenv python3-pyqt5 python3-opengl && \
|
apt install -y python3 python3-pip python3-polib python3-pil python3-dotenv python3-pyqt5 python3-opengl && \
|
||||||
dkp-pacman -S --needed --noconfirm gamecube-sdl2 ppc-liblzma ppc-libzip
|
dkp-pacman -S --needed --noconfirm gamecube-sdl2 ppc-liblzma ppc-libzip
|
||||||
|
VOLUME ["/workdir"]
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
docker build -t dusk-dolphin -f docker/dolphin/Dockerfile .
|
docker build -t dusk-dolphin -f docker/dolphin/Dockerfile .
|
||||||
docker run --rm -v $(pwd):/workdir dusk-dolphin ls
|
docker run --rm -v $(pwd):/workdir dusk-dolphin /bin/bash -c "./scripts/build-gamecube.sh"
|
||||||
@@ -5,6 +5,6 @@ if [ -z "$DEVKITPRO" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p build-gamecube
|
mkdir -p build-gamecube
|
||||||
cmake -S. -Bbuild-gamecube -DDUSK_TARGET_SYSTEM=gamcube -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/GameCube.cmake"
|
cmake -S. -Bbuild-gamecube -DDUSK_TARGET_SYSTEM=gamecube -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/GameCube.cmake"
|
||||||
cd build-gamecube
|
cd build-gamecube
|
||||||
make -j$(nproc) VERBOSE=1
|
make -j$(nproc) VERBOSE=1
|
||||||
3
scripts/build-wii-docker.sh
Executable file
3
scripts/build-wii-docker.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker build -t dusk-dolphin -f docker/dolphin/Dockerfile .
|
||||||
|
docker run --rm -v $(pwd):/workdir dusk-dolphin /bin/bash -c "./scripts/build-wii.sh"
|
||||||
@@ -1,6 +1,71 @@
|
|||||||
# Copyright (c) 2026 Dominic Masters
|
# Copyright (c) 2025 Dominic Masters
|
||||||
#
|
#
|
||||||
# This software is released under the MIT License.
|
# This software is released under the MIT License.
|
||||||
# https://opensource.org/licenses/MIT
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
add_subdirectory(dusk)
|
# Required Libraries
|
||||||
|
if(NOT cglm_FOUND)
|
||||||
|
find_package(cglm REQUIRED)
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC cglm)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT libzip_FOUND)
|
||||||
|
find_package(libzip REQUIRED)
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC zip)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Lua_FOUND)
|
||||||
|
find_package(Lua REQUIRED)
|
||||||
|
if(Lua_FOUND AND NOT TARGET Lua::Lua)
|
||||||
|
add_library(Lua::Lua INTERFACE IMPORTED)
|
||||||
|
set_target_properties(
|
||||||
|
Lua::Lua
|
||||||
|
PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC Lua::Lua)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Includes
|
||||||
|
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Main Binary Source
|
||||||
|
target_sources(${DUSK_BINARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
main.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# Defs
|
||||||
|
dusk_env_to_h(duskdefs.env duskdefs.h)
|
||||||
|
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Subdirs
|
||||||
|
add_subdirectory(assert)
|
||||||
|
add_subdirectory(asset)
|
||||||
|
add_subdirectory(debug)
|
||||||
|
add_subdirectory(display)
|
||||||
|
add_subdirectory(engine)
|
||||||
|
add_subdirectory(error)
|
||||||
|
add_subdirectory(event)
|
||||||
|
add_subdirectory(input)
|
||||||
|
add_subdirectory(item)
|
||||||
|
add_subdirectory(locale)
|
||||||
|
add_subdirectory(map)
|
||||||
|
add_subdirectory(scene)
|
||||||
|
add_subdirectory(script)
|
||||||
|
add_subdirectory(story)
|
||||||
|
add_subdirectory(time)
|
||||||
|
add_subdirectory(ui)
|
||||||
|
add_subdirectory(util)
|
||||||
|
|
||||||
|
# if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
|
# add_subdirectory(thread)
|
||||||
|
# endif()
|
||||||
@@ -28,7 +28,7 @@ void paletteInit(
|
|||||||
memoryZero(palette, sizeof(palette_t));
|
memoryZero(palette, sizeof(palette_t));
|
||||||
|
|
||||||
palette->colorCount = colorCount;
|
palette->colorCount = colorCount;
|
||||||
memoryCopy(colors, palette->colors, colorCount * sizeof(color_t));
|
memoryCopy(palette->colors, colors, colorCount * sizeof(color_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void paletteBind(palette_t *palette, const uint8_t slot) {
|
void paletteBind(palette_t *palette, const uint8_t slot) {
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Copyright (c) 2025 Dominic Masters
|
|
||||||
#
|
|
||||||
# This software is released under the MIT License.
|
|
||||||
# https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
# Libs
|
|
||||||
|
|
||||||
# Includes
|
|
||||||
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Sources
|
|
||||||
|
|
||||||
# Main Binary Source
|
|
||||||
target_sources(${DUSK_BINARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
main.c
|
|
||||||
)
|
|
||||||
|
|
||||||
# Defs
|
|
||||||
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Subdirs
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2026 Dominic Masters
|
|
||||||
*
|
|
||||||
* This software is released under the MIT License.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
printf("Hello, Dusk!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2026 Dominic Masters
|
|
||||||
*
|
|
||||||
* This software is released under the MIT License.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NULL (Empty source) file for allowing CMake to not complain about missing
|
|
||||||
// a source file early on during the build.
|
|
||||||
static void nullFunction(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user