1@echo off
2rem // Copyright (c) 2012- PPSSPP Project.
3
4rem // This program is free software: you can redistribute it and/or modify
5rem // it under the terms of the GNU General Public License as published by
6rem // the Free Software Foundation, version 2.0 or later versions.
7
8rem // This program is distributed in the hope that it will be useful,
9rem // but WITHOUT ANY WARRANTY; without even the implied warranty of
10rem // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11rem // GNU General Public License 2.0 for more details.
12
13rem // A copy of the GPL 2.0 should have been included with the program.
14rem // If not, see http://www.gnu.org/licenses/
15
16rem // Official git repository and contact information can be found at
17rem // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
18
19if not defined vs140comntools (
20  echo "Visual Studio 2015 doesn't appear to be installed properly. Quitting."
21  goto quit
22) else (
23    call "%vs140comntools%\vsvars32.bat" x86_amd64
24)
25
26set PPSSPP_ROOT=%CD%\..
27set RELEASE_DIR=%CD%\bin-release
28set RELEASE_X64=PPSSPPWindows64.exe
29set DEBUG_X64=PPSSPPDebug64.exe
30
31set RLS_PPSSPP=/m /p:Configuration=Release;Platform=x64
32set DBG_PPSSPP=/m /p:Configuration=Debug;Platform=x64
33
34call msbuild PPSSPP.sln /t:Clean %RLS_PPSSPP%
35call msbuild PPSSPP.sln /t:Build %RLS_PPSSPP%
36if not exist "%PPSSPP_ROOT%\%RELEASEX64%" (
37    echo Release build failed.
38    goto Quit
39)
40call msbuild PPSSPP.sln /t:Clean %DBG_PPSSPP% /m
41call msbuild PPSSPP.sln /t:Build %DBG_PPSSPP% /m
42if not exist "%PPSSPP_ROOT%\%DEBUGX64%" (
43    echo Debug build failed.
44    goto Quit
45)
46
47if not exist "%RELEASE_DIR%\\." (
48  mkdir %RELEASE_DIR%
49) else (
50  rmdir /S /Q %RELEASE_DIR%
51  mkdir %RELEASE_DIR%
52)
53
54cd /d %RELEASE_DIR%
55
56xcopy "%PPSSPP_ROOT%\assets" ".\assets\*" /S
57xcopy "%PPSSPP_ROOT%\flash0" ".\flash0\*" /S
58xcopy "%PPSSPP_ROOT%\lang" ".\lang\*" /S
59
60copy %PPSSPP_ROOT%\LICENSE.txt /Y
61copy %PPSSPP_ROOT%\README.md /Y
62
63copy %PPSSPP_ROOT%\%DEBUG_X64% /Y
64
65copy %PPSSPP_ROOT%\%RELEASE_X64% /Y
66
67:Quit
68pause
69