Subversion Repositories Kolibri OS

Rev

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

Rev 9374 Rev 9376
Line 86... Line 86...
86
    for file_name in program_files:
86
    for file_name in program_files:
87
        lines_to_add += bytes(f"\r\n/SYS/{file_name.upper()}\t\t""\t0\t# Your program", "ascii")
87
        lines_to_add += bytes(f"\r\n/SYS/{file_name.upper()}\t\t""\t0\t# Your program", "ascii")
88
    autorun_dat = img.extract_file_path("SETTINGS\AUTORUN.DAT")
88
    autorun_dat = img.extract_file_path("SETTINGS\AUTORUN.DAT")
89
    place_for_new_lines = autorun_dat.index(b"\r\n/SYS/@TASKBAR")# b"\r\n### Hello, ASM World! ###")
89
    place_for_new_lines = autorun_dat.index(b"\r\n/SYS/@TASKBAR")# b"\r\n### Hello, ASM World! ###")
90
    autorun_dat = autorun_dat[:place_for_new_lines] + lines_to_add + autorun_dat[place_for_new_lines:]
90
    autorun_dat = autorun_dat[:place_for_new_lines] + lines_to_add + autorun_dat[place_for_new_lines:]
91
    print(autorun_dat)
-
 
92
    img.delete_path("SETTINGS\AUTORUN.DAT")
91
    img.delete_path("SETTINGS\AUTORUN.DAT")
93
    img.add_file_path("SETTINGS\AUTORUN.DAT", autorun_dat)
92
    img.add_file_path("SETTINGS\AUTORUN.DAT", autorun_dat)
94
    log("Done")
93
    log("Done")
Line 95... Line 94...
95
 
94