-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.ps1
19 lines (14 loc) · 865 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$dir = Split-Path -parent $MyInvocation.MyCommand.Path
& MSBuild.exe /t:Rebuild "$dir\LeveledUp.sln" /p:Configuration=Release
$pathToChrome = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
#chrome might be installed in appdata folder
$appDataChromeInstallFolder = $env:LOCALAPPDATA + "\Google\Chrome\Application\chrome.exe"
if(Test-Path $appDataChromeInstallFolder)
{
$pathToChrome = $appDataChromeInstallFolder
}
& "$pathToChrome" --pack-extension="$dir\chrome_extension\src\" --pack-extension-key="$dir\chrome_extension\chrome_extension.pem"
[System.Threading.Thread]::Sleep(1000)
move -Force "$dir\chrome_extension\src.crx" "$dir\chrome_extension\chrome_extension.crx"
& MSBuild.exe "$dir\Installer\Installer.wixproj" /t:Rebuild /p:Configuration=Release /p:Platform="x64"
#copy -Force "$dir\Installer\bin\x64\Release\*.exe" "$dir\build\"