Subversion Repositories Kolibri OS

Rev

Rev 9389 | Rev 9391 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9389 Rev 9390
Line 9... Line 9...
9
path_to_tools = os.path.dirname(path_to_tools_workspace)
9
path_to_tools = os.path.dirname(path_to_tools_workspace)
10
sys.path.append(path_to_tools)
10
sys.path.append(path_to_tools)
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
from workspace.build import build
12
from workspace.build import build
13
 
13
 
14
from lib.builds import builds_get_contents
14
from lib.builds import builds_get, builds_get_contents
15
from lib.makeflop import Floppy
15
from lib.makeflop import Floppy
16
from lib.platform import is_win32, path
16
from lib.platform import is_win32, path
Line 44... Line 44...
44
    program_name = build()
44
    program_name = build()
Line 45... Line 45...
45
 
45
 
Line 46... Line 46...
46
    os.makedirs("workspace", exist_ok = True)
46
    os.makedirs("workspace", exist_ok = True)
47
 
47
 
Line 48... Line 48...
48
    # Create a copy of IMG
48
    # Create a copy of IMG
49
    shutil.copyfile(tools_cache_kolibri_img, "workspace/kolibri.img")
49
    kolibri_img = builds_get("eng/data/data/kolibri.img", "workspace/kolibri.img")
50
 
50
 
51
    # Open the IMG
51
    # Open the IMG
Line 52... Line 52...
52
    with open("workspace/kolibri.img", "rb") as img:
52
    with open(kolibri_img, "rb") as img:
53
        img_data = img.read()
53
        img_data = img.read()
Line 77... Line 77...
77
    autorun_dat = autorun_dat[:place_for_new_lines] + lines_to_add + autorun_dat[place_for_new_lines:]
77
    autorun_dat = autorun_dat[:place_for_new_lines] + lines_to_add + autorun_dat[place_for_new_lines:]
78
    img.delete_path("SETTINGS\AUTORUN.DAT")
78
    img.delete_path("SETTINGS\AUTORUN.DAT")
79
    img.add_file_path("SETTINGS\AUTORUN.DAT", autorun_dat)
79
    img.add_file_path("SETTINGS\AUTORUN.DAT", autorun_dat)
80
    log("Done")
80
    log("Done")
Line 81... Line 81...
81
 
81
 
Line 82... Line 82...
82
    img.save("workspace/kolibri.img")
82
    img.save(kolibri_img)