summaryrefslogtreecommitdiff
path: root/scripts/context/stubs/mswin/first-setup.bat
blob: f06ad0e6b795611ecd33e31b5e25f2690126a255 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@echo off

setlocal

:fetch

set OWNPATH=%~dp0
set PATH=%OWNPATH%bin;%PATH%
set PLATFORM=mswin

set CYGWIN=nontsec

if defined ProgramFiles(x86) (
    set PLATFORM=win64
) else (
    if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set PLATFORM=win64
)

REM ~ copy /y bin\mtx-update.lua bin\x.lua

if "%PLATFORM%" == "win64" goto update-win64

:update-win32

rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/mswin/bin/ bin

goto update

:update-win64

rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/win64/bin/ bin

goto update

:update

REM ~ copy /y bin\x.lua bin\mtx-update.lua

REM --mingw --nofiledatabase --engine=luatex

mtxrun --script ./bin/mtx-update.lua --update --force --make --engine=all --context=beta --texroot=%OWNPATH%tex %*

echo.
echo.
echo When you want to use context, you need to initialize the tree with:
echo.
echo   %OWNPATH%tex\setuptex.bat %OWNPATH%tex
echo.
echo You can associate this command with a shortcut to the cmd prompt.
echo.
echo Alternatively you can add %OWNPATH%tex\texmf-%PLATFORM%\bin to your PATH
echo variable.
echo.
echo If you run from an editor you can specify the full path to mtxrun.exe:
echo.
echo.  %OWNPATH%tex\texmf-%PLATFORM%\bin\mtxrun.exe --autogenerate --script context --autopdf ...
echo.

:ruby

echo okay > ok.log

ruby -e "File.delete('ok.log')"

if not exist "ok.log" goto end

echo.
echo The distribution has been downloaded but if you want to run pdfTeX and/or XeTeX you
echo need to run this script with the following directive:
echo.
echo   --platform=all
echo.
echo You then also need to install Ruby in order to be able to use texexec. After
echo installing Ruby you can run this script again which will give you the formats
echo needed, or you can run:
echo.
echo   texexec --make --pdftex
echo   texexec --make --xetex
echo.

:okay

del /q ok.log

:end

endlocal