Skip to content

Commit

Permalink
Updated build batch files
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed Feb 16, 2017
1 parent 007c68d commit 58ec5dc
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 30 deletions.
8 changes: 0 additions & 8 deletions create-projects.bat

This file was deleted.

20 changes: 20 additions & 0 deletions linux-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

if [[ "$(uname -m)" == 'x86_64' ]]; then
PREMAKE5=utils/premake5_x64
CONFIG=release_x64
else
PREMAKE5=utils/premake5_x86
CONFIG=release_x86
fi

# Clean old build files
rm -Rf Build/
rm -Rf Bin/

# Generate makefiles
$PREMAKE5 gmake

# Build!
cd Build/
make config=$CONFIG all
18 changes: 18 additions & 0 deletions linux-install-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [[ "$(uname -m)" == 'x86_64' ]]; then
PREMAKE5=utils/premake5_x64
else
PREMAKE5=utils/premake5_x86
fi

# Install data files
$PREMAKE5 install_data

# Optionally install resources
read -p "Install resources? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
$PREMAKE5 install_resources
fi
12 changes: 0 additions & 12 deletions mta-build.sh

This file was deleted.

10 changes: 0 additions & 10 deletions mta-install.sh

This file was deleted.

4 changes: 4 additions & 0 deletions win-build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@echo off

rem Create solution (ignoring pause)
call win-create-projects.bat < nul
echo.

set MSBUILD_REG_KEY="HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0"
set MSBUILD_REG_SUBKEY="MSBuildToolsPath"

Expand Down
21 changes: 21 additions & 0 deletions win-create-projects.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off

rem Update CEF eventually
utils\premake5 install_cef

rem Generate solutions
utils\premake5 vs2015

rem Create a shortcut to the solution - http://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%

pause
14 changes: 14 additions & 0 deletions win-install-data.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off

rem Install data files
utils\premake5 install_data

rem Optionally install resources
echo.
set ANSWER=n
set /P ANSWER="Install resources? [y/N] "
if "%ANSWER%"=="y" (
utils\premake5 install_resources
)

pause

0 comments on commit 58ec5dc

Please sign in to comment.