Skip to content

Commit

Permalink
Simplify BuildBot and add a helper script for compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
micove committed Sep 26, 2015
1 parent b9e00ab commit f201aac
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 65 deletions.
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
*.dsw
*.bsc
*.aps
*.exe

*.trace
*.asm
*.dump

*.asm
!/pcsx2/IPU/yuv2rgb.asm
!/pcsx2/x86/ix86-32/aVif_proc-32.asm
!/plugins/CDVDpeops/i386.asm
Expand Down Expand Up @@ -51,11 +52,15 @@ Devel

oprofile_data/

/BuildLog.htm
/UpgradeLog.XML
/UpgradeLog2.XML
/UpgradeLog3.XML
# Visual Studio upgrades
/Backup*
/UpgradeLog*.htm

/bin/**/*.dll
/bin/**/*.exp
/bin/**/*.ilk
/bin/**/*.lib
/bin/**/*.pdb
/bin/PCSX2
/bin/*ReplayLoader
/bin/bios
Expand Down Expand Up @@ -95,7 +100,6 @@ oprofile_data/
/nsis/svnrev_spu2x.nsh
/nsis/svnrev_zerogs.nsh
/nsis/svnrev_zerospu2.nsh
/nsis/*.exe
/pcsx2/gui/Resources/*.h
!/pcsx2/gui/Resources/EmbeddedImage.h
/plugins/CDVDolio/Template
Expand Down
6 changes: 0 additions & 6 deletions bin/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions build.cmd

This file was deleted.

71 changes: 71 additions & 0 deletions buildbot.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="ReleaseAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Add all the solutions here. -->
<ItemGroup>
<SolutionSet Include="$(MSBuildProjectDirectory)\PCSX2_suite.sln" />
<!--SolutionSet Include="$(MSBuildProjectDirectory)\old_plugins.sln" /-->
<ProjectSetCPU Include="$(MSBuildProjectDirectory)\plugins\GSdx\GSdx.vcxproj" />
</ItemGroup>
<!-- Add common build properties here. -->
<PropertyGroup>
<CreateHardLinksIfPossible>true</CreateHardLinksIfPossible>
<CompileFastPlz>BuildInParallel=True;
CreateHardLinksForCopyFilesToOutputDirectoryIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForCopyAdditionalFilesIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForCopyLocalIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForPublishFilesIfPossible=$(CreateHardLinksIfPossible);
</CompileFastPlz>
</PropertyGroup>
<!-- Add all the custom targets here. -->
<Target Name="CleanBloat" AfterTargets="InternalBuild">
<ItemGroup>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.bsc"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.exp"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.ilk"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.iobj"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.ipdb"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.lib"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.pdb"/>
</ItemGroup>
<Delete Files="@(BloatToDelete)" />
</Target>
<Target Name="CleanCruft">
<ItemGroup>
<CruftToDelete Include="$(MSBuildProjectDirectory)\**\svnrev.h"/>
<CruftToDelete Include="$(MSBuildProjectDirectory)\**\*.CppClean.log" />
</ItemGroup>
<Delete Files="@(CruftToDelete)" />
</Target>
<Target Name="InternalBuild" AfterTargets="DebugAll;DevelAll;ReleaseAll">
<MSBuild Projects="@(SolutionSet)" BuildInParallel="false" Properties="Configuration=$(BaseConfiguration)" Targets="Clean" />
<MSBuild Projects="@(ProjectSetCPU)" BuildInParallel="false" Properties="Configuration=%(ConfigCPU.Identity)" Targets="Clean" />
<CallTarget Targets="CleanCruft" />
<MSBuild Projects="@(SolutionSet)" BuildInParallel="false" Properties="Configuration=$(BaseConfiguration);$(CompileFastPlz)" Targets="Build" />
<MSBuild Projects="@(ProjectSetCPU)" BuildInParallel="true" Properties="Configuration=%(ConfigCPU.Identity);BuildProjectReferences=false;$(CompileFastPlz);SolutionDir=$(MSBuildProjectDirectory)\" Targets="Build" />
</Target>
<Target Name="DebugAll">
<PropertyGroup>
<BaseConfiguration>Debug</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Debug AVX;Debug AVX2;Debug SSE4;Debug SSSE3"/>
</ItemGroup>
</Target>
<Target Name="DevelAll">
<PropertyGroup>
<BaseConfiguration>Devel</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Release AVX;Release AVX2;Release SSE4;Release SSSE3"/>
<!--ConfigCPU Include="Devel AVX;Devel AVX2;Devel SSE4;Devel SSSE3"/-->
</ItemGroup>
</Target>
<Target Name="ReleaseAll">
<PropertyGroup>
<BaseConfiguration>Release</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Release AVX;Release AVX2;Release SSE4;Release SSSE3"/>
</ItemGroup>
</Target>
</Project>
29 changes: 0 additions & 29 deletions clean_msvc.cmd

This file was deleted.

65 changes: 65 additions & 0 deletions mscompile.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@ECHO OFF
REM PCSX2 - PS2 Emulator for PCs
REM Copyright (C) 2002-2015 PCSX2 Dev Team
REM
REM PCSX2 is free software: you can redistribute it and/or modify it under the terms
REM of the GNU Lesser General Public License as published by the Free Software Found-
REM ation, either version 3 of the License, or (at your option) any later version.
REM
REM PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
REM without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
REM PURPOSE. See the GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License along with PCSX2.
REM If not, see <http://www.gnu.org/licenses/>.

CLS
ECHO Select your Visual Studio version:
ECHO 1. Microsoft Visual Studio 2013 (default)
ECHO 2. Microsoft Visual Studio 2015
ECHO Q. Exit the script.
CHOICE /C 12Q /T 10 /D 1 /M "Visual Studio version: "
IF ERRORLEVEL 3 GOTO END
IF ERRORLEVEL 2 SET "VCVARPATH=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
IF ERRORLEVEL 1 SET "VCVARPATH=%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"

ECHO.
ECHO Select the desired configuration:
ECHO 1. Release 32bit (default)
ECHO 2. Devel 32bit
ECHO 3. Debug 32bit
ECHO 4. Release 64bit (WIP)
ECHO 5. Devel 64bit (WIP)
ECHO 6. Debug 64bit (WIP)
ECHO Q. Exit the script.
CHOICE /C 123456Q /T 10 /D 1 /M "Configuration: "
IF ERRORLEVEL 7 GOTO END
IF ERRORLEVEL 6 SET "SELARCH=amd64" && SET "SELCONF=DebugAll"
IF ERRORLEVEL 5 SET "SELARCH=amd64" && SET "SELCONF=DevelAll"
IF ERRORLEVEL 4 SET "SELARCH=amd64" && SET "SELCONF=ReleaseAll"
IF ERRORLEVEL 3 SET "SELARCH=x86" && SET "SELCONF=DebugAll"
IF ERRORLEVEL 2 SET "SELARCH=x86" && SET "SELCONF=DevelAll"
IF ERRORLEVEL 1 SET "SELARCH=x86" && SET "SELCONF=ReleaseAll"

IF EXIST "%VCVARPATH%" (call "%VCVARPATH%" %SELARCH%) ELSE GOTO ERRORVS
cl > NUL 2>&1
if %ERRORLEVEL% NEQ 0 GOTO ERRORVS

ECHO.
ECHO Using:
cl 2>&1 | findstr "Version"
ECHO.

SET "LOGOPTIONS=/v:m /fl1 /fl2 /flp1:logfile="%~dpn0-%SELARCH%-%SELCONF%-errors.log";errorsonly /flp2:logfile="%~dpn0-%SELARCH%-%SELCONF%-warnings.log";warningsonly"
msbuild "%~dp0\buildbot.xml" /m %LOGOPTIONS% /t:%SELCONF%
GOTO END

:ERRORVS
ECHO.
ECHO The selected Visual Studio version was not found.

:END
ECHO.
ECHO Bye!
ECHO.
timeout /t 10

0 comments on commit f201aac

Please sign in to comment.