-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostmake.lua
More file actions
81 lines (59 loc) · 2.34 KB
/
postmake.lua
File metadata and controls
81 lines (59 loc) · 2.34 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
local function executeorexit(str)
local exit = os.execute(str)
if exit == nil then
os.exit(1)
end
if not exit == true then
os.exit(1)
end
end
local innosetup = postmake.loadplugin("internal/innosetup")
local shellscript = postmake.loadplugin("internal/shellscript")
local InnoAppID = "{{1CA82BG1-B475-45F7-9FFE-6DF654047519}"
-- App Settings
postmake.appname = "UCodeGameEngine"
postmake.appversion = "0.0.1"
postmake.apppublisher = "LostbBlizzard"
postmake.output = "./Output/install"
postmake.appinstalldir = "~/.ucodegameengine"
postmake.applicensefile = "LICENSE.txt"
-- Short Hands
local all = postmake.allconfig
--- Configs
local win = postmake.newconfig("windows", "x64")
local gnu = postmake.newconfig("linux", "x64")
local mac = postmake.newconfig("macos", "x64")
--- Add Your files
local programdir = postmake.installdir() .. "bin/"
local unixmainprogram = programdir .. postmake.appname
local winsmainprogram = unixmainprogram .. ".exe"
local programbuilddir = "./Output/UCodeEditor/linux64/Debug/"
win.addxfile(programbuilddir .. "UCodeEditor", winsmainprogram)
gnu.addxfile(programbuilddir .. "UCodeEditor", unixmainprogram)
mac.addxfile(programbuilddir .. "UCodeEditor", unixmainprogram)
-- all.addfile(programbuilddir .. "UFiles.data", programdir .. "UFiles.data")
all.addfile(postmake.applicensefile, postmake.installdir() .. postmake.applicensefile)
local addpathflag = all.newflag("Add Path", true)
all.If(addpathflag).addpath(programdir)
executeorexit("cd ./UCodeGameEngineDoc && mdbook build --dest-dir ../Output/UCodeGameEngineDoc")
all.addfile("Output/UCodeGameEngineDoc/.**", postmake.installdir() .. "doc")
local installwebsite = "https://github.com/LostbBlizzard/UCodeGameEngine/releases/tag/Release-" .. postmake.appversion
---@type ShellScriptConfig
local shellsettings = {
weburl = installwebsite,
uploaddir = "./Output/upload/",
}
---@type InnoSetConfig
local innosettings = {
AppId = InnoAppID,
MyAppURL = "https://github.com/LostbBlizzard/UCodeGameEngine",
LaunchProgram = winsmainprogram,
SetupIconFile = "UCodeGameEngineLogo.ico",
UninstallDelete = {
programdir .. "imgui.ini"
},
}
-- TODO missing line
-- Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon;
postmake.make(shellscript, { gnu, mac }, shellsettings);
postmake.make(innosetup, { win }, innosettings);