[Scummvm-git-logs] scummvm master -> 681fc2eaa3b212390bb379c2cb2a6e852352a6c0
sev-
sev at scummvm.org
Mon Aug 9 20:41:24 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
681fc2eaa3 DEVTOOLS: COMPANION: Set the macbinary type and creator for mac mode
Commit: 681fc2eaa3b212390bb379c2cb2a6e852352a6c0
https://github.com/scummvm/scummvm/commit/681fc2eaa3b212390bb379c2cb2a6e852352a6c0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-09T22:41:12+02:00
Commit Message:
DEVTOOLS: COMPANION: Set the macbinary type and creator for mac mode
Changed paths:
devtools/dumper-companion.py
diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index 637176991a..90a541ec8f 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -12,6 +12,7 @@ import argparse
import io
import os
import sys
+import re
from binascii import crc_hqx
from pathlib import Path
from struct import pack
@@ -165,6 +166,15 @@ def collect_forks(args: argparse.Namespace) -> None:
file.crdate = 2082844800 + int(info.st_birthtime)
file.mddate = 2082844800 + int(info.st_mtime)
+ # Get info on creator and type
+ tmp = os.popen("GetFileInfo \"" + os.path.join(dirpath, filename) + "\"").read()
+
+ groups = re.search(r"type: \"(.*)\"\ncreator: \"(.*)\"", tmp)
+
+ # We may have here "\0\0\0\0"
+ file.type = eval("\"" + groups.group(1) + "\"").encode()
+ file.creator = eval("\"" + groups.group(2) + "\"").encode()
+
with open(os.path.join(dirpath, resource_filename), "rb") as rsrc:
file.rsrc = rsrc.read()
with open(os.path.join(dirpath, filename), "rb") as data:
More information about the Scummvm-git-logs
mailing list