-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_win.bat
48 lines (38 loc) · 1.15 KB
/
install_win.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal
REM Script directory
set "SCRIPT_DIR=%~dp0"
REM Source directory
set "SOURCE_DIR=%SCRIPT_DIR%_filter_sol_distortion"
REM Check if source directory exists
if not exist "%SOURCE_DIR%" (
echo "%SOURCE_DIR% does not exist. Make sure it is located in the same directory as this script."
pause
exit /b 1
)
REM Destination base directory
set "DEST_DIR_BASE=C:\ProgramData\GameMakerStudio2-LTS\Cache\runtimes"
REM Get latest runtime directory
for /f "delims=" %%i in ('dir /b /ad /o-d "%DEST_DIR_BASE%"') do (
set "LATEST_DIR=%%i"
goto found_latest
)
rem Check if destination directory exists
:found_latest
if "%LATEST_DIR%"=="" (
echo "%LATEST_DIR% runtime does not exist. Make sure GameMaker is installed."
pause
exit /b 1
)
REM FiltersAndEffects path
set "DEST_DIR=%DEST_DIR_BASE%\%LATEST_DIR%\bin\FiltersAndEffects"
REM Copy folder
xcopy /e /i /y "%SOURCE_DIR%" "%DEST_DIR%\_filter_sol_distortion"
REM Check if copying was successful
if %errorlevel% equ 0 (
echo "Effect has been successfully installed for runtime %LATEST_DIR%"
) else (
echo "An error has occurred while installing the effect..."
)
pause
exit /b 1