def copyDev(targetDir): aceutils.mkdir(targetDir+r'/') # Sample sampleDir = targetDir+r'/' if type == 'cpp': aceutils.mkdir(sampleDir+r'cpp/') aceutils.mkdir(sampleDir+r'cpp/include/') aceutils.mkdir(sampleDir+r'cpp/lib/') aceutils.mkdir(sampleDir+r'cpp/lib/Debug/') aceutils.mkdir(sampleDir+r'cpp/lib/Release/') aceutils.copy(r'Dev/include/Altseed.h', sampleDir+r'cpp/include/') if aceutils.isWin(): aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', sampleDir+r'cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', sampleDir+r'cpp/lib/Release/') else: aceutils.copy(r'Dev/lib/libAltseed.a', sampleDir+r'cpp/lib/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core_Debug.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleDir+r'bin/') elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleDir+r'bin/') else: aceutils.copy(r'Dev/bin/libAltseed_core.so', sampleDir+r'bin/') if type == 'cs': aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'sample_cs/') aceutils.copy(r'Dev/bin/Altseed.xml', sampleDir+r'sample_cs/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleDir+r'bin/') elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleDir+r'bin/') else: aceutils.copy(r'Dev/bin/libAltseed_core.so', sampleDir+r'bin/') if type == 'java': aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed.jar', sampleDir+r'bin/') if aceutils.isWin(): aceutils.call('.\Script\CSharpTranslator\LanguageTranslator.exe '+sampleDir+r'sample_cs/ '+sampleDir+r'sample_java/ java '+sampleDir+r'bin/Altseed.dll') else: aceutils.call('mono ./Script/CSharpTranslator/LanguageTranslator.exe '+sampleDir+r'sample_cs/ '+sampleDir+r'sample_java/ java '+sampleDir+r'bin/Altseed.dll') editFiles(sampleDir+r'sample_java/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleDir+r'bin/') elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleDir+r'bin/') else: aceutils.copy(r'Dev/bin/libAltseed_core.so', sampleDir+r'bin/')
def release_common(): aceutils.cdToScript() aceutils.cd(r'../') # generate makefiles using cmake if aceutils.isMac(): aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_TOOL=ON -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../') aceutils.cd(r'../../')
def release_common(): aceutils.cdToScript() aceutils.cd(r'../') # generate makefiles using cmake if aceutils.isMac(): aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_TOOL=ON -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + '" ../') aceutils.cd(r'../../')
def genCPP(): targetDir = r'NuGetPackage/Cpp/' aceutils.cdToScript() aceutils.cd(r'../') aceutils.call(aceutils.cmd_compile + r'Dev/asd_cpp.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'Dev/asd_cpp.sln /p:configuration=Release') if not os.path.exists(targetDir): aceutils.mkdir(targetDir) aceutils.mkdir(targetDir+'build/native/bin/') aceutils.mkdir(targetDir+'build/native/include/') aceutils.mkdir(targetDir+'build/native/lib/') aceutils.mkdir(targetDir+'build/native/lib/Debug') aceutils.mkdir(targetDir+'build/native/lib/Release') aceutils.copy(r'Dev/bin/Altseed_core.dll', targetDir+'build/native/bin/') aceutils.copy(r'Dev/bin/Altseed_core_Debug.dll', targetDir+'build/native/bin/') aceutils.copy(r'Dev/include/Altseed.h', targetDir+'build/native/include/') aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', targetDir+'build/native/lib/Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', targetDir+'build/native/lib/Release/') aceutils.cd(targetDir) aceutils.call(r'nuget pack AltseedCpp.nuspec -Version ' + version)
def store_tools(): aceutils.cdToScript() aceutils.cd(r'../') aceutils.call(sys.executable + r' Dev/generate_swig.py') compile('cs') compile_tool() toolDir = 'Altseed_Tool' aceutils.rmdir(toolDir) aceutils.mkdir(toolDir) aceutils.copy(r'Dev/bin/System.Reactive.dll', toolDir) # aceutils.copy(r'Dev/bin/System.Windows.Interactivity.dll', toolDir) aceutils.copy(r'Dev/bin/ReactiveProperty.dll', toolDir) aceutils.copy(r'Dev/bin/ReactiveProperty.NET46.dll', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.exe', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.Model.dll', toolDir) aceutils.copy(r'Dev/bin/ImagePackageGenerator.exe', toolDir) aceutils.copy(r'Dev/bin/ImagePackageGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FilePackageGenerator.exe', toolDir) # aceutils.copy(r'Dev/bin/FilePackageGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FilePackageGeneratorCore.dll', toolDir) aceutils.copy(r'Dev/bin/Altseed.dll', toolDir) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', toolDir) aceutils.copy(r'Dev/bin/FontGeneratorCore.dll', toolDir) aceutils.copy(r'Dev/bin/PSDParser.dll', toolDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', toolDir) aceutils.copy(r'Dev/bin/libFontGeneratorCore.dylib', toolDir) aceutils.copy( r'Dev/cmake/ImagePackageGenerator/bin/libPSDParser.dylib', toolDir)
def store_tools(): aceutils.cdToScript() aceutils.cd(r'../') aceutils.call(sys.executable + r' Dev/generate_swig.py') compile('cs') compile_tool() toolDir = 'Altseed_Tool' aceutils.rmdir(toolDir) aceutils.mkdir(toolDir) aceutils.copy(r'Dev/bin/System.Reactive.dll', toolDir) #aceutils.copy(r'Dev/bin/System.Windows.Interactivity.dll', toolDir) aceutils.copy(r'Dev/bin/ReactiveProperty.dll', toolDir) aceutils.copy(r'Dev/bin/ReactiveProperty.NET46.dll', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.exe', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FontGenerator.Model.dll', toolDir) aceutils.copy(r'Dev/bin/ImagePackageGenerator.exe', toolDir) aceutils.copy(r'Dev/bin/ImagePackageGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FilePackageGenerator.exe', toolDir) #aceutils.copy(r'Dev/bin/FilePackageGenerator.exe.config', toolDir) aceutils.copy(r'Dev/bin/FilePackageGeneratorCore.dll', toolDir) aceutils.copy(r'Dev/bin/Altseed.dll', toolDir) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', toolDir) aceutils.copy(r'Dev/bin/FontGeneratorCore.dll', toolDir) aceutils.copy(r'Dev/bin/PSDParser.dll', toolDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', toolDir) aceutils.copy(r'Dev/bin/libFontGeneratorCore.dylib', toolDir) aceutils.copy(r'Dev/cmake/ImagePackageGenerator/bin/libPSDParser.dylib', toolDir)
def genCS(): targetDir = r'NuGetPackage/CSharp/' aceutils.cdToScript() aceutils.cd(r'../') # GenerateHeader aceutils.call(r'python Dev/generate_swig.py') aceutils.call(aceutils.cmd_compile + r'Dev/asd_cs.sln /p:configuration=Release') if not os.path.exists(targetDir): aceutils.mkdir(targetDir) aceutils.copy(r'Dev/bin/Altseed.dll', targetDir) aceutils.copy(r'Dev/bin/Altseed.xml', targetDir) aceutils.copy(r'Dev/bin/Altseed_core.dll', targetDir) aceutils.cd(targetDir) aceutils.call(r'nuget pack AltseedDotNet.nuspec -Version ' + version)
import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') if aceutils.isWin(): aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cpp.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cpp.sln /p:configuration=Release') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cs.sln /p:configuration=Release') def copyDev(targetDir): aceutils.mkdir(targetDir+r'/') # Sample sampleDir = targetDir+r'/' aceutils.mkdir(sampleDir+r'cpp/') aceutils.mkdir(sampleDir+r'cpp/include/') aceutils.mkdir(sampleDir+r'cpp/lib/') aceutils.mkdir(sampleDir+r'cpp/lib/Debug/') aceutils.mkdir(sampleDir+r'cpp/lib/Release/') aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed_core.Debug.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/include/Altseed.h', sampleDir+r'cpp/include/') aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', sampleDir+r'cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', sampleDir+r'cpp/lib/Release/')
aceutils.rm(r'master.zip') aceutils.rmdir(r'glfw-master') aceutils.wget(r'https://github.com/ac-engine/GLFW/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'glfw-master/CMakeLists.txt') if aceutils.isWin(): aceutils.cd(r"glfw-master") else: aceutils.mkdir(r"glfw_bin") aceutils.cd(r"glfw_bin") if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../glfw-master/' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Debug' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Release' ) else: aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../Dev ../glfw-master/' ) aceutils.call(r'make install') aceutils.cd(r"../")
aceutils.rmdir(r"freetype_bin") aceutils.rmdir(r"freetype_bin_x64") aceutils.rmdir(r"freetype") aceutils.rmdir(r'freetype-2.6') aceutils.wget( r'https://sourceforge.net/projects/freetype/files/freetype2/2.6/ft26.zip') aceutils.unzip(r'ft26.zip') aceutils.mkdir(r"freetype_bin") aceutils.mkdir(r"freetype_bin_x64") aceutils.copytree(r'freetype-2.6', r'freetype') aceutils.editCmakeForACE(r'freetype/CMakeLists.txt', 'cp932') with aceutils.CurrentDir('freetype_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake+r'../freetype/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" "-DWITH_BZip2=OFF" "-DWITH_HarfBuzz=OFF" "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" -D CMAKE_BUILD_TYPE=Release ../freetype/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ../freetype/') aceutils.call(r'make') with aceutils.CurrentDir('freetype_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64+r'../freetype/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release')
aceutils.cd(r'../') aceutils.rm(r'master.zip') aceutils.rmdir(r'glfw-master') aceutils.wget(r'https://github.com/ac-engine/GLFW/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'glfw-master/CMakeLists.txt') if aceutils.isWin(): aceutils.cd(r"glfw-master") else: aceutils.mkdir(r"glfw_bin") aceutils.cd(r"glfw_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../glfw-master/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Release') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../Dev ../glfw-master/') aceutils.call(r'make install') aceutils.cd(r"../") aceutils.mkdir(r"Dev/include/GLFW/") if aceutils.isWin(): aceutils.copy(r'glfw-master/include/GLFW/glfw3.h', r'Dev/include/GLFW/') aceutils.copy(r'glfw-master/include/GLFW/glfw3native.h', r'Dev/include/GLFW') aceutils.copy(r'glfw-master/src/Debug/glfw3.lib', r'Dev/lib/Debug/')
def compile(type): aceutils.cdToScript() if type=='cpp': aceutils.call(r'python ../Dev/generate_swig.py') if type=='cs': aceutils.call(r'python ../Dev/generate_swig.py') if type=='java': aceutils.call(r'python ../Dev/generate_swig.py java') aceutils.call('.\CSharpTranslator\LanguageTranslator.exe ../Dev/asd_cs/ ../Dev/asd_java/') aceutils.cd(r'../') if aceutils.isWin(): if type=='cpp': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Release') if type=='cs': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cs.sln /p:configuration=Release') if type=='java': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Release /p:platform=x64') aceutils.cd(r'Dev/asd_java') aceutils.call(r'ant') aceutils.cd(r'../../') elif aceutils.isMac(): if type=='cpp': aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'../../') elif type=='cs': aceutils.cd(r'Dev') aceutils.call(r'xbuild /p:Configuration=Release unitTest_Engine_cs.sln') aceutils.cd(r'../') elif type=='java': aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.cd(r'Dev/asd_java') aceutils.call(r'ant') aceutils.cd(r'../../')
aceutils.cdToScript() aceutils.cd(r'../') aceutils.rm(r'master.zip') aceutils.rmdir(r'Effekseer-master') aceutils.wget(r'https://github.com/effekseer/Effekseer/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'Effekseer-master/Dev/Cpp/CMakeLists.txt') aceutils.mkdir(r"effekseer_bin") aceutils.cd(r"effekseer_bin") if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Debug' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Release' ) else: aceutils.call( r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/' ) aceutils.call(r'make') aceutils.cd(r"../")
import aceutils aceutils.cdToScript() aceutils.mkdir('../Doxygen') aceutils.cd(r'../Doxygen/') aceutils.call(r'doxygen ../Script/Doxyfile_core_XML')
def release_cs(): type = 'cs' targetDir = getTargetDir(type) init(type, targetDir) # GenerateHeader aceutils.call(sys.executable + r' Dev/generate_swig.py') compile(type) aceutils.mkdir(targetDir+r'/') copy_tools(type, targetDir) makeDocument(type, targetDir, 'cs') # Sample aceutils.mkdir(targetDir+r'/Sample/') def copySampleFiles(from_, to_): sampleDir = to_ sampleBinDir = sampleDir+r'bin/' aceutils.mkdir(sampleDir) aceutils.mkdir(sampleBinDir) aceutils.copytreeWithExt(from_ + r'bin/', sampleBinDir, [r'.h', r'.cpp', r'.filters', r'.config', r'.vcxproj', r'.cs', r'.csproj', r'.sln', r'.wav', r'.ogg', r'.png', r'.mp4', r'.aip', r'.efk', r'.aff', r'.pack', r'.txt']) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleBinDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleBinDir) aceutils.mkdir(sampleDir+r'sample_cs/') aceutils.copytreeWithExt(from_ + r'sample_cs/', sampleDir+r'sample_cs/', [r'.h', r'.cpp', r'.filters', r'.config', r'.vcxproj', r'.cs', r'.csproj', r'.sln', r'.wav', r'.ogg', r'.png', r'.mp4', r'.aip', r'.efk', r'.aff', r'.pack', r'.txt']) editCSFiles(sampleDir+r'sample_cs/') aceutils.copy(from_+r'sample_cs.sln', to_) aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'sample_cs/') aceutils.copy(r'Dev/bin/Altseed.XML', sampleDir+r'sample_cs/') copySampleFiles(r'Sample/BasicSample/', targetDir+r'/Sample/BasicSample/') copySampleFiles(r'Sample/ApplicationSample/', targetDir+r'/Sample/ApplicationSample/') # Runtime runtimeDir = targetDir+r'/Runtime/' aceutils.mkdir(runtimeDir) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', runtimeDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', runtimeDir) aceutils.copy(r'Dev/bin/Altseed.dll', runtimeDir) aceutils.copy(r'Dev/bin/Altseed.XML', runtimeDir) # Readme aceutils.copy(r'readme_cs.txt', targetDir+r'/readme.txt') # Template if aceutils.isWin(): aceutils.copytreeWithExt(r'Template/cs_win/', targetDir+r'/Template/', [r'.cs', r'.filters', r'.config', r'.vcxproj', r'.sln', r'.csproj']) aceutils.mkdir(targetDir+r'/Template/bin/') aceutils.copy(r'Dev/bin/Altseed.dll', targetDir+r'/Template/Game/') aceutils.copy(r'Dev/bin/Altseed.XML', targetDir+r'/Template/Game/') aceutils.copy(r'Dev/bin/Altseed_core.dll', targetDir+r'/Template/bin/') elif aceutils.isMac(): aceutils.copytreeWithExt(r'Template/cs_mac/', targetDir + r'/Template/', [r'.cs', r'.plist', r'.sln', r'.csproj']) aceutils.mkdir(targetDir+r'/Template/bin/') aceutils.copy(r'Dev/bin/Altseed.dll', targetDir+r'/Template/Game/') aceutils.copy(r'Dev/bin/Altseed.XML', targetDir+r'/Template/Game/') aceutils.copy(r'Dev/bin/libAltseed_core.dylib', targetDir+r'/Template/bin/')
def release_cpp(): type = 'cpp' targetDir = getTargetDir(type) init(type, targetDir) compile(type) aceutils.mkdir(targetDir+r'/') copy_tools(type, targetDir) makeDocument(type, targetDir, 'cpp') # Sample aceutils.mkdir(targetDir+r'/Sample/') def copySampleFiles(from_, to_): sampleDir = to_ sampleBinDir = sampleDir+r'bin/' aceutils.mkdir(sampleDir) aceutils.mkdir(sampleBinDir) aceutils.copytreeWithExt(from_ + 'bin/', sampleBinDir, [r'.h', r'.cpp', r'.filters', r'.config', r'.vcxproj', r'.cs', r'.csproj', r'.sln', r'.wav', r'.ogg', r'.png', r'.mp4', r'.aip', r'.efk', r'.aff', r'.pack', r'.txt']) aceutils.mkdir(sampleDir+r'cpp/') aceutils.mkdir(sampleDir+r'cpp/include/') aceutils.mkdir(sampleDir+r'cpp/lib/') aceutils.mkdir(sampleDir+r'cpp/lib/Debug/') aceutils.mkdir(sampleDir+r'cpp/lib/Release/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core_Debug.dll', sampleBinDir) aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleBinDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleBinDir) aceutils.copy(r'Dev/include/Altseed.h', sampleDir+r'cpp/include/') if aceutils.isWin(): if aceutils.Isi386(): aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', sampleDir+r'cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', sampleDir+r'cpp/lib/Release/') else: aceutils.copy(r'Dev/lib/x64/Debug/Altseed.lib', sampleDir+r'cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x64/Release/Altseed.lib', sampleDir+r'cpp/lib/Release/') elif aceutils.isMac(): aceutils.copy(r'Dev/lib/libAltseed.a', sampleDir+r'cpp/lib/') aceutils.copy(from_+r'sample_cpp.sln', to_) aceutils.mkdir(sampleDir+r'sample_cpp/') aceutils.copytreeWithExt(from_ + r'sample_cpp/', sampleDir+r'sample_cpp/', [ r'.h', r'.cpp', r'.filters', r'.config', r'.vcxproj', r'.cs', r'.csproj', r'.sln', r'.wav', r'.ogg', r'.png', r'.mp4', r'.aip', r'.efk', r'.aff', r'.pack', r'.txt']) copySampleFiles(r'Sample/BasicSample/', targetDir+r'/Sample/BasicSample/') copySampleFiles(r'Sample/ApplicationSample/', targetDir+r'/Sample/ApplicationSample/') # Runtime runtimeDir = targetDir+r'/Runtime/' aceutils.mkdir(runtimeDir) aceutils.mkdir(runtimeDir+r'Debug/') aceutils.mkdir(runtimeDir+r'Release/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core_Debug.dll', runtimeDir) aceutils.copy(r'Dev/bin/Altseed_core.dll', runtimeDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', runtimeDir) aceutils.copy(r'Dev/include/Altseed.h', runtimeDir) if aceutils.isWin(): if aceutils.Isi386(): aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', runtimeDir+r'Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', runtimeDir+r'Release/') else: aceutils.copy(r'Dev/lib/x64/Debug/Altseed.lib', runtimeDir+r'Debug/') aceutils.copy(r'Dev/lib/x64/Release/Altseed.lib', runtimeDir+r'Release/') elif aceutils.isMac(): aceutils.copy(r'Dev/lib/libAltseed.a', runtimeDir+r'/') # Doxygen aceutils.call(r'doxygen Script/Doxyfile_cpp') aceutils.copytree(r'Doxygen_CPP/html/', targetDir+r'/Reference_CPP') # Readme aceutils.copy(r'readme_cpp.txt', targetDir+r'/readme.txt') # Template if aceutils.isWin(): aceutils.copytreeWithExt(r'Template/cpp_win/', targetDir+r'/Template/', [ r'.h', r'.cpp', r'.filters', r'.config', r'.vcxproj', r'.sln']) aceutils.mkdir(targetDir+r'/Template/bin/') aceutils.mkdir(targetDir+r'/Template/cpp/') aceutils.mkdir(targetDir+r'/Template/cpp/include/') aceutils.mkdir(targetDir+r'/Template/cpp/lib/') aceutils.mkdir(targetDir+r'/Template/cpp/lib/Debug/') aceutils.mkdir(targetDir+r'/Template/cpp/lib/Release/') aceutils.copy(r'Dev/bin/Altseed_core_Debug.dll', targetDir+r'/Template/bin/') aceutils.copy(r'Dev/bin/Altseed_core.dll', targetDir+r'/Template/bin/') aceutils.copy(r'Dev/include/Altseed.h', targetDir+r'/Template/cpp/include/') if aceutils.Isi386(): aceutils.copy(r'Dev/lib/x86/Debug/Altseed.lib', targetDir+r'/Template/cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x86/Release/Altseed.lib', targetDir+r'/Template/cpp/lib/Release/') else: aceutils.copy(r'Dev/lib/x64/Debug/Altseed.lib', targetDir+r'/Template/cpp/lib/Debug/') aceutils.copy(r'Dev/lib/x64/Release/Altseed.lib', targetDir+r'/Template/cpp/lib/Release/') elif aceutils.isMac(): aceutils.copytreeWithExt(r'Template/cpp_mac/', targetDir+r'/Template/', [ r'.h', r'.cpp', r'.plist', r'.pbxproj', r'.xcworkspacedata']) aceutils.mkdir(targetDir+r'/Template/bin/') aceutils.mkdir(targetDir+r'/Template/include/') aceutils.mkdir(targetDir+r'/Template/lib/') aceutils.copy(r'Dev/bin/libAltseed_core.dylib', targetDir+r'/Template/bin/') aceutils.copy(r'Dev/include/Altseed.h', targetDir+r'/Template/include/') aceutils.copy(r'Dev/lib/libAltseed.a', targetDir+r'/Template/lib/')
aceutils.editCmakeForACE(r'zlib/CMakeLists.txt') aceutils.editCmakeForACE(r'libpng/CMakeLists.txt') aceutils.mkdir(r'zlib_bin') aceutils.mkdir(r'libpng_bin') aceutils.mkdir(r'libpng_bin/i386') aceutils.mkdir(r'../Dev/Cpp/include') aceutils.mkdir(r'../Dev/Cpp/lib') if aceutils.isWin(): print('already installed.') else: aceutils.cd(r'zlib_bin') if aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev/Cpp "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10" -D CMAKE_BUILD_TYPE=Release ../zlib/') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev/Cpp ../zlib/') aceutils.call(r'make install') aceutils.cd(r'../') aceutils.cd(r'libpng_bin') if aceutils.isMac(): aceutils.copy(r'../libpng/scripts/pnglibconf.h.prebuilt',r'../libpng/pnglibconf.h') aceutils.call(r'cmake -G "Unix Makefiles" -D PNG_STATIC:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=../../Dev/Cpp "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10" -D CMAKE_BUILD_TYPE=Release ../libpng/') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev/Cpp ../libpng/') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.rm(r'Dev/Cpp/lib/libz.so')
aceutils.editCmakeForACE(r'Box2D-Linux/Box2D/Box2D/CMakeLists.txt', 'cp932') aceutils.mkdir(r"box2d_bin") aceutils.mkdir(r"box2d_bin_x64") if aceutils.isWin(): pathname = r"Box2D" elif aceutils.isMac(): pathname = r"Box2D" else: pathname = r"Box2D-Linux" with aceutils.CurrentDir("box2d_bin"): if aceutils.isWin(): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BOX2D_BUILD_EXAMPLES:BOOL=OFF ../' + pathname + r'/Box2D/') aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../' + pathname + r'/Box2D/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" ../' + pathname + r'/Box2D/') aceutils.call(r'make')
aceutils.mkdir(r"bullet_bin") aceutils.mkdir(r"bullet_bin_x64") options = [] options += ['-D', 'BUILD_PYBULLET=OFF'] options += ['-D', 'BUILD_EXTRAS=OFF'] options += ['-D', 'BUILD_UNIT_TESTS=OFF'] options += ['-D', 'BUILD_CPU_DEMOS=OFF'] options += ['-D', 'BUILD_BULLET2_DEMOS=OFF'] options += ['-D', 'BUILD_OPENGL3_DEMOS=OFF'] options += ['-D', 'USE_GRAPHICAL_BENCHMARK=OFF'] options_cmd = ' '.join(options) with aceutils.CurrentDir('bullet_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake+r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ' + options_cmd + r' ../bullet3/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ' + options_cmd + r' "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../bullet3/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ' + options_cmd + r' ../bullet3/') aceutils.call(r'make') with aceutils.CurrentDir('bullet_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64+r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ' + options_cmd + r' ../bullet3/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release')
import aceutils import shutil aceutils.cdToScript() aceutils.cd(r'../') aceutils.rm(r'Box2D_V2.3.0.7z') aceutils.rmdir(r'Box2D_V2.3.0') aceutils.wget(r'https://box2d.googlecode.com/files/Box2D_v2.3.0.7z') if aceutils.isWin(): aceutils.call(r'7za x -y Box2D_v2.3.0.7z') else: aceutils.call(r'7za x -y Box2D_v2.3.0.7z') aceutils.editCmakeForACE(r'Box2D_v2.3.0/Box2D/CMakeLists.txt', 'cp932') aceutils.editCmakeForACE(r'Box2D_v2.3.0/Box2D/Box2D/CMakeLists.txt', 'cp932') aceutils.rmdir(r"box2d_bin") aceutils.rmdir(r"box2d_bin_x64") aceutils.mkdir(r"box2d_bin") aceutils.mkdir(r"box2d_bin_x64") aceutils.cd(r"box2d_bin") if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BOX2D_BUILD_EXAMPLES:BOOL=OFF ../Box2D_v2.3.0/Box2D/' ) aceutils.call(
def compile_tool(): if(leastCompileTarget != 'cs'): return if aceutils.isWin(): aceutils.call(aceutils.cmd_compile + r'Dev/FontGenerator.sln /p:configuration=Release;platform=' + platform_cs) aceutils.call(aceutils.cmd_compile + r'Dev/FilePackageGenerator.sln /p:configuration=Release;platform=' + platform_cs) aceutils.call(aceutils.cmd_compile + r'Dev/ImagePackageGenerator.sln /p:configuration=Release;platform=' + platform_cs) elif aceutils.isMac(): # for core aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'ImagePackageGenerator') aceutils.call(r'make') aceutils.cd(r'../../../') aceutils.call( r'nuget restore Dev/FontGenerator.sln -PackagesDirectory Dev/FontGenerator/packages/') aceutils.call( r'msbuild Dev/FontGenerator/FontGenerator.Altseed/FontGenerator.Altseed.csproj /p:Configuration=Release /p:Platform=' + platform_cs) aceutils.call( r'msbuild Dev/FilePackageGenerator/FilePackageGenerator.Altseed/FilePackageGenerator.Altseed.csproj /p:Configuration=Release /p:Platform=' + platform_cs) aceutils.call( r'msbuild Dev/ImagePackageGenerator/ImagePackageGenerator/ImagePackageGenerator.csproj /p:Configuration=Release /p:Platform=' + platform_cs)
import aceutils import shutil aceutils.cdToScript() aceutils.cd(r'../') aceutils.rm(r'Box2D_V2.3.0.7z') aceutils.rmdir(r'Box2D_V2.3.0') aceutils.wget(r'https://box2d.googlecode.com/files/Box2D_v2.3.0.7z') if aceutils.isWin(): aceutils.call(r'7za x -y Box2D_v2.3.0.7z') else: aceutils.call(r'7za x -y Box2D_v2.3.0.7z') aceutils.editCmakeForACE(r'Box2D_v2.3.0/Box2D/CMakeLists.txt','cp932') aceutils.editCmakeForACE(r'Box2D_v2.3.0/Box2D/Box2D/CMakeLists.txt','cp932') aceutils.rmdir(r"box2d_bin") aceutils.rmdir(r"box2d_bin_x64") aceutils.mkdir(r"box2d_bin") aceutils.mkdir(r"box2d_bin_x64") aceutils.cd(r"box2d_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BOX2D_BUILD_EXAMPLES:BOOL=OFF ../Box2D_v2.3.0/Box2D/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Box2D.sln /p:configuration=Debug')
def release_java(): type = 'java' targetDir = getTargetDir(type) init(type, targetDir) # GenerateHeader aceutils.call(sys.executable + r' Dev/generate_swig.py java') aceutils.call(sys.executable + r' Script/generateTranslatedCode.py --java') # Sample aceutils.call(sys.executable + r' Script/generate_sample.py --java') aceutils.cd(r'Sample/BasicSample/sample_java/') aceutils.call(r'ant') aceutils.cd(r'../../../') aceutils.cd(r'Sample/ApplicationSample/sample_java/') aceutils.call(r'ant') aceutils.cd(r'../../../') compile(type) aceutils.mkdir(targetDir+r'/') copy_tools(type, targetDir) makeDocument(type, targetDir, 'java') # Sample aceutils.mkdir(targetDir+r'/Sample/') def copySampleFiles(from_, to_): sampleDir = to_ sampleBinDir = sampleDir+r'bin/' aceutils.mkdir(sampleDir) aceutils.mkdir(sampleBinDir) aceutils.copytreeWithExt(from_ + r'bin/', sampleBinDir, [ r'.jar', r'.wav', r'.ogg', r'.png', r'.mp4', r'.aip', r'.efk', r'.aff', r'.pack', r'.txt']) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleBinDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleBinDir) aceutils.mkdir(sampleDir+r'sample_java/') aceutils.copytreeWithExt( from_ + r'sample_java/', sampleDir+r'sample_java/', [r'.java', r'.xml']) aceutils.copy(r'Dev/bin/Altseed.jar', sampleBinDir) def editFiles(targetDir): files = [] for f in aceutils.get_files(targetDir): basename = os.path.basename(f) ext = os.path.splitext(basename)[1] if ext == '.java': if r'Sample' in basename or 'Program' in basename: aceutils.rm(f) else: files.append(f) for file in files: ls = [] with open(file, mode='r', encoding='utf-8-sig') as f: for l in f.readlines(): l = l.replace(r'public void Run()', 'public static void main(String args[])') l = l.replace(r'implements ISample', '') ls.append(l) with open(file, mode='w', encoding='utf-8-sig') as f: f.writelines(ls) copySampleFiles(r'Sample/BasicSample/', targetDir+r'/Sample/BasicSample/') copySampleFiles(r'Sample/ApplicationSample/', targetDir+r'/Sample/ApplicationSample/') editFiles(targetDir+r'/Sample/BasicSample/') editFiles(targetDir+r'/Sample/ApplicationSample/') # Runtime runtimeDir = targetDir+r'/Runtime/' aceutils.mkdir(runtimeDir) if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.dll', runtimeDir) elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', runtimeDir) aceutils.copy(r'Dev/bin/Altseed.jar', runtimeDir) # Readme aceutils.copy(r'readme_java.txt', targetDir+r'/readme.txt')
import aceutils import sys aceutils.cdToScript() aceutils.mkdir('../Downloads') with aceutils.CurrentDir('../Downloads'): # Build dependencies glfw_args = ' '.join('"{0}"'.format(w) for w in sys.argv[1:]) if not aceutils.isMac(): aceutils.call(sys.executable + ' AltseedRHI/Script/build_glew.py ' + glfw_args) aceutils.call(sys.executable + ' AltseedRHI/Script/build_libpng.py ' + glfw_args) # Comple aceutils.rmdir(r"AltseedRHI_bin") aceutils.rmdir(r"AltseedRHI_bin_x64") aceutils.mkdir(r"AltseedRHI_bin") aceutils.mkdir(r"AltseedRHI_bin_x64") with aceutils.CurrentDir('AltseedRHI_bin'): if aceutils.isWin(): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../AltseedRHI/') aceutils.call(aceutils.cmd_compile + r'AltseedRHI.sln /p:configuration=Debug')
def compile(type): global leastCompileTarget leastCompileTarget = type if aceutils.isWin(): if type == 'cpp': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Debug /p:Platform=' + platform_cpp) aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Release /p:Platform=' + platform_cpp) if type == 'cs': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cs.sln /p:configuration=Release /p:Platform=' + platform_cs) if type == 'java': aceutils.call(aceutils.cmd_compile + r'Dev/unitTest_Engine_cpp.sln /p:configuration=Release /p:Platform=' + platform_cpp) aceutils.cd(r'Dev/asd_java') aceutils.call(r'ant') aceutils.cd(r'../../') elif aceutils.isMac(): if type == 'cpp': aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'../../') elif type == 'cs': # for core aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.cd(r'Dev') aceutils.call( r'xbuild /p:Configuration=Release unitTest_Engine_cs.sln /p:Platform=' + platform_cs) aceutils.cd(r'../') elif type == 'java': # for core aceutils.cd(r'Dev/cmake') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.cd(r'Dev/asd_java') aceutils.call(r'ant') aceutils.cd(r'../../')
pathname = r'libgd' aceutils.cdToScript() with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"gd_bin") aceutils.rmdir(r"gd_bin_x64") aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt', 'cp932') aceutils.editCmakeForACE(pathname + r'/src/CMakeLists.txt', 'cp932') aceutils.mkdir(r"gd_bin") aceutils.mkdir(r"gd_bin_x64") with aceutils.CurrentDir('gd_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake + r'-DBUILD_STATIC_LIBS=ON ../' + pathname + '/') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -DBUILD_STATIC_LIBS=ON "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" -D CMAKE_BUILD_TYPE=Release ../' + pathname + '/') aceutils.call(r'make') else: aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ../' + pathname + '/') aceutils.call(r'make')
aceutils.copytree('../Downloads/glfw/', './glfw/', True) aceutils.rm('./glfw/.git') aceutils.rmdir('./glfw/.github/') # Compile aceutils.rmdir(r"glfw_bin") aceutils.rmdir(r"glfw_bin_x64") aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt') aceutils.mkdir(r"glfw_bin") aceutils.mkdir(r"glfw_bin_x64") with aceutils.CurrentDir('glfw_bin'): if aceutils.isWin(): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D GLFW_BUILD_EXAMPLES:BOOL=OFF -D GLFW_BUILD_TESTS:BOOL=OFF ../' + pathname + '/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../.. "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../' + pathname + '/') aceutils.call(r'make install') else: aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../.. ../' + pathname + '/') aceutils.call(r'make install')
if aceutils.isWin() or aceutils.isMac(): aceutils.copy('../Script/CMake/CMakeLists.Box2D.txt', 'box2d_temp/Box2D/CMakeLists.txt') else: aceutils.editCmakeForACE(r'box2d_temp/Box2D/CMakeLists.txt', 'cp932') aceutils.editCmakeForACE( r'box2d_temp/Box2D/Box2D/CMakeLists.txt', 'cp932') aceutils.mkdir(r"box2d_bin") aceutils.mkdir(r"box2d_bin_x64") pathname = r"box2d_temp/" if aceutils.isWin(): with aceutils.CurrentDir("box2d_bin"): aceutils.call( aceutils.cmd_cmake+r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../Box2d_temp/Box2D/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') with aceutils.CurrentDir("box2d_bin_x64"): aceutils.call(aceutils.cmd_cmake_x64 + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../Box2d_temp/Box2D/') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') elif aceutils.isMac(): with aceutils.CurrentDir("box2d_temp/Box2D"): aceutils.call(aceutils.cmd_premake5 + r'xcode4') with aceutils.CurrentDir(r'Build/xcode4'): aceutils.call(r'xcodebuild -project Box2D.xcodeproj ONLY_ACTIVE_ARCH=NO ARCHS="' + ( 'i386 ' if aceutils.Isi386() else '') + r'x86_64" -configuration Release') else:
import aceutils aceutils.cdToScript() aceutils.cd(r'../') aceutils.call(r'doxygen Script/Doxyfile_cpp')
def init(): aceutils.cdToScript() aceutils.cd(r'../') if aceutils.isWin(): aceutils.call(r'python Dev/generate_swig.py') elif aceutils.isMac(): # generate header(C#) aceutils.call(r'python Dev/generate_swig.py') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data',r'Dev/cmake/bin/Data') else: # generate header(C#) aceutils.call(r'python Dev/generate_swig.py') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data',r'Dev/cmake/bin/Data')
with aceutils.CurrentDir('../Downloads'): aceutils.rm(r'glew-1.13.0.zip') aceutils.rmdir(pathname) aceutils.rmdir(r"glew_bin") aceutils.rmdir(r"glew_bin_x64") aceutils.wget(r'https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.zip') aceutils.unzip(r'glew-1.13.0.zip') aceutils.editCmakeForACE(pathname + r'/build/cmake/CMakeLists.txt') aceutils.mkdir(r"glew_bin") aceutils.mkdir(r"glew_bin_x64") with aceutils.CurrentDir('glew_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake+r'-UGLEW_USE_STATIC_LIBS ../' + pathname + '/build/cmake') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -UGLEW_USE_STATIC_LIBS -D CMAKE_INSTALL_PREFIX:PATH=../dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../' + pathname + '/build/cmake') aceutils.call(r'make install') else: aceutils.call(r'cmake -G "Unix Makefiles" -UGLEW_USE_STATIC_LIBS -D CMAKE_INSTALL_PREFIX=../dev ../' + pathname + '/build/cmake') aceutils.call(r'make install') with aceutils.CurrentDir('glew_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64+r'-UGLEW_USE_STATIC_LIBS ../' + pathname + '/build/cmake') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Release')
aceutils.rmdir(r"../Downloads/" + pathname) aceutils.copytree(r"../Downloads/" + originalpathname, r"../Downloads/" + pathname) with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"gd_bin") aceutils.rmdir(r"gd_bin_x64") aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt','cp932') aceutils.editCmakeForACE(pathname + r'/src/CMakeLists.txt','cp932') aceutils.mkdir(r"gd_bin") aceutils.mkdir(r"gd_bin_x64") with aceutils.CurrentDir('gd_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake + r'-DBUILD_STATIC_LIBS=ON ../' + pathname + '/') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -DBUILD_STATIC_LIBS=ON "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10" -D CMAKE_BUILD_TYPE=Release ../' + pathname + '/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -DBUILD_STATIC_LIBS=ON ../' + pathname + '/') aceutils.call(r'make') with aceutils.CurrentDir('gd_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64 + r'-DBUILD_STATIC_LIBS=ON ../' + pathname + '/') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Release')
aceutils.wget(r'https://github.com/effekseer/Effekseer/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'Effekseer-master/Dev/Cpp/CMakeLists.txt', 'cp932') aceutils.rmdir(r"effekseer_bin") aceutils.rmdir(r"effekseer_bin_x64") aceutils.mkdir(r"effekseer_bin") aceutils.mkdir(r"effekseer_bin_x64") aceutils.cd(r"effekseer_bin") if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Debug' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Release' ) elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF -D USE_GLEW_STATIC:BOOL=OFF -D USE_GLEW_DLL:BOOL=OFF -D USE_OPENGL3:BOOL=ON -D USE_OPENAL:BOOL=OFF "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../Effekseer-master/Dev/Cpp/' ) aceutils.call(r'make') else: aceutils.call( r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF -D USE_OPENAL:BOOL=OFF ../Effekseer-master/Dev/Cpp/'
aceutils.cdToScript() aceutils.cd(r'../') aceutils.rm(r'master.zip') aceutils.rmdir(r'Effekseer-master') aceutils.wget(r'https://github.com/effekseer/Effekseer/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'Effekseer-master/Dev/Cpp/CMakeLists.txt') aceutils.mkdir(r"effekseer_bin") aceutils.cd(r"effekseer_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Release') else: aceutils.call(r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/') aceutils.call(r'make') aceutils.cd(r"../") if aceutils.isWin(): aceutils.mkdir(r'Dev/lib/Debug') aceutils.mkdir(r'Dev/lib/Release') aceutils.copy(r'Effekseer-master/Dev/Cpp/Effekseer/Effekseer.h', r'Dev/include/') aceutils.copy(r'Effekseer-master/Dev/Cpp/EffekseerRendererDX11/EffekseerRendererDX11.h', r'Dev/include/') aceutils.copy(r'Effekseer-master/Dev/Cpp/EffekseerRendererGL/EffekseerRendererGL.h', r'Dev/include/') aceutils.copy(r'effekseer_bin/Debug/Effekseer.lib', r'Dev/lib/Debug/')
aceutils.wget(r'https://github.com/altseed/OpenSoundMixer/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'OpenSoundMixer-master/CMakeLists.txt','cp932') aceutils.rmdir(r"osm_bin") aceutils.rmdir(r"osm_bin_x64") aceutils.mkdir(r"osm_bin") aceutils.mkdir(r"osm_bin_x64") aceutils.cd(r"osm_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../OpenSoundMixer-master/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" OpenSoundMixer.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" OpenSoundMixer.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../OpenSoundMixer-master/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" ../OpenSoundMixer-master/') aceutils.call(r'make') aceutils.cd(r"../") aceutils.cd(r"osm_bin_x64") if aceutils.isWin():
import os import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') aceutils.rmdir(r'libogg-1.3.2') aceutils.rmdir(r'libvorbis-1.3.5') aceutils.wget(r'http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz') aceutils.wget(r'http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz') aceutils.call(r'tar zxvf libogg-1.3.2.tar.gz') aceutils.call(r'tar zxvf libvorbis-1.3.5.tar.gz') if aceutils.isWin(): pass else: ogg_dir="libogg-1.3.2" aceutils.cd(ogg_dir) cmdenv="" if aceutils.isMac(): cmdenv+="CFLAGS='-arch i386 -arch x86_64 -fPIC '$CFLAGS " else: cmdenv+="CFLAGS='-fPIC '$CFLAGS " aceutils.call(cmdenv+"./configure --prefix=`pwd`/build --disable-shared") aceutils.call(cmdenv+"make") aceutils.call(cmdenv+"make install") ogg_build_dir=os.getcwd()+"/build" aceutils.cd("../")
import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') aceutils.rmdir(r'zlib_bin') aceutils.rmdir(r'libpng_bin') aceutils.wget(r'http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.6/libpng-1.6.6.tar.gz') aceutils.wget(r'http://zlib.net/zlib-1.2.8.tar.gz') aceutils.call(r'tar zxvf libpng-1.6.6.tar.gz') aceutils.call(r'tar zxvf zlib-1.2.8.tar.gz') aceutils.editCmakeForACE(r'zlib-1.2.8/CMakeLists.txt') aceutils.editCmakeForACE(r'libpng-1.6.6/CMakeLists.txt') aceutils.mkdir(r'zlib_bin') aceutils.mkdir(r'libpng_bin') if aceutils.isWin(): print('already installed.') else: aceutils.cd(r'zlib_bin') if aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../zlib-1.2.8/') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../Dev ../zlib-1.2.8/') aceutils.call(r'make install') aceutils.cd(r'../')
aceutils.wget(r'https://github.com/effekseer/Effekseer/archive/master.zip') aceutils.unzip(r'master.zip') aceutils.editCmakeForACE(r'Effekseer-master/Dev/Cpp/CMakeLists.txt','cp932') aceutils.rmdir(r"effekseer_bin") aceutils.rmdir(r"effekseer_bin_x64") aceutils.mkdir(r"effekseer_bin") aceutils.mkdir(r"effekseer_bin_x64") aceutils.cd(r"effekseer_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../Effekseer-master/Dev/Cpp/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Effekseer.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF -D USE_GLEW_STATIC:BOOL=OFF -D USE_GLEW_DLL:BOOL=OFF -D USE_OPENGL3:BOOL=ON -D USE_OPENAL:BOOL=OFF "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../Effekseer-master/Dev/Cpp/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF -D USE_OPENAL:BOOL=OFF ../Effekseer-master/Dev/Cpp/') aceutils.call(r'make') aceutils.cd(r"../") aceutils.cd(r"effekseer_bin_x64") if aceutils.isWin():
aceutils.rmdir(pathname) aceutils.rmdir(r"glew_bin") aceutils.rmdir(r"glew_bin_x64") if aceutils.isWin(): aceutils.wget(r'https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.zip') aceutils.unzip(r'glew-1.13.0.zip') aceutils.editCmakeForACE(pathname + r'/build/cmake/CMakeLists.txt') aceutils.mkdir(r"glew_bin") aceutils.mkdir(r"glew_bin_x64") with aceutils.CurrentDir('glew_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake+r'-UGLEW_USE_STATIC_LIBS ../' + pathname + '/build/cmake') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -UGLEW_USE_STATIC_LIBS -D CMAKE_INSTALL_PREFIX:PATH=../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../' + pathname + '/build/cmake') aceutils.call(r'make install') else: aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -UGLEW_USE_STATIC_LIBS -D CMAKE_INSTALL_PREFIX=../Dev ../' + pathname + '/') aceutils.call(r'make install') with aceutils.CurrentDir('glew_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64+r'-UGLEW_USE_STATIC_LIBS ../' + pathname + '/build/cmake') aceutils.call('cmake --build . --config Debug') aceutils.call('cmake --build . --config Release')
aceutils.editCmakeForACE(r'zlib/CMakeLists.txt') aceutils.editCmakeForACE(r'libpng/CMakeLists.txt') aceutils.mkdir(r'zlib_bin') aceutils.mkdir(r'libpng_bin') if aceutils.isWin(): print('already installed.') else: aceutils.mkdir(r'zlib_bin/i386') aceutils.mkdir(r'libpng_bin/i386') aceutils.cd(r'zlib_bin') if aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../zlib/' ) else: aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev ../zlib/' ) aceutils.call(r'make install') aceutils.cd(r'../') aceutils.cd(r'libpng_bin') if aceutils.isMac(): aceutils.copy(r'../libpng/scripts/pnglibconf.h.prebuilt', r'../libpng/pnglibconf.h') aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D PNG_STATIC:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=../../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../libpng/' )
if aceutils.isWin() or aceutils.isMac(): aceutils.copy('../Script/CMake/CMakeLists.Box2D.txt', 'box2d_temp/Box2D/CMakeLists.txt') else: aceutils.editCmakeForACE(r'box2d_temp/Box2D/CMakeLists.txt', 'cp932') aceutils.editCmakeForACE(r'box2d_temp/Box2D/Box2D/CMakeLists.txt', 'cp932') aceutils.mkdir(r"box2d_bin") aceutils.mkdir(r"box2d_bin_x64") pathname = r"box2d_temp/" if aceutils.isWin(): with aceutils.CurrentDir("box2d_bin"): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../Box2d_temp/Box2D/' ) aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Release') with aceutils.CurrentDir("box2d_bin_x64"): aceutils.call( aceutils.cmd_cmake_x64 + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../Box2d_temp/Box2D/' ) aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'Box2D.sln /p:configuration=Release')
aceutils.copy(r'zlib_bin/{}/lib/zlibstaticd.lib'.format(xn), r'../Dev/lib/{}/Debug/'.format(xn)) aceutils.copy(r'zlib_bin/{}/lib/zlibstatic.lib'.format(xn), r'../Dev/lib/{}/Release/'.format(xn)) aceutils.copy(r'libpng_bin/{}/lib/libpng16_staticd.lib'.format(xn), r'../Dev/lib/{}/Debug/'.format(xn)) aceutils.copy(r'libpng_bin/{}/lib/libpng16_static.lib'.format(xn), r'../Dev/lib/{}/Release/'.format(xn)) compile('x86') compile('x64') else: if aceutils.Isi386(): aceutils.mkdir(r'zlib_bin/i386') aceutils.mkdir(r'libpng_bin/i386') aceutils.cd(r'zlib_bin') if aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../zlib/') else: aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev ../zlib/') aceutils.call(r'make install') aceutils.cd(r'../') aceutils.cd(r'libpng_bin') if aceutils.isMac(): aceutils.copy(r'../libpng/scripts/pnglibconf.h.prebuilt',r'../libpng/pnglibconf.h') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D PNG_STATIC:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=../../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64' + (';i386' if aceutils.Isi386() else '') + r'" ../libpng/') else: aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev ../libpng/') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.rm(r'Dev/lib/libz.so')
import aceutils aceutils.cdToScript() aceutils.mkdir('../Downloads') with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"gtest_bin") aceutils.rmdir(r"gtest_bin_x64") aceutils.mkdir(r"gtest_bin") aceutils.mkdir(r"gtest_bin_x64") with aceutils.CurrentDir('gtest_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake+r'-D BUILD_SHARED_LIBS:BOOL=OFF ../googletest/') aceutils.call(aceutils.cmd_compile + r'gtest.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'gtest.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../googletest/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../Dev ../googletest/') aceutils.call(r'make') with aceutils.CurrentDir('gtest_bin_x64'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake_x64+r'-D BUILD_SHARED_LIBS:BOOL=OFF ../googletest/') aceutils.call(aceutils.cmd_compile + r'gtest.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'gtest.sln /p:configuration=Release')
def compile(xn): aceutils.mkdir(r'zlib_bin/{}/'.format(xn)) aceutils.mkdir(r'libpng_bin/{}/'.format(xn)) aceutils.cd(r'zlib_bin/{}/'.format(xn)) cmake_args = [] cmake_args += [r'-D CMAKE_INSTALL_PREFIX:PATH=.'] cmake_args += [r'../../zlib/'] if xn == 'x86': aceutils.call(aceutils.cmd_cmake + r' ' + ' '.join(cmake_args)) else: aceutils.call(aceutils.cmd_cmake_x64 + r' ' + ' '.join(cmake_args)) aceutils.call(r'cmake --build . --config Debug --target install') aceutils.call(r'cmake --build . --config Release --target install') aceutils.cd(r'../../') aceutils.cd(r'libpng_bin/{}/'.format(xn)) cmake_args = [] cmake_args += [r'-D PNG_STATIC=ON'] cmake_args += [r'-D PNG_SHARED=OFF'] cmake_args += [r'-D CMAKE_INSTALL_PREFIX:PATH=.'] cmake_args += [r'-D ZLIB_INCLUDE_DIR=../../zlib_bin/{}/include'.format(xn)] cmake_args += [r'-D ZLIB_LIBRARY_DEBUG=../../zlib_bin/{}/lib/zlibstaticd.lib'.format(xn)] cmake_args += [r'-D ZLIB_LIBRARY_RELEASE=../../zlib_bin/{}/lib/zlibstatic.lib'.format(xn)] cmake_args += [r'../../libpng/'] if xn == 'x86': aceutils.call(aceutils.cmd_cmake + r' ' + ' '.join(cmake_args)) else: aceutils.call(aceutils.cmd_cmake_x64 + r' ' + ' '.join(cmake_args)) aceutils.call(r'cmake --build . --config Debug --target install') aceutils.call(r'cmake --build . --config Release --target install') aceutils.cd(r'../../') aceutils.mkdir(r'../Dev/lib/{}/'.format(xn)) aceutils.mkdir(r'../Dev/lib/{}/Debug'.format(xn)) aceutils.mkdir(r'../Dev/lib/{}/Release'.format(xn)) aceutils.copy(r'zlib_bin/{}/lib/zlibstaticd.lib'.format(xn), r'../Dev/lib/{}/Debug/'.format(xn)) aceutils.copy(r'zlib_bin/{}/lib/zlibstatic.lib'.format(xn), r'../Dev/lib/{}/Release/'.format(xn)) aceutils.copy(r'libpng_bin/{}/lib/libpng16_staticd.lib'.format(xn), r'../Dev/lib/{}/Debug/'.format(xn)) aceutils.copy(r'libpng_bin/{}/lib/libpng16_static.lib'.format(xn), r'../Dev/lib/{}/Release/'.format(xn))
aceutils.cdToScript() aceutils.mkdir('../Downloads') with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"osm_bin") aceutils.rmdir(r"osm_bin_x64") aceutils.editCmakeForACE(r'OpenSoundMixer/CMakeLists.txt', 'cp932') aceutils.mkdir(r"osm_bin") aceutils.mkdir(r"osm_bin_x64") with aceutils.CurrentDir('osm_bin'): if aceutils.isWin(): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../OpenSoundMixer/' ) aceutils.call(aceutils.cmd_compile + r'OpenSoundMixer.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'OpenSoundMixer.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../OpenSoundMixer/' ) aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" ../OpenSoundMixer/') aceutils.call(r'make') with aceutils.CurrentDir('osm_bin_x64'):
aceutils.cdToScript() aceutils.mkdir('../Downloads') with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"glfw_bin") aceutils.rmdir(r"glfw_bin_x64") aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt') aceutils.mkdir(r"glfw_bin") aceutils.mkdir(r"glfw_bin_x64") with aceutils.CurrentDir('glfw_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../' + pathname + '/') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'ALL_BUILD.vcxproj /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../' + pathname + '/') aceutils.call(r'make install') else: aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../../Dev ../' + pathname + '/') aceutils.call(r'make install')
def init(): aceutils.cdToScript() aceutils.cd(r'../') if aceutils.isWin(): aceutils.call(r'python Dev/generate_swig.py') elif aceutils.isMac(): # generate header(C#) aceutils.call(r'python Dev/generate_swig.py') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data',r'Dev/cmake/bin/Data') else: # generate header(C#) aceutils.call(r'python Dev/generate_swig.py') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') aceutils.call(r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../ ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data',r'Dev/cmake/bin/Data')
import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D BUILD_SHARED_LIBS:BOOL=OFF -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../') else: aceutils.call(r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data',r'Dev/cmake/bin/Data')
import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') if aceutils.isWin(): aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cpp.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cpp.sln /p:configuration=Release') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" Dev/unitTest_Engine_cs.sln /p:configuration=Release') def copyDev(targetDir): aceutils.mkdir(targetDir+r'/') # Sample sampleDir = targetDir+r'/' aceutils.mkdir(sampleDir+r'cpp/') aceutils.mkdir(sampleDir+r'cpp/include/') aceutils.mkdir(sampleDir+r'cpp/lib/') aceutils.mkdir(sampleDir+r'cpp/lib/Debug/') aceutils.mkdir(sampleDir+r'cpp/lib/Release/') aceutils.copy(r'Dev/bin/Altseed.dll', sampleDir+r'bin/') if aceutils.isWin(): aceutils.copy(r'Dev/bin/Altseed_core.Debug.dll', sampleDir+r'bin/') aceutils.copy(r'Dev/bin/Altseed_core.dll', sampleDir+r'bin/') elif aceutils.isMac(): aceutils.copy(r'Dev/bin/libAltseed_core.dylib', sampleDir+r'bin/') else: aceutils.copy(r'Dev/bin/libAltseed_core.so', sampleDir+r'bin/')
aceutils.cdToScript() aceutils.mkdir('../Downloads') with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"bullet_bin") aceutils.rmdir(r"bullet_bin_x64") aceutils.editCmakeForACE(r'bullet3/CMakeLists.txt', 'cp932') aceutils.mkdir(r"bullet_bin") aceutils.mkdir(r"bullet_bin_x64") with aceutils.CurrentDir('bullet_bin'): if aceutils.isWin(): aceutils.call( aceutils.cmd_cmake + r'-D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BUILD_DEMOS:BOOL=OFF ../bullet3/' ) aceutils.call(aceutils.cmd_compile + r'BULLET_PHYSICS.sln /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'BULLET_PHYSICS.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_PYBULLET=OFF "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../bullet3/' ) aceutils.call(r'make') else: aceutils.call( r'cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../bullet3/' ) aceutils.call(r'make')
import os.path import aceutils aceutils.cdToScript() aceutils.cd(r'../') aceutils.rmdir(r'Dev/cmake') aceutils.mkdir(r'Dev/cmake') aceutils.cd(r'Dev/cmake') if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D BUILD_SHARED_LIBS:BOOL=OFF -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../' ) else: aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF ../') aceutils.call(r'make install') aceutils.cd(r'../../') aceutils.copytree(r'Dev/bin/Data', r'Dev/cmake/bin/Data')
aceutils.wget(r'https://github.com/altseed/glfw/archive/' + zipname) aceutils.unzip(zipname) aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt') aceutils.rmdir(r"glfw_bin") aceutils.rmdir(r"glfw_bin_x64") aceutils.mkdir(r"glfw_bin") aceutils.mkdir(r"glfw_bin_x64") aceutils.cd(r"glfw_bin") if aceutils.isWin(): aceutils.call( r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF ../' + pathname + '/') aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Debug' ) aceutils.call( r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" ALL_BUILD.vcxproj /p:configuration=Release' ) elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX:PATH=../Dev "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../' + pathname + '/') aceutils.call(r'make install') else: aceutils.call( r'cmake -G "Unix Makefiles" -D BUILD_SHARED_LIBS:BOOL=OFF -D CMAKE_INSTALL_PREFIX=../Dev ../'
aceutils.wget(r'https://bullet.googlecode.com/files/bullet-2.82-r2704.zip') aceutils.unzip(r'bullet-2.82-r2704.zip') aceutils.editCmakeForACE(r'bullet-2.82-r2704/CMakeLists.txt','cp932') aceutils.rmdir(r"bullet_bin") aceutils.rmdir(r"bullet_bin_x64") aceutils.mkdir(r"bullet_bin") aceutils.mkdir(r"bullet_bin_x64") aceutils.cd(r"bullet_bin") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BUILD_DEMOS:BOOL=OFF ../bullet-2.82-r2704/') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" BULLET_PHYSICS.sln /p:configuration=Debug') aceutils.call(r'"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild" BULLET_PHYSICS.sln /p:configuration=Release') elif aceutils.isMac(): aceutils.call(r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D USE_INTERNAL_LOADER:BOOL=OFF "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../bullet-2.82-r2704/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF ../bullet-2.82-r2704/') aceutils.call(r'make') aceutils.cd(r"../") aceutils.cd(r"bullet_bin_x64") if aceutils.isWin(): aceutils.call(r'cmake -G "Visual Studio 12 Win64" -D USE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF -D BUILD_DEMOS:BOOL=OFF ../bullet-2.82-r2704/')
pathname = r'libgd' aceutils.cdToScript() with aceutils.CurrentDir('../Downloads'): aceutils.rmdir(r"gd_bin") aceutils.rmdir(r"gd_bin_x64") aceutils.editCmakeForACE(pathname + r'/CMakeLists.txt', 'cp932') aceutils.editCmakeForACE(pathname + r'/src/CMakeLists.txt', 'cp932') aceutils.mkdir(r"gd_bin") aceutils.mkdir(r"gd_bin_x64") with aceutils.CurrentDir('gd_bin'): if aceutils.isWin(): aceutils.call(aceutils.cmd_cmake + r'../' + pathname + '/') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Debug') aceutils.call(aceutils.cmd_compile + r'src/libgd_static.vcxproj /p:configuration=Release') elif aceutils.isMac(): aceutils.call( r'cmake -G "Unix Makefiles" "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ../' + pathname + '/') aceutils.call(r'make') else: aceutils.call(r'cmake -G "Unix Makefiles" ../' + pathname + '/') aceutils.call(r'make') with aceutils.CurrentDir('gd_bin_x64'): if aceutils.isWin():