Skip to content

Commit

Permalink
add special case for "Launcher" which is the main entry point
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@14187 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 17, 2016
1 parent 2540d58 commit a12728b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions osx/make-appstore-PKG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,31 @@ PKG_FILENAME="./image/Xpra$BUILD_INFO-$VERSION-r$REVISION$REV_MOD-appstore.pkg"
rm -f $PKG_FILENAME >& /dev/null
echo "Making $PKG_FILENAME"

rm appstore/Xpra.app/Contents/MacOS/*

#move all the scripts to Resources/scripts:
mkdir appstore/Xpra.app/Contents/Resources/scripts
rm -f appstore/Xpra.app/Contents/MacOS/*
for x in Bug_Report GTK_info Network_info Python Xpra Launcher Config_info Keyboard_Tool OpenGL_check PythonExecWrapper Encoding_info Keymap_info Path_info Version_info Shadow Feature_info Manual PowerMonitor Webcam_Test GStreamer_info NativeGUI_info Print Websockify; do
mv "appstore/Xpra.app/Contents/Helpers/$x" "appstore/Xpra.app/Contents/Resources/scripts/"
if [ "$x" != "PythonExecWrapper" ]; then
cat appstore/Xpra.app/Contents/Info.plist | sed "s+Launcher+$x+g" | sed "s+org.xpra.Xpra+org.xpra.$x+g" | sed "s+Xpra+$x+g" > ./appstore/temp.plist
gcc -arch i386 -o "appstore/Xpra.app/Contents/MacOS/$x" "./Shell-wrapper.c" -sectcreate __TEXT __info_plist ./appstore/temp.plist
rm appstore/temp.plist
if [ "$x" == "Launcher" ]; then
gcc -arch i386 -o "appstore/Xpra.app/Contents/MacOS/$x" "./Shell-wrapper.c"
else
cat appstore/Xpra.app/Contents/Info.plist | sed "s+Launcher+$x+g" | sed "s+org.xpra.Xpra+org.xpra.$x+g" | sed "s+Xpra+$x+g" > ./appstore/temp.plist
gcc -arch i386 -o "appstore/Xpra.app/Contents/MacOS/$x" "./Shell-wrapper.c" -sectcreate __TEXT __info_plist ./appstore/temp.plist
rm appstore/temp.plist
fi
fi
done
ls -la appstore/Xpra.app/Contents/MacOS
echo "MacOS:"
ls -la@ appstore/Xpra.app/Contents/MacOS
echo
ls -la appstore/Xpra.app/Contents/Helpers
echo "Helpers:"
ls -la@ appstore/Xpra.app/Contents/Helpers
#remove gstreamer bits:
rm appstore/Xpra.app/Contents/Helpers/gst*


CODESIGN_ARGS="--force --verbose --sign \"3rd Party Mac Developer Application\" --entitlements ./Xpra.entitlements"
eval codesign $CODESIGN_ARGS appstore/Xpra.app/Contents/MacOS/Launcher
eval codesign $CODESIGN_ARGS appstore/Xpra.app/Contents/Helpers/*
EXES=`find appstore/Xpra.app/Contents/MacOS -type f | grep -v "Launcher" | xargs`
eval codesign $CODESIGN_ARGS $EXES
Expand All @@ -59,10 +62,6 @@ eval codesign $CODESIGN_ARGS $LIBS
eval "find appstore/Xpra.app/Contents/Resources/bin/ -type f -exec codesign $CODESIGN_ARGS {} \;"

CODESIGN_ARGS="--force --verbose --sign \"3rd Party Mac Developer Application\" --entitlements ./Xpra.entitlements"
eval codesign $CODESIGN_ARGS appstore/Xpra.app/Contents/MacOS/Launcher

#cat appstore/Xpra.app/Contents/Info.plist | sed "s+org.xpra.Xpra+org.xpra.Launcher+g" | sed "s+Xpra+Launcher+g" > ./appstore/temp.plist
#mv ./appstore/temp.plist appstore/Xpra.app/Contents/Info.plist
eval codesign $CODESIGN_ARGS appstore/Xpra.app
productbuild --component ./appstore/Xpra.app /Applications $PKG_FILENAME --sign "3rd Party Mac Developer Installer: $CODESIGN_KEYNAME"

Expand Down

0 comments on commit a12728b

Please sign in to comment.