Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#26 Added Option for disabling Boxstarter desktop icon #54

Merged
merged 1 commit into from
Jan 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BuildScripts/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $tools = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
. (Join-Path $tools Setup.ps1)
try {
$ModuleName = (Get-ChildItem $tools | ?{ $_.PSIsContainer }).BaseName
Install-Boxstarter "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $ModuleName
Install-Boxstarter "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $ModuleName $env:chocolateyPackageParameters
Write-ChocolateySuccess $ModuleName
} catch {
Write-ChocolateyFailure $ModuleName "$($_.Exception.Message)"
Expand Down
9 changes: 5 additions & 4 deletions BuildScripts/setup.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Install-Boxstarter($here, $ModuleName) {
function Install-Boxstarter($here, $ModuleName, $installArgs = "") {
$boxstarterPath=Join-Path $env:AppData Boxstarter
if(!(test-Path $boxstarterPath)){
mkdir $boxstarterPath
Expand Down Expand Up @@ -50,9 +50,10 @@ PS:>Get-Help Boxstarter
$target="powershell.exe"
$targetArgs="-ExecutionPolicy bypass -NoExit -Command `"&'$boxstarterPath\BoxstarterShell.ps1'`""

$link = Join-Path $desktop "Boxstarter Shell.lnk"
Create-Shortcut $link $target $targetArgs $boxstarterPath

if($installArgs -inotcontains "nodesktopicon") {
$link = Join-Path $desktop "Boxstarter Shell.lnk"
Create-Shortcut $link $target $targetArgs $boxstarterPath
}
$link = Join-Path $startMenu "Boxstarter Shell.lnk"
Create-Shortcut $link $target $targetArgs $boxstarterPath

Expand Down