Skip to content

Commit

Permalink
improve build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Hübner committed Dec 11, 2019
1 parent 7f06bcb commit 47b572c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ $buildPath = 'C:\SeeSharp\win10\x64'
$pagesPath = Join-Path -Path $buildPath -ChildPath '\pages'

### build App
Write-Host "BUILDING APP" -ForegroundColor Green
cd SeeSharp.Desktop
dotnet publish -o $buildPath -c RELEASE -f netcoreapp3.0 -r win10-x64 /p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true
cd ..

### Create 'Send to > pages' shortcut
### Create 'Send to > SeeSharp' shortcut
Write-Host "CREATING 'Send to > SeeSharp' SHORTCUT" -ForegroundColor Green
$wshshell = New-Object -com wscript.shell

$shortcutPath = Join-Path -Path $wshshell.SpecialFolders.Item('sendto') -ChildPath 'SeeSharp.lnk'
$shortcut = $wshshell.CreateShortcut($shortcutPath)
$shortcut.TargetPath = $pagesPath
$shortcut.Description = 'this shortcut was created by SeeSharp'
$shortcut.Save()
$shortcut.Save()

Write-Host "ALL DONE!" -ForegroundColor Green

0 comments on commit 47b572c

Please sign in to comment.