Compare commits

...

18 Commits

Author SHA1 Message Date
AllSpiceUser
516a35ba84 Ad %PATH% to help debug 2024-02-11 01:59:08 +00:00
AllSpiceUser
67eea6f93d Change syntax to debug URI failure 2024-02-11 01:54:48 +00:00
AllSpiceUser
fea8020297 Remove quotes around URI 2024-02-11 01:50:55 +00:00
AllSpiceUser
ca8659d981 Convert scoop git install to .bat -> powershell install 2024-02-11 01:49:13 +00:00
AllSpiceUser
2470aad2c6 Add check for git 2024-02-11 01:37:45 +00:00
AllSpiceUser
1178b50a06 Move execution policy to top of code to execute every time 2024-02-11 01:34:50 +00:00
AllSpiceUser
e587d6b6eb Re-add git install 2024-02-11 01:32:51 +00:00
AllSpiceUser
dd5033b995 Add git install 2024-02-11 01:31:08 +00:00
AllSpiceUser
28eeb50a89 Replace powershell .ps1 file with inline powershell commands 2024-02-11 01:28:53 +00:00
AllSpiceUser
b745ce84e5 Add pause to debug 2024-02-11 01:07:16 +00:00
AllSpiceUser
bf3e2aeceb Change git download link 2024-02-11 00:59:58 +00:00
AllSpiceUser
65b9813f30 Change git installer from shoop to powershell download and install to fix catch22 dependency 2024-02-11 00:52:31 +00:00
AllSpiceUser
290979de7b Change git install syntax to fix bug 2024-02-11 00:50:08 +00:00
AllSpiceUser
57f1ab7323 Replace git install with scoop.sh recommended commands 2024-02-11 00:44:10 +00:00
AllSpiceUser
a669fc74cd Move scoop update below git install dependency 2024-02-11 00:41:57 +00:00
AllSpiceUser
7e7aa58970 Remove bucket creation before git install 2024-02-11 00:37:49 +00:00
AllSpiceUser
01522f0759 Revert link to develop branch for development 2024-02-11 00:29:37 +00:00
AllSpiceUser
0c2a8e3054 Add check for scoop install 2024-02-11 00:28:04 +00:00
2 changed files with 87 additions and 20 deletions

View File

@ -1,11 +1,56 @@
@echo Installing AllSpice Ecosystem
@echo Environment-path [%PATH%]
@echo [1][Download powershell script]
@echo off
echo Downloading install-allspice-win64.ps1...
powershell -Command "$downloadPath = Join-Path -Path $HOME -ChildPath 'AllSpice'; if (-not (Test-Path -Path $downloadPath)) { New-Item -ItemType Directory -Path $downloadPath }; Invoke-WebRequest -Uri 'https://hub.allspice.io/AllSpice-demos/Demos-home/raw/tag/active/install-allspice-win64.ps1' -OutFile (Join-Path -Path $downloadPath -ChildPath 'install-allspice-win64.ps1')"
echo Script downloaded. Running the script...
powershell -ExecutionPolicy Bypass -Command "& \"$env:USERPROFILE\AllSpice\install-allspice-win64.ps1\""
echo Script execution completed. Paused.
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser"
:: Check if Scoop is already installed
where scoop >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Scoop is not installed, installing Scoop...
powershell -Command "Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')"
) else (
echo Scoop is already installed.
)
:: Check for Git in the system's PATH
where git >nul 2>&1
:: Check the result of the where command
if %ERRORLEVEL% EQU 0 (
echo Git is installed.
) else (
echo Git is not installed.
@echo off
SET installer_path=%TEMP%\git_installer.exe
echo Downloading Git for Windows...
powershell -Command "Invoke-WebRequest -Uri 'https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/Git-2.43.0-64-bit.exe' -OutFile '%installer_path%'"
echo Git installer downloaded. Installing Git...
start /wait "" "%installer_path%" /VERYSILENT /NORESTART
echo Checking if Git is installed correctly...
git --version
if %ERRORLEVEL% EQU 0 (
echo Git has been successfully installed.
) else (
echo Git installation failed or Git is not in the PATH.
)
pause
)
:: Update Scoop
echo Updating Scoop...
powershell -Command "scoop update"
:: Pause the script to allow the user to see the output
pause

View File

@ -1,36 +1,58 @@
Write-Host "Attempting to install Scoop..."
try {
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') -ErrorAction Stop
} catch {
Write-Host "An error occurred while installing Scoop: $_"
Write-Host "Checking if Scoop is installed..."
Read-Host
if (-not (Test-Path "~\scoop")) {
Write-Host "Scoop is not installed. Installing Scoop..."
try {
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
} catch {
Write-Host "An error occurred while installing Scoop: $_"
}
} else {
Write-Host "Scoop is already installed."
}
Write-Host "Attempting to install git..."
Write-Host "Installing git..."
try {
scoop bucket add main -ErrorAction Stop
scoop install git -ErrorAction Stop
# Download Git for Windows installer
$gitInstallerUrl = "https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/Git-2.43.0-64-bit.exe" # Make sure to check for the latest version
$installerPath = "$env:TEMP\GitInstaller.exe"
Invoke-WebRequest -Uri $gitInstallerUrl -OutFile $installerPath
# Install Git silently
Start-Process -FilePath $installerPath -Args "/VERYSILENT /NORESTART" -Wait -PassThru
# Optionally, remove the installer after installation
Remove-Item -Path $installerPath
} catch {
Write-Host "An error occurred while installing git: $_"
}
Write-Host "Testing Git version..."
Write-Host "Git version test..."
try {
git --version -ErrorAction Stop
git --version
} catch {
Write-Host "An error occurred while testing Git version: $_"
}
Write-Host "Attempting to install Python 3.12 to ~/scoop/apps/python312..."
Write-Host "Ensuring Scoop is up to date..."
scoop update
Write-Host "Installing python 3.12 to ~/scoop/apps/python312..."
try {
scoop bucket add versions -ErrorAction Stop
scoop install python312 -ErrorAction Stop
scoop bucket add versions
scoop install python312
} catch {
Write-Host "An error occurred while installing Python 3.12: $_"
}
Write-Host "Testing Python version..."
Write-Host "Python version test..."
try {
python --version -ErrorAction Stop
python --version
} catch {
Write-Host "An error occurred while testing Python version: $_"
}