Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 15 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
id: premake
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/premake/premake-core/releases/download/v5.0.0-beta6/premake-5.0.0-beta6-windows.zip
url: https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-windows.zip
filename: premake5.zip

- name: Extract premake
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
premake-version: 5.0.0-beta4
- name: ubuntu-24
os: ubuntu-24.04
premake-version: 5.0.0-beta6
premake-version: 5.0.0-beta7
- name: ubuntu-static-link
os: ubuntu-22.04
premake-version: 5.0.0-beta4
Expand Down Expand Up @@ -528,9 +528,17 @@ jobs:
brew install opus opusfile libvorbis
# brew install sqlite libx11 freetype libevent

- name: Install premake
- name: Download premake
id: premake
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-macosx.tar.gz
filename: premake5.tar.gz

- name: Extract premake
run: |
brew install premake
tar xf ${{ steps.premake.outputs.filepath }}
chmod +x ./premake5

- name: Download libevent
if: matrix.static-link == true
Expand Down Expand Up @@ -662,12 +670,12 @@ jobs:
- name: Use premake to generate make files (Homebrew packages)
if: matrix.static-link != true
run: |
DYLD_LIBRARY_PATH=$(brew --prefix)/lib premake5 gmake
DYLD_LIBRARY_PATH=$(brew --prefix)/lib ./premake5 gmake

- 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' || '' }} \
./premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }} \
--build-event \
--build-freetype \
--build-sqlite \
Expand All @@ -684,4 +692,4 @@ jobs:
with:
name: YGOPro-${{ matrix.name }}
path: |
bin/release/YGOPro.app
bin/release/YGOPro
18 changes: 3 additions & 15 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,9 @@ if os.istarget("macosx") then
if GetParam("mac-intel") then
MAC_INTEL = true
end

if MAC_ARM then
if MAC_ARM or (not MAC_INTEL and os.hostarch() == "ARM64") then
-- building on ARM CPU will target ARM automatically
TARGET_MAC_ARM = true
elseif not MAC_INTEL then
-- automatic target arm64, need extra detect
local uname = os.outputof("uname -m")
local proctranslated = os.outputof("sysctl sysctl.proc_translated")
if uname:find("arm") or proctranslated then
print("Detected Apple Silicon Mac")
TARGET_MAC_ARM = true
end
end
end

Expand Down Expand Up @@ -319,11 +311,7 @@ workspace "YGOPro"
targetdir "bin/debug/x64"

filter { "configurations:Release", "action:vs*" }
if linktimeoptimization then
linktimeoptimization "On"
else
flags { "LinkTimeOptimization" }
end
linktimeoptimization "On"
staticruntime "On"
disablewarnings { "4244", "4267", "4838", "4996", "6011", "6031", "6054", "6262" }

Expand Down