Commit 277f11d2 authored by mercury233's avatar mercury233

update

parent bf58ee15
...@@ -236,7 +236,7 @@ jobs: ...@@ -236,7 +236,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libevent-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libsqlite3-dev libxxf86vm-dev libminiaudio-dev libopusfile-dev libvorbis-dev sudo apt-get install -y libevent-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libsqlite3-dev libxxf86vm-dev libopusfile-dev libvorbis-dev
- name: Download premake - name: Download premake
id: premake id: premake
...@@ -261,6 +261,12 @@ jobs: ...@@ -261,6 +261,12 @@ jobs:
tar xf ${{ steps.lua.outputs.filepath }} tar xf ${{ steps.lua.outputs.filepath }}
mv lua-5.4.7 lua mv lua-5.4.7 lua
# - name: Download miniaudio
# id: miniaudio
# uses: mercury233/action-cache-download-file@v1.0.0
# with:
# url:
- name: Download irrlicht - name: Download irrlicht
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
......
...@@ -42,15 +42,10 @@ project "YGOPro" ...@@ -42,15 +42,10 @@ project "YGOPro"
defines { "YGOPRO_USE_AUDIO" } defines { "YGOPRO_USE_AUDIO" }
includedirs { "../miniaudio" } includedirs { "../miniaudio" }
links { "miniaudio" } links { "miniaudio" }
if not BUILD_MINIAUDIO then if MINIAUDIO_SUPPORT_OPUS_VORBIS and not BUILD_OPUS_VORBIS then
includedirs { MINIAUDIO_INCLUDE_DIR } includedirs { OPUS_INCLUDE_DIR, VORBIS_INCLUDE_DIR }
libdirs { MINIAUDIO_LIB_DIR } libdirs { OPUS_LIB_DIR, VORBIS_LIB_DIR }
links { "miniaudio" } links { "opusfile", "vorbis" }
if MINIAUDIO_SUPPORT_OPUS_VORBIS then
includedirs { OPUS_INCLUDE_DIR, VORBIS_INCLUDE_DIR }
libdirs { OPUS_LIB_DIR, VORBIS_LIB_DIR }
links { "opusfile", "vorbis" }
end
end end
end end
......
...@@ -6,7 +6,6 @@ BUILD_EVENT = os.istarget("windows") ...@@ -6,7 +6,6 @@ BUILD_EVENT = os.istarget("windows")
BUILD_FREETYPE = os.istarget("windows") BUILD_FREETYPE = os.istarget("windows")
BUILD_SQLITE = os.istarget("windows") BUILD_SQLITE = os.istarget("windows")
BUILD_IRRLICHT = not os.istarget("macosx") BUILD_IRRLICHT = not os.istarget("macosx")
BUILD_MINIAUDIO = os.istarget("windows")
BUILD_OPUS_VORBIS = os.istarget("windows") BUILD_OPUS_VORBIS = os.istarget("windows")
MINIAUDIO_SUPPORT_OPUS_VORBIS = true MINIAUDIO_SUPPORT_OPUS_VORBIS = true
LUA_LIB_NAME = "lua" LUA_LIB_NAME = "lua"
...@@ -47,8 +46,6 @@ newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", d ...@@ -47,8 +46,6 @@ newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", d
newoption { trigger = "no-audio", category = "YGOPro", description = "" } newoption { trigger = "no-audio", category = "YGOPro", description = "" }
newoption { trigger = "build-miniaudio", category = "YGOPro - miniaudio", description = "" }
newoption { trigger = "no-build-miniaudio", category = "YGOPro - miniaudio", description = "" }
newoption { trigger = "miniaudio-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } newoption { trigger = "miniaudio-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "miniaudio-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } newoption { trigger = "miniaudio-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "miniaudio-support-opus-vorbis", category = "YGOPro - miniaudio", description = "" } newoption { trigger = "miniaudio-support-opus-vorbis", category = "YGOPro - miniaudio", description = "" }
...@@ -124,16 +121,6 @@ if GetParam("no-audio") then ...@@ -124,16 +121,6 @@ if GetParam("no-audio") then
USE_AUDIO = false USE_AUDIO = false
end end
if GetParam("build-miniaudio") then
BUILD_MINIAUDIO = true
elseif GetParam("nobuild-miniaudio") then
BUILD_MINIAUDIO = false
end
if not BUILD_MINIAUDIO then
MINIAUDIO_SUPPORT_OPUS_VORBIS = false
MINIAUDIO_INCLUDE_DIR = GetParam("miniaudio-include-dir") or os.findheader("miniaudio")
MINIAUDIO_LIB_DIR = GetParam("miniaudio-lib-dir") or os.findlib("miniaudio")
end
if GetParam("miniaudio-support-opus-vorbis") then if GetParam("miniaudio-support-opus-vorbis") then
MINIAUDIO_SUPPORT_OPUS_VORBIS = true MINIAUDIO_SUPPORT_OPUS_VORBIS = true
elseif GetParam("no-miniaudio-support-opus-vorbis") then elseif GetParam("no-miniaudio-support-opus-vorbis") then
...@@ -249,6 +236,6 @@ workspace "YGOPro" ...@@ -249,6 +236,6 @@ workspace "YGOPro"
if BUILD_SQLITE then if BUILD_SQLITE then
include "sqlite3" include "sqlite3"
end end
if USE_AUDIO and BUILD_MINIAUDIO then if USE_AUDIO then
include "miniaudio" include "miniaudio"
end end
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