Skip to content

Commit

Permalink
Adjust installation script to work within the working copy tree, such…
Browse files Browse the repository at this point in the history
… that it doesn't make any assumptions about the folder the sources have been cloned into.
  • Loading branch information
codereader committed Dec 28, 2019
1 parent 049f885 commit 694e204
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -49,6 +49,7 @@ tools/msvc2015/DarkRadiant.VC.db
# Mac OS X Stuff
.DS_Store
xcuserdata

Makefile.in
/config.h.in
/configure
Expand All @@ -60,3 +61,7 @@ Makefile.in
/tools/innosetup/*.zip
/tools/lwo_analyse/.vs
/radiant/*.aps

# Portable installation temp folders
/tools/scripts/DarkRadiant_install.x64
/tools/scripts/DarkRadiant_install
12 changes: 7 additions & 5 deletions tools/scripts/compile_release_package.ps1
@@ -1,9 +1,11 @@
# Check input arguments
if ($args.Count -eq 0 -or ($args[0] -ne "x64" -and $args[0] -ne "x86"))
{
Write-Host "Usage: compile_release_package.ps1 <x64|x86>"
Write-Host "Usage: compile_release_package.ps1 <x64|x86> [skipbuild]"
Write-Host ""
Write-Host "e.g. to compile a 64 bit build: .\compile_release_package.ps1 x64"
Write-Host "The skipbuild flag is optional and can be used to skip recompiling"
Write-Host "the whole sources, only the installers and 7z files will be created"
Write-Host ""
return
}
Expand Down Expand Up @@ -64,8 +66,8 @@ if (-not $skipbuild)

# Copy files to portable files folder

$pathToCheck = "..\..\..\$portablePath"
$portableFilesFolder = Get-Item -Path $pathToCheck
$pathToCheck = ".\$portablePath"
$portableFilesFolder = Get-Item -Path $pathToCheck -ErrorAction SilentlyContinue

if ($portableFilesFolder -eq $null)
{
Expand Down Expand Up @@ -122,11 +124,11 @@ if ((Get-ChildItem -Path $portableFilename -ErrorAction SilentlyContinue) -ne $n
{
Remove-Item -Path $portableFilename
}
Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList ("a", "-r", "-x!*.pdb", "-mx9", "-mmt2", $portableFilename, "..\..\..\$portablePath\*.*")
Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList ("a", "-r", "-x!*.pdb", "-mx9", "-mmt2", $portableFilename, "$portableFilesFolder\*.*")

# Compress Program Database Files
if ((Get-ChildItem -Path $pdbFilename -ErrorAction SilentlyContinue) -ne $null)
{
Remove-Item -Path $pdbFilename
}
Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList ("a", "-r", "-mx9", "-mmt2", $pdbFilename, "..\..\..\$portablePath\*.pdb") -Wait
Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList ("a", "-r", "-mx9", "-mmt2", $pdbFilename, "$portableFilesFolder\*.pdb") -Wait

0 comments on commit 694e204

Please sign in to comment.