Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
- name: Extract sqlite
run: |
7z x ${{ steps.sqlite.outputs.filepath }}
mv sqlite-amalgamation-3510300 sqlite3
mv sqlite-amalgamation-3510300 sqlite

- name: Download lzma (xz)
id: lzma
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
!jpeg/testimages/
png/
zlib/
sqlite3/
sqlite/
lzma/
miniaudio/
!miniaudio/external/opus/dnn/
Expand Down Expand Up @@ -565,15 +565,7 @@ jobs:
- name: Use premake to generate make files (static link)
if: matrix.static-link == true
run: |
./premake5 gmake \
--build-event \
--build-jpeg \
--build-png \
--build-zlib \
--build-freetype \
--build-sqlite \
--build-lzma \
--build-opus-vorbis
./premake5 gmake --build-all

- name: Make
run: |
Expand Down Expand Up @@ -635,8 +627,8 @@ jobs:
- name: Install dependencies
if: matrix.static-link != true
run: |
brew install opus opusfile libvorbis zlib
# brew install sqlite libx11 freetype libevent libjpeg-turbo libpng xz
brew install libevent opus opusfile libvorbis zlib
# brew install sqlite libx11 freetype libjpeg-turbo libpng xz

- name: Install NASM
if: matrix.static-link == true
Expand Down Expand Up @@ -710,14 +702,7 @@ jobs:
if: matrix.static-link == true
run: |
./premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }} \
--build-event \
--build-jpeg \
--build-png \
--build-zlib \
--build-freetype \
--build-sqlite \
--build-lzma \
--build-opus-vorbis
--build-all

- name: Make
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/lua
/miniaudio
/png
/sqlite3
/sqlite
/lzma
/zlib
/gframe/*.ico
Expand Down
59 changes: 16 additions & 43 deletions gframe/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,29 @@ project "YGOPro"

defines { "_IRR_STATIC_LIB_" }
files { "*.cpp", "*.h" }
includedirs { "../ocgcore", EVENT_INCLUDE_DIR, IRRLICHT_INCLUDE_DIR, JPEG_INCLUDE_DIR, ZLIB_INCLUDE_DIR, LZMA_INCLUDE_DIR, SQLITE_INCLUDE_DIR }
links { "ocgcore", "lzma", "sqlite3", "irrlicht", "png", "freetype", "event" }

if BUILD_LUA then
links { "lua" }
else
links { LUA_LIB_NAME }
libdirs { LUA_LIB_DIR }
end

if not BUILD_EVENT then
libdirs { EVENT_LIB_DIR }
links { "event_pthreads" }
end
includedirs { "../ocgcore" }
links { "ocgcore" }

if not BUILD_IRRLICHT then
libdirs { IRRLICHT_LIB_DIR }
end

if BUILD_JPEG then
links { "jpeg" }
else
links { JPEG_LIB_NAME }
libdirs { JPEG_LIB_DIR }
end

if not BUILD_PNG then
libdirs { PNG_LIB_DIR }
end

if BUILD_ZLIB then
links { "zlib" }
else
links { ZLIB_LIB_NAME }
libdirs { ZLIB_LIB_DIR }
end

if BUILD_FREETYPE then
includedirs { FREETYPE_CUSTOM_INCLUDE_DIR, FREETYPE_INCLUDE_DIR }
else
includedirs { FREETYPE_INCLUDE_DIR }
libdirs { FREETYPE_LIB_DIR }
includedirs { FREETYPE_CUSTOM_INCLUDE_DIR }
end

if not BUILD_SQLITE then
libdirs { SQLITE_LIB_DIR }
for _, dep in ipairs(DEPENDENCIES_METADATA) do
local upper = string.upper(dep.name)
includedirs { _G[upper .. "_INCLUDE_DIR"] }
if _G["BUILD_" .. upper] then
-- When building from source, the dependencies will be linked with their project names, which can't be changed via options.
links { dep.name }
else
links { _G[upper .. "_LIB_NAME"] }
libdirs { _G[upper .. "_LIB_DIR"] }
end
end

if not BUILD_LZMA then
libdirs { LZMA_LIB_DIR }
if not BUILD_EVENT then
links { EVENT_PTHREADS_LIB_NAME }
end
Comment thread
mercury233 marked this conversation as resolved.
Outdated

if USE_SIMD == "none" then
Expand All @@ -73,7 +46,7 @@ project "YGOPro"
defines { "YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS" }
includedirs { MINIAUDIO_OPUS_INCLUDE_DIR, MINIAUDIO_VORBIS_INCLUDE_DIR }
if not MINIAUDIO_BUILD_OPUS_VORBIS then
links { "opusfile", "vorbisfile", "opus", "vorbis", "ogg" }
links { OPUS_LIB_NAME, OPUSFILE_LIB_NAME, VORBIS_LIB_NAME, VORBISFILE_LIB_NAME, OGG_LIB_NAME }
libdirs { OPUS_LIB_DIR, OPUSFILE_LIB_DIR, VORBIS_LIB_DIR, OGG_LIB_DIR }
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project "sqlite3"
project "sqlite"
kind "StaticLib"

files { "sqlite3.c", "sqlite3.h" }
Expand Down
Loading