-
Notifications
You must be signed in to change notification settings - Fork 6
/
install.bat
62 lines (50 loc) · 1.13 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@echo off
setlocal enabledelayedexpansion
set xdir=%~dp0
set "defaultlayout=qwerty"
set "layout=%~1"
if "%layout%"=="" (
set "layout=%defaultlayout%"
)
if "%layout%"=="norman" (
goto :continue
)
if "%layout%"=="qwerty" (
goto :continue
)
echo currently sui do not support layout: %layout%
exit \b
:continue
echo your keyboard layout is: %layout%
setx SUI_ROOT %xdir%
if not exist "%xdir%build" (
md "%xdir%build"
)
if not exist "%xdir%build\%layout%" (
md "%xdir%build\%layout%"
)
echo copy src to build dir...
xcopy /E /I "%xdir%src" "%xdir%build\%layout%"
if %errorlevel%==0 (
goto :installsui
) else (
echo copy build dir error..
echo stop sui install!!!
exit
)
:installsui
echo change layout to %layout%...
"%xdir%sui\layoutchanger\layoutchanger.exe" -l "%layout%"
echo install bin...
call "%xdir%bin\install.bat" "%~1"
REM exec sub dirs install.bat
for /f %%i in ('dir /b /ad "%xdir%build\%layout%"') do (
if exist "%xdir%build\%layout%\%%i\install.bat" (
echo install %%i's config...
call "%xdir%build\%layout%\%%i\install.bat" "%layout%"
if %errorlevel%==0 (
echo install %%i ok
)
)
)
pause