forked from citizenfx/fivem
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprebuild_natives.cmd
91 lines (68 loc) · 2.01 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
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
88
89
90
91
@echo off
setlocal EnableDelayedExpansion
set path=C:\msys64\usr\bin;%path%
set LUA_PATH=
set LUA_CPATH=
where /q pacman
if errorlevel 1 (
exit /B 1
)
pacman --noconfirm --needed -Sy make curl diffutils libcurl
where /q curl
if errorlevel 1 (
exit /B 1
)
pushd ext\natives\
mkdir inp
curl -z inp\natives_global.lua -Lo inp\natives_global_new.lua https://runtime.fivem.net/doc/natives.lua
curl -z inp\natives_rdr3.lua -Lo inp\natives_rdr3_new.lua https://runtime.fivem.net/doc/natives_rdr_tmp.lua
curl -z inp\natives_ny.lua -Lo inp\natives_ny_new.lua https://runtime.fivem.net/doc/natives_ny_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
)
if exist inp\natives_ny.lua (
diff inp\natives_ny.lua inp\natives_ny_new.lua > nul
if errorlevel 0 (
copy /y inp\natives_ny_new.lua inp\natives_ny.lua
)
) else (
copy /y inp\natives_ny_new.lua inp\natives_ny.lua
)
del inp\natives_global_new.lua
del inp\natives_rdr3_new.lua
del inp\natives_ny_new.lua
popd
pushd ext\native-doc-gen\
sh build.sh
if errorlevel 1 (
popd
exit /B 1
)
popd
pushd ext\natives\
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\Natives*.h ..\..\code\components\citizen-scripting-lua\src
xcopy /y out\PASGen.h ..\..\code\components\rage-scripting-five\src
)
popd