Commit 4611008a authored by nanahira's avatar nanahira

update_mac

parent 5d83e80a
...@@ -55,20 +55,21 @@ before_install: ...@@ -55,20 +55,21 @@ before_install:
- curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://www.ambiera.at/downloads/irrKlang-64bit-1.5.0.zip - curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://www.ambiera.at/downloads/irrKlang-64bit-1.5.0.zip
- unzip -q irrKlang-64bit-1.5.0.zip - unzip -q irrKlang-64bit-1.5.0.zip
- mv -f irrKlang-64bit-1.5.0 irrklang - mv -f irrKlang-64bit-1.5.0 irrklang
- mv -f irrklang/plugins/ikpMP3 ikpmp3
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mv -f irrklang/bin/macosx-gcc/libirrklang.dylib irrklang/bin/macosx-gcc/libirrKlang.dylib; mv -f irrklang/bin/macosx-gcc/libirrklang.dylib irrklang/bin/macosx-gcc/libirrKlang.dylib;
sudo cp -rf irrklang/bin/macosx-gcc/*.dylib /usr/local/lib/; sudo cp -rf irrklang/bin/macosx-gcc/libirrKlang.dylib /usr/local/lib/;
fi fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mv -f irrklang/bin/linux-gcc-64/libIrrKlang.so irrklang/bin/linux-gcc-64/libirrKlang.so; mv -f irrklang/bin/linux-gcc-64/libIrrKlang.so irrklang/bin/linux-gcc-64/libirrKlang.so;
cp -rf irrklang/bin/linux-gcc-64/*.so .; cp -rf irrklang/bin/linux-gcc-64/libirrKlang.so .;
fi fi
script: script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./premake5 gmake --cc=clang; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./premake5 gmake --cc=clang; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./premake5 gmake; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./premake5 gmake; fi
- cd build - cd build
- make config=release ygopro - make config=release ygopro -j4
- cd .. - cd ..
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv -f bin/release/ygopro ./; strip ygopro; - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv -f bin/release/ygopro ./; strip ygopro;
fi fi
...@@ -90,7 +91,7 @@ script: ...@@ -90,7 +91,7 @@ script:
fi fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
zip -q -r ygopro-koishi-$TRAVIS_OS_NAME.zip ygopro *.so; zip -q -r ygopro-koishi-$TRAVIS_OS_NAME.zip ygopro libirrKlang.so;
fi fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
zip -q -r ygopro-koishi-$TRAVIS_OS_NAME.zip ygopro.app; zip -q -r ygopro-koishi-$TRAVIS_OS_NAME.zip ygopro.app;
...@@ -100,6 +101,7 @@ deploy: ...@@ -100,6 +101,7 @@ deploy:
provider: releases provider: releases
file: ygopro-koishi-$TRAVIS_OS_NAME.zip file: ygopro-koishi-$TRAVIS_OS_NAME.zip
skip_cleanup: true skip_cleanup: true
overwrite: true
on: on:
tags: true tags: true
api-key: $NANAHIRA api-key: $NANAHIRA
...@@ -9,10 +9,9 @@ project "ygopro" ...@@ -9,10 +9,9 @@ project "ygopro"
links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event" } links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event" }
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
links { "irrKlang" } links { "irrKlang", "ikpmp3" }
includedirs { "../irrklang/include" } includedirs { "../irrklang/include" }
if IRRKLANG_PRO then if IRRKLANG_PRO then
links { "ikpMP3" }
defines { "IRRKLANG_STATIC" } defines { "IRRKLANG_STATIC" }
end end
end end
......
...@@ -16,9 +16,7 @@ bool SoundManager::Init() { ...@@ -16,9 +16,7 @@ bool SoundManager::Init() {
if(!engineSound || !engineMusic) { if(!engineSound || !engineMusic) {
return false; return false;
} else { } else {
#ifdef IRRKLANG_STATIC
irrklang::ikpMP3Init(engineMusic); irrklang::ikpMP3Init(engineMusic);
#endif
return true; return true;
} }
#endif // YGOPRO_USE_IRRKLANG #endif // YGOPRO_USE_IRRKLANG
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
#include "game.h" #include "game.h"
#ifdef YGOPRO_USE_IRRKLANG #ifdef YGOPRO_USE_IRRKLANG
#include <irrKlang.h> #include <irrKlang.h>
#ifdef IRRKLANG_STATIC
#include "../ikpmp3/ikpMP3.h" #include "../ikpmp3/ikpMP3.h"
#endif #endif
#endif
#define wcsicmp _wcsicmp #define wcsicmp _wcsicmp
......
...@@ -8,7 +8,6 @@ solution "ygo" ...@@ -8,7 +8,6 @@ solution "ygo"
IRRKLANG_PRO = true IRRKLANG_PRO = true
end end
end end
startproject "ygopro"
configurations { "Debug", "Release" } configurations { "Debug", "Release" }
defines { "LUA_COMPAT_5_2" } defines { "LUA_COMPAT_5_2" }
...@@ -76,6 +75,6 @@ solution "ygo" ...@@ -76,6 +75,6 @@ solution "ygo"
include "lua" include "lua"
include "sqlite3" include "sqlite3"
end end
if IRRKLANG_PRO then if USE_IRRKLANG then
include "ikpmp3" include "ikpmp3"
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