forked from citizenfx/fivem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prebuild_natives.cmd
55 lines (41 loc) · 1.4 KB
/
prebuild_natives.cmd
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
@echo off
setlocal EnableDelayedExpansion
set path=C:\msys64\usr\bin;%path%
pacman --noconfirm --needed -Sy make curl diffutils libcurl
pushd ext\native-doc-gen\
sh build.sh
popd
pushd ext\natives\
mkdir inp
curl -z inp\natives_global.lua -Lo inp\natives_global_new.lua http://runtime.fivem.net/doc/natives.lua
curl -z inp\natives_rdr3.lua -Lo inp\natives_rdr3_new.lua http://runtime.fivem.net/doc/natives_rdr_tmp.lua
if exist inp\natives_global.lua (
diff inp\natives_global.lua inp\natives_global_new.lua > nul
if errorlevel 0 (
copy /y inp\natives_global_new.lua inp\natives_global.lua
)
) else (
copy /y inp\natives_global_new.lua inp\natives_global.lua
)
if exist inp\natives_rdr3.lua (
diff inp\natives_rdr3.lua inp\natives_rdr3_new.lua > nul
if errorlevel 0 (
copy /y inp\natives_rdr3_new.lua inp\natives_rdr3.lua
)
) else (
copy /y inp\natives_rdr3_new.lua inp\natives_rdr3.lua
)
del inp\natives_global_new.lua
del inp\natives_rdr3_new.lua
make -q
if errorlevel 1 (
make -j4
xcopy /y out\*.lua ..\..\data\shared\citizen\scripting\lua
xcopy /y out\*.js ..\..\data\shared\citizen\scripting\v8
xcopy /y out\*.d.ts ..\..\data\shared\citizen\scripting\v8
xcopy /y out\rpc_natives.json ..\..\data\shared\citizen\scripting
xcopy /y out\*.zip ..\..\data\shared\citizen\scripting\lua
xcopy /y out\*.cs ..\..\code\client\clrcore
xcopy /y out\*.h ..\..\code\components\citizen-scripting-lua\src
)
popd