mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-10-30 05:22:20 +00:00
Compare commits
No commits in common. "35ddfba78a139e2e0a676fda38d6675e397f493a" and "d93847e6a3e350bd1157d61cc1315d8bbff76968" have entirely different histories.
35ddfba78a
...
d93847e6a3
5 changed files with 22 additions and 96 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -17,9 +17,9 @@ jobs:
|
||||||
|
|
||||||
- name: Build library and examples
|
- name: Build library and examples
|
||||||
run: |
|
run: |
|
||||||
make -C GRRLIB clean all install
|
(cd GRRLIB && make clean all install)
|
||||||
make -C GRRLIB/GRRLIB PLATFORM=cube clean all install
|
(cd GRRLIB/GRRLIB && make PLATFORM=cube clean all install)
|
||||||
make -C examples
|
(cd examples && make)
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
2
.github/workflows/doc.yml
vendored
2
.github/workflows/doc.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install doxygen
|
- name: Install doxygen
|
||||||
run: |
|
run: |
|
||||||
wget https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz -O - | tar -xzv --directory=/tmp/
|
wget https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz -O - | tar -xzv --directory=/tmp/
|
||||||
cd /tmp/doxygen-*
|
cd /tmp/doxygen-*
|
||||||
sudo make install
|
sudo make install
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
|
@ -4,7 +4,6 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [Unreleased][]
|
## [Unreleased][]
|
||||||
|
|
||||||
- Allow compilation and installation with cmake.
|
|
||||||
- Added `GRRLIB_CreateEmptyTextureFmt()` to create an empty texture with a given format.
|
- Added `GRRLIB_CreateEmptyTextureFmt()` to create an empty texture with a given format.
|
||||||
|
|
||||||
## [4.5.1][] - 2024-03-02
|
## [4.5.1][] - 2024-03-02
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 3.18)
|
|
||||||
project(grrlib)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
|
|
||||||
pkg_check_modules(PNG REQUIRED libpng)
|
|
||||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
|
||||||
pkg_check_modules(JPEG REQUIRED libjpeg)
|
|
||||||
|
|
||||||
add_library(pngu STATIC)
|
|
||||||
|
|
||||||
target_sources(pngu
|
|
||||||
PRIVATE
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/lib/pngu/pngu.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(pngu
|
|
||||||
PUBLIC
|
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/lib/pngu>"
|
|
||||||
PRIVATE
|
|
||||||
${PNG_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(pngu PUBLIC
|
|
||||||
${PNG_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(grrlib STATIC)
|
|
||||||
|
|
||||||
target_compile_options(grrlib
|
|
||||||
PRIVATE
|
|
||||||
-Wall
|
|
||||||
-Wshadow
|
|
||||||
-Wunused
|
|
||||||
)
|
|
||||||
|
|
||||||
file(GLOB_RECURSE GRRLIB_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/*.c")
|
|
||||||
target_sources(grrlib
|
|
||||||
PRIVATE
|
|
||||||
"${GRRLIB_SRC_FILES}"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(grrlib
|
|
||||||
PUBLIC
|
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB>"
|
|
||||||
PRIVATE
|
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/grrlib>"
|
|
||||||
${FREETYPE_INCLUDE_DIRS}
|
|
||||||
${JPEG_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(grrlib PUBLIC
|
|
||||||
pngu
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/"
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
||||||
FILES_MATCHING PATTERN "*.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS pngu grrlib
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
)
|
|
43
README.md
43
README.md
|
@ -82,31 +82,14 @@ libjpeg is supplied via devkitPro pacman (ppc-libjpeg-turbo)
|
||||||
libfat is supplied via devkitPro pacman (libfat-ogc)
|
libfat is supplied via devkitPro pacman (libfat-ogc)
|
||||||
```
|
```
|
||||||
|
|
||||||
First, you need to make sure that all required library dependencies are installed.
|
The easy way is to install GRRLIB and all the required libraries with a few
|
||||||
Install them with a single command:
|
commands:
|
||||||
|
|
||||||
```bash
|
|
||||||
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
|
||||||
```
|
|
||||||
|
|
||||||
Go to the directory where the code was downloaded:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
c:
|
c:
|
||||||
cd \grr
|
cd \grr\GRRLIB
|
||||||
```
|
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
||||||
|
make clean all install
|
||||||
To install GRRLIB with Make in a single command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
make -C GRRLIB clean all install
|
|
||||||
```
|
|
||||||
|
|
||||||
If you prefer to use CMake, it can also be installed with a few commands:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
/opt/devkitpro/portlibs/wii/bin/powerpc-eabi-cmake -B build
|
|
||||||
cmake --build build --target install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This process may take some time depending on the speed of your PC.
|
This process may take some time depending on the speed of your PC.
|
||||||
|
@ -114,26 +97,36 @@ This process may take some time depending on the speed of your PC.
|
||||||
If you used the method above the following steps are not required, GRRLIB is
|
If you used the method above the following steps are not required, GRRLIB is
|
||||||
installed and you are ready to start developing Wii homebrew games.
|
installed and you are ready to start developing Wii homebrew games.
|
||||||
|
|
||||||
|
If you want, you could install the libfat, libpng,
|
||||||
|
libfreetype and libjpeg with there dependencies in a single command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
||||||
|
```
|
||||||
|
|
||||||
Each library could also be installed individually:
|
Each library could also be installed individually:
|
||||||
|
|
||||||
To install libpngu:
|
To install libpngu:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd GRRLIB\lib\pngu
|
c:
|
||||||
|
cd \grr\GRRLIB\lib\pngu
|
||||||
make clean all install
|
make clean all install
|
||||||
```
|
```
|
||||||
|
|
||||||
To install libgrrlib for Wii:
|
To install libgrrlib for Wii:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd GRRLIB\GRRLIB
|
c:
|
||||||
|
cd \grr\GRRLIB\GRRLIB
|
||||||
make clean all install
|
make clean all install
|
||||||
```
|
```
|
||||||
|
|
||||||
To install libgrrlib for GameCube:
|
To install libgrrlib for GameCube:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd GRRLIB\GRRLIB
|
c:
|
||||||
|
cd \grr\GRRLIB\GRRLIB
|
||||||
make PLATFORM=cube clean all install
|
make PLATFORM=cube clean all install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue