Giter VIP home page Giter VIP logo

Comments (20)

sthak004 avatar sthak004 commented on June 29, 2024 1

@cw-lin Both @dogi and I ran your script it worked! And yes, if you can add installation to this script, that would be great so that I can test it with my uninstall script.

from ole--vagrant-community.

cw-lin avatar cw-lin commented on June 29, 2024 1

@sthak004
Sorry about the typo, \wait should be /wait

start /wait %cd%\vagrant_1.8.5.msi
start /wait %cd%\VirtualBox-5.0.10-104061-Win.exe
start /wait %cd%\Git-2.9.2-64-bit.exe

I typed the script out into comment instead of copy and paste from my code, that's probably why /wait becomes \wait

from ole--vagrant-community.

sthak004 avatar sthak004 commented on June 29, 2024 1

@cw-lin So I ran your script and it ran successfully! I was able to install everything using your script and uninstall everything with my script. Thanks!

I have some feedback:

  1. I think there should be a branch to install either the 32 bit version or the 64 bit version of Git because as of right now, the script only installs the 64 bit version.
  2. After the script finishes, see if you can delete the folder called Installation since we don't need the installers anymore.
  3. If you can find a way to install each program silently that would be great because I believe that's what @dogi mentioned in the hangout on Monday.

Here are the options for installing silently for each of the separate installers

Git Installer:
git installer options

Virtual Box Installer:
virtualbox installer options

Vagrant Installer:
vagrant installer options

from ole--vagrant-community.

dogi avatar dogi commented on June 29, 2024

Maybe first we have to brainstorm, which software each os needs ...

from ole--vagrant-community.

xinglunxu avatar xinglunxu commented on June 29, 2024

Can we do something like this?

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew install git 
    brew cask install vagrant
    brew cask install virtualbox

Just put all the install commands into one script.

from ole--vagrant-community.

dogi avatar dogi commented on June 29, 2024

yes ;)

I kinda would also check if user is "root" and if not switch to "root"

from ole--vagrant-community.

xinglunxu avatar xinglunxu commented on June 29, 2024

Why do we need to switch to "root"? If there is permission issue can't we just run the script with sudo?

Here is the script I came up with:

#!/bin/bash

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew tap caskroom/cask
brew cask install vagrant
brew cask install virtualbox

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

As for Windows, I think we need:
1- git
2- Virtual box
3- Vagrant

from ole--vagrant-community.

dogi avatar dogi commented on June 29, 2024

@mhalqurashi

+ssh
+bonjour

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

@dogi Why do we need these? I ran my BeLL app without them.

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

@dogi Also, if we are using Powershell as a scripting language for Windows, we need to install it. This link could help.

4- Powershell

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

@dogi I have created a PowerShell script which downloads and installs Git for Windows 10 x64. It has not been tested on x86 architecture yet. It will most likely work on Windows 7, 8, and 8.1 since they all have PowerShell pre-installed. Here is the file.

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

Also, I think I can create a script for Vagrant and Virtual Box.

from ole--vagrant-community.

dogi avatar dogi commented on June 29, 2024

@mhalqurashi please copy paste the code into this ;)

from ole--vagrant-community.

mhalqurashi avatar mhalqurashi commented on June 29, 2024

$LocalTempDir = $env:TEMP; $GitInstaller = "GitInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('https://github.com/git-for-windows/git/releases/download/v2.9.0.windows.1/Git-2.9.0-64-bit.exe', "$LocalTempDir\$GitInstaller"); & "$LocalTempDir\$GitInstaller" /silent /install; $Process2Monitor = "GitInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$GitInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)

from ole--vagrant-community.

cw-lin avatar cw-lin commented on June 29, 2024

@dogi I wrote a batch script for windows to download git, virtualbox, and vagrant.

@echo off

MKDIR Installation
CD Installation
set powershellDir=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe

IF EXIST "%PROGRAMFILES(X86)%" GOTO 64BIT
ELSE GOTO 32BIT

:64BIT
%powershellDir% -Command "Invoke-WebRequest https://github.com/git-for-windows/git/releases/download/v2.9.2.windows.1/Git-2.9.2-64-bit.exe -OutFile Git-2.9.2-32-bit.exe"
goto track
GOTO END

:32BIT
%powershellDir% -Command "Invoke-WebRequest https://github.com/git-for-windows/git/releases/download/v2.9.2.windows.1/Git-2.9.2-32-bit.exe -OutFile Git-2.9.2-32-bit.exe"
goto track
GOTO END

:track
%powershellDir% -Command "Invoke-WebRequest https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5.msi -OutFile vagrant_1.8.5.msi"
%powershellDir% -Command "Invoke-WebRequest http://download.virtualbox.org/virtualbox/5.0.10/VirtualBox-5.0.10-104061-Win.exe -OutFile VirtualBox-5.0.10-104061-Win.exe"
END

It works for my computer but it would be helpful if anyone can test this script.
Do you want me add installation into this script? It seems like that belongs to issue #9

from ole--vagrant-community.

sthak004 avatar sthak004 commented on June 29, 2024

@cw-lin Also, @dogi mentioned that it would be preferable (if possible) to have installation as a one liner as the website brew.sh does so.

from ole--vagrant-community.

cw-lin avatar cw-lin commented on June 29, 2024

@dogi @sthak004 Thanks for testing the script
Here's the installation script

start \wait %cd%\vagrant_1.8.5.msi
start \wait %cd%\VirtualBox-5.0.10-104061-Win.exe
start \wait %cd%\Git-2.9.2-64-bit.exe

from ole--vagrant-community.

sthak004 avatar sthak004 commented on June 29, 2024

@cw-lin I ran into a problem when attempting to run your script.

I went and combined your installation script to your download script as such:

code

and it successfully downloaded the correct installers into a Installation folder however, when it came time to installation component of your script (outlined above), windows gave me this error regarding the *wait* command:

capture

Did it work on your machine? I can try and troubleshoot but I'd rather just ask first in case I'm doing something wrong.
Thanks.

from ole--vagrant-community.

cw-lin avatar cw-lin commented on June 29, 2024

@sthak004
Haven't tested the silent installation yet but here's the more complete version of script I made together.

@echo off
MKDIR Installation
CD Installation
set powershellDir=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe
IF EXIST "%PROGRAMFILES(X86)%" GOTO GIT64BIT
ELSE GOTO GIT32BIT
:GIT64BIT
%powershellDir% -Command "Invoke-WebRequest https://github.com/git-for-windows/git/releases/download/v2.9.2.windows.1/Git-2.9.2-64-bit.exe -OutFile Git-2.9.2.exe"
%powershellDir% -Command "Start-Process -FilePath '%cd%\Git-2.9.2.exe' -ArgumentList '/silent', '/install', '/norestart' -Wait"
goto VBANDVAGRANT
GOTO END
:GIT32BIT
%powershellDir% -Command "Invoke-WebRequest https://github.com/git-for-windows/git/releases/download/v2.9.2.windows.1/Git-2.9.2-32-bit.exe -OutFile Git-2.9.2.exe"
%powershellDir% -Command "Start-Process -FilePath '%cd%\Git-2.9.2.exe' -ArgumentList '/silent', '/install', '/norestart' -Wait"
goto VBANDVAGRANT
GOTO END
:VBANDVAGRANT
%powershellDir% -Command "Invoke-WebRequest https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5.msi -OutFile vagrant_1.8.5.msi"
%powershellDir% -Command "Invoke-WebRequest http://download.virtualbox.org/virtualbox/5.0.10/VirtualBox-5.0.10-104061-Win.exe -OutFile VirtualBox-5.0.10-104061-Win.exe"
msiexec /package vagrant_1.8.5.msi /quiet /norestart
%powershellDir% -Command "Start-Process -FilePath '%cd%\VirtualBox-5.0.10-104061-Win.exe' -ArgumentList '/silent', '/install', '/norestart' -Wait"
goto cleanup
GOTO END
:cleanup
del Git-2.9.2.exe vagrant_1.8.5.msi VirtualBox-5.0.10-104061-Win.exe
cd ..
RMDIR Installation
exit

from ole--vagrant-community.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.