forked from KolibriOS/kolibrios
[WS] Implement basic workspace system
* get_started.py sets up a new workspace in a project folder * build.py builds the project using info from Tupfile.lua * run.py moves compiled program into kolibri.img and boots qemu on it Only supports very simple programs for now (tested on few demos). Only tested on Windows for now. git-svn-id: svn://kolibrios.org@9357 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
24
_tools/workspace/build.py
Normal file
24
_tools/workspace/build.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
path_to_lib = '../lib'
|
||||
sys.path.append(path_to_lib)
|
||||
|
||||
import tupfile_parser
|
||||
|
||||
def build():
|
||||
if not os.path.exists("Tupfile.lua"):
|
||||
print("No Tupfile.lua, can't build anything")
|
||||
exit()
|
||||
|
||||
tup_rules = tupfile_parser.parse("Tupfile.lua")
|
||||
program_files = []
|
||||
for rule in tup_rules:
|
||||
# TODO: Manage source dependencies
|
||||
# TODO: Inform about tools required for the build
|
||||
os.system(rule.command)
|
||||
program_files += rule.output
|
||||
return program_files
|
||||
|
||||
if __name__ == "__main__":
|
||||
build()
|
Reference in New Issue
Block a user