Repository navigation
Expand file tree
/
Copy pathxmake.lua
More file actions
58 lines (43 loc) · 1.61 KB
/
Copy pathxmake.lua
File metadata and controls
58 lines (43 loc) · 1.61 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
-- set minimum xmake version
set_xmakever("3.0.0")
includes("lib/commonlibsse-ng")
local PLUGIN_NAME = "PrismaUI-Example-Plugin"
local PLUGIN_VERSION = "1.5.0"
local VIEW_NAME = "PrismaUI-Example-UI"
set_project(PLUGIN_NAME)
set_version(PLUGIN_VERSION)
set_license("GPL-3.0")
set_languages("c++23")
set_warnings("allextra")
add_defines("UNICODE", "_UNICODE")
set_policy("package.requires_lock", true)
add_rules("mode.release")
--add_rules("mode.debug", "mode.releasedbg")
add_rules("plugin.vsxmake.autoupdate")
-- targets
target(PLUGIN_NAME)
add_deps("commonlibsse-ng")
add_rules("commonlibsse-ng.plugin", {
name = PLUGIN_NAME,
author = "StarkMP <discord: starkmp>",
description = "SKSE64 plugin template using CommonLibSSE-NG and PrismaUI"
})
add_files("src/**.cpp")
add_headerfiles("src/**.h")
add_includedirs("src")
set_pcxxheader("src/pch.h")
after_build(function (target)
local distdir = path.join(os.projectdir(), "dist", PLUGIN_NAME .. "_" .. PLUGIN_VERSION)
local viewdir = path.join(distdir, "PrismaUI", "views", VIEW_NAME)
local plugindir = path.join(distdir, "SKSE", "plugins")
os.tryrm(distdir)
os.mkdir(viewdir)
os.mkdir(plugindir)
os.cp(path.join(os.projectdir(), "view", "*"), viewdir)
os.cp(target:targetfile(), plugindir)
local symbolfile = target:symbolfile()
if symbolfile and os.isfile(symbolfile) then
os.cp(symbolfile, plugindir)
end
cprint("${bright green}creating distribution folder: ${clear}dist/%s_%s", PLUGIN_NAME, PLUGIN_VERSION)
end)