Esempio n. 1
0
        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):
                msbuild_path = candidate
                break

        if candidate is None:
            raise Exception("MSBuild is not found")

    elif aceutils.isMac():
        msbuild_path = 'msbuild'

    with aceutils.CurrentDir('build'):

        if aceutils.isWin() or aceutils.isMac():
            # for auto restore of .csproj
            aceutils.wget(
                r'https://dist.nuget.org/win-x86-commandline/v5.1.0/nuget.exe')

        if aceutils.isWin():
            if is_x86:
                aceutils.call('cmake .. -A Win32 -DBUILD_VIEWER=ON')
            else:
                aceutils.call('cmake .. -A x64 -DBUILD_VIEWER=ON')
Esempio n. 2
0
    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():
            if is_x86:
                aceutils.call('cmake .. -A Win32 -DBUILD_VIEWER=ON')
            else:
                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')

    if is_x86:
        call(
            '"' + msbuild_path + '"' +
            ' Dev/Editor/EffekseerCore/EffekseerCore.csproj /t:build /p:Configuration=Release /p:Platform=x86'