mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 17:29:35 +00:00
Added ability to set the TYPE/CREATOR resource fork attributes of file(s) inside newly-created cd-rom ISO images of type HFS
This commit is contained in:
parent
e5b99d4fa9
commit
ed245b295a
|
@ -582,6 +582,23 @@ function fetchHardDiskDrivers() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fetch file genisoimage_hfs_resource_fork_map.txt file.
|
||||||
|
# It is used when creating ISO images of type HFS.
|
||||||
|
function fetchGenisoimageHfsResourceForkMapFile() {
|
||||||
|
GENISOIMAGE_MAP_FOLDER="genisoimage_hfs_resource_fork_map"
|
||||||
|
GENISOIMAGE_MAP_FILE="genisoimage_hfs_resource_fork_map.txt"
|
||||||
|
if [ ! -d "$BASE/$GENISOIMAGE_MAP_FOLDER" ]; then
|
||||||
|
mkdir -p "$BASE/$GENISOIMAGE_MAP_FOLDER"
|
||||||
|
# Do not overwrite the file if it already exists locally:
|
||||||
|
if [ ! -f "$BASE/$GENISOIMAGE_MAP_FOLDER/$GENISOIMAGE_MAP_FILE" ]; then
|
||||||
|
cd "$BASE/$GENISOIMAGE_MAP_FOLDER" || exit 1
|
||||||
|
# Currently the file is in Google Drive, but ideally it should be hosted on Dropbox,
|
||||||
|
# similar to the hard disk drivers above, see fetchHardDiskDrivers()
|
||||||
|
wget "https://drive.google.com/uc?export=download&id=1fUHyY8puxw3cWa9mH17G-f5--JiqplAR" -O "$GENISOIMAGE_MAP_FILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Modifies system configurations for a wired network bridge
|
# Modifies system configurations for a wired network bridge
|
||||||
function setupWiredNetworking() {
|
function setupWiredNetworking() {
|
||||||
echo "Setting up wired network..."
|
echo "Setting up wired network..."
|
||||||
|
@ -1249,6 +1266,7 @@ function runChoice() {
|
||||||
installPackages
|
installPackages
|
||||||
installHfdisk
|
installHfdisk
|
||||||
fetchHardDiskDrivers
|
fetchHardDiskDrivers
|
||||||
|
fetchGenisoimageHfsResourceForkMapFile
|
||||||
stopService "piscsi-ctrlboard"
|
stopService "piscsi-ctrlboard"
|
||||||
stopService "piscsi-oled"
|
stopService "piscsi-oled"
|
||||||
stopService "piscsi"
|
stopService "piscsi"
|
||||||
|
@ -1432,6 +1450,7 @@ function runChoice() {
|
||||||
installPackagesWeb
|
installPackagesWeb
|
||||||
installHfdisk
|
installHfdisk
|
||||||
fetchHardDiskDrivers
|
fetchHardDiskDrivers
|
||||||
|
fetchGenisoimageHfsResourceForkMapFile
|
||||||
preparePythonCommon
|
preparePythonCommon
|
||||||
cachePipPackages
|
cachePipPackages
|
||||||
installPiscsiWebInterface
|
installPiscsiWebInterface
|
||||||
|
@ -1484,6 +1503,7 @@ function runChoice() {
|
||||||
installPackages
|
installPackages
|
||||||
installHfdisk
|
installHfdisk
|
||||||
fetchHardDiskDrivers
|
fetchHardDiskDrivers
|
||||||
|
fetchGenisoimageHfsResourceForkMapFile
|
||||||
compilePiscsi
|
compilePiscsi
|
||||||
installPiscsi
|
installPiscsi
|
||||||
configurePiscsiService
|
configurePiscsiService
|
||||||
|
|
|
@ -940,7 +940,21 @@ def download_to_iso():
|
||||||
local_file = request.form.get("file")
|
local_file = request.form.get("file")
|
||||||
|
|
||||||
if iso_type == "HFS":
|
if iso_type == "HFS":
|
||||||
iso_args = ["-hfs"]
|
# The file was downloaded into this location during installation, see fetchGenisoimageHfsResourceForkMapFile() in easyinstall.sh
|
||||||
|
genisoimage_hfs_resource_fork_map_file_path = Path(f"{WEB_DIR}/../../../genisoimage_hfs_resource_fork_map/genisoimage_hfs_resource_fork_map.txt")
|
||||||
|
if genisoimage_hfs_resource_fork_map_file_path.exists():
|
||||||
|
# genisoimage will look up the file extension in the map file to derive the file's CREATOR and TYPE
|
||||||
|
# resource fork attributes, see more at https://linux.die.net/man/1/genisoimage
|
||||||
|
iso_args = ["-hfs", "-map", str(genisoimage_hfs_resource_fork_map_file_path)]
|
||||||
|
logging.info(
|
||||||
|
"Found and using genisoimage hfs map file at %s .",
|
||||||
|
str(genisoimage_hfs_resource_fork_map_file_path))
|
||||||
|
else:
|
||||||
|
logging.warning(
|
||||||
|
"Genisoimage hfs map file %s is not present at %s. Will not set resource fork attributes of files in the iso image!",
|
||||||
|
str(genisoimage_hfs_resource_fork_map_file_path),
|
||||||
|
)
|
||||||
|
iso_args = ["-hfs"]
|
||||||
elif iso_type == "ISO-9660 Level 1":
|
elif iso_type == "ISO-9660 Level 1":
|
||||||
iso_args = ["-iso-level", "1"]
|
iso_args = ["-iso-level", "1"]
|
||||||
elif iso_type == "ISO-9660 Level 2":
|
elif iso_type == "ISO-9660 Level 2":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user