aboutsummaryrefslogtreecommitdiff
path: root/project/Win32BuildSetup/BuildSetup.bat
diff options
context:
space:
mode:
authorPär Björklund <per@ohmy.nu>2016-08-04 18:33:47 +0200
committerPär Björklund <per@ohmy.nu>2016-08-06 18:55:41 +0200
commitd3faf082c1ee24373ad473a60fb5946ca5540729 (patch)
tree9a47b8cfdf5d007abbb4a7efd1dfe1536312a371 /project/Win32BuildSetup/BuildSetup.bat
parentc24a52f8054e2b6f2804bfb28752eee377d1a04f (diff)
Finally get rid of the VS solution!legacy_drop_vs
This drops the VS2010Express directory and modifies BuildSetup.bat to only use cmake. No more horrible xml merge conflicts :)
Diffstat (limited to 'project/Win32BuildSetup/BuildSetup.bat')
-rw-r--r--project/Win32BuildSetup/BuildSetup.bat129
1 files changed, 23 insertions, 106 deletions
diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat
index de41eda95b..9086d27d6d 100644
--- a/project/Win32BuildSetup/BuildSetup.bat
+++ b/project/Win32BuildSetup/BuildSetup.bat
@@ -1,4 +1,4 @@
-@ECHO OFF
+@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
REM setup all paths
SET cur_dir=%CD%
@@ -47,7 +47,6 @@ SET buildmingwlibs=true
SET buildbinaryaddons=true
SET exitcode=0
SET useshell=rxvt
-SET cmake=0
SET BRANCH=na
FOR %%b in (%1, %2, %3, %4, %5, %6) DO (
IF %%b==clean SET buildmode=clean
@@ -56,61 +55,18 @@ FOR %%b in (%1, %2, %3, %4, %5, %6) DO (
IF %%b==nomingwlibs SET buildmingwlibs=false
IF %%b==nobinaryaddons SET buildbinaryaddons=false
IF %%b==sh SET useshell=sh
- IF %%b==cmake SET cmake=1
)
SET buildconfig=Release
-set WORKSPACE=%CD%\..\..
+set WORKSPACE=%CD%\..\..\kodi-build
- REM look for MSBuild.exe delivered with Visual Studio 2015
- FOR /F "tokens=2,* delims= " %%A IN ('REG QUERY HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 /v MSBuildToolsRoot') DO SET MSBUILDROOT=%%B
- SET NET="%MSBUILDROOT%14.0\bin\MSBuild.exe"
-
- IF EXIST "!NET!" (
- set msbuildemitsolution=1
- set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Build /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V140" /m
- set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Clean /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V140"
- )
-
- IF NOT EXIST %NET% (
- set DIETEXT=MSBuild was not found.
- goto DIE
- )
-
- set EXE= "..\VS2010Express\XBMC\%buildconfig%\%APP_NAME%.exe"
- set PDB= "..\VS2010Express\XBMC\%buildconfig%\%APP_NAME%.pdb"
- set D3D= "..\VS2010Express\XBMC\%buildconfig%\D3DCompile*.DLL"
-
:: sets the BRANCH env var
call getbranch.bat
rem CONFIG END
rem -------------------------------------------------------------
- goto EXE_COMPILE
-
-:EXE_COMPILE
- IF EXIST buildlog.html del buildlog.html /q
- IF NOT %buildmode%==ask goto COMPILE_MINGW
- IF %promptlevel%==noprompt goto COMPILE_MINGW
- rem ---------------------------------------------
- rem check for existing exe
- rem ---------------------------------------------
- set buildmode=clean
-
- IF NOT EXIST %EXE% goto COMPILE_MINGW
-
- ECHO ------------------------------------------------------------
- ECHO Found a previous Compiled WIN32 EXE!
- ECHO [1] a NEW EXE will be compiled for the BUILD_WIN32
- ECHO [2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32
- ECHO ------------------------------------------------------------
- set /P APP_COMPILE_ANSWER=Compile a new EXE? [1/2]:
- if /I %APP_COMPILE_ANSWER% EQU 1 set buildmode=clean
- if /I %APP_COMPILE_ANSWER% EQU 2 set buildmode=noclean
-
goto COMPILE_MINGW
-
:COMPILE_MINGW
ECHO Buildmode = %buildmode%
@@ -123,68 +79,29 @@ set WORKSPACE=%CD%\..\..
)
rem only use sh to please jenkins
IF %useshell%==sh (
- call ..\..\tools\buildsteps\win32\make-mingwlibs.bat sh noprompt %buildmode%
+ call %base_dir%\tools\buildsteps\win32\make-mingwlibs.bat sh noprompt %buildmode%
) ELSE (
- call ..\..\tools\buildsteps\win32\make-mingwlibs.bat noprompt %buildmode%
+ call %base_dir%\tools\buildsteps\win32\make-mingwlibs.bat noprompt %buildmode%
)
IF EXIST errormingw (
set DIETEXT="failed to build mingw libs"
goto DIE
)
)
- IF %cmake%==1 goto COMPILE_CMAKE_EXE
- IF %buildmode%==clean goto COMPILE_EXE
- goto COMPILE_NO_CLEAN_EXE
+ goto COMPILE_CMAKE_EXE
-
-:COMPILE_EXE
- ECHO Wait while preparing the build.
- ECHO ------------------------------------------------------------
- ECHO Cleaning Solution...
- %NET% %CLEAN_EXE%
- ECHO Compiling %APP_NAME% branch %BRANCH%...
- %NET% %OPTS_EXE%
- IF %errorlevel%==1 (
- set DIETEXT="%APP_NAME%.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
- IF %promptlevel%==noprompt (
- type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
- )
- goto DIE
- )
- ECHO Done!
- ECHO ------------------------------------------------------------
- set buildmode=clean
- GOTO MAKE_BUILD_EXE
-
-:COMPILE_NO_CLEAN_EXE
- ECHO Wait while preparing the build.
- ECHO ------------------------------------------------------------
- ECHO Compiling %APP_NAME% branch %BRANCH%...
- %NET% %OPTS_EXE%
- IF %errorlevel%==1 (
- set DIETEXT="%APP_NAME%.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
- IF %promptlevel%==noprompt (
- type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
- )
- goto DIE
- )
- ECHO Done!
- ECHO ------------------------------------------------------------
- GOTO MAKE_BUILD_EXE
-
-
:COMPILE_CMAKE_EXE
ECHO Wait while preparing the build.
ECHO ------------------------------------------------------------
ECHO Compiling %APP_NAME% branch %BRANCH%...
IF %buildmode%==clean (
- RMDIR /S /Q %WORKSPACE%\kodi-build
+ RMDIR /S /Q %WORKSPACE%
)
- MKDIR %WORKSPACE%\kodi-build
- PUSHD %WORKSPACE%\kodi-build
+ MKDIR %WORKSPACE%
+ PUSHD %WORKSPACE%
- cmake.exe -G "Visual Studio 14" %WORKSPACE%\project\cmake
+ cmake.exe -G "Visual Studio 14" %base_dir%\project\cmake
IF %errorlevel%==1 (
set DIETEXT="%APP_NAME%.EXE failed to build!"
goto DIE
@@ -196,9 +113,9 @@ set WORKSPACE=%CD%\..\..
goto DIE
)
- set EXE="%WORKSPACE%\kodi-build\%buildconfig%\%APP_NAME%.exe"
- set PDB="%WORKSPACE%\kodi-build\%buildconfig%\%APP_NAME%.pdb"
- set D3D="%WORKSPACE%\kodi-build\D3DCompile*.DLL"
+ set EXE="%WORKSPACE%\%buildconfig%\%APP_NAME%.exe"
+ set PDB="%WORKSPACE%\%buildconfig%\%APP_NAME%.pdb"
+ set D3D="%WORKSPACE%\D3DCompile*.DLL"
POPD
ECHO Done!
@@ -245,16 +162,16 @@ set WORKSPACE=%CD%\..\..
xcopy %EXE% BUILD_WIN32\application > NUL
xcopy %D3D% BUILD_WIN32\application > NUL
- xcopy ..\..\userdata BUILD_WIN32\application\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
- copy ..\..\copying.txt BUILD_WIN32\application > NUL
- copy ..\..\LICENSE.GPL BUILD_WIN32\application > NUL
- copy ..\..\known_issues.txt BUILD_WIN32\application > NUL
+ xcopy %base_dir%\userdata BUILD_WIN32\application\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ copy %base_dir%\copying.txt BUILD_WIN32\application > NUL
+ copy %base_dir%\LICENSE.GPL BUILD_WIN32\application > NUL
+ copy %base_dir%\known_issues.txt BUILD_WIN32\application > NUL
xcopy dependencies\*.* BUILD_WIN32\application /Q /I /Y /EXCLUDE:exclude.txt > NUL
- xcopy ..\..\addons BUILD_WIN32\application\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
- xcopy ..\..\system\*.dll BUILD_WIN32\application /Q /I /Y > NUL
- xcopy ..\..\system BUILD_WIN32\application\system /E /Q /I /Y /EXCLUDE:exclude.txt+exclude_dll.txt > NUL
- xcopy ..\..\media BUILD_WIN32\application\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ xcopy %WORKSPACE%\addons BUILD_WIN32\application\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ xcopy %WORKSPACE%\*.dll BUILD_WIN32\application /Q /I /Y > NUL
+ xcopy %WORKSPACE%\system BUILD_WIN32\application\system /E /Q /I /Y /EXCLUDE:exclude.txt+exclude_dll.txt > NUL
+ xcopy %WORKSPACE%\media BUILD_WIN32\application\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
REM create AppxManifest.xml
"%sed_exe%" -e s/@APP_NAME@/%APP_NAME%/g -e s/@COMPANY_NAME@/%COMPANY_NAME%/g -e s/@APP_VERSION@/%APP_VERSION%/g -e s/@VERSION_NUMBER@/%VERSION_NUMBER%/g "AppxManifest.xml.in" > "BUILD_WIN32\application\AppxManifest.xml"
@@ -263,7 +180,7 @@ set WORKSPACE=%CD%\..\..
IF %buildbinaryaddons%==true (
ECHO ------------------------------------------------------------
ECHO Building addons...
- cd ..\..\tools\buildsteps\win32
+ cd %base_dir%\tools\buildsteps\win32
IF %buildmode%==clean (
call make-addons.bat clean
)
@@ -280,12 +197,12 @@ set WORKSPACE=%CD%\..\..
ECHO ------------------------------------------------------------
ECHO Building Estuary Skin...
- cd ..\..\addons\skin.estuary
+ cd %WORKSPACE%\addons\skin.estuary
call build.bat > NUL
cd %build_path%
ECHO Building Estouchy Skin...
- cd ..\..\addons\skin.estouchy
+ cd %WORKSPACE%\addons\skin.estouchy
call build.bat > NUL
cd %build_path%