Commit 4110e20b authored by nanahira's avatar nanahira

Merge remote-tracking branch 'mer/patch-irrlicht-mac' of ../../ygopro into develop

parents 54907993 3aace69f
Pipeline #35965 passed with stages
in 11 minutes and 10 seconds
...@@ -6,8 +6,6 @@ TARGET_PLATFORM=$(arch) ...@@ -6,8 +6,6 @@ TARGET_PLATFORM=$(arch)
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht/lib/$(arch)
export OPUS_INCLUDE_DIR=$PWD/miniaudio/external-built/include/opus export OPUS_INCLUDE_DIR=$PWD/miniaudio/external-built/include/opus
export OPUS_LIB_DIR=$PWD/miniaudio/external-built/lib export OPUS_LIB_DIR=$PWD/miniaudio/external-built/lib
export VORBIS_INCLUDE_DIR=$PWD/miniaudio/external-built/include export VORBIS_INCLUDE_DIR=$PWD/miniaudio/external-built/include
......
...@@ -401,12 +401,6 @@ jobs: ...@@ -401,12 +401,6 @@ jobs:
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
- name: Build irrlicht
run: |
cd irrlicht/source/Irrlicht/MacOSX
xcodebuild -project MacOSX.xcodeproj
cd ../../../..
- name: Copy premake files - name: Copy premake files
run: | run: |
cp -r premake/* . cp -r premake/* .
...@@ -417,10 +411,15 @@ jobs: ...@@ -417,10 +411,15 @@ jobs:
run: | run: |
./premake5 gmake \ ./premake5 gmake \
--cc=clang \ --cc=clang \
<<<<<<< HEAD
--freetype-include-dir="/usr/local/include/freetype2" \ --freetype-include-dir="/usr/local/include/freetype2" \
--opus-include-dir="/usr/local/include/opus" \ --opus-include-dir="/usr/local/include/opus" \
--irrlicht-include-dir="../irrlicht/include" \ --irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release" --irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
=======
--no-use-irrklang \
--freetype-include-dir="/usr/local/include/freetype2"
>>>>>>> 3aace69fd7bed29f44f40321b513be2a9a3ee45c
- name: Use premake to generate make files (ARM64) - name: Use premake to generate make files (ARM64)
if: runner.arch == 'ARM64' if: runner.arch == 'ARM64'
...@@ -432,6 +431,7 @@ jobs: ...@@ -432,6 +431,7 @@ jobs:
--freetype-include-dir="/opt/homebrew/include/freetype2" \ --freetype-include-dir="/opt/homebrew/include/freetype2" \
--freetype-lib-dir="/opt/homebrew/lib" \ --freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \ --sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
<<<<<<< HEAD
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \ --sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \
--miniaudio-include-dir="/opt/homebrew/include" \ --miniaudio-include-dir="/opt/homebrew/include" \
--miniaudio-lib-dir="/opt/homebrew/lib" \ --miniaudio-lib-dir="/opt/homebrew/lib" \
...@@ -441,6 +441,9 @@ jobs: ...@@ -441,6 +441,9 @@ jobs:
--vorbis-lib-dir="/opt/homebrew/lib" \ --vorbis-lib-dir="/opt/homebrew/lib" \
--irrlicht-include-dir="../irrlicht/include" \ --irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release" --irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
=======
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib"
>>>>>>> 3aace69fd7bed29f44f40321b513be2a9a3ee45c
- name: Make - name: Make
run: | run: |
......
...@@ -23,6 +23,8 @@ mat_common: ...@@ -23,6 +23,8 @@ mat_common:
# freetype # freetype
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
- mv freetype-2.11.1 freetype - mv freetype-2.11.1 freetype
# irrlicht
- ./.ci/prepare-irrlicht.sh
# miniaudio # miniaudio
- ./.ci/prepare-miniaudio.sh - ./.ci/prepare-miniaudio.sh
# premake # premake
...@@ -32,6 +34,7 @@ mat_common: ...@@ -32,6 +34,7 @@ mat_common:
- lua - lua
- freetype - freetype
- sqlite3 - sqlite3
- irrlicht
- miniaudio - miniaudio
mat_submodules: mat_submodules:
...@@ -48,21 +51,21 @@ mat_submodules: ...@@ -48,21 +51,21 @@ mat_submodules:
- ocgcore - ocgcore
- script - script
mat_linux: #mat_linux:
stage: prepare # stage: prepare
tags: # tags:
- linux # - linux
script: # script:
- apt update; apt -y install git wget tar # - apt update; apt -y install git wget tar
- ./.ci/prepare-irrlicht.sh # - ./.ci/prepare-irrlicht.sh
# - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta5-linux.tar.gz | tar zfx - # # - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta5-linux.tar.gz | tar zfx -
# - env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh # # - env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts: # artifacts:
paths: # paths:
# - premake5 # # - premake5
- irrlicht # - irrlicht
# - libevent-stable # # - libevent-stable
image: git-registry.mycard.moe/mycard/docker-runner-base:debian11 # image: git-registry.mycard.moe/mycard/docker-runner-base:debian11
mat_macos: mat_macos:
stage: prepare stage: prepare
...@@ -72,14 +75,9 @@ mat_macos: ...@@ -72,14 +75,9 @@ mat_macos:
- 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-beta5-macosx.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta5-macosx.tar.gz | tar zfx -
- chmod +x premake5 - chmod +x premake5
- mkdir irrlicht
- cd irrlicht
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx -
- cd ..
artifacts: artifacts:
paths: paths:
- premake5 - premake5
- irrlicht
mat_windows: mat_windows:
stage: prepare stage: prepare
...@@ -93,13 +91,10 @@ mat_windows: ...@@ -93,13 +91,10 @@ mat_windows:
# event # event
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- mv libevent-2.0.22-stable event - mv libevent-2.0.22-stable event
# irrlicht
- ./.ci/prepare-irrlicht.sh
artifacts: artifacts:
paths: paths:
- premake5.exe - premake5.exe
- event - event
- irrlicht
exec_windows: exec_windows:
stage: build stage: build
...@@ -130,7 +125,7 @@ exec_linux: ...@@ -130,7 +125,7 @@ exec_linux:
image: git-registry.moenext.com/mycard/docker-ygopro-builder:latest image: git-registry.moenext.com/mycard/docker-ygopro-builder:latest
dependencies: dependencies:
- mat_common - mat_common
- mat_linux #- mat_linux
- mat_submodules - mat_submodules
variables: variables:
EVENT_INCLUDE_DIR: /usr/share/libevent-stable/include EVENT_INCLUDE_DIR: /usr/share/libevent-stable/include
...@@ -148,7 +143,7 @@ exec_linux: ...@@ -148,7 +143,7 @@ exec_linux:
- obj/ - obj/
script: script:
- ./.ci/build-opus.sh - ./.ci/build-opus.sh
- premake5 gmake --build-freetype --build-sqlite --build-irrlicht - premake5 gmake --build-freetype --build-sqlite
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
......
...@@ -158,3 +158,15 @@ project "irrlicht" ...@@ -158,3 +158,15 @@ project "irrlicht"
filter { "system:linux" } filter { "system:linux" }
links { "X11", "Xxf86vm" } links { "X11", "Xxf86vm" }
filter { "system:macosx" }
cppdialect "gnu++14"
defines { "GL_SILENCE_DEPRECATION", "PNG_ARM_NEON_OPT=0", "PNG_ARM_NEON_IMPLEMENTATION=0" }
undefines { "NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_" }
files {
"source/Irrlicht/MacOSX/*.mm",
"source/Irrlicht/MacOSX/*.h",
}
filter { "system:macosx", "files:source/Irrlicht/Irrlicht.cpp or source/Irrlicht/COpenGLDriver.cpp" }
compileas "Objective-C++"
...@@ -6,7 +6,7 @@ LUA_LIB_NAME = "lua" ...@@ -6,7 +6,7 @@ LUA_LIB_NAME = "lua"
BUILD_EVENT = os.istarget("windows") 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 = true
USE_AUDIO = true USE_AUDIO = true
AUDIO_LIB = "miniaudio" AUDIO_LIB = "miniaudio"
...@@ -230,7 +230,6 @@ workspace "YGOPro" ...@@ -230,7 +230,6 @@ workspace "YGOPro"
filter "system:macosx" filter "system:macosx"
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" }
if MAC_ARM then if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" } buildoptions { "--target=arm64-apple-macos12" }
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