Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 9388 → Rev 9389

/_tools/lib/builds.py
0,0 → 1,18
import os
 
from .network import download
from .constants import tools_cache
 
def builds_get(path):
url = f"http://builds.kolibrios.org/{path}"
output_path = f"{tools_cache}/builds.kolibrios.org/{path}"
output_dir = os.path.dirname(output_path)
os.makedirs(output_dir, exist_ok = True)
download(url, output_path, skip_exist = True)
return output_path
 
def builds_get_contents(path):
output_path = builds_get(path)
with open(output_path, "rb") as f:
return f.read()
 
/_tools/workspace/run.py
11,6 → 11,7
 
from workspace.build import build
 
from lib.builds import builds_get_contents
from lib.makeflop import Floppy
from lib.platform import is_win32, path
from lib.logging import log
57,6 → 58,11
img.delete_path("DEMOS")
img.delete_path("3D")
 
# Insert faster kernel if need
if len(sys.argv) > 1 and sys.argv[1] == "--fast":
new_kernel = builds_get_contents("eng/data/kernel/trunk/kernel.mnt.pretest")
img.add_file_path("KERNEL.MNT", new_kernel)
 
log("Moving program into kolibri image... ", end = "")
with open(program_name, "rb") as file:
file_data = file.read()