Added a counterpart to the Makefile for Windows users
This commit is contained in:
@@ -166,11 +166,12 @@ NEW:
|
|||||||
Utility:
|
Utility:
|
||||||
Added an improved INI/MPR map import.
|
Added an improved INI/MPR map import.
|
||||||
Added an --upgrade-mod feature to upgrade the yaml of mods to the latest specifications.
|
Added an --upgrade-mod feature to upgrade the yaml of mods to the latest specifications.
|
||||||
Packaging:
|
Build system and packages:
|
||||||
Removed portable install option from Windows installer as the game left without write access breaks content download and error log generation.
|
Removed portable install option from Windows installer as the game left without write access breaks content download and error log generation.
|
||||||
Added HTML documentation to the Windows installer.
|
Added HTML documentation to the Windows installer.
|
||||||
Fixed broken FreeType 2 dependency for Fedora RPM.
|
Fixed broken FreeType 2 dependency for Fedora RPM.
|
||||||
Added SDL 2 as a dependency for the RPM package.
|
Added SDL 2 as a dependency for the RPM package.
|
||||||
|
Added a counterpart to the Makefile for Windows users.
|
||||||
Mod / Custom map compatibility:
|
Mod / Custom map compatibility:
|
||||||
Altitude is no longer parsed from actor templates in maps. Specify CenterPosition instead.
|
Altitude is no longer parsed from actor templates in maps. Specify CenterPosition instead.
|
||||||
system.yaml has been split into four files for all mods: misc.yaml, ai.yaml, player.yaml and world.yaml.
|
system.yaml has been split into four files for all mods: misc.yaml, ai.yaml, player.yaml and world.yaml.
|
||||||
|
|||||||
1
make.cmd
Normal file
1
make.cmd
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@powershell -NoProfile -ExecutionPolicy Unrestricted -File make.ps1 %*
|
||||||
92
make.ps1
Normal file
92
make.ps1
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
if ($args.Length -eq 0)
|
||||||
|
{
|
||||||
|
echo "Command list:"
|
||||||
|
echo ""
|
||||||
|
echo " all Builds the game and its development tools."
|
||||||
|
echo " dependencies Copies the game's dependencies into the main game folder."
|
||||||
|
echo " version Sets the version strings for the default mods to the latest"
|
||||||
|
echo " version for the current Git branch."
|
||||||
|
echo " clean Removes all built and copied files. Use the 'all' and"
|
||||||
|
echo " 'dependencies' commands to restore removed files."
|
||||||
|
echo ""
|
||||||
|
$command = Read-Host "Enter command"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$command = $args
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($command -eq "all")
|
||||||
|
{
|
||||||
|
$msBuildVersions = @("4.0", "3.5")
|
||||||
|
foreach ($msBuildVersion in $msBuildVersions)
|
||||||
|
{
|
||||||
|
$key = "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\{0}" -f $msBuildVersion
|
||||||
|
$property = Get-ItemProperty $key -ErrorAction SilentlyContinue
|
||||||
|
if ($property -eq $null -or $property.MSBuildToolsPath -eq $null)
|
||||||
|
{
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
$path = Join-Path $property.MSBuildToolsPath -ChildPath "MSBuild.exe"
|
||||||
|
if (-not (Test-Path $path))
|
||||||
|
{
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
$proc = Start-Process $path /t:Rebuild -NoNewWindow -PassThru -Wait
|
||||||
|
$proc.WaitForExit()
|
||||||
|
if ($proc.ExitCode -ne 0)
|
||||||
|
{
|
||||||
|
echo "Build failed. If just the development tools failed to build, try installing Visual Studio. You may also still be able to run the game."
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "Build succeeded."
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if ($proc -eq $null)
|
||||||
|
{
|
||||||
|
echo "Unable to locate an appropriate version of MSBuild."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($command -eq "clean")
|
||||||
|
{
|
||||||
|
rm *.pdb
|
||||||
|
rm *.config
|
||||||
|
rm *.exe
|
||||||
|
rm *.dll
|
||||||
|
rm mods/*/*.dll
|
||||||
|
echo "Clean complete."
|
||||||
|
}
|
||||||
|
elseif ($command -eq "version")
|
||||||
|
{
|
||||||
|
$version = git name-rev --name-only --tags --no-undefined HEAD 2>$null
|
||||||
|
if ($version -eq $null)
|
||||||
|
{
|
||||||
|
$version = "git-" + (git rev-parse --short HEAD)
|
||||||
|
}
|
||||||
|
$mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/modchooser/mod.yaml")
|
||||||
|
foreach ($mod in $mods)
|
||||||
|
{
|
||||||
|
$replacement = (gc $mod) -Replace "Version:.*", ("Version: {0}" -f $version)
|
||||||
|
sc $mod $replacement
|
||||||
|
}
|
||||||
|
echo ("Version strings set to '{0}'." -f $version)
|
||||||
|
}
|
||||||
|
elseif ($command -eq "dependencies")
|
||||||
|
{
|
||||||
|
cp thirdparty/*.dll .
|
||||||
|
cp thirdparty/Tao/*.dll .
|
||||||
|
cp packaging/windows/*.dll .
|
||||||
|
echo "Dependencies copied."
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo ("Invalid command '{0}'" -f $command)
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($args.Length -eq 0)
|
||||||
|
{
|
||||||
|
echo "Press enter to continue."
|
||||||
|
[System.Console]::ReadKey($true) >$null
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user