This repository was archived by the owner on Dec 31, 2024. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathpremake5.lua
More file actions
82 lines (72 loc) · 2.44 KB
/
Copy pathpremake5.lua
File metadata and controls
82 lines (72 loc) · 2.44 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
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
newoption {
trigger = "with-version",
value = "STRING",
description = "Ultimate Star Wars Outlaws ModLoader version",
default = "1.0.0",
}
workspace "Ultimate-SWO-ModLoader"
configurations { "Release" }
architecture "x86_64"
location "build"
cppdialect "C++latest"
exceptionhandling ("SEH")
defines {
"rsc_CompanyName=\"Patrick Mollohan\"",
"rsc_LegalCopyright=\"MIT License\"",
"rsc_InternalName=\"%{prj.name}\"", "rsc_ProductName=\"%{prj.name}\"", "rsc_OriginalFilename=\"version.dll\"",
"rsc_FileDescription=\"Ultimate Star Wars Outlaws ModLoader\"",
"rsc_UpdateUrl=\"https://github.com/patrickmollohan/Ultimate-SWO-ModLoader\""
}
local major = 1
local minor = 0
local build = 3
local revision = 0
if(_OPTIONS["with-version"]) then
local t = {}
for i in _OPTIONS["with-version"]:gmatch("([^.]+)") do
t[#t + 1], _ = i:gsub("%D+", "")
end
while #t < 4 do t[#t + 1] = 0 end
major = math.min(tonumber(t[1]), 255)
minor = math.min(tonumber(t[2]), 255)
build = math.min(tonumber(t[3]), 65535)
revision = math.min(tonumber(t[4]), 65535)
end
defines {
"rsc_FileVersion_MAJOR=" .. major,
"rsc_FileVersion_MINOR=" .. minor,
"rsc_FileVersion_BUILD=" .. build,
"rsc_FileVersion_REVISION=" .. revision,
"rsc_FileVersion=\"" .. major .. "." .. minor .. "." .. build .. "\"",
"rsc_ProductVersion=\"" .. major .. "." .. minor .. "." .. build .. "\""
}
project "Ultimate-SWO-ModLoader"
kind "SharedLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
targetname "version"
targetextension ".dll"
includedirs {
"lib",
"lib/MinHook/include",
"src"
}
files {
"lib/MinHook/include/*.h", "lib/MinHook/src/**.c", "lib/MinHook/src/**.h",
"src/disk_cache_enabler.cpp", "src/disk_cache_enabler.hpp",
"src/dll_main.cpp", "src/dll_main.hpp",
"src/minhook_handler.cpp", "src/minhook_handler.hpp",
"src/mod_loader.cpp", "src/mod_loader.hpp",
"src/script_loader.cpp", "src/script_loader.hpp",
"src/settings.cpp", "src/settings.hpp",
"src/utilities.cpp", "src/utilities.hpp",
"src/version.def",
"src/version_wrapper.cpp", "src/version_wrapper.hpp",
"src/Versioninfo.rc"
}
characterset ("UNICODE")
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
buildoptions { "/Ox" }
staticruntime "On"