-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
44 lines (30 loc) Β· 1.08 KB
/
install.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
@echo off
setlocal
call :setESC
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[94mInstalling ASMEMU%ESC%[0m
IF NOT EXIST "bin/Debug/DEBUG.COM" (
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[52mBuilding DEBUG...%ESC%[0m
cd bin/Debug
call MAKE.BAT
cd ../../
)
SET F="%localappdata%\ASMEMU"
IF EXIST %F% RMDIR /S /Q %F%
mkdir %F%
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[32mCopying files%ESC%[0m
xcopy /y /s /exclude:excludedfileslist.txt "." %F%
set F=%F:"=%
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[52mAdding folder to 'PATH'...%ESC%[0m
SET "PATH=%PATH%;%F%;"
powershell -command "[Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ';%F%', 'User')"
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[52mDefining 'ASMEMU' variable...%ESC%[0m
SET "ASMEMU=%F%"
powershell -command "[Environment]::SetEnvironmentVariable('ASMEMU', '%F%', 'User')"
echo %ESC%[36mASMEMU%ESC%[35m^|%ESC%[0m%ESC%[32mInstalled successfully...%ESC%[0m
pause
:setESC
FOR /F "tokens=1,2 delims=#" %%a IN ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') DO (
set ESC=%%b
exit /B 0
)
exit /B 0