Wow! I can't believe I haven't started this project again!
This commit is contained in:
@ -7,11 +7,11 @@ cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Variable Caches
|
||||
set(DAWN_CACHE_TARGET "dawn-target")
|
||||
set(DAWN_TARGET_NAME "Dawn")
|
||||
|
||||
# Set Common Build Variables
|
||||
set(DAWN_ROOT_DIR "${CMAKE_SOURCE_DIR}")
|
||||
@ -23,11 +23,6 @@ set(DAWN_ASSETS_BUILD_DIR "${DAWN_BUILD_DIR}/assets")
|
||||
set(DAWN_GENERATED_DIR "${DAWN_BUILD_DIR}/generated")
|
||||
set(DAWN_TEMP_DIR "${DAWN_BUILD_DIR}/temp")
|
||||
|
||||
# Add CMake Tools
|
||||
add_subdirectory(cmake)
|
||||
|
||||
set(DAWN_BUILD_BINARY ${DAWN_BUILD_DIR}/src/${DAWN_BUILDING}/${DAWN_TARGET_NAME})
|
||||
|
||||
# Initialize Project First.
|
||||
project(Dawn
|
||||
VERSION 1.0.0
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir tools
|
||||
cd tools
|
||||
cmake .. -DDAWN_BUILD_TARGET=target-tools
|
||||
make
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
git submodule update --init --recursive
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sudo apt install build-essential
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
sudo apt-get install cmake libarchive-tools
|
||||
git clone https://github.com/vitasdk/vdpm ~/vdpm
|
||||
cd ~/vdpm
|
||||
./bootstrap-vitasdk.sh
|
||||
export PATH=$VITASDK/bin:$PATH
|
||||
|
||||
git clone https://github.com/vitasdk/packages.git ~/vitapackages
|
||||
cd ~/vitapackages
|
||||
|
||||
dir_array=(
|
||||
zlib
|
||||
bzip2
|
||||
henkaku
|
||||
taihen
|
||||
kubridge
|
||||
openal-soft
|
||||
openssl
|
||||
curl
|
||||
curlpp
|
||||
expat
|
||||
opus
|
||||
opusfile
|
||||
glm
|
||||
kuio
|
||||
vitaShaRK
|
||||
libmathneon
|
||||
vitaGL
|
||||
SceShaccCgExt
|
||||
)
|
||||
|
||||
curdir=$(pwd)
|
||||
for d in "${dir_array[@]}";do
|
||||
echo "${curdir}${d}"
|
||||
cd "${curdir}/${d}"
|
||||
vita-makepkg
|
||||
vdpm *-arm.tar.xz
|
||||
done
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir -p vita/build
|
||||
cd vita/build
|
||||
if [ ! -d "src" ]
|
||||
then
|
||||
cmake ../.. -DDAWN_BUILD_TARGET=target-helloworld-vita -DCMAKE_BUILD_TYPE=Debug
|
||||
fi
|
||||
make
|
||||
cp ./src/dawnvita/*.vpk ../
|
||||
cd ../..
|
@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Includes
|
||||
add_subdirectory(hosts)
|
||||
add_subdirectory(targets)
|
@ -1,15 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Check for build target, or default
|
||||
if(WIN32)
|
||||
set(DAWN_BUILD_HOST "build-host-win32")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(DAWN_BUILD_HOST "build-host-linux")
|
||||
elseif(UNIX AND APPLE)
|
||||
set(DAWN_BUILD_HOST "build-host-osx")
|
||||
endif()
|
||||
|
||||
add_subdirectory(${DAWN_BUILD_HOST})
|
@ -1,4 +0,0 @@
|
||||
# CMake Hosts
|
||||
CMake Hosts help the build system define how a HOST (Not the target/client) does
|
||||
its building. Host would be the system you are using, right now, to do the build
|
||||
with.
|
@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILD_HOST_LIBS "m" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,49 +0,0 @@
|
||||
find_path(GLFW_INCLUDE_DIR GLFW/glfw3.h
|
||||
HINTS
|
||||
ENV GLFWDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/glfw"
|
||||
"$ENV{PROGRAMFILES}/glfw3"
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# Search for the library
|
||||
FIND_LIBRARY(GLFW_LIBRARY
|
||||
NAMES
|
||||
glfw glfw3 GLFW GLFW3
|
||||
HINTS
|
||||
ENV GLFWDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/glfw"
|
||||
"$ENV{PROGRAMFILES}/glfw3"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
lib32
|
||||
lib64
|
||||
libs
|
||||
lib-vc2012
|
||||
lib-vc2013
|
||||
lib-vc2015
|
||||
lib-vc2017
|
||||
lib-vc2019
|
||||
lib-vc2022
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
GLFW
|
||||
REQUIRED_VARS GLFW_LIBRARY GLFW_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(GLFW_LIBRARY GLFW_INCLUDE_DIR)
|
@ -1,49 +0,0 @@
|
||||
find_path(OPENAL_INCLUDE_DIR al.h
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/openal"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]"
|
||||
PATH_SUFFIXES
|
||||
include/AL
|
||||
AL/AL
|
||||
include/OpenAL
|
||||
include
|
||||
AL
|
||||
OpenAL
|
||||
)
|
||||
|
||||
# Search for the library
|
||||
FIND_LIBRARY(OPENAL_LIBRARY
|
||||
NAMES
|
||||
OpenAL al openal OpenAL32
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/openal"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
lib32
|
||||
lib64
|
||||
libs
|
||||
${_OpenAL_ARCH_DIR}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
OpenAL
|
||||
REQUIRED_VARS OPENAL_LIBRARY OPENAL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
@ -1,14 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Now validate we have a build target for real
|
||||
if(NOT DEFINED DAWN_BUILD_TARGET)
|
||||
set(DAWN_BUILD_TARGET "target-rpg-linux-glfw" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
endif()
|
||||
|
||||
message("Building target ${DAWN_BUILD_TARGET}")
|
||||
|
||||
# Include the build target
|
||||
add_subdirectory(${DAWN_BUILD_TARGET})
|
@ -1,40 +0,0 @@
|
||||
# CMake Targets
|
||||
CMake Targets decide what you are intending to build. Targets are (usually) a
|
||||
specific system, like vita, 3ds, switch, or a specific OS with a library, e.g.
|
||||
targetting vulkan on linux vs targetting opengl on linux, or targetting opengl
|
||||
on windows, etc.
|
||||
|
||||
In addition the target also decides what project(s) to build. Usually this is
|
||||
just the specific game and/or systems to be built, so if you are building a VN
|
||||
game the target would need to let the build system know you want to rollup the
|
||||
VN parts of the engine also.
|
||||
|
||||
Note this is one of the very few build args that is required during the
|
||||
configuration of cmake to make it build properly, failure to specify a target
|
||||
will result in a build error.
|
||||
|
||||
```
|
||||
-DDAWN_BUILD_TARGET=target-helloworld-linux64-glfw
|
||||
```
|
||||
|
||||
## Target Systems
|
||||
- vita
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
- emscripten (Web)
|
||||
|
||||
## Target Libraries
|
||||
- vita (Includes OGL)
|
||||
- glfw (Includes OGL)
|
||||
- sdl2 (Includes OGL)
|
||||
|
||||
## Target games
|
||||
- liminal
|
||||
- helloworld
|
||||
|
||||
## Target Arcitectures
|
||||
- vita (form of armv7)
|
||||
- linux (x64 only)
|
||||
- windows (x64 only)
|
||||
- osx (targetting arm64 currently)
|
@ -1,15 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_EMSCRIPTEN true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
set(DAWN_EMSCRIPTEN_FLAGS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
# Ensures a .HTML file is generated.
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,10 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_LINUX true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_ARCHIVE true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,21 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_VITA true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
# Properties
|
||||
set(DAWN_VITA_APP_NAME "Hello Vita" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VITA_TITLEID "DAWN00000" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VITA_VERSION "01.00" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
# Toolchain
|
||||
if(DEFINED ENV{VITASDK})
|
||||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
else()
|
||||
message(FATAL_ERROR "VITASDK Environment variable is missing! Either you do not have the VITASDK installed, or it is not set up with the env vars correctly.")
|
||||
endif()
|
@ -1,11 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnrpg CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_LINUX true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "DawnRPG" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_ARCHIVE true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_TRUETYPE false CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,340 +0,0 @@
|
||||
# Compiling, Debugging and Running
|
||||
This document's purpose is to explain how to compile, debug and run the project
|
||||
on your machine. It is assumed that you have a basic understanding of the
|
||||
fundamentals of your operating system and how to use a terminal.
|
||||
|
||||
## Preamble
|
||||
The Dawn project is written almost entirely in C and C++. This includes all of
|
||||
the tooling used to generate the project and assets. The only non-C/C++ code is
|
||||
used by CMake to generate the output compilation files. This provides the Dawn
|
||||
project an extremely high level of portability not typically seen in other
|
||||
projects.
|
||||
|
||||
## TLDR; Version
|
||||
This document is going to go over the installation and configuration of the
|
||||
following items. If you are already familiar with these tools, you can skip to
|
||||
the "Downloading the Source Code" section.
|
||||
- C/C++ Compiler
|
||||
- CMake
|
||||
- Git
|
||||
- IDE
|
||||
You may also need *python*, since we depend on third-party libraries that may use
|
||||
python scripts to generate their own build files. This is not required for the
|
||||
Dawn project itself.
|
||||
|
||||
## Pre-Configuration
|
||||
In order to compile the Dawn project, you are required to have the following
|
||||
tools installed on your machine.
|
||||
|
||||
### 1. A C/C++ Compiler
|
||||
The exact tool(s) will depend on your specific scenario. The compiler is used to
|
||||
take the .cpp/.hpp files and generating binaries that execute on the target
|
||||
machine. Typically you will use your own C/C++ compiler for the machine that you
|
||||
are currently running, e.g. if you are running Windows, you will use the Visual
|
||||
Studio compiler. If you are running Linux, you will use GCC or Clang. If you are
|
||||
running macOS, you will use Clang, and so-on.
|
||||
|
||||
If you are intending to compile on a different machine than the one you are
|
||||
currently running, you will need to use a cross-compiler that is specific for
|
||||
your use-case. You will also need to refer to the documentation for creating a
|
||||
new Dawn engine target.
|
||||
|
||||
Please follow the instructions for your specific operating system to install the
|
||||
appropriate C/C++ compiler.
|
||||
|
||||
**Windows**
|
||||
You will need to download and install [Visual Studio](https://visualstudio.microsoft.com/downloads/).
|
||||
Visual Studio (not to be confused with Visual Studio Code) is a full IDE that
|
||||
bundles the official Microsoft C/C++ compiler. It is the recommended compiler
|
||||
for building the Dawn project on Windows.
|
||||
|
||||
Advanced used can also use [MinGW](http://www.mingw.org/) or another compiler if
|
||||
they wish, however this is not officially supported.
|
||||
|
||||
After installing Visual Studio, you will need to install the C++ development
|
||||
tools. This can be done by opening the Visual Studio Installer and selecting
|
||||
the "Desktop development with C++" workload.
|
||||
|
||||
**Linux**
|
||||
You will need to install the GCC and Clang compilers. The compilers are usually
|
||||
installed either by default or by installing the necessary packages for your
|
||||
Linux distribution.
|
||||
|
||||
For example, on Ubuntu, you can install the GCC and Clang compilers by running
|
||||
the following command:
|
||||
```bash
|
||||
sudo apt install build-essential clang
|
||||
```
|
||||
|
||||
On Arch Linux, you can install the GCC and Clang compilers by running the
|
||||
following command:
|
||||
```bash
|
||||
sudo pacman -S base-devel clang
|
||||
```
|
||||
|
||||
And on Fedora, you can install the GCC and Clang compilers by running the
|
||||
following command:
|
||||
```bash
|
||||
sudo dnf install @development-tools clang
|
||||
```
|
||||
|
||||
For other distributions, please refer to your distribution's documentation.
|
||||
|
||||
**macOS**
|
||||
You will need to install the Xcode command line tools. This can be done by done
|
||||
by running the following command in your terminal:
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
Afterwards you will need to install and enable [Brew](https://brew.sh/). This
|
||||
can be done by running the following command in your terminal:
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
|
||||
### 2. CMake
|
||||
CMake is a tool that is used to generate the compilation files for the Dawn
|
||||
project. In short this is used to create versions of the Dawn project that can
|
||||
be compiled on all different sets of compilers, so if you are compiling on, for
|
||||
example, Windows, you can use CMake to generate the compilation files for the
|
||||
Visual Studio compiler, or if you are compiling on Linux, you can use CMake to
|
||||
generate the compilation files for the GCC or Clang compilers, and so-on.
|
||||
|
||||
To install CMake, please follow the instructions for your specific operating
|
||||
system. All other operating systems can be found on the [CMake downloads page](https://cmake.org/download/).
|
||||
|
||||
**Windows**
|
||||
You will need to download and install [CMake](https://cmake.org/download/). The
|
||||
installer will guide you through the installation process and will install the
|
||||
CMake executable to your system. It is recommended that you add CMake to your
|
||||
system PATH if requested by the installer.
|
||||
|
||||
**Linux**
|
||||
Like installing the C/C++ compilers, you will need to install CMake using your
|
||||
specific Linux distribution's package manager, there is also a chance that CMake
|
||||
can be installed using flatpak or snap. Please refer to your distribution's
|
||||
documentation for more information.
|
||||
|
||||
For Ubuntu and other Debian-based distributions, you can install CMake by using
|
||||
the following command:
|
||||
```bash
|
||||
sudo apt install cmake
|
||||
```
|
||||
|
||||
For Arch Linux, you can install CMake by using the following command:
|
||||
```bash
|
||||
sudo pacman -S cmake
|
||||
```
|
||||
|
||||
And for Fedora, you can install CMake by using the following command:
|
||||
```bash
|
||||
sudo dnf install cmake
|
||||
```
|
||||
|
||||
**macOS**
|
||||
You will install CMake using brew. We detailed how to install brew in the C/C++
|
||||
compiler section. To install CMake, run the following command in your terminal:
|
||||
```bash
|
||||
brew install cmake
|
||||
```
|
||||
|
||||
### 3. Git
|
||||
Git is a version control system that is used to manage the Dawn project's source
|
||||
code. It is used to download the source code, and to update the source code to
|
||||
the latest version. It is also used to manage the project's dependencies. Git is
|
||||
a standard tool in the programming industry and is used to manage complex
|
||||
projects, especially those that are worked on by multiple people.
|
||||
|
||||
Git, like all of the above tools, is installed slightly differently depending on
|
||||
your operating system. Please follow the instructions for your specific
|
||||
operating system.
|
||||
|
||||
**Windows**
|
||||
You will need to download and install [Git](https://git-scm.com/downloads). The
|
||||
installer will guide you through the installation process and will install the
|
||||
Git executable to your system. It is recommended that you add Git to your system
|
||||
PATH if requested by the installer. You do not need to add the Context-menu
|
||||
items to your system.
|
||||
|
||||
**Linux**
|
||||
Like installing the C/C++ compilers, you will need to install Git using your
|
||||
specific Linux distribution's package manager. It is also likely that git would
|
||||
have been installed by default. Please refer to your distribution's docs for
|
||||
more information.
|
||||
|
||||
For Ubuntu and other Debian-based distributions, you can install Git by using
|
||||
the following command:
|
||||
```bash
|
||||
sudo apt install git
|
||||
```
|
||||
|
||||
For Arch Linux, you can install Git by using the following command:
|
||||
```bash
|
||||
sudo pacman -S git
|
||||
```
|
||||
|
||||
And for Fedora, you can install Git by using the following command:
|
||||
```bash
|
||||
sudo dnf install git
|
||||
```
|
||||
|
||||
**macOS**
|
||||
You will install Git using brew. We detailed how to install brew in the C/C++
|
||||
compiler section. To install Git, run the following command in your terminal:
|
||||
```bash
|
||||
brew install git
|
||||
```
|
||||
|
||||
### 4. An IDE
|
||||
An IDE (Integrated Development Environment) is a tool that is used to view and
|
||||
edit code of projects. While it is not required to use an IDE, it is recommended
|
||||
since it can make the process of editing and running the project much easier.
|
||||
|
||||
There are many different IDEs available, and often people chose an IDE that will
|
||||
suit their preferences and needs, however if you are unsure of which IDE you
|
||||
should be using, the Dawn project recommends using [Visual Studio Code](https://code.visualstudio.com/),
|
||||
not to be confused with Visual Studio.
|
||||
|
||||
Visual Studio Code is a free and open-source IDE that is widely used in the
|
||||
industry for its simple, modern and configurable interface. For example you can
|
||||
configure VSCode to work on Web Projects, Game Projects, and more. It acts like
|
||||
a text editor with a bunch of extra tools.
|
||||
|
||||
In addition to installing the VSCode IDE, we will add several recommended
|
||||
plugins that will make editing the Dawn project easier and more seamless.
|
||||
|
||||
To install VSCode follow the instructions for your specific operating system on
|
||||
the [VSCode downloads page](https://code.visualstudio.com/download), as it can
|
||||
vary a lot between operating systems.
|
||||
|
||||
After installing VSCode, you will need to install the following plugins, by
|
||||
clicking on the "Extensions" icon on the left-hand side of the VSCode window,
|
||||
and searching for the following plugins. You may also be able to click on the
|
||||
following links to install the plugins directly, but it may not work.
|
||||
- [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
|
||||
- [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
|
||||
- [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
|
||||
|
||||
## Downloading the Source Code
|
||||
Now that you have all of the necessary tools installed, you can download the
|
||||
source code of the project and using it to build. The source code contains all
|
||||
of the code of the project, as well as the assets and the build scripts. This is
|
||||
confidential information and should not be shared with anyone.
|
||||
|
||||
### 1. Cloning the Repository
|
||||
We previously installed the git tool, which is used to download the source code
|
||||
of the project, and some third-party libraries. To download the source code, you
|
||||
will need to open a terminal and navigate to the directory where you want to
|
||||
download the source code to.
|
||||
|
||||
Afterwards, you will need to run the following command:
|
||||
```bash
|
||||
git clone https://git.wish.moe/YourWishes/Dawn.git
|
||||
```
|
||||
This will download the source code of the project to a new subdirectory called
|
||||
"Dawn" and put all of the projects' source code within there.
|
||||
|
||||
### 2. Installing the Dependencies / Libraries.
|
||||
I try to keep dependencies on third-party libraries to a minimum, however there
|
||||
are a few libraries that are required to build the Dawn project. These libraries
|
||||
are not included in the source code, and must be downloaded separately. This is
|
||||
done using the git tool.
|
||||
|
||||
After you have cloned the above repository, you will need to open a terminal and
|
||||
navigate to the directory where you downloaded the source code to. Afterwards,
|
||||
you will need to run the following command:
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
This will fetch all of the third-party libraries that are required to build the
|
||||
Dawn project. This may take a while depending on your internet connection.
|
||||
|
||||
### 3. Loading the Project
|
||||
This step is semi-optional. We are aiming to build the project using CMake, and
|
||||
the easiest way to do this is to use the CMake Tools plugin for VSCode that we
|
||||
installed earlier. This plugin will automatically detect the CMake files in the
|
||||
project and will allow us to build the project using the VSCode interface.
|
||||
|
||||
If you opted out of using VSCode, you will need to set up your CMake environment
|
||||
to suit your IDE or needs. This is outside of the scope of this document, and
|
||||
you will need to refer to your IDE's documentation for more information.
|
||||
|
||||
To load the project, you will need to open VSCode and open the Dawn project
|
||||
directory. Most operating systems will allow you to do this by dragging the
|
||||
Dawn project directory onto the VSCode window. If this does not work, you can
|
||||
open VSCode and click on the "File" menu, and click on "Open Folder". You will
|
||||
then need to navigate to the Dawn project directory and click "Open".
|
||||
|
||||
Afterwards you will likely be prompted autometically to configure the CMake
|
||||
Tools plugin. If you are not, you can click on the "CMake" icon on the left-hand
|
||||
side of the VSCode window, and click on "Configure". This will configure the
|
||||
CMake Tools plugin to use the CMake files in the Dawn project directory.
|
||||
|
||||
You may also be asked to select a compiler. If you are using Windows, you will
|
||||
need to select the Visual Studio compiler. If you are using Linux, you will need
|
||||
to select the GCC or Clang compiler. If you are using macOS, you will need to
|
||||
select the Clang compiler. If you are using a different compiler, you will need
|
||||
to select the appropriate compiler.
|
||||
|
||||
If prompted to select a build type, select "Debug".
|
||||
|
||||
## Compiling the Project
|
||||
Now that we have the project loaded into our IDE, we can compile the project.
|
||||
This is done using the CMake Tools plugin for VSCode. If you are not using
|
||||
VSCode you will need to refer to your IDE's documentation for more information.
|
||||
|
||||
Firstly, you will need to create a settings file to configure the project. In
|
||||
VSCode you can create a new folder called `.vscode` (Including the leading `.`)
|
||||
in the Dawn project root directory. Afterwards, you will need to create a new
|
||||
file called `settings.json` in the `.vscode` directory. You will then need to
|
||||
paste the following into the file:
|
||||
```json
|
||||
{
|
||||
"cmake.configureArgs": [
|
||||
"-DDAWN_BUILD_TOOLS=true",
|
||||
"-DDAWN_BUILD_TARGET=target-liminal-win32-glfw",
|
||||
"-DDAWN_DEBUG_BUILD=true"
|
||||
]
|
||||
}
|
||||
```
|
||||
And save the file. You may want to alter the values to suit your needs. For
|
||||
example, if you are compiling on Linux, you will need to change
|
||||
`target-liminal-win32-glfw` to `target-liminal-linux-glfw`. If you are compiling
|
||||
on macOS, you will need to change it to `target-liminal-osx-glfw`. The specific
|
||||
configure arguments are outside of the scope of this document, and you will need
|
||||
to refer to the specific target documentation for more information.
|
||||
|
||||
After you have created the settings file, you will need to configure and build
|
||||
the project. To perform the build you need to click "Build" button the bottom of
|
||||
the VSCode window. This will compile the project and will output the resulting
|
||||
binaries in to a "build" directory within the Dawn project directory.
|
||||
|
||||
Upon clicking the "Build" button, you will see an output panel appear at the
|
||||
bottom of the VSCode window. This will show the process of the build, and will
|
||||
show any errors that may occur. This is used to debug and fix any issues that
|
||||
may occur during the build process.
|
||||
|
||||
If the build was successful, you will see a "Build finished" message in the
|
||||
output panel, typically read as;
|
||||
```bash
|
||||
[build] Build finished with exit code 0
|
||||
```
|
||||
If you do not see this message, or if the exit code is not 0, you will need to
|
||||
debug the issue. The output panel will show the error message which is helpful
|
||||
so we can debug the issue. If you are unable to debug the issue, you can ask for
|
||||
help in the Discord server.
|
||||
|
||||
## Running the built project
|
||||
After the build process succeeds you will be able to run the project. This is
|
||||
done by clicking on the Run icon, which looks like a play button, on the bottom
|
||||
of the VSCode window. This will run the project in production mode and will not
|
||||
show any debug information.
|
||||
|
||||
If the program hangs, crashes or does not run, you can click the Debug icon,
|
||||
which looks like a ladybug, on the bottom of the VSCode window. This will run
|
||||
the project in debug mode and will show debug information and HALT the program
|
||||
if there is an error detected. If program HALTS in debug mode you can use this
|
||||
information to debug the issue. If you are unable to debug the issue, you can
|
||||
ask for help in the Discord server.
|
@ -3,75 +3,30 @@
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Custom variables
|
||||
set(
|
||||
DAWN_TARGET_DEPENDENCIES_LAST
|
||||
CACHE INTERNAL ${DAWN_CACHE_TARGET}
|
||||
)
|
||||
|
||||
# Build Project
|
||||
add_executable(${DAWN_TARGET_NAME})
|
||||
|
||||
# Change what we are building. Pulled from the cmake/targets dir.
|
||||
if(DEFINED DAWN_BUILDING)
|
||||
add_subdirectory(${DAWN_BUILDING})
|
||||
endif()
|
||||
|
||||
# Validate game project includes the target name
|
||||
if(DEFINED DAWN_TARGET_NAME)
|
||||
# Add in base library
|
||||
add_subdirectory(dawn)
|
||||
|
||||
# Compile entry targets
|
||||
if(DAWN_TARGET_WIN32)
|
||||
add_subdirectory(dawnwin32)
|
||||
elseif(DAWN_TARGET_LINUX)
|
||||
add_subdirectory(dawnlinux)
|
||||
elseif(DAWN_TARGET_OSX)
|
||||
add_subdirectory(dawnosx)
|
||||
elseif(DAWN_TARGET_VITA)
|
||||
add_subdirectory(dawnvita)
|
||||
elseif(DAWN_TARGET_EMSCRIPTEN)
|
||||
add_subdirectory(dawnemscripten)
|
||||
else()
|
||||
message(FATAL_ERROR "You need to define an entry target")
|
||||
endif()
|
||||
|
||||
# Host Libraries
|
||||
target_link_libraries(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
${DAWN_BUILD_HOST_LIBS}
|
||||
)
|
||||
|
||||
# Compile support targets
|
||||
if(DAWN_TARGET_GLFW)
|
||||
add_subdirectory(dawnglfw)
|
||||
add_subdirectory(dawnopengl)
|
||||
endif()
|
||||
|
||||
if(DAWN_TARGET_TRUETYPE)
|
||||
add_subdirectory(dawntruetype)
|
||||
endif()
|
||||
|
||||
if(DAWN_TARGET_SDL2)
|
||||
add_subdirectory(dawnsdl2)
|
||||
add_subdirectory(dawnopengl)
|
||||
endif()
|
||||
|
||||
if(DAWN_TARGET_VITA)
|
||||
add_subdirectory(dawnopengl)
|
||||
endif()
|
||||
|
||||
if(DAWN_TARGET_OPENAL)
|
||||
add_subdirectory(dawnopenal)
|
||||
endif()
|
||||
|
||||
# Late definitions, used by tools
|
||||
if(NOT DAWN_TARGET_DEPENDENCIES_LAST)
|
||||
else()
|
||||
add_dependencies(${DAWN_TARGET_NAME} ${DAWN_TARGET_DEPENDENCIES_LAST})
|
||||
endif()
|
||||
|
||||
# Compress the game assets.
|
||||
add_dependencies(${DAWN_TARGET_NAME} dawnassets)
|
||||
if(NOT DEFINED DAWN_TARGET_NAME)
|
||||
message(FATAL_ERROR "You need to define a target name")
|
||||
endif()
|
||||
|
||||
# Add in base library
|
||||
add_subdirectory(dawn)
|
||||
add_subdirectory(dawnrpg)
|
||||
|
||||
# Host Libraries
|
||||
target_link_libraries(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
${DAWN_BUILD_HOST_LIBS}
|
||||
)
|
||||
|
||||
# Compile support targets
|
||||
if(DAWN_TARGET_LINUX)
|
||||
add_subdirectory(dawnglfw)
|
||||
add_subdirectory(dawnopengl)
|
||||
add_subdirectory(dawnlinux)
|
||||
endif()
|
||||
|
||||
# Compress the game assets.
|
||||
add_dependencies(${DAWN_TARGET_NAME} dawnassets)
|
@ -6,8 +6,10 @@
|
||||
# Libraries
|
||||
target_link_libraries(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
glm
|
||||
archive_static
|
||||
glm::glm
|
||||
nlohmann_json::nlohmann_json
|
||||
freetype
|
||||
)
|
||||
|
||||
# Includes
|
||||
|
@ -67,6 +67,35 @@ AssetDataLoader::AssetDataLoader(std::string fileName) : fileName(fileName) {
|
||||
);
|
||||
}
|
||||
|
||||
size_t AssetDataLoader::getSize() {
|
||||
assertTrue(this->assetArchiveEntry != nullptr, "AssetDataLoader::getSize: Entry is NULL!");
|
||||
assertTrue(archive_entry_size_is_set(assetArchiveEntry), "assetGetSize: Entry size is not set!");
|
||||
return archive_entry_size(assetArchiveEntry);
|
||||
}
|
||||
|
||||
size_t AssetDataLoader::getPosition() {
|
||||
assertNotNull(this->assetArchiveFile, "AssetDataLoader::getPosition: File is not open!");
|
||||
return this->position;
|
||||
}
|
||||
|
||||
std::string AssetDataLoader::getEntireContentsAsString() {
|
||||
if(!this->isOpen()) {
|
||||
this->open();
|
||||
} else {
|
||||
this->rewind();
|
||||
}
|
||||
|
||||
std::string buffer;
|
||||
buffer.resize(this->getSize());
|
||||
this->read((uint8_t*)buffer.data(), buffer.size());
|
||||
this->close();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
bool_t AssetDataLoader::isOpen() {
|
||||
return this->assetArchive != nullptr;
|
||||
}
|
||||
|
||||
void AssetDataLoader::open() {
|
||||
assertNull(this->assetArchiveFile, "AssetDataLoader::open: File is already open");
|
||||
assertNull(this->assetArchive, "AssetDataLoader::open: Archive is already open");
|
||||
@ -156,12 +185,6 @@ size_t AssetDataLoader::readUntil(
|
||||
return i;
|
||||
}
|
||||
|
||||
size_t AssetDataLoader::getSize() {
|
||||
assertTrue(this->assetArchiveEntry != nullptr, "AssetDataLoader::getSize: Entry is NULL!");
|
||||
assertTrue(archive_entry_size_is_set(assetArchiveEntry), "assetGetSize: Entry size is not set!");
|
||||
return archive_entry_size(assetArchiveEntry);
|
||||
}
|
||||
|
||||
size_t AssetDataLoader::skip(size_t n) {
|
||||
assertTrue(n >= 0, "AssetDataLoader::skip: Byte count must be greater than 0.");
|
||||
|
||||
@ -185,16 +208,14 @@ size_t AssetDataLoader::setPosition(const size_t position) {
|
||||
}
|
||||
|
||||
void AssetDataLoader::rewind() {
|
||||
assertTrue(this->isOpen(), "Asset is not open!");
|
||||
if(this->position == 0) return;
|
||||
|
||||
// TODO: See if I can optimize this
|
||||
this->close();
|
||||
this->open();
|
||||
}
|
||||
|
||||
size_t AssetDataLoader::getPosition() {
|
||||
assertNotNull(this->assetArchiveFile, "AssetDataLoader::getPosition: File is not open!");
|
||||
return this->position;
|
||||
}
|
||||
|
||||
AssetDataLoader::~AssetDataLoader() {
|
||||
if(this->assetArchiveFile != nullptr) this->close();
|
||||
}
|
@ -90,6 +90,33 @@ namespace Dawn {
|
||||
*/
|
||||
AssetDataLoader(std::string filename);
|
||||
|
||||
/**
|
||||
* Get the size of the asset.
|
||||
* @return The size of the asset in bytes.
|
||||
*/
|
||||
size_t getSize();
|
||||
|
||||
/**
|
||||
* Returns the current position of the read head.
|
||||
*
|
||||
* @return The current read head position.
|
||||
*/
|
||||
size_t getPosition();
|
||||
|
||||
/**
|
||||
* Get the entire contents of the asset as a string.
|
||||
*
|
||||
* @return The entire contents of the asset as a string.
|
||||
*/
|
||||
std::string getEntireContentsAsString();
|
||||
|
||||
/**
|
||||
* Check if the asset is open.
|
||||
*
|
||||
* @return True if the asset is open, otherwise false.
|
||||
*/
|
||||
bool_t isOpen();
|
||||
|
||||
/**
|
||||
* Platform-centric method to open a file buffer to an asset.
|
||||
*/
|
||||
@ -124,12 +151,6 @@ namespace Dawn {
|
||||
const char_t delimiter
|
||||
);
|
||||
|
||||
/**
|
||||
* Get the size of the asset.
|
||||
* @return The size of the asset in bytes.
|
||||
*/
|
||||
size_t getSize();
|
||||
|
||||
/**
|
||||
* Skips the read head forward to a given position.
|
||||
*
|
||||
@ -151,13 +172,6 @@ namespace Dawn {
|
||||
*/
|
||||
size_t setPosition(const size_t absolutePosition);
|
||||
|
||||
/**
|
||||
* Returns the current position of the read head.
|
||||
*
|
||||
* @return The current read head position.
|
||||
*/
|
||||
size_t getPosition();
|
||||
|
||||
/**
|
||||
* Cleanup the asset loader.
|
||||
*/
|
||||
|
@ -92,11 +92,24 @@ namespace Dawn {
|
||||
* @param fontSize The font size to get the truetype asset of.
|
||||
* @return The asset loader for the given asset.
|
||||
*/
|
||||
template<class T>
|
||||
std::shared_ptr<T> get(
|
||||
const std::string filename,
|
||||
const uint32_t fontSize
|
||||
);
|
||||
// std::shared_ptr<TrueTypeTexture> get(
|
||||
// const std::string filename,
|
||||
// const uint32_t fontSize
|
||||
// ) {
|
||||
// auto existing = this->getExisting<TrueTypeLoader>(filename);
|
||||
// if(existing) {
|
||||
// // Check pointer hasn't gone stale, if it has remove it and create new.
|
||||
// auto texture = existing->getTexture(fontSize);
|
||||
// if(texture) return texture;
|
||||
// this->removeExisting(filename);
|
||||
// }
|
||||
|
||||
// std::shared_ptr<TrueTypeLoader> loader = std::make_shared<TrueTypeLoader>(
|
||||
// filename
|
||||
// );
|
||||
// pendingAssetLoaders.push_back(std::static_pointer_cast<AssetLoader>(loader));
|
||||
// return loader->getTexture(fontSize);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Dispose the asset manager, and all attached assets.
|
||||
|
@ -7,4 +7,6 @@
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
TextureLoader.cpp
|
||||
JSONLoader.cpp
|
||||
TrueTypeLoader.cpp
|
||||
)
|
33
src/dawn/asset/loaders/JSONLoader.cpp
Normal file
33
src/dawn/asset/loaders/JSONLoader.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2024 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "JSONLoader.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
JSONLoader::JSONLoader(const std::string name) :
|
||||
AssetLoader(name),
|
||||
loader(name),
|
||||
state(JSONLoaderState::INITIAL)
|
||||
{
|
||||
}
|
||||
|
||||
void JSONLoader::updateAsync() {
|
||||
if(this->state != JSONLoaderState::INITIAL) return;
|
||||
|
||||
this->state = JSONLoaderState::LOADING_JSON;
|
||||
std::string jsonContents = loader.getEntireContentsAsString();
|
||||
this->data = json::parse(jsonContents);
|
||||
this->state = JSONLoaderState::DONE;
|
||||
this->loaded = true;
|
||||
}
|
||||
|
||||
void JSONLoader::updateSync() {
|
||||
}
|
||||
|
||||
JSONLoader::~JSONLoader() {
|
||||
|
||||
}
|
||||
|
33
src/dawn/asset/loaders/JSONLoader.hpp
Normal file
33
src/dawn/asset/loaders/JSONLoader.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2024 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "asset/AssetLoader.hpp"
|
||||
#include "asset/AssetDataLoader.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Dawn {
|
||||
enum class JSONLoaderState {
|
||||
INITIAL,
|
||||
LOADING_JSON,
|
||||
DONE
|
||||
};
|
||||
|
||||
class JSONLoader : public AssetLoader {
|
||||
protected:
|
||||
AssetDataLoader loader;
|
||||
enum JSONLoaderState state;
|
||||
|
||||
public:
|
||||
json data;
|
||||
|
||||
JSONLoader(const std::string name);
|
||||
void updateSync() override;
|
||||
void updateAsync() override;
|
||||
~JSONLoader();
|
||||
};
|
||||
}
|
@ -14,3 +14,4 @@ target_sources(${DAWN_TARGET_NAME}
|
||||
# Subdirs
|
||||
add_subdirectory(mesh)
|
||||
add_subdirectory(shader)
|
||||
add_subdirectory(font)
|
@ -5,5 +5,6 @@
|
||||
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
UILabel.cpp
|
||||
UIRectangle.cpp
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Includes
|
||||
target_include_directories(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
freetype
|
||||
)
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(asset)
|
||||
add_subdirectory(display)
|
||||
add_subdirectory(ui)
|
@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2024 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "AssetManager.hpp"
|
||||
#include "loaders/TrueTypeLoader.hpp"
|
||||
|
||||
template<>
|
||||
std::shared_ptr<TrueTypeTexture> AssetManager::get<TrueTypeTexture>(
|
||||
const std::string filename,
|
||||
const uint32_t fontSize
|
||||
) {
|
||||
auto existing = this->getExisting<TrueTypeLoader>(filename);
|
||||
if(existing) {
|
||||
// Check pointer hasn't gone stale, if it has remove it and create new.
|
||||
auto texture = existing->getTexture(fontSize);
|
||||
if(texture) return texture;
|
||||
this->removeExisting(filename);
|
||||
}
|
||||
|
||||
std::shared_ptr<TrueTypeLoader> loader = std::make_shared<TrueTypeLoader>(
|
||||
filename
|
||||
);
|
||||
pendingAssetLoaders.push_back(std::static_pointer_cast<AssetLoader>(loader));
|
||||
return loader->getTexture(fontSize);
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# Copyright (c) 2024 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
AssetManagerTrueType.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(loaders)
|
@ -1,10 +0,0 @@
|
||||
# Copyright (c) 2024 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
TrueTypeLoader.cpp
|
||||
)
|
@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2024 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
add_subdirectory(font)
|
@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2024 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
add_subdirectory(elements)
|
@ -1,9 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
UILabel.cpp
|
||||
)
|
@ -9,7 +9,9 @@ import tarfile
|
||||
import argparse
|
||||
|
||||
# Args
|
||||
parser = argparse.ArgumentParser(description='Bundles all assets into the internal archive format.')
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Bundles all assets into the internal archive format.'
|
||||
)
|
||||
parser.add_argument('-i', '--input');
|
||||
parser.add_argument('-o', '--output');
|
||||
args = parser.parse_args()
|
||||
@ -24,7 +26,7 @@ if not os.path.exists(os.path.dirname(args.output)):
|
||||
# Does the archive already exist?
|
||||
filesInArchive = []
|
||||
|
||||
if os.path.exists(args.output):
|
||||
if os.path.exists(args.output) and False:
|
||||
# Yes, open it
|
||||
archive = tarfile.open(args.output, 'r:')
|
||||
|
||||
|
Reference in New Issue
Block a user