Commit de9fe43e authored by mercury233's avatar mercury233

make static link not default

parent 9fea147d
......@@ -237,7 +237,7 @@ jobs:
name:
- ubuntu-22
- ubuntu-24
- ubuntu-dynamic-link
- ubuntu-static-link
include:
- name: ubuntu-22
os: ubuntu-22.04
......@@ -245,10 +245,10 @@ jobs:
- name: ubuntu-24
os: ubuntu-24.04
premake-version: 5.0.0-beta6
- name: ubuntu-dynamic-link
- name: ubuntu-static-link
os: ubuntu-22.04
premake-version: 5.0.0-beta4
dynamic-link: true
static-link: true
runs-on: ${{ matrix.os }}
......@@ -275,8 +275,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libxxf86vm-dev
- name: Install dependencies (dynamic lib)
if: matrix.dynamic-link == true
- name: Install dependencies (dynamic link)
if: matrix.static-link != true
run: |
sudo apt-get install -y libevent-dev libfreetype6-dev libsqlite3-dev libopusfile-dev libvorbis-dev
......@@ -293,7 +293,7 @@ jobs:
chmod +x ./premake5
- name: Download libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: libevent
uses: mercury233/action-cache-download-file@v1.0.0
with:
......@@ -301,13 +301,13 @@ jobs:
filename: libevent.tar.gz
- name: Extract libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.libevent.outputs.filepath }}
mv libevent-2.1.12-stable event
- name: Configure libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
cd event
./configure --disable-openssl --enable-static=yes --enable-shared=no
......@@ -315,14 +315,14 @@ jobs:
cd ..
- name: Download freetype
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: freetype
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz
- name: Extract freetype
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.freetype.outputs.filepath }}
mv freetype-2.13.3 freetype
......@@ -339,14 +339,14 @@ jobs:
mv lua-5.4.7 lua
- name: Download sqlite
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: sqlite
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip
- name: Extract sqlite
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
7z x ${{ steps.sqlite.outputs.filepath }}
mv sqlite-amalgamation-3490100 sqlite3
......@@ -359,60 +359,60 @@ jobs:
cd ..
- name: Download ogg
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: ogg
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz
- name: Extract ogg
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.ogg.outputs.filepath }}
mv libogg-1.3.5 miniaudio/external/ogg
- name: Configure ogg
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
cd miniaudio/external/ogg
./configure
cd ../../..
- name: Download opus
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: opus
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz
- name: Extract opus
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.opus.outputs.filepath }}
mv opus-1.5.2 miniaudio/external/opus
- name: Download opusfile
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: opusfile
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz
- name: Extract opusfile
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.opusfile.outputs.filepath }}
mv opusfile-0.12 miniaudio/external/opusfile
- name: Download vorbis
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: vorbis
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz
- name: Extract vorbis
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.vorbis.outputs.filepath }}
mv libvorbis-1.3.7 miniaudio/external/vorbis
......@@ -427,20 +427,20 @@ jobs:
cp -r resource/* .
- name: Use premake to generate make files (apt packages)
if: matrix.dynamic-link == true
if: matrix.static-link != true
run: |
./premake5 gmake \
--no-build-event \
--no-build-freetype \
--no-build-sqlite \
--no-build-opus-vorbis \
--freetype-include-dir="/usr/include/freetype2" \
--opus-include-dir="/usr/include/opus"
- name: Use premake to generate make files
if: matrix.dynamic-link != true
- name: Use premake to generate make files (static link)
if: matrix.static-link == true
run: |
./premake5 gmake
./premake5 gmake \
--build-event \
--build-freetype \
--build-sqlite \
--build-opus-vorbis
- name: Make
run: |
......@@ -467,41 +467,34 @@ jobs:
matrix:
name:
- macos-13-intel
- macos-13-arm-crossbuild
- macos-13-universal
- macos-13-arm-cross-compile-static-link
- macos-13-universal-static-link
- macos-15-arm
- macos-15-intel-crossbuild
- macos-15-universal
- macos-dynamic-link
- macos-15-intel-cross-compile-static-link
- macos-15-universal-static-link
include:
- name: macos-13-intel
os: macos-13
premake-version: 5.0.0-beta6
- name: macos-13-arm-crossbuild
- name: macos-13-arm-cross-compile-static-link
os: macos-13
premake-version: 5.0.0-beta6
cross-build-arm: true
- name: macos-13-universal
static-link: true
- name: macos-13-universal-static-link
os: macos-13
premake-version: 5.0.0-beta6
cross-build-intel: true
cross-build-arm: true
static-link: true
- name: macos-15-arm
os: macos-15
premake-version: 5.0.0-beta6
- name: macos-15-intel-crossbuild
- name: macos-15-intel-cross-compile-static-link
os: macos-15
premake-version: 5.0.0-beta6
cross-build-intel: true
- name: macos-15-universal
static-link: true
- name: macos-15-universal-static-link
os: macos-15
premake-version: 5.0.0-beta6
cross-build-intel: true
cross-build-arm: true
- name: macos-dynamic-link
os: macos-13
premake-version: 5.0.0-beta6
dynamic-link: true
static-link: true
runs-on: ${{ matrix.os }}
......@@ -524,7 +517,7 @@ jobs:
# cd ..
- name: Install dependencies
if: matrix.dynamic-link == true
if: matrix.static-link != true
run: |
brew install opus opusfile libvorbis
# brew install sqlite libx11 freetype libevent
......@@ -534,7 +527,7 @@ jobs:
brew install premake
- name: Download libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: libevent
uses: mercury233/action-cache-download-file@v1.0.0
with:
......@@ -542,13 +535,13 @@ jobs:
filename: libevent.tar.gz
- name: Extract libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.libevent.outputs.filepath }}
mv libevent-2.1.12-stable event
- name: Configure libevent
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
cd event
./configure --disable-openssl --enable-static=yes --enable-shared=no
......@@ -556,14 +549,14 @@ jobs:
cd ..
- name: Download freetype
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: freetype
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz
- name: Extract freetype
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.freetype.outputs.filepath }}
mv freetype-2.13.3 freetype
......@@ -580,14 +573,14 @@ jobs:
mv lua-5.4.7 lua
- name: Download sqlite
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: sqlite
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip
- name: Extract sqlite
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
7z x ${{ steps.sqlite.outputs.filepath }}
mv sqlite-amalgamation-3490100 sqlite3
......@@ -600,53 +593,53 @@ jobs:
cd ..
- name: Download ogg
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: ogg
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz
- name: Extract ogg
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.ogg.outputs.filepath }}
mv libogg-1.3.5 miniaudio/external/ogg
- name: Download opus
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: opus
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz
- name: Extract opus
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.opus.outputs.filepath }}
mv opus-1.5.2 miniaudio/external/opus
- name: Download opusfile
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: opusfile
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz
- name: Extract opusfile
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.opusfile.outputs.filepath }}
mv opusfile-0.12 miniaudio/external/opusfile
- name: Download vorbis
if: matrix.dynamic-link != true
if: matrix.static-link == true
id: vorbis
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz
- name: Extract vorbis
if: matrix.dynamic-link != true
if: matrix.static-link == true
run: |
tar xf ${{ steps.vorbis.outputs.filepath }}
mv libvorbis-1.3.7 miniaudio/external/vorbis
......@@ -660,21 +653,36 @@ jobs:
cp -r premake/* .
cp -r resource/* .
- name: Use premake to generate make files (homebrew packages)
if: matrix.dynamic-link == true
- name: Use premake to generate make files (homebrew packages, Intel)
if: matrix.static-link != true && runner.arch == 'X64'
run: |
premake5 gmake \
--no-build-event \
--no-build-freetype \
--no-build-sqlite \
--no-build-opus-vorbis \
premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }} \
--freetype-include-dir="/usr/local/include/freetype2" \
--opus-include-dir="/usr/local/include/opus"
- name: Use premake to generate make files
if: matrix.dynamic-link != true
run: |
./premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }}
- name: Use premake to generate make files (homebrew packages, Apple Silicon)
if: matrix.static-link != true && runner.arch == 'ARM64'
run: |
premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }} \
--event-include-dir="/opt/homebrew/include" \
--event-lib-dir="/opt/homebrew/lib" \
--freetype-include-dir="/opt/homebrew/include/freetype2" \
--freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \
--opus-include-dir="/opt/homebrew/include/opus" \
--opus-lib-dir="/opt/homebrew/lib" \
--vorbis-include-dir="/opt/homebrew/include" \
--vorbis-lib-dir="/opt/homebrew/lib"
- name: Use premake to generate make files (static link)
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-freetype \
--build-sqlite \
--build-opus-vorbis
- name: Make
run: |
......
......@@ -3,9 +3,9 @@
BUILD_LUA = true
LUA_LIB_NAME = "lua"
BUILD_EVENT = true
BUILD_FREETYPE = true
BUILD_SQLITE = true
BUILD_EVENT = os.istarget("windows")
BUILD_FREETYPE = os.istarget("windows")
BUILD_SQLITE = os.istarget("windows")
BUILD_IRRLICHT = true
......@@ -13,7 +13,7 @@ USE_AUDIO = true
AUDIO_LIB = "miniaudio"
-- BUILD_MINIAUDIO is always true
MINIAUDIO_SUPPORT_OPUS_VORBIS = true
MINIAUDIO_BUILD_OPUS_VORBIS = true
MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows")
-- BUILD_IRRKLANG is impossible because irrKlang is not open source
IRRKLANG_PRO = false
IRRKLANG_PRO_BUILD_IKPMP3 = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment