diff --git a/projects/language/language.vcxproj b/projects/language/language.vcxproj deleted file mode 100644 index 071a041562..0000000000 --- a/projects/language/language.vcxproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Release XP - Win32 - - - Release with Tests - Win32 - - - - {0468FC1E-5881-4DB9-9DDE-1892290B31D9} - language - - - - Utility - true - v140 - MultiByte - - - Utility - false - v140 - true - MultiByte - - - Utility - false - v140_xp - true - MultiByte - - - Utility - false - v140 - true - MultiByte - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\build\$(Configuration)\ - $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Configuration)\ - $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Configuration)\ - $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ - - - $(SolutionDir)..\build\Release\ - $(SolutionDir)..\obj\$(ProjectName)\Release\ - - - - Level3 - Disabled - true - - - true - - - xcopy /Y "$(SolutionDir)\..\Data\Language\*.*" "$(TargetDir)\Data\Language\" - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - true - - - xcopy /Y "$(SolutionDir)\..\Data\Language\*.*" "$(TargetDir)\Data\Language\" - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - true - - - xcopy /Y "$(SolutionDir)\..\Data\Language\*.*" "$(TargetDir)\Data\Language\" - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - true - - - xcopy /Y "$(SolutionDir)\..\Data\Language\*.*" "$(TargetDir)\Data\Language\" - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/projects/language/language.vcxproj.filters b/projects/language/language.vcxproj.filters deleted file mode 100644 index 6810d604ae..0000000000 --- a/projects/language/language.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {96ec0470-f3e0-443e-8715-171ad8676bb6} - - - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - Resource Files\Language - - - \ No newline at end of file diff --git a/projects/openrct2.sln b/projects/openrct2.sln index 5667f3043f..b4083ffb27 100644 --- a/projects/openrct2.sln +++ b/projects/openrct2.sln @@ -1,14 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2", "openrct2.vcxproj", "{D24D94F6-2A74-480C-B512-629C306CE92F}" - ProjectSection(ProjectDependencies) = postProject - {0468FC1E-5881-4DB9-9DDE-1892290B31D9} = {0468FC1E-5881-4DB9-9DDE-1892290B31D9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "language", "language\language.vcxproj", "{0468FC1E-5881-4DB9-9DDE-1892290B31D9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libs", "libs\libs.vcxproj", "{074DC930-05C6-4B7F-B5DD-DD237E6E44DB}" EndProject @@ -28,14 +23,6 @@ Global {D24D94F6-2A74-480C-B512-629C306CE92F}.Release XP|Win32.Build.0 = Release XP|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.ActiveCfg = Release|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.Build.0 = Release|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Debug|Win32.Build.0 = Debug|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release with Tests|Win32.ActiveCfg = Release with Tests|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release with Tests|Win32.Build.0 = Release with Tests|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release XP|Win32.ActiveCfg = Release XP|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release XP|Win32.Build.0 = Release XP|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release|Win32.ActiveCfg = Release|Win32 - {0468FC1E-5881-4DB9-9DDE-1892290B31D9}.Release|Win32.Build.0 = Release|Win32 {074DC930-05C6-4B7F-B5DD-DD237E6E44DB}.Debug|Win32.ActiveCfg = Debug|Win32 {074DC930-05C6-4B7F-B5DD-DD237E6E44DB}.Debug|Win32.Build.0 = Debug|Win32 {074DC930-05C6-4B7F-B5DD-DD237E6E44DB}.Release with Tests|Win32.ActiveCfg = Release with Tests|Win32 diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj index d875356d8b..074e69bca3 100644 --- a/projects/openrct2.vcxproj +++ b/projects/openrct2.vcxproj @@ -345,25 +345,25 @@ $(SolutionDir)..\lib;$(SolutionDir)..\lib\libspeex;$(SolutionDir)..\lib\sdl\include;$(SolutionDir)..\lib\libcurl\include;$(SolutionDir)..\lib\jansson;$(SolutionDir)..\lib\cutest;$(SolutionDir)..\lib\SDL2_ttf\include;$(IncludePath) $(SolutionDir)..\lib\sdl\lib\x86;$(SolutionDir)..\lib\libcurl\lib;$(LibraryPath) - $(SolutionDir)..\build\$(Configuration)\ + $(SolutionDir)..\bin\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ $(SolutionDir)..\lib;$(SolutionDir)..\lib\libspeex;$(SolutionDir)..\lib\sdl\include;$(SolutionDir)..\lib\libcurl\include;$(SolutionDir)..\lib\jansson;$(SolutionDir)..\lib\cutest;$(SolutionDir)..\lib\SDL2_ttf\include;$(IncludePath) $(SolutionDir)..\lib\sdl\lib\x86;$(SolutionDir)..\lib\libcurl\lib;$(LibraryPath) - $(SolutionDir)..\build\$(Configuration)\ + $(SolutionDir)..\bin\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ $(SolutionDir)..\lib;$(SolutionDir)..\lib\libspeex;$(SolutionDir)..\lib\sdl\include;$(SolutionDir)..\lib\libcurl\include;$(SolutionDir)..\lib\jansson;$(SolutionDir)..\lib\cutest;$(SolutionDir)..\lib\SDL2_ttf\include;$(IncludePath) $(SolutionDir)..\lib\sdl\lib\x86;$(SolutionDir)..\lib\libcurl\lib;$(LibraryPath) - $(SolutionDir)..\build\$(Configuration)\ + $(SolutionDir)..\bin\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)\ $(SolutionDir)..\lib;$(SolutionDir)..\lib\libspeex;$(SolutionDir)..\lib\sdl\include;$(SolutionDir)..\lib\libcurl\include;$(SolutionDir)..\lib\jansson;$(SolutionDir)..\lib\cutest;$(SolutionDir)..\lib\SDL2_ttf\include;$(IncludePath) $(SolutionDir)..\lib\sdl\lib\x86;$(SolutionDir)..\lib\libcurl\lib;$(LibraryPath) - $(SolutionDir)..\build\Release\ + $(SolutionDir)..\bin\ $(SolutionDir)..\obj\$(ProjectName)\Release\ @@ -383,11 +383,6 @@ true winmm.lib;sdl2.lib;%(AdditionalDependencies) - - "$(TargetDir)openrct2.exe" sprite build "$(SolutionDir)..\Data\g2.dat" "$(SolutionDir)..\Resources\g2" -xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" - Build g2.dat and copy the Data directory. - @@ -415,19 +410,6 @@ xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" winmm.lib;sdl2.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) - - "$(TargetDir)openrct2.exe" sprite build "$(SolutionDir)..\Data\g2.dat" "$(SolutionDir)..\Resources\g2" -xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" - Build g2.dat and copy the Data directory. - - - - - - - - - @@ -456,19 +438,6 @@ xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" /ignore:4099 %(AdditionalOptions) Windows - - "$(TargetDir)openrct2.exe" sprite build "$(SolutionDir)..\Data\g2.dat" "$(SolutionDir)..\Resources\g2" -xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" - Build g2.dat and copy the Data directory. - - - - - - - - - @@ -495,19 +464,6 @@ xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" winmm.lib;sdl2.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) - - "$(TargetDir)openrct2.exe" sprite build "$(SolutionDir)..\Data\g2.dat" "$(SolutionDir)..\Resources\g2" -xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data" - Build g2.dat and copy the Data directory. - - - - - - - - - diff --git a/scripts/build.ps1 b/scripts/build.ps1 index ee5776c0c9..28194ddf21 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1 +1,66 @@ -msbuild ..\projects\openrct2.sln /p:Configuration=Release /p:Platform=Win32 /v:minimal +######################################################### +# Script to build different parts of OpenRCT2 +######################################################### +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false, Position = 1)] + [string]$Task = "openrct2", + + [Parameter(Mandatory = $false)] + [string]$Configuration = "Release" +) + +# Get paths +$scriptPath = $Script:MyInvocation.MyCommand.Path +$scriptsPath = Split-Path $scriptPath +$rootPath = Split-Path $scriptsPath +$binPath = Join-Path $rootPath "bin" +$openrct2Path = Join-Path $binPath "openrct2.exe" + +function Build-Data() +{ + Write-Host "Copying data to bin..." -ForegroundColor Cyan + New-Item -Force -ItemType Directory $binPath > $null + Copy-Item -Force -Recurse "$rootPath\data" $binPath + return 0 +} + +function Build-OpenRCT2() +{ + Write-Host "Building OpenRCT2 ($Configuration)..." -ForegroundColor Cyan + msbuild ..\projects\openrct2.sln /p:Configuration=$Configuration /p:Platform=Win32 /v:minimal | Write-Host + return $LASTEXITCODE +} + +function Build-G2() +{ + # Check if OpenRCT2 binary exists + if (-not (Test-Path $openrct2Path)) + { + Write-Host "You must build OpenRCT2 first before g2.dat can be built." -ForegroundColor Red + return 1 + } + + Write-Host "Building g2.dat..." -ForegroundColor Cyan + & $openrct2Path sprite build "$binPath\data\g2.dat" "$rootPath\resources\g2" + return $LASTEXITCODE +} + +function Build-All() +{ + if (($result = (Build-Data )) -ne 0) { return $result } + if (($result = (Build-OpenRCT2)) -ne 0) { return $result } + if (($result = (Build-G2 )) -ne 0) { return $result } +} + +# Script entry point +switch ($Task) +{ + "data" { $result = Build-Data } + "openrct2" { $result = Build-OpenRCT2 } + "g2" { $result = Build-G2 } + "all" { $result = Build-All } + default { Write-Host "Unknown build task." -ForegroundColor Red + $result = 1 } +} +exit $result diff --git a/scripts/build_g2.ps1 b/scripts/build_g2.ps1 deleted file mode 100644 index 5fdd155a1f..0000000000 --- a/scripts/build_g2.ps1 +++ /dev/null @@ -1 +0,0 @@ -..\build\release\openrct2.exe sprite build "data\g2.dat" "resources\g2" diff --git a/scripts/install.ps1 b/scripts/install.ps1 index f61e579d89..4c0f60437a 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -4,7 +4,7 @@ param ( [switch]$Force ) -Write-Output "Installing OpenRCT2 development environment for Windows" +Write-Host "Installing OpenRCT2 development environment for Windows" -ForegroundColor Cyan Import-Module ".\common.psm1" -DisableNameChecking # Settings @@ -49,7 +49,7 @@ else # Download latest version of the dependencies if ($updateLibs) { - Write-Output "Updating dependencies..." + Write-Host "Updating dependencies..." -ForegroundColor Cyan Remove-Item -Force -Recurse $libsPath -ErrorAction SilentlyContinue New-Item -Force -ItemType Directory $libsPath > $null diff --git a/scripts/publish.ps1 b/scripts/publish.ps1 index b26a6af9ec..f02b6510e9 100644 --- a/scripts/publish.ps1 +++ b/scripts/publish.ps1 @@ -9,10 +9,15 @@ param ( [string]$buildNo = "" ) +# Get paths +$scriptPath = $Script:MyInvocation.MyCommand.Path +$scriptsPath = Split-Path $scriptPath +$rootPath = Split-Path $scriptsPath + # Set build attributes function do-prepareSource($build_server = "", $build_number = "") { - Write-Output "Setting build #defines..." + Write-Host "Setting build #defines..." -ForegroundColor Cyan # $build_number = ""; # $build_server = ""; $build_branch = (git rev-parse --abbrev-ref HEAD) @@ -42,18 +47,18 @@ function do-prepareSource($build_server = "", $build_number = "") # Building OpenRCT2 function do-build() { - Write-Output "Building OpenRCT2..." - msbuild ..\projects\openrct2.sln /p:Configuration=Release /p:Platform=Win32 /t:rebuild /v:minimal + Write-Host "Building OpenRCT2..." -ForegroundColor Cyan + msbuild $rootPath\projects\openrct2.sln /p:Configuration=Release /p:Platform=Win32 /t:rebuild /v:minimal } # Package function do-package() { - Write-Output "Publishing OpenRCT2..." - $releaseDir = "..\build\Release" - $distDir = "..\distribution" - $tempDir = "..\artifacts\temp" - $outZip = "..\artifacts\openrct2.zip" + Write-Host "Publishing OpenRCT2..." -ForegroundColor Cyan + $releaseDir = "$rootPath\bin" + $distDir = "$rootPath\distribution" + $tempDir = "$rootPath\artifacts\temp" + $outZip = "$rootPath\artifacts\openrct2.zip" # Create new temp directory Remove-Item -Force -Recurse $tempDir -ErrorAction SilentlyContinue @@ -76,6 +81,6 @@ function do-package() Remove-Item -Force -Recurse $tempDir -ErrorAction SilentlyContinue } -# do-prepareSource $server $buildNo -# do-build +do-prepareSource $server $buildNo +do-build do-package