generated from AllSpice-Demos/AllSpice-Altium-template-repo
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
516a35ba84 | ||
|
67eea6f93d | ||
|
fea8020297 | ||
|
ca8659d981 | ||
|
2470aad2c6 | ||
|
1178b50a06 | ||
|
e587d6b6eb | ||
|
dd5033b995 | ||
|
28eeb50a89 | ||
|
b745ce84e5 | ||
|
bf3e2aeceb | ||
|
65b9813f30 | ||
|
290979de7b | ||
|
57f1ab7323 | ||
|
a669fc74cd | ||
|
7e7aa58970 | ||
|
01522f0759 | ||
|
0c2a8e3054 |
@ -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
|
||||
|
||||
|
||||
|
@ -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: $_"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user