Commit 0e780948 authored by nanahira's avatar nanahira

Merge branch 'develop' into server-develop

parents a13d71af e8fc2f08
...@@ -16,7 +16,7 @@ make config=release -j$(sysctl -n hw.ncpu) ...@@ -16,7 +16,7 @@ make config=release -j$(sysctl -n hw.ncpu)
cd .. cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH mv bin/release/YGOPro $TARGET_YGOPRO_BINARY_PATH
#if [[ $TARGET_PLATFORM == "x86" ]]; then #if [[ $TARGET_PLATFORM == "x86" ]]; then
# install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH # install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
......
#!/bin/bash #!/bin/bash
set -x set -x
set -o errexit set -o errexit
source .ci/asset-branch
IRRLICHT_REPO_URL="https://code.moenext.com/mycard/irrlicht-new.git" source .ci/prepare-repo
IRRLICHT_BRANCH_NAME="$ASSET_BRANCH_NAME" prepare_repo "https://code.moenext.com/mycard/irrlicht-new.git" "irrlicht"
if [ ! -d "irrlicht" ]; then
git clone --depth=1 --branch "$IRRLICHT_BRANCH_NAME" "$IRRLICHT_REPO_URL" irrlicht
else
cd irrlicht
git fetch origin "$IRRLICHT_BRANCH_NAME"
git checkout "$IRRLICHT_BRANCH_NAME"
git reset --hard origin/"$IRRLICHT_BRANCH_NAME"
cd ..
fi
#!/bin/sh #!/bin/bash
set -x set -x
set -o errexit set -o errexit
if [ ! -d "miniaudio" ]; then source .ci/prepare-repo
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio prepare_repo "https://code.moenext.com/mycard/miniaudio.git" "miniaudio"
fi
cp -rf miniaudio/extras/miniaudio_split/miniaudio.* miniaudio/ cp -rf miniaudio/extras/miniaudio_split/miniaudio.* miniaudio/
...@@ -20,7 +19,7 @@ install_external() { ...@@ -20,7 +19,7 @@ install_external() {
fi fi
} }
install_external "ogg" "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz" install_external "ogg" "https://mat-cacher.moenext.com/https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz"
install_external "opus" "https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz" install_external "opus" "https://mat-cacher.moenext.com/https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz"
install_external "opusfile" "https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz" install_external "opusfile" "https://mat-cacher.moenext.com/https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz"
install_external "vorbis" "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz" install_external "vorbis" "https://mat-cacher.moenext.com/https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz"
source .ci/asset-branch
BRANCH_NAME="$ASSET_BRANCH_NAME"
prepare_repo() {
REPO_URL="$1"
TARGET_DIR_NAME="$2"
if [ ! -d "$TARGET_DIR_NAME" ]; then
echo "Cloning repository $REPO_URL branch $BRANCH_NAME into $TARGET_DIR_NAME"
git clone --depth=1 --branch "$BRANCH_NAME" "$REPO_URL" "$TARGET_DIR_NAME"
else
echo "Repository $REPO_URL already exists in $TARGET_DIR_NAME, updating to $BRANCH_NAME..."
cd "$TARGET_DIR_NAME"
git remote set-url origin "$REPO_URL"
git fetch origin "$BRANCH_NAME"
git checkout "$BRANCH_NAME"
git reset --hard origin/"$BRANCH_NAME"
cd ..
fi
}
...@@ -65,7 +65,7 @@ jobs: ...@@ -65,7 +65,7 @@ jobs:
id: premake id: premake
uses: mercury233/action-cache-download-file@v1.0.0 uses: mercury233/action-cache-download-file@v1.0.0
with: 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 filename: premake5.zip
- name: Extract premake - name: Extract premake
...@@ -258,7 +258,7 @@ jobs: ...@@ -258,7 +258,7 @@ jobs:
premake-version: 5.0.0-beta4 premake-version: 5.0.0-beta4
- name: ubuntu-24 - name: ubuntu-24
os: ubuntu-24.04 os: ubuntu-24.04
premake-version: 5.0.0-beta6 premake-version: 5.0.0-beta7
- name: ubuntu-static-link - name: ubuntu-static-link
os: ubuntu-22.04 os: ubuntu-22.04
premake-version: 5.0.0-beta4 premake-version: 5.0.0-beta4
...@@ -528,9 +528,17 @@ jobs: ...@@ -528,9 +528,17 @@ jobs:
brew install opus opusfile libvorbis brew install opus opusfile libvorbis
# brew install sqlite libx11 freetype libevent # 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: | run: |
brew install premake tar xf ${{ steps.premake.outputs.filepath }}
chmod +x ./premake5
- name: Download libevent - name: Download libevent
if: matrix.static-link == true if: matrix.static-link == true
...@@ -662,12 +670,12 @@ jobs: ...@@ -662,12 +670,12 @@ jobs:
- name: Use premake to generate make files (Homebrew packages) - name: Use premake to generate make files (Homebrew packages)
if: matrix.static-link != true if: matrix.static-link != true
run: | 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) - name: Use premake to generate make files (static link)
if: matrix.static-link == true if: matrix.static-link == true
run: | 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-event \
--build-freetype \ --build-freetype \
--build-sqlite \ --build-sqlite \
...@@ -684,4 +692,4 @@ jobs: ...@@ -684,4 +692,4 @@ jobs:
with: with:
name: YGOPro-${{ matrix.name }} name: YGOPro-${{ matrix.name }}
path: | path: |
bin/release/YGOPro.app bin/release/YGOPro
...@@ -14,16 +14,16 @@ mat_common: ...@@ -14,16 +14,16 @@ mat_common:
- linux - linux
script: script:
# lua # lua
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/lua-5.4.7.tar.gz | tar zfx - - wget -O - https://mat-cacher.moenext.com/https://www.lua.org/ftp/lua-5.4.8.tar.gz | tar zfx -
- mv lua-5.4.7 lua - mv lua-5.4.8 lua
# sqlite3 # sqlite3
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/sqlite-autoconf-3490100.tar.gz | tar zfx - - wget -O - https://mat-cacher.moenext.com/https://www.sqlite.org/2025/sqlite-autoconf-3500100.tar.gz | tar zfx -
- mv sqlite-autoconf-3490100 sqlite3 - mv sqlite-autoconf-3500100 sqlite3
# freetype # freetype
#- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/freetype-2.13.3.tar.gz | tar zfx - # - wget -O - https://mat-cacher.moenext.com/https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz | tar zfx -
#- mv freetype-2.13.3 freetype # - mv freetype-2.13.3 freetype
# event # event
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/libevent-2.1.12-stable.tar.gz | tar zfx - - wget -O - https://mat-cacher.moenext.com/https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz | tar zfx -
- mv libevent-2.1.12-stable event - mv libevent-2.1.12-stable event
# irrlicht # irrlicht
- ./.ci/prepare-irrlicht.sh - ./.ci/prepare-irrlicht.sh
...@@ -72,7 +72,7 @@ mat_macos: ...@@ -72,7 +72,7 @@ mat_macos:
- linux - linux
script: script:
- apt update; apt -y install wget tar - apt update; apt -y install wget tar
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta6-macosx.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/premake5-built/premake-5.0.0-beta7-macosx.tar.gz | tar zfx -
- chmod +x premake5 - chmod +x premake5
artifacts: artifacts:
paths: paths:
...@@ -85,8 +85,8 @@ mat_windows: ...@@ -85,8 +85,8 @@ mat_windows:
script: script:
- apt update; apt -y install wget tar patch p7zip-full - apt update; apt -y install wget tar patch p7zip-full
# premake5.exe # premake5.exe
- wget https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta6-windows.zip - wget https://cdn02.moecube.com:444/premake5-built/premake-5.0.0-beta7-windows.zip
- 7z x -y premake-5.0.0-beta6-windows.zip - 7z x -y premake-5.0.0-beta7-windows.zip
artifacts: artifacts:
paths: paths:
- premake5.exe - premake5.exe
......
Subproject commit ae7a3b8110a64387fe9812bbccb7b685a731a12f Subproject commit 76b4b3ad89fe967bd701f3dbd453d03e6381da37
...@@ -360,12 +360,6 @@ if SERVER_MODE then ...@@ -360,12 +360,6 @@ if SERVER_MODE then
end end
end end
function isRunningUnderRosetta()
local uname = os.outputof("uname -m")
local proctranslated = os.outputof("sysctl sysctl.proc_translated")
return uname:find("arm") or proctranslated
end
function IsRunningUnderARM() function IsRunningUnderARM()
-- os.hostarch() is over premake5 beta3, -- os.hostarch() is over premake5 beta3,
if os.hostarch then if os.hostarch then
...@@ -414,14 +408,9 @@ if os.istarget("macosx") then ...@@ -414,14 +408,9 @@ if os.istarget("macosx") then
if GetParam("mac-intel") then if GetParam("mac-intel") then
MAC_INTEL = true MAC_INTEL = true
end end
if MAC_ARM or (not MAC_INTEL and os.hostarch() == "ARM64") then
if MAC_ARM then -- building on ARM CPU will target ARM automatically
TARGET_MAC_ARM = true TARGET_MAC_ARM = true
elseif not MAC_INTEL then
-- automatic target arm64, need extra detect
if isRunningUnderRosetta() then
TARGET_MAC_ARM = true
end
end end
end end
...@@ -508,11 +497,7 @@ workspace "YGOPro" ...@@ -508,11 +497,7 @@ workspace "YGOPro"
targetdir "bin/debug/x64" targetdir "bin/debug/x64"
filter { "configurations:Release", "action:vs*" } filter { "configurations:Release", "action:vs*" }
if linktimeoptimization then linktimeoptimization "On"
linktimeoptimization "On"
else
flags { "LinkTimeOptimization" }
end
staticruntime "On" staticruntime "On"
disablewarnings { "4244", "4267", "4838", "4996", "6011", "6031", "6054", "6262" } disablewarnings { "4244", "4267", "4838", "4996", "6011", "6031", "6054", "6262" }
......
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