-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
66 lines (57 loc) · 2.25 KB
/
premake5.lua
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
workspace "GTAIV.EFLC.FusionFix"
configurations { "Release", "Debug" }
architecture "x86"
location "build"
buildoptions {"-std:c++latest"}
kind "SharedLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
targetextension ".asi"
defines { "rsc_CompanyName=\"GTAIV.EFLC.FusionFix\"" }
defines { "rsc_LegalCopyright=\"GTAIV.EFLC.FusionFix\""}
defines { "rsc_FileVersion=\"1.0.0.0\"", "rsc_ProductVersion=\"1.0.0.0\"" }
defines { "rsc_InternalName=\"%{prj.name}\"", "rsc_ProductName=\"%{prj.name}\"", "rsc_OriginalFilename=\"%{prj.name}.dll\"" }
defines { "rsc_FileDescription=\"GTAIV.EFLC.FusionFix\"" }
defines { "rsc_UpdateUrl=\"https://github.com/ThirteenAG/GTAIV.EFLC.FusionFix\"" }
includedirs { "source" }
files { "source/dllmain.cpp" }
files { "source/resources/Versioninfo.rc" }
includedirs { "external/hooking" }
includedirs { "external/injector/include" }
includedirs { "external/inireader" }
files { "external/hooking/Hooking.Patterns.h", "external/hooking/Hooking.Patterns.cpp" }
characterset ("Unicode")
pbcommands = {
"setlocal EnableDelayedExpansion",
--"set \"path=" .. (gamepath) .. "\"",
"set file=$(TargetPath)",
"FOR %%i IN (\"%file%\") DO (",
"set filename=%%~ni",
"set fileextension=%%~xi",
"set target=!path!!filename!!fileextension!",
"if exist \"!target!\" copy /y \"!file!\" \"!target!\"",
")" }
function setpaths (gamepath, exepath, scriptspath)
scriptspath = scriptspath or "scripts/"
if (gamepath) then
cmdcopy = { "set \"path=" .. gamepath .. scriptspath .. "\"" }
table.insert(cmdcopy, pbcommands)
postbuildcommands (cmdcopy)
debugdir (gamepath)
if (exepath) then
debugcommand (gamepath .. exepath)
dir, file = exepath:match'(.*/)(.*)'
debugdir (gamepath .. (dir or ""))
end
end
targetdir ("bin")
end
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
staticruntime "On"
project "GTAIV.EFLC.FusionFix"
setpaths("G:/Games/Grand Theft Auto IV v1.0.8.0 - DLC/", "GTAIV.exe", "plugins/")