forked from multitheftauto/mtasa-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwin-create-projects.bat
More file actions
40 lines (32 loc) · 1.33 KB
/
win-create-projects.bat
File metadata and controls
40 lines (32 loc) · 1.33 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
@echo off
setlocal
rem If PREMAKE_FILE is set by a caller, use it;
rem otherwise continue to the default premake5.lua with no extra flags.
if defined PREMAKE_FILE (
set "PREMAKE5_FLAGS=--file=%PREMAKE_FILE%"
) else (
set "PREMAKE5_FLAGS="
)
rem Update CEF eventually
utils\premake5.exe %PREMAKE5_FLAGS% install_cef
rem Update Unifont
utils\premake5.exe %PREMAKE5_FLAGS% install_unifont
rem Update discord-rpc
utils\premake5.exe %PREMAKE5_FLAGS% install_discord
rem Generate solutions
utils\premake5.exe %PREMAKE5_FLAGS% vs2026
rem Create symlink from utils\settings.VisualStudio.json to Build\settings.VisualStudio.json
if exist "%~dp0\Build\settings.VisualStudio.json" del "%~dp0\Build\settings.VisualStudio.json"
mklink /H "%~dp0\Build\settings.VisualStudio.json" "%~dp0\utils\settings.VisualStudio.json"
rem Create a shortcut to the solution - https://superuser.com/questions/392061/how-to-make-a-shortcut-from-cmd
set SCRIPTFILE="%TEMP%\CreateMyShortcut.vbs"
(
echo Set oWS = WScript.CreateObject^("WScript.Shell"^)
echo sLinkFile = oWS.ExpandEnvironmentStrings^("MTASA.sln - Shortcut.lnk"^)
echo Set oLink = oWS.CreateShortcut^(sLinkFile^)
echo oLink.TargetPath = oWS.ExpandEnvironmentStrings^("%~dp0\Build\MTASA.sln"^)
echo oLink.Save
) 1>%SCRIPTFILE%
cscript //nologo %SCRIPTFILE%
del /f /q %SCRIPTFILE%
if %0 == "%~0" pause