Commit fabe20b9 authored by nanahira's avatar nanahira

mcpro sound test

parent 72e244db
...@@ -30,6 +30,12 @@ before_install: ...@@ -30,6 +30,12 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip; unzip irrlicht-1.8.4.zip ; cd irrlicht-1.8.4/ ; cp ../premake/irrlicht/irrlicht-mac.patch . ; patch -p1 < irrlicht-mac.patch ; cd source/Irrlicht/MacOSX/ ; xcodebuild -project MacOSX.xcodeproj ; cp build/Release/libIrrlicht.a /usr/local/lib/ ; cp -r ../../../include /usr/local/include/irrlicht ; cd ../../../../ ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip; unzip irrlicht-1.8.4.zip ; cd irrlicht-1.8.4/ ; cp ../premake/irrlicht/irrlicht-mac.patch . ; patch -p1 < irrlicht-mac.patch ; cd source/Irrlicht/MacOSX/ ; xcodebuild -project MacOSX.xcodeproj ; cp build/Release/libIrrlicht.a /usr/local/lib/ ; cp -r ../../../include /usr/local/include/irrlicht ; cd ../../../../ ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz
| tar zfx - ; wget -O - https://www.lua.org/ftp/lua-5.3.4.tar.gz | tar zfx -; cd lua-5.3.4; sudo make linux install; cd .. ; fi | tar zfx - ; wget -O - https://www.lua.org/ftp/lua-5.3.4.tar.gz | tar zfx -; cd lua-5.3.4; sudo make linux install; cd .. ; fi
- git clone --depth=1 https://$IRRKLANG_ACCESS_KEY@github.com/purerosefallen/irrklang
- mv -f irrklang/plugins/ikpmp3 .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo cp -rf irrklang/bin/macosx-gcc/libirrklang.dylib /usr/local/lib/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so .; 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
...@@ -65,12 +71,15 @@ before_deploy: ...@@ -65,12 +71,15 @@ before_deploy:
- curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-starter-pack/archive/master.zip - curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-starter-pack/archive/master.zip
- unzip -q ygopro-starter-pack-master.zip - unzip -q ygopro-starter-pack-master.zip
- mv ygopro-starter-pack-master/* . - mv ygopro-starter-pack-master/* .
- curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-sounds/archive/master.zip
- unzip -q ygopro-sounds-master.zip
- cp -rf ygopro-sounds-master/sound .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
--format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf --format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf
system.conf cards.cdb script textures deck single pics replay; fi system.conf cards.cdb script textures deck single pics replay sound; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
--format=posix --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf --format=posix --exclude='.git*' ygopro LICENSE README.md libIrrKlang.so lflist.conf strings.conf
system.conf cards.cdb script textures deck single pics replay; fi system.conf cards.cdb script textures deck single pics replay sound; fi
deploy: deploy:
provider: releases provider: releases
file: file:
......
...@@ -5,6 +5,8 @@ environment: ...@@ -5,6 +5,8 @@ environment:
- locale: zh-CN - locale: zh-CN
# - locale: ja-JP # - locale: ja-JP
- locale: en-US - locale: en-US
access_token:
secure: dAqGTWGo387j9Kaot54scDTRWzXGb3DBVPVcOIzQhNAvSt3WCvXA6xBYIFvPH4pQ
install: install:
# fix tar xz # fix tar xz
...@@ -40,6 +42,9 @@ install: ...@@ -40,6 +42,9 @@ install:
- 7z x sqlite-amalgamation-3200100.zip - 7z x sqlite-amalgamation-3200100.zip
- move sqlite-amalgamation-3200100 sqlite3 - move sqlite-amalgamation-3200100 sqlite3
- git clone --depth=1 https://%access_token%@github.com/purerosefallen/irrklang
- mv -f irrklang/plugins/ikpmp3 .
# let premake happy # let premake happy
- xcopy /E premake\* . - xcopy /E premake\* .
...@@ -66,7 +71,10 @@ after_build: ...@@ -66,7 +71,10 @@ after_build:
- curl --location --retry 5 --output ygopro-starter-pack-master.zip https://github.com/moecube/ygopro-starter-pack/archive/master.zip - curl --location --retry 5 --output ygopro-starter-pack-master.zip https://github.com/moecube/ygopro-starter-pack/archive/master.zip
- unzip -q ygopro-starter-pack-master.zip - unzip -q ygopro-starter-pack-master.zip
- mv ygopro-starter-pack-master/* . - mv ygopro-starter-pack-master/* .
- tar -zcf ygopro-%APPVEYOR_REPO_TAG_NAME%-win32-%locale%.tar.gz --format=posix --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay - curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-sounds/archive/master.zip
- unzip -q ygopro-sounds-master.zip
- cp -rf ygopro-sounds-master/sound .
- tar -zcf ygopro-%APPVEYOR_REPO_TAG_NAME%-win32-%locale%.tar.gz --format=posix --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound
test: off test: off
...@@ -77,8 +85,7 @@ artifacts: ...@@ -77,8 +85,7 @@ artifacts:
deploy: deploy:
description: 'Automatic build' description: 'Automatic build'
provider: GitHub provider: GitHub
auth_token: auth_token: $(access_token)
secure: dAqGTWGo387j9Kaot54scDTRWzXGb3DBVPVcOIzQhNAvSt3WCvXA6xBYIFvPH4pQ # your encrypted token from GitHub
on: on:
appveyor_repo_tag: true # deploy on tag push only appveyor_repo_tag: true # deploy on tag push only
......
...@@ -7,20 +7,22 @@ project "ygopro" ...@@ -7,20 +7,22 @@ project "ygopro"
excludes "lzma/**" excludes "lzma/**"
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event" } links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event" }
if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
links { "ikpmp3" }
includedirs { "../irrklang/include" }
if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" }
end
end
configuration "windows" configuration "windows"
files "ygopro.rc" files "ygopro.rc"
excludes "CGUIButton.cpp" excludes "CGUIButton.cpp"
includedirs { "../irrlicht/include", "../freetype/include", "../event/include", "../sqlite3" } includedirs { "../irrlicht/include", "../freetype/include", "../event/include", "../sqlite3" }
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
links { "irrKlang" } links { "irrKlang" }
includedirs { "../irrklang/include" }
libdirs { "../irrklang/lib/Win32-visualStudio" } libdirs { "../irrklang/lib/Win32-visualStudio" }
if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" }
links { "ikpmp3" }
end
end end
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" } links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" }
configuration {"windows", "not vs*"} configuration {"windows", "not vs*"}
...@@ -33,9 +35,12 @@ project "ygopro" ...@@ -33,9 +35,12 @@ project "ygopro"
links { "event_pthreads", "GL", "dl", "pthread" } links { "event_pthreads", "GL", "dl", "pthread" }
configuration "linux" configuration "linux"
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
links { "IrrKlang" } links { "IrrKlang" }
linkoptions{ "-Wl,-rpath=./irrklang/bin/linux-gcc-64/" } linkoptions{ "-Wl,-rpath=./" }
libdirs { "../irrklang/bin/linux-gcc-64" } libdirs { "../irrklang/bin/linux-gcc-64" }
includedirs { "../irrklang/include" } end
configuration "macosx"
if USE_IRRKLANG then
links { "irrklang" }
libdirs { "../irrklang/bin/macosx-gcc" }
end end
...@@ -19,9 +19,7 @@ bool SoundManager::Init() { ...@@ -19,9 +19,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
......
...@@ -2,13 +2,20 @@ solution "ygo" ...@@ -2,13 +2,20 @@ solution "ygo"
location "build" location "build"
language "C++" language "C++"
objdir "obj" objdir "obj"
if os.ishost("windows") or os.getenv("USE_IRRKLANG") then
USE_IRRKLANG = true
if os.getenv("irrklang_pro") then
IRRKLANG_PRO = true
end
end
configurations { "Debug", "Release" } configurations { "Release", "Debug" }
defines { "LUA_COMPAT_5_2" }
configuration "windows" configuration "windows"
defines { "WIN32", "_WIN32", "WINVER=0x0501" } defines { "WIN32", "_WIN32", "WINVER=0x0501" }
libdirs { "$(DXSDK_DIR)Lib/x86" } libdirs { "$(DXSDK_DIR)Lib/x86" }
entrypoint "mainCRTStartup" entrypoint "mainCRTStartup"
toolset "v140_xp"
startproject "ygopro" startproject "ygopro"
configuration "bsd" configuration "bsd"
...@@ -17,7 +24,7 @@ solution "ygo" ...@@ -17,7 +24,7 @@ solution "ygo"
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
configuration "macosx" configuration "macosx"
defines { "LUA_USE_MACOSX", "LUA_COMPAT_5_2" } defines { "LUA_USE_MACOSX" }
includedirs { "/usr/local/include", "/usr/local/include/*" } includedirs { "/usr/local/include", "/usr/local/include/*" }
libdirs { "/usr/local/lib", "/usr/X11/lib" } libdirs { "/usr/local/lib", "/usr/X11/lib" }
buildoptions { "-stdlib=libc++" } buildoptions { "-stdlib=libc++" }
...@@ -37,7 +44,7 @@ solution "ygo" ...@@ -37,7 +44,7 @@ solution "ygo"
configuration { "Release", "vs*" } configuration { "Release", "vs*" }
flags { "StaticRuntime", "LinkTimeOptimization" } flags { "StaticRuntime", "LinkTimeOptimization" }
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477" } disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4305" }
configuration { "Release", "not vs*" } configuration { "Release", "not vs*" }
symbols "On" symbols "On"
...@@ -67,3 +74,6 @@ solution "ygo" ...@@ -67,3 +74,6 @@ solution "ygo"
include "lua" include "lua"
include "sqlite3" include "sqlite3"
end end
if USE_IRRKLANG then
include "ikpmp3"
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