updating all recipes to use dynamic helper script loading (#69)
This commit is contained in:
@@ -17,7 +17,6 @@ A recipe is the script you run. It calls multiple helper scripts. These curren
|
||||
|
||||
**Helper Scripts**: A helper script performs setup routines that may be useful by many recipes. Recipes call helper scripts (you don't run helper scripts directly). The helper scripts live in the **scripts** folder
|
||||
|
||||
|
||||
## You may want to customize the scripts
|
||||
These scripts should cover a lot of what you need but will not likely match your personal preferences exactly. In this case please fork the project and change the scripts however you desire. We really appreciate PR's back to this project if you have recommended changes.
|
||||
|
||||
@@ -45,10 +44,13 @@ To run a recipe script, click a link in the table below from your target machine
|
||||
| | More Coming Soon! |
|
||||
|
||||
**Notes:**
|
||||
¹ If you're a Node.js contributor working on Node.js core, please see the [Node.js Bootstrapping Guide](https://github.com/nodejs/node/tree/master/tools/bootstrap) or [click here to run](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter).
|
||||
1. If you are using WSL there's a followup step we recommend after running the setup script. When the script finishes you will only have a root user with a blank password. You should manually create a non-root user via `$ sudo adduser [USERNAME] sudo`
|
||||
with a non-blank password. Use this user going forward. For more info on WSL please refer to the [documentation](https://docs.microsoft.com/en-us/windows/wsl/about).
|
||||
2. If you're a Node.js contributor working on Node.js core, please see the [Node.js Bootstrapping Guide](https://github.com/nodejs/node/tree/master/tools/bootstrap) or [click here to run](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter).
|
||||
|
||||
## Known issues
|
||||
- Windows 1803 is not successfully launching Boxstarter via the web launcher. This is actively under investigation and there are workarounds such as running Boxstarter locally. See this issue for details: https://github.com/chocolatey/boxstarter/issues/301
|
||||
- Reboot is not always logging you back in to resume the script. This is being tracked [here](https://github.com/chocolatey/boxstarter/issues/318). If you experience this please login manually and the script will continue running.
|
||||
- There have been reports of Windows 1803 not successfully launching Boxstarter via the web launcher. See this issue for details: https://github.com/chocolatey/boxstarter/issues/301
|
||||
|
||||
## Working with Chocolatey in an organization?
|
||||
As an organization, you may not be keen to reach out to the internet. That's fine as with just a few modifications you can still take advantage of these scripts. Visit the [organizational use page](ORGANIZATION.md) to learn how.
|
||||
|
||||
19
dev_app.ps1
19
dev_app.ps1
@@ -4,16 +4,21 @@
|
||||
|
||||
Disable-UAC
|
||||
|
||||
# see if we can't get calling URL somehow, that would eliminate this need
|
||||
# should move to a config file
|
||||
$user = "Microsoft";
|
||||
$baseBranch = "master";
|
||||
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";
|
||||
# Get the base URI path from the ScriptToCall value
|
||||
$bstrappackage = "-bootstrapPackage"
|
||||
$helperUri = $Boxstarter['ScriptToCall']
|
||||
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||
$helperUri = $helperUri.TrimStart("'", " ")
|
||||
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||
$helperUri += "/scripts"
|
||||
write-host "helper script base URI is $helperUri"
|
||||
|
||||
function executeScript {
|
||||
Param ([string]$script)
|
||||
write-host "executing $finalBaseHelperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
|
||||
write-host "executing $helperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||
}
|
||||
|
||||
#--- Setting up Windows ---
|
||||
|
||||
@@ -4,16 +4,21 @@
|
||||
|
||||
Disable-UAC
|
||||
|
||||
# see if we can't get calling URL somehow, that would eliminate this need
|
||||
# should move to a config file
|
||||
$user = "Microsoft";
|
||||
$baseBranch = "MLSamples";
|
||||
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";
|
||||
# Get the base URI path from the ScriptToCall value
|
||||
$bstrappackage = "-bootstrapPackage"
|
||||
$helperUri = $Boxstarter['ScriptToCall']
|
||||
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||
$helperUri = $helperUri.TrimStart("'", " ")
|
||||
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||
$helperUri += "/scripts"
|
||||
write-host "helper script base URI is $helperUri"
|
||||
|
||||
function executeScript {
|
||||
Param ([string]$script)
|
||||
write-host "executing $finalBaseHelperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
|
||||
write-host "executing $helperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||
}
|
||||
|
||||
#--- Setting up Windows ---
|
||||
|
||||
@@ -6,11 +6,7 @@ Disable-UAC
|
||||
|
||||
# Get the base URI path from the ScriptToCall value
|
||||
$bstrappackage = "-bootstrapPackage"
|
||||
$Boxstarter | Foreach-Object { write-host "The key name is $_.Key and value is $_.Value" }
|
||||
|
||||
$helperUri = $Boxstarter['ScriptToCall']
|
||||
write-host "ScriptToCall is $helperUri"
|
||||
|
||||
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||
$helperUri = $helperUri.TrimStart("'", " ")
|
||||
|
||||
21
dev_web.ps1
21
dev_web.ps1
@@ -4,18 +4,23 @@
|
||||
|
||||
Disable-UAC
|
||||
|
||||
# Get the base URI path from the ScriptToCall value
|
||||
$bstrappackage = "-bootstrapPackage"
|
||||
$helperUri = $Boxstarter['ScriptToCall']
|
||||
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||
$helperUri = $helperUri.TrimStart("'", " ")
|
||||
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||
$helperUri += "/scripts"
|
||||
write-host "helper script base URI is $helperUri"
|
||||
|
||||
function executeScript {
|
||||
Param ([string]$script)
|
||||
write-host "executing $finalBaseHelperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
|
||||
write-host "executing $helperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||
}
|
||||
|
||||
# see if we can't get calling URL somehow, that would eliminate this need
|
||||
# should move to a config file
|
||||
$user = "Microsoft";
|
||||
$baseBranch = "master";
|
||||
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";
|
||||
|
||||
#--- Setting up Windows ---
|
||||
executeScript "FileExplorerSettings.ps1";
|
||||
executeScript "SystemConfiguration.ps1";
|
||||
|
||||
@@ -4,16 +4,21 @@
|
||||
|
||||
Disable-UAC
|
||||
|
||||
# see if we can't get calling URL somehow, that would eliminate this need
|
||||
# should move to a config file
|
||||
$user = "Microsoft";
|
||||
$baseBranch = "master";
|
||||
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";
|
||||
# Get the base URI path from the ScriptToCall value
|
||||
$bstrappackage = "-bootstrapPackage"
|
||||
$helperUri = $Boxstarter['ScriptToCall']
|
||||
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||
$helperUri = $helperUri.TrimStart("'", " ")
|
||||
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||
$helperUri += "/scripts"
|
||||
write-host "helper script base URI is $helperUri"
|
||||
|
||||
function executeScript {
|
||||
Param ([string]$script)
|
||||
write-host "executing $finalBaseHelperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
|
||||
write-host "executing $helperUri/$script ..."
|
||||
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||
}
|
||||
|
||||
#--- Setting up Windows ---
|
||||
|
||||
Reference in New Issue
Block a user