Moving IIgs tools from HFS to JFS.

This commit is contained in:
Scott Duensing 2021-08-03 19:08:16 -05:00
parent a93c83c32e
commit ad949fdf68

View file

@ -53,21 +53,24 @@ G_MAC64=6
function buildMacOSXSDK() { function buildMacOSXSDK() {
local RESULT=$1
local XCODE= local XCODE=
local OSX="${G_PARENT}/sdks/macOS" local OSX="${G_PARENT}/sdks/macOS"
eval $RESULT=0
mkdir -p "${G_PARENT}/sdks" mkdir -p "${G_PARENT}/sdks"
if [[ ! -z ${G_AUTOMATED} ]]; then if [[ ! -z ${G_AUTOMATED} ]]; then
XCODE=${G_XCODE_FILE} XCODE=${G_XCODE_FILE}
if [[ ! -e "${XCODE}" ]]; then if [[ ! -e "${XCODE}" ]]; then
return 1 return 0
fi fi
else else
if [[ ! -e "${OSX}/SDK" ]]; then if [[ ! -e "${OSX}/SDK" ]]; then
tFileBrowser XCODE "Please locate your XCode XIP" .xip .. tFileBrowser XCODE "Please locate your XCode XIP" .xip ..
if [[ -z ${XCODE} || "${XCODE}" == "" ]]; then if [[ -z ${XCODE} || "${XCODE}" == "" ]]; then
return 1 return 0
fi fi
fi fi
fi fi
@ -88,7 +91,7 @@ function buildMacOSXSDK() {
configWrite configWrite
configRead configRead
return 0 eval $RESULT=1
} }
@ -452,20 +455,27 @@ function installIIgs() {
local GGATE= local GGATE=
local IIGS="${G_PARENT}/sdks/IIgs" local IIGS="${G_PARENT}/sdks/IIgs"
if [[ ! -z ${G_AUTOMATED} ]]; then
GGATE=${G_GOLDEN_GATE_FILE}
if [[ ! -e "${GGATE}" ]]; then
return 0
fi
fi
if [[ -e "${IIGS}/unmountORCA.sh" ]]; then if [[ -e "${IIGS}/unmountORCA.sh" ]]; then
"${IIGS}/unmountORCA.sh" "${IIGS}/unmountORCA.sh"
fi fi
mkdir -p "${IIGS}/ORCA" mkdir -p "${IIGS}/ORCA"
chmod 777 "${IIGS}/ORCA" chmod 777 "${IIGS}/ORCA"
if [[ ! -e "${IIGS}/hfsDrive.img" ]]; then if [[ ! -e "${IIGS}/jfsDrive.img" ]]; then
purple "Creating HFS Volume" purple "Creating JFS Volume"
O=${IIGS}/mountORCA.sh O=${IIGS}/mountORCA.sh
echo "#!/bin/bash" > "${O}" echo "#!/bin/bash" > "${O}"
echo "IIGS=${IIGS}" >> "${O}" echo "IIGS=${IIGS}" >> "${O}"
echo "if ! mount | grep \${IIGS}/ORCA | grep -q hfsplus; then" >> "${O}" echo "if ! mount | grep \${IIGS}/ORCA | grep -q jfs; then" >> "${O}"
echo -e "\tfsck.hfsplus -dfary \${IIGS}/hfsDrive.img" >> "${O}" echo -e "\tfsck.jfs -a \${IIGS}/jfsDrive.img" >> "${O}"
echo -e "\tIIGSDISK=\$(sudo losetup --partscan --find --show \${IIGS}/hfsDrive.img)" >> "${O}" echo -e "\tIIGSDISK=\$(sudo losetup --partscan --find --show \${IIGS}/jfsDrive.img)" >> "${O}"
echo -e "\tsudo mount \${IIGSDISK} \${IIGS}/ORCA" >> "${O}" echo -e "\tsudo mount \${IIGSDISK} \${IIGS}/ORCA" >> "${O}"
echo -e "\techo LOOP=\${IIGSDISK} > \${IIGS}/lastMount.cfg" >> "${O}" echo -e "\techo LOOP=\${IIGSDISK} > \${IIGS}/lastMount.cfg" >> "${O}"
echo -e "\techo MOUNT=\${IIGS}/ORCA >> \${IIGS}/lastMount.cfg" >> "${O}" echo -e "\techo MOUNT=\${IIGS}/ORCA >> \${IIGS}/lastMount.cfg" >> "${O}"
@ -481,9 +491,8 @@ function installIIgs() {
echo -e "\tsudo rm \${IIGS}/lastMount.cfg" >> "${O}" echo -e "\tsudo rm \${IIGS}/lastMount.cfg" >> "${O}"
echo "fi" >> "${O}" echo "fi" >> "${O}"
chmod +x "${O}" chmod +x "${O}"
fallocate -l 32M "${IIGS}/hfsDrive.img" fallocate -l 32M "${IIGS}/jfsDrive.img"
mkfs.hfs -v IIgs "${IIGS}/hfsDrive.img" mkfs.jfs -O -q -L IIgs "${IIGS}/jfsDrive.img"
fsck.hfsplus -dfary "${IIGS}/hfsDrive.img"
fi fi
"${IIGS}/mountORCA.sh" "${IIGS}/mountORCA.sh"
@ -504,12 +513,7 @@ function installIIgs() {
fi fi
if [[ ! -d GoldenGate ]]; then if [[ ! -d GoldenGate ]]; then
if [[ ! -z ${G_AUTOMATED} ]]; then if [[ -z ${G_AUTOMATED} ]]; then
GGATE=${G_GOLDEN_GATE_FILE}
if [[ ! -e "${GGATE}" ]]; then
return 0
fi
else
tFileBrowser GGATE "Please locate your 'Golden Gate' MSI" .msi .. tFileBrowser GGATE "Please locate your 'Golden Gate' MSI" .msi ..
if [[ -z ${GGATE} || "${GGATE}" == "" ]]; then if [[ -z ${GGATE} || "${GGATE}" == "" ]]; then
return 0 return 0
@ -654,8 +658,8 @@ function installIIgs() {
"${IIGS}/unmountORCA.sh" "${IIGS}/unmountORCA.sh"
if [[ ! -e "${IIGS}/hfsDrive.img.backup.tar.bz2" ]]; then if [[ ! -e "${IIGS}/jfsDrive.img.backup.tar.bz2" ]]; then
tar cjf "${IIGS}/hfsDrive.img.backup.tar.bz2" "${IIGS}/hfsDrive.img" &> /dev/null tar cjf "${IIGS}/jfsDrive.img.backup.tar.bz2" "${IIGS}/jfsDrive.img" &> /dev/null
fi fi
} }
@ -684,7 +688,9 @@ function installLinux64() {
function installmacOS32() { function installmacOS32() {
buildMacOSXSDK && \ local INSTALLED=
buildMacOSXSDK INSTALLED
if [[ ${INSTALLED} -eq 1 ]]; then
buildPCDeps \ buildPCDeps \
"macos32" \ "macos32" \
"macOS/i386" \ "macOS/i386" \
@ -692,11 +698,14 @@ function installmacOS32() {
"o32-clang" \ "o32-clang" \
"" \ "" \
"${JOEY}/sdks/macOS/lib" "${JOEY}/sdks/macOS/lib"
fi
} }
function installmacOS64() { function installmacOS64() {
buildMacOSXSDK && \ local INSTALLED=
buildMacOSXSDK INSTALLED
if [[ ${INSTALLED} -eq 1 ]]; then
buildPCDeps \ buildPCDeps \
"macos64" \ "macos64" \
"macOS/x64" \ "macOS/x64" \
@ -704,6 +713,7 @@ function installmacOS64() {
"o64-clang" \ "o64-clang" \
"" \ "" \
"${JOEY}/sdks/macOS/lib" "${JOEY}/sdks/macOS/lib"
fi
} }
@ -976,9 +986,7 @@ function start() {
git-lfs \ git-lfs \
gzip \ gzip \
hatari \ hatari \
hfsplus \ jfsutils \
hfsprogs \
hfsutils \
lhasa \ lhasa \
libasound2-dev{,:i386} \ libasound2-dev{,:i386} \
libbz2-dev \ libbz2-dev \
@ -1045,6 +1053,7 @@ function start() {
echo "" echo ""
echo ${MISSING} echo ${MISSING}
echo "" echo ""
echo ${MISSING} > ${G_WORK}/missing.lst
exit 1 exit 1
fi fi
fi fi