Exemple #1
0
env["PKG_CONFIG_PATH"] = os.getenv(
    'PKG_CONFIG_PATH',
    '/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig')
env["AS"] = os.getenv('AS', 'as -arch i386')
env["CC"] = os.getenv('CC', 'clang -arch i386 -mmacosx-version-min=10.6')

env["MONO_SDK_PATH"] = os.getenv(
    'MONO_SDK_PATH', '/Library/Frameworks/Mono.framework/Versions/Current')
env["PACKAGEING_FOR_MAC"] = os.getenv('PACKAGEING_FOR_MAC', '0')
env["PACKAGEING_FOR_LINUX"] = os.getenv('PACKAGEING_FOR_LINUX', '0')
env["IGNORE_BUILD"] = os.getenv('IGNORE_BUILD', '0')

is_x86 = 'x86' in sys.argv

if env['IGNORE_BUILD'] == '0':
    aceutils.mkdir('build')
    if aceutils.isWin():
        #import winreg
        #reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
        #key = winreg.OpenKey(reg, r"SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0")
        #msbuild_path = winreg.QueryValueEx(key, 'MSBuildToolsPath')[0] + 'MSBuild.exe'

        candidates = [
            r"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe",
            r"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe",
            r"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe",
        ]

        candidate = None
        for candidate in candidates:
            if os.path.exists(candidate):
Exemple #2
0
import subprocess
import Script.aceutils as aceutils

aceutils.mkdir('build')

if aceutils.isWin():
    import winreg
    reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
    key = winreg.OpenKey(reg, r"SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0")
    msbuild_path = winreg.QueryValueEx(key, 'MSBuildToolsPath')[0] + 'MSBuild.exe'
else:
    msbuild_path = 'msbuild'

with aceutils.CurrentDir('build'):
    # for auto restore of .csproj 
    aceutils.wget(r'https://dist.nuget.org/win-x86-commandline/v5.1.0/nuget.exe')

    if aceutils.isWin():
        aceutils.call('cmake .. -A x64 -DBUILD_VIEWER=ON')
    elif aceutils.isMac():
        aceutils.call('cmake .. -G "Xcode" -DBUILD_VIEWER=ON')
    else:
        aceutils.call('cmake .. -G "Unix Makefiles" -DBUILD_VIEWER=ON')
    aceutils.call('cmake --build . --config Release')

if aceutils.isWin():
    aceutils.call('build\\nuget.exe restore Dev/Editor/Effekseer.sln')
else:
    aceutils.call('mono ./build/nuget.exe restore Dev/Editor/Effekseer.sln')

aceutils.call('"' + msbuild_path + '"' + ' Dev/Editor/EffekseerCore/EffekseerCore.csproj /t:build /p:Configuration=Release /p:Platform=x64')