forked from metin-server/m2dev-client
new packer
This commit is contained in:
BIN
assets/PackMaker.exe
Normal file
BIN
assets/PackMaker.exe
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
//"log_name":"PackMakerLite",
|
|
||||||
//"cs_name":"",
|
|
||||||
"ignore_full_name": [".git", ".svn", ".vs", "desktop.ini"],
|
|
||||||
"ignore_file_extension": ["bak", "db", "wdp"],
|
|
||||||
"force_filename_lowercase": false,
|
|
||||||
"default_pack_type": 2,
|
|
||||||
"pack_type_by_list": [],
|
|
||||||
/*"pack_type_by_list": [
|
|
||||||
["mss", 0],
|
|
||||||
["mse", 1],
|
|
||||||
["msf", 2],
|
|
||||||
["spt", 0],
|
|
||||||
["atr", 1],
|
|
||||||
["dds", 2],
|
|
||||||
["raw", 0],
|
|
||||||
["wtr", 1],
|
|
||||||
["mde", 2],
|
|
||||||
["tga", 0],
|
|
||||||
["txt", 1],
|
|
||||||
["msk", 2],
|
|
||||||
["msa", 0],
|
|
||||||
["msm", 1],
|
|
||||||
["py", 2]
|
|
||||||
],*/
|
|
||||||
//"eter_magic_mcoz":"MCOZ",
|
|
||||||
//"eter_magic_epkd":"EPKD",
|
|
||||||
//"eter_magic_mcsp":"MCSP",
|
|
||||||
//"parallel":true,
|
|
||||||
"eter_pack_index_ext":".eix",
|
|
||||||
"eter_pack_data_ext":".epk",
|
|
||||||
"eter_pack_index_key": [
|
|
||||||
45129401,
|
|
||||||
92367215,
|
|
||||||
681285731,
|
|
||||||
1710201
|
|
||||||
],
|
|
||||||
"eter_pack_data_key": [
|
|
||||||
78952482,
|
|
||||||
527348324,
|
|
||||||
1632942,
|
|
||||||
486274726
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -18,26 +18,11 @@ def pack_folder(folder_path):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(["PackMakerLite.exe", "--nolog", "--parallel", "-p", folder_name], check=True)
|
result = subprocess.run(["PackMaker.exe", "--input", folder_name, "--output", output_folder_path], check=True)
|
||||||
# print(f"Packing completed for: {folder_name}")
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Error occurred while packing {folder_name}: {e}")
|
print(f"Error occurred while packing {folder_name}: {e}")
|
||||||
return
|
return
|
||||||
|
|
||||||
eix_file = f"{folder_name}.eix"
|
|
||||||
epk_file = f"{folder_name}.epk"
|
|
||||||
|
|
||||||
if not os.path.exists(eix_file) or not os.path.exists(epk_file):
|
|
||||||
print(f"Packing failed: {eix_file} or {epk_file} not found.")
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
shutil.move(eix_file, os.path.join(output_folder_path, eix_file))
|
|
||||||
shutil.move(epk_file, os.path.join(output_folder_path, epk_file))
|
|
||||||
print(f"Moved {eix_file} and {epk_file} to {output_folder_path}")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error occurred while moving files: {e}")
|
|
||||||
|
|
||||||
def pack_all_folders():
|
def pack_all_folders():
|
||||||
all_folders = [f for f in os.listdir() if os.path.isdir(f) and f not in IGNORE_FOLDERS]
|
all_folders = [f for f in os.listdir() if os.path.isdir(f) and f not in IGNORE_FOLDERS]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user