-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup-tm-sdk.bat
More file actions
executable file
·60 lines (42 loc) · 1.75 KB
/
Copy pathsetup-tm-sdk.bat
File metadata and controls
executable file
·60 lines (42 loc) · 1.75 KB
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
@REM Set up the texmacs SDK
@REM determine root directory
@REM https://technet.microsoft.com/en-us/library/bb490909.aspx says:
@REM <percent>~dpI Expands <percent>I to a drive letter and path only.
@REM <percent>~fI Expands <percent>I to a fully qualified path name.
@FOR /F "delims=" %%D in ("%~dp0") do @set cwd=%%~fD
@REM set PATH
@set PATH=%cwd%\usr\bin;%PATH%
@REM init msys2 repo keys etc.
@"%cwd%"\usr\bin\bash.exe --login -c exit
@REM update packages to current
@"%cwd%"\usr\bin\pacman -Syuu --noconfirm
@"%cwd%"\usr\bin\pacman -Syuu --noconfirm
@"%cwd%"\usr\bin\pacman -Syuu --noconfirm
@REM set MSYSTEM so that MSYS2 starts up in the correct mode
@set MSYSTEM=MINGW32
@REM now add dev tools (maybe not all needed)
@"%cwd%"\usr\bin\pacman -S --needed --noconfirm ^
base python less openssh patch make tar diffutils ca-certificates ^
git subversion mintty vim p7zip markdown winpty unrar ^
mingw-w64-i686-toolchain ^
base-devel
@IF ERRORLEVEL 1 @(
ECHO Not all packges could be installed. Try re-running this .bat in cmd
PAUSE
EXIT
)
@REM Avoid overlapping address ranges
@IF MINGW32 == %MSYSTEM% @(
ECHO Auto-rebasing .dll files
CALL "%cwd%"\autorebase.bat
)
@REM Before running a shell, let's prevent complaints about "permission denied"
@REM from MSYS2's /etc/post-install/01-devices.post
@MKDIR "%cwd%"\dev\shm 2> NUL
@MKDIR "%cwd%"\dev\mqueue 2> NUL
@REM now get updated build-tm.sh, run it, finally start an interactive shell
@"%cwd%"\usr\bin\curl https://raw.githubusercontent.com/slowphil/texmacs-win-builder/master/build-tm.sh > "%cwd%"\build-tm.sh
@start "" /D "%cwd%" mingw32.exe ./build-tm.sh
@REM @bash --login -c "cd / && bash ./build-tm.sh"
@IF ERRORLEVEL 1 PAUSE
@start mintty -i /msys2.ico -t "texmacs SDK 32-bit" bash --login -i