-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake5.lua
61 lines (50 loc) · 1.62 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
workspace "W4MAnniversaryPatch"
configurations { "Release", "Debug" }
platforms { "Win32" }
architecture "x32"
location "build"
-- objdir ("build/obj")
-- buildlog ("build/log/%{prj.name}.log")
buildoptions {"-std:c++latest"}
kind "SharedLib"
language "C++"
targetextension ".asi"
characterset ("UNICODE")
staticruntime "On"
files { "source/stdafx.h", "source/stdafx.cpp" }
files { "source/resources/VersionInfo.rc" }
includedirs { "source" }
includedirs { "source/injector" }
includedirs { "source/inireader" }
date = os.outputof("date /t")
yy = tonumber(string.sub(date, 9, 10))
mm = tonumber(string.sub(date, 4, 5))
dd = 0 -- tonumber(string.sub(date, 1, 2))
build = 0
defines {
"rsc_MajorVersion=%{yy}",
"rsc_MinorVersion=%{mm}",
"rsc_RevisionID=%{dd}",
"rsc_BuildID=%{build}"
}
defines {
"rsc_StringVersion=\"%{yy}.%{mm}.%{dd}.%{build}\"",
"rsc_InternalName=\"%{prj.name}\"",
"rsc_ProductName=\"Anniversary Patch\"",
"rsc_OriginalFilename=\"%{prj.name}.dll\"",
"rsc_CompanyName=\"heatray\"",
"rsc_LegalCopyright=\"Copyright (C) heatray\"",
"rsc_UpdateUrl=\"https://github.com/heatray/W4MPatch/releases\""
}
filter "configurations:Debug*"
defines "DEBUG"
symbols "On"
filter "configurations:Release*"
defines "NDEBUG"
optimize "On"
project "W4M.Patch"
files { "source/patch.cpp" }
defines { "rsc_FileDescription=\"Patch for Worms 4 Mayhem\"" }
project "W4M.Loader"
files { "source/loader.cpp" }
defines { "rsc_FileDescription=\"Loader for Worms 4 Mayhem\"" }