Skip to content

Instantly share code, notes, and snippets.

@digitaldrummerj
Last active September 16, 2023 05:21
Show Gist options
  • Save digitaldrummerj/3fe2eb057004b6742b89 to your computer and use it in GitHub Desktop.
Save digitaldrummerj/3fe2eb057004b6742b89 to your computer and use it in GitHub Desktop.
Setup script to install everything needed for Ionic Framework using Chocolatey.
#########################
# This gist is meant to be used to install everything needed to get up and running with the Ionic Framework on Windows using Chocolatey (http://chocolatey.org)
# Read "How to use this Gist File" section below for instructions.
#########################
#########################
# NOTE : for those familiar with Chocolatey, there are a couple of custom packages used as part of the install that are not published and are waiting on maintainers to make updates to their packages.
#########################
#---------------------------
# How to use this Gist File
#---------------------------
#
# Install Chocolatey from http://www.chocolatey.org. Command is on the front-page of the site.
#
# Install the BoxStarter Chocolatey package
# after install chocolatey, the command is cinst BoxStarter
#
# close the cmd prompt or powershell prompt that you opened to install Chocolatey and BoxStarter
#
#
#---------------------------
# END REQUIRED PRE-WORK
#---------------------------
#---------------------------
# START OF SCRIPT THAT DOES THE INSTALLS
#---------------------------
#---------------------------
# Software Installs
#---------------------------
choco install nodejs -y -version 6.9.1 # https://chocolatey.org/packages/nodejs
choco install git -y # https://chocolatey.org/packages/git
choco install gradle -y
choco install AndroidStudio -y -InstallArguments "/AddToDesktop:false /PinnedToTaskbar:false" #https://chocolatey.org/packages/androidstudio
choco install GoogleChrome -y # https://chocolatey.org/packages/GoogleChrome
choco install visualstudiocode -y
#---------------------------
# End Software Installs
#---------------------------
#-------------------------
# Install node, npm, cordova, and ionic
#-------------------------
Write-Host 'Installing Cordova. This may take a few minutes'
cmd /c "refreshenv && npm install -g cordova"
Write-Host 'Installing Ionic. This may take a few minutes'
cmd /c "refreshenv && npm install -g ionic"
cmd /c "refreshenv && node -v "
cmd /c "refreshenv && npm -v "
cmd /c "refreshenv && cordova -v"
cmd /c "refreshenv && ionic -v"
#-------------------------
# End Install node, npm, bower, gulp, cordova, and ionic
#-------------------------
#-------------------------
# Install Android SDK Apis
#-------------------------
cmd /c "refreshenv && android update sdk -a -u -t tools,platform-tools,build-tools-24.0.3,android-19,android-20,android-21,android-22,android-23,android-24,source-24,extra-google-webdriver"
#-------------------------
# End Install Android SDK Apis
#-------------------------
#########################
# This gist is meant to be used to install everything needed to get up and running with the Ionic Framework on Windows using Chocolatey (http://chocolatey.org)
# Read "How to use this Gist File" section below for instructions.
#########################
#########################
# NOTE : for those familiar with Chocolatey, there are a couple of custom packages used as part of the install that are not published and are waiting on maintainers to make updates to their packages.
#########################
#---------------------------
# How to use this Gist File
#---------------------------
#
# Install Chocolatey from http://www.chocolatey.org. Command is on the front-page of the site.
#
# Install the BoxStarter Chocolatey package
# after install chocolatey, the command is cinst BoxStarter
#
# close the cmd prompt or powershell prompt that you opened to install Chocolatey and BoxStarter
#
#
#---------------------------
# END REQUIRED PRE-WORK
#---------------------------
#---------------------------
# START OF SCRIPT THAT DOES THE INSTALLS
#---------------------------
#*****************
# install nodejs
#*****************
choco install nodejs -y -version 6.9.1 # https://chocolatey.org/packages/nodejs
#*****************
# install git command line
#*****************
choco install git -y # https://chocolatey.org/packages/git
#*****************
# install gradle
#*****************
choco install gradle -y
#*****************
# install android sdk
# unfortunately the Android sdk exe silent install puts it in %LocalAppData%\Android
# the package also doesn't add the android tools and platform-tools into the path. I did that below. Maintainer has been contacted.
# Installed as part of android studio package dependency
#*****************
choco install -y android-sdk #https://chocolatey.org/packages/android-sdk
#********************
# Installs Anroid studio without SDK
#*********************
choco install -y AndroidStudio -InstallArguments "/AddToDesktop:false /PinnedToTaskbar:false" #https://chocolatey.org/packages/androidstudio
#*****************
# install Google Chrome
# needed for testing ionic in a browser and debugging when deployed to an Android device
#*****************
choco install GoogleChrome -y # https://chocolatey.org/packages/GoogleChrome
#*****************
# install Visual Studio Code
# great free editor that I really like
#*****************
choco install visualstudiocode -y # https://chocolatey.org/packages/visualstudiocode
#-------------------------
# OPTIONAL
#-------------------------
#
#***********************
# only need if not using Visual Studio 2015 Android Emulator
# installs genymotion. Don't install inside of a virtual machine
#***********************
#choco install -y genymotion #https://chocolatey.org/packages/genymotion
#-------------------------
# END OPTIONAL
#-------------------------
#-------------------------
# Install node, npm, bower, gulp, cordova, and ionic
#-------------------------
Write-Host 'Installing Cordova. This may take a few minutes'
cmd /c "refreshenv && npm install -g cordova"
Write-Host 'Installing Bower. This may take a few minutes'
cmd /c "refreshenv && npm install -g bower"
Write-Host 'Installing Gulp. This may take a few minutes'
cmd /c "refreshenv && npm install -g gulp"
Write-Host 'Installing Ionic. This may take a few minutes'
cmd /c "refreshenv && npm install -g ionic"
cmd /c "refreshenv && node -v "
cmd /c "refreshenv && npm -v "
cmd /c "refreshenv && bower -v "
cmd /c "refreshenv && gulp -v "
cmd /c "refreshenv && cordova -v"
cmd /c "refreshenv && ionic -v"
#-------------------------
# End Install node, npm, bower, gulp, cordova, and ionic
#-------------------------
#-------------------------
# Install Android SDK Apis
#-------------------------
cmd /c "refreshenv && android update sdk -a -u -t platform-tools,android-23,build-tools-23.0.3,extra-google-webdriver"
#-------------------------
# End Install Android SDK Apis
#-------------------------
@cookyourweb
Copy link

Thanks a lot , really great, no errors during instalation .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment