Add args on Linux to preserve the resource fork when copying files to the disk image. Update the readme

This commit is contained in:
Jeremy Rand 2020-11-30 00:31:21 -05:00
parent 2898704073
commit b6527a190e
2 changed files with 25 additions and 3 deletions

View File

@ -27,6 +27,14 @@ Features of this build environment include:
* Errors returned by the C compiler, the resource compiler and the Merlin assembler are now understood by Xcode. The error will be visible in the editor itself and Xcode will jump to the line reported by the compiler to contain the error. Note that ORCA/M errors are not understood by Xcode at this time.
MacOS Versions:
----------------
As of today, I have not been able to test these build tools under MacOS 11 (Big Sur). There are barriers which prevent me from upgrading to MacOS 11 right now so I am unable to test it and can make no guarantees. I did get some informal feedback from someone using a beta of MacOS 11 who was having permission problems. That is the most likely issue. In general, with each release recently, Apple has tighted up security in ways that can lead to problems. If you are trying to use these tools on MacOS 11 right now and are having problems, please contact me and I will try to help but it may be difficult to assist until I can upgrade myself.
And when it comes to Apple silicon, I have no specific plans right now to purchase new hardware so I cannot do any testing. However, there are no binaries in this package itself since it is just makefiles, scripts and Xcode configuration files. Assuming that Golden Gate and Fuse work on Apple silicon and assuming that MacOS 11 is OK (see the previous paragraph), I don't expect any specific issues with Apple silicon. But again, I have no ability to test that right now so I cannot make any guarantees.
MacOS Installation:
--------------------
@ -71,7 +79,7 @@ UNIX Installation:
This build infrastructure can be used in a non-Mac environment. The Makefile infrastructure should work on any UNIX-y platform. You will still need Golden Gate and the ORCA tools setup on your machine. Just add the Makefile and the contents of the make directory to your project. Modify the Makefile as appropriate and you should have a build environment which you can use with the make command.
That said, I haven't tested this on any other platform to show this is actually true.
Thanks to [xandark](https://github.com/xandark) who has done some testing of the build scripts under Linux. Thanks to that work and the issues raised, I have more confidence that these build scripts should work on non-MacOS platforms. Feel free to submit issues if you find problems.
Possible Future Improvements:

View File

@ -23,6 +23,20 @@ DEST="${MOUNTDIR}/${DISKIMAGEDEST}"
COPYDIRS=$*
# It looks like on Linux, the cp command needs a special argument to preserve the resource fork. This isn't ideal
# but for now, if uname is Darwin, then this is MacOS and we don't need any cp args. If not Darwin, then assume
# this is Linux and ask for extended attributes to be preserved through the copy.
#
# Ultimately, it could be that other platforms (BSD, does Solaris still exist?) or even other Linux versions or
# distributions need different arguments for this rather special thing. If true, this may need to be a build time
# option which can be set.
if [ "`uname`" = Darwin ]
then
CPARGS=""
else
CPARGS="--preserve=xattr"
fi
cleanupAndExit()
{
umount "$MOUNTDIR" 2> /dev/null
@ -59,7 +73,7 @@ then
cleanupAndExit
fi
cp "$FILE" "$DEST"
cp $CPARGS "$FILE" "$DEST"
if [ $? != 0 ]
then
echo Unable to copy the file to the disk image.
@ -83,7 +97,7 @@ do
mkdir -p "${MOUNTDIR}/$FILEORDIR"
elif [ -f "$FILEORDIR" ]
then
cp "$FILEORDIR" "${MOUNTDIR}/$FILEORDIR"
cp $CPARGS "$FILEORDIR" "${MOUNTDIR}/$FILEORDIR"
fi
done
cd "$OLDDIR"