mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-24 10:32:32 +00:00
[patch from Mike Sliczniak]
Here is a patch that has a shell script cpr.sh to recursively copy directories but discarding things that cause problems at least on 10.4 when making the .app bundles.
This commit is contained in:
parent
1b9d155673
commit
65eac29142
@ -98,24 +98,26 @@ $(GUI_APP)$(EXEEXT): $(OBJ_DIR) $(GUI_OBJS)
|
||||
$(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS)
|
||||
|
||||
$(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
|
||||
rm -rf $(APP_APP)/Contents
|
||||
mkdir -p $(APP_APP)/Contents
|
||||
cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/
|
||||
./cpr.sh ../MacOSX/Info.plist $(APP_APP)/Contents/
|
||||
echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo
|
||||
mkdir -p $(APP_APP)/Contents/MacOS
|
||||
cp -f $(APP) $(APP_APP)/Contents/MacOS/
|
||||
./cpr.sh $(APP) $(APP_APP)/Contents/MacOS/
|
||||
strip -x $(APP_APP)/Contents/MacOS/$(APP)
|
||||
mkdir -p $(APP_APP)/Contents/Resources
|
||||
cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/
|
||||
./cpr.sh ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/
|
||||
|
||||
$(GUI_APP)_app: $(GUI_APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
|
||||
rm -rf $(GUI_APP_APP)/Contents
|
||||
mkdir -p $(GUI_APP_APP)/Contents
|
||||
sed -e "s/$(APP)/$(GUI_APP)/" < ../MacOSX/Info.plist > $(GUI_APP_APP)/Contents/Info.plist
|
||||
echo -n 'APPL????' > $(GUI_APP_APP)/Contents/PkgInfo
|
||||
mkdir -p $(GUI_APP_APP)/Contents/MacOS
|
||||
cp -f $(GUI_APP) $(GUI_APP_APP)/Contents/MacOS/
|
||||
./cpr.sh $(GUI_APP) $(GUI_APP_APP)/Contents/MacOS/
|
||||
strip -x $(GUI_APP_APP)/Contents/MacOS/$(GUI_APP)
|
||||
mkdir -p $(GUI_APP_APP)/Contents/Resources
|
||||
cp -f ../MacOSX/$(APP).icns $(GUI_APP_APP)/Contents/Resources/$(GUI_APP).icns
|
||||
./cpr.sh ../MacOSX/$(APP).icns $(GUI_APP_APP)/Contents/Resources/$(GUI_APP).icns
|
||||
|
||||
modules:
|
||||
cd Linux/NetDriver; make
|
||||
|
59
BasiliskII/src/Unix/cpr.sh
Executable file
59
BasiliskII/src/Unix/cpr.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
# A script to copy recursively ignoring detritus.
|
||||
# I based this off of a script I had that copied over ssh.
|
||||
# source can be a file or directory.
|
||||
# Mike Sliczniak 2009
|
||||
|
||||
# Don't copy resource forks or extended attributes on Mac OS X 10.4.
|
||||
COPY_EXTENDED_ATTRIBUTES_DISABLE=true; export COPY_EXTENDED_ATTRIBUTES_DISABLE
|
||||
|
||||
# Don't copy resource forks or extended attributes on Mac OS X 10.5.
|
||||
COPYFILE_DISABLE=true; export COPYFILE_DISABLE
|
||||
|
||||
case $# in
|
||||
2)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: cpr source destdir" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
# dir and base names of the source
|
||||
d=`dirname "$1"` || exit
|
||||
b=`basename "$1"` || exit
|
||||
|
||||
# handle relative and absolute destination dirs
|
||||
case "$2" in
|
||||
/*)
|
||||
p=$2
|
||||
;;
|
||||
*)
|
||||
p="$PWD"/"$2"
|
||||
;;
|
||||
esac
|
||||
|
||||
# cd into the source dir
|
||||
cd "$d" || exit
|
||||
|
||||
# This is only for Mac OS X, but some systems do not have gtar, find
|
||||
# sometimes lacks -f, and other systems use test -a.
|
||||
|
||||
# List all interesting files for tar to copy:
|
||||
# The first clause skips directories used for revision control.
|
||||
# The second clause ignores detritus files from revision control and OSs.
|
||||
# The third clause ignores ._ style files created by Mac OS X on file systems
|
||||
# that do not have native resource forks or extended attributes. It checks to
|
||||
# see that the file it is associated with exists.
|
||||
find -f "$b" \( \! \( -type d \( \
|
||||
-name CVS -o -name RCS -o -name SCCS -o -name .git -o -name .svn \
|
||||
\) -prune \) \) \
|
||||
\
|
||||
\( \! \( -type f \( \
|
||||
-name .DS_Store -o -name Thumbs.db -o -name .cvsignore -o -name .gitignore \
|
||||
\) \) \) \
|
||||
\
|
||||
\( \! \( \
|
||||
-type f -name '._*' -execdir /bin/sh -c \
|
||||
'f=`echo "$1" | sed "s:^\._:./:"`; [ -e "$f" ]' /bin/sh '{}' \; \
|
||||
\) \) -print0 | tar -c -f - --null -T - --no-recursion | tar -x -C "$p" -f -
|
Loading…
Reference in New Issue
Block a user