-
Notifications
You must be signed in to change notification settings - Fork 5
/
xmake.lua
92 lines (75 loc) · 2.33 KB
/
xmake.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
set_xmakever("2.8.0")
set_policy("build.ccache", false)
set_policy("package.requires_lock", false)
add_cxflags("-fPIC")
-- c code will use c99,
set_languages("c99", "cxx20")
add_configfiles("BuildInfo.h.in")
add_requires(
"mimalloc 2.1.7",
"spdlog",
"hopscotch-map",
"cryptopp",
"gamenetworkingsockets",
"glm",
"openssl",
"zlib",
"nlohmann_json",
"flecs v4.0.3",
"protobuf-cpp",
"entt",
"microsoft-gsl")
if is_plat("windows") then
set_arch("x64")
add_cxflags("/bigobj")
add_defines("NOMINMAX")
end
add_defines("_UNICODE", "RED4EXT_STATIC_LIB", "GLM_ENABLE_EXPERIMENTAL")
set_warnings("all")
add_vectorexts("sse", "sse2", "sse3", "ssse3")
-- build configurations
add_rules("mode.debug", "mode.releasedbg", "mode.release")
if is_mode("debug") then
add_defines("TP_DEBUG")
set_symbols("debug", "edit")
end
includes('tools/codegen')
includes('tools/csharp')
-- add projects
includes("code/netpack")
includes("code/common")
includes("code/protocol")
includes("code/server")
option("game")
set_showmenu(true)
set_default("Cyberpunk2077.exe")
set_description("Set the path to Cyberpunk2077.exe for easy debugging")
option("rpcdir")
set_showmenu(true)
set_default("")
set_description("Set the path where the RPC files will be generated")
if is_plat("windows") then
includes("code/assets")
includes("code/client")
includes("code/launcher")
includes("code/loader")
includes("vendor/")
includes("@builtin/xpack")
xpack("Cyberpunk Multiplayer")
set_formats("zip")
set_title("Cyberpunk Multiplayer")
set_basename("Artifacts")
set_author("Tilted Phoques SRL")
set_description("Installer for Cyberpunk Multiplayer Launcher")
--set_homepage("https://your-project-homepage.com")
--set_licensefile("LICENSE.md") -- Make sure this file exists in your project
local function add_files_recursively(dir, root_dir)
local relative_path = path.relative(dir, root_dir)
add_installfiles(path.join(dir, "*"), {prefixdir = relative_path})
for _, subdir in ipairs(os.dirs(path.join(dir, "*"))) do
add_files_recursively(subdir, root_dir)
end
end
add_files_recursively("distrib/launcher")
set_version("0.1.0.0")
end