mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-26 08:36:49 +03:00
[WS][run.py] Add --fast key to use non-compressed kernel
git-svn-id: svn://kolibrios.org@9389 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a44c4281c4
commit
a68941be35
18
_tools/lib/builds.py
Normal file
18
_tools/lib/builds.py
Normal file
@ -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()
|
||||
|
@ -11,6 +11,7 @@ sys.path.append(path_to_tools)
|
||||
|
||||
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 @@ if __name__ == "__main__":
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user