-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
80 lines (72 loc) · 2.29 KB
/
build.py
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
# Python build script written for Pokelua.
# Written by Jordynl
import src.python.fileTree
import src.python.generator
import src.python.debug
import os
# Local build config
config = {
"nextVersion": ""
}
class Builder():
def __init__(self, config):
self.config = config
self.srcPath = os.getcwd()
self.newVersionMessage = ""
self.debugVerbose = {
"chatMessage",
}
self.loadOrder = [
"src.lua.lib",
"src.lua.database",
"include.strings",
"src.lua.misc",
"src.lua.init",
"config",
"include.list",
"src.lua.admin",
"src.lua.room",
"src.lua.translate",
"src.lua.object",
"src.lua.pokedex",
"src.lua.help",
"src.lua.qualityControl",
"src.lua.events.eventMouse",
"src.lua.events.eventNewGame",
"src.lua.events.eventKeyboard",
"src.lua.events.eventNewPlayer",
"src.lua.events.eventPlayerLeft",
"src.lua.events.eventPlayerDied",
"src.lua.events.eventChatCommand",
"src.lua.events.eventPopupAnswer",
"src.lua.events.eventTextAreaCallback",
"src.lua.commands.public",
"src.lua.commands.admin",
"src.lua.commands.owner",
"src.lua.commands.dev",
"src.lua.commands.alias",
]
def run(self):
print("• [+] Starting #pokelua builder.")
print("• [+] Source path: %s" % self.srcPath)
self.ignore = src.python.fileTree.getGitIgnore(self.srcPath)
self.filesList = src.python.fileTree.getFileTree(self.srcPath)
print("• [+] Files indexed. (%s entries, %s ignored)" % (
len(self.filesList), len(self.ignore)))
src.python.generator.listFile(self.srcPath)
src.python.generator.debugFile(
self.srcPath,
self.filesList,
self.loadOrder,
config
)
src.python.generator.moduleFile(
self.srcPath,
self.filesList,
self.loadOrder,
config
)
src.python.debug.run(self.srcPath)
if __name__ == "__main__":
builder = Builder(config)
builder.run()