34 lines
1.1 KiB
Batchfile
34 lines
1.1 KiB
Batchfile
@echo off
|
|
|
|
echo Installing AllSpice Ecosystem
|
|
echo Environment-path [%PATH%]
|
|
|
|
:: Set Execution Policy
|
|
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser"
|
|
|
|
:: Check and Install Git if necessary
|
|
where git >nul 2>&1
|
|
if not %ERRORLEVEL% equ 0 (
|
|
echo Git is not installed. Installing Git...
|
|
SET "installer_path=%TEMP%\git_installer.exe"
|
|
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%'"
|
|
start /wait "" "%installer_path%" /VERYSILENT /NORESTART
|
|
del "%installer_path%"
|
|
) else (
|
|
echo Git is already installed.
|
|
)
|
|
|
|
:: Clone AllSpice Install Repository
|
|
SET "TARGET_DIR=%USERPROFILE%\AllSpice\AllSpice-Install"
|
|
if exist "%TARGET_DIR%" rmdir /s /q "%TARGET_DIR%"
|
|
git clone https://hub.allspice.io/AllSpiceUser/AllSpice-Install.git "%TARGET_DIR%"
|
|
echo Clone complete.
|
|
|
|
:: Run Git Bash script
|
|
SET "git_bash_script_path=%TARGET_DIR%\install-scripts\allspice-windows-install.sh"
|
|
echo Running Git Bash script...
|
|
"C:\Program Files\Git\bin\bash.exe" "%git_bash_script_path%"
|
|
|
|
echo Installation complete.
|
|
pause
|