mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
add dmg icon, fix extension onf README file, fix icon on Uninstall script
This commit is contained in:
parent
e9615c6b0a
commit
7aa0d9b187
BIN
osx/Install/_VolumeIcon.icns
Normal file
BIN
osx/Install/_VolumeIcon.icns
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
29
osx/Uninstall Firefly.applescript
Normal file
29
osx/Uninstall Firefly.applescript
Normal file
@ -0,0 +1,29 @@
|
||||
tell application "System Events"
|
||||
quit application "System Preferences"
|
||||
-- why do we do the following block this way? Because if Firefly has never been installed and we try to just quit Firefly Helper, AppleScript will put up a dialog asking for the user to find it. That's not helpful. The delay is to give System Preferences time to quit. Otherwise, if we quit the Helper and Firefly happened to be the open pane, the "lost connection" dialog will pop up.
|
||||
if ("Firefly Helper" is in (name of every process)) then
|
||||
delay 2
|
||||
quit application "Firefly Helper"
|
||||
end if
|
||||
if "Firefly Helper" is in (name of every login item) then
|
||||
delete (every login item whose name is "Firefly Helper")
|
||||
end if
|
||||
end tell
|
||||
|
||||
tell application "Finder"
|
||||
try
|
||||
set uninstallFolder to (make new folder with properties {name:"firefly-uninstall"} at desktop)
|
||||
set libraryFolder to folder "Library" of home
|
||||
try
|
||||
move (file "Firefly.prefPane" of folder "PreferencePanes" of libraryFolder) to uninstallFolder
|
||||
end try
|
||||
try
|
||||
move (folder "Firefly" of folder "Application Support" of libraryFolder) to uninstallFolder
|
||||
end try
|
||||
move uninstallFolder to trash
|
||||
display dialog "Uninstall was successful. Please double-click the Firefly.prefPane icon to install the new version." buttons {"OK"} default button {"OK"}
|
||||
on error
|
||||
display dialog "An error occurred while uninstalling the old version of Firefly. Please follow the manual uninstall instructions in the Read Me First! file." buttons {"OK"} default button {"OK"}
|
||||
end try
|
||||
end tell
|
||||
|
@ -1,23 +1,48 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -O extglob
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
BUILD="yes"
|
||||
EDIT="no"
|
||||
|
||||
until [ -z "$1" ]; do
|
||||
case $1 in
|
||||
--no-build|-n)
|
||||
BUILD="no"
|
||||
;;
|
||||
|
||||
--edit|-e)
|
||||
EDIT="yes"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
|
||||
if [ "$#" = "0" ]; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$BUILD" = "yes" ]; then
|
||||
# any argument leaves the server folder as-is
|
||||
echo "** BUILDING SERVER FOLDER **"
|
||||
|
||||
AR="Firefly Helper/Server/admin-root"
|
||||
|
||||
mkdir "Firefly Helper/Server/plugins"
|
||||
mkdir "${AR}"
|
||||
mkdir "${AR}/lib-js"
|
||||
mkdir "${AR}/lib-js/script.aculo.us"
|
||||
|
||||
cp ../.build/ppc/mt-daapd FireflyHelper/Server/firefly
|
||||
cp ../.build/ppc/*so FireflyHelper/Server/Plugins
|
||||
cp ../.build/wavstreamer FireflyHelper/Server
|
||||
cp ../.build/alac FireflyHelper/Server
|
||||
rm -rf "Firefly Helper/Server/plugins"
|
||||
rm -rf "Firefly Helper/Server/admin-root"
|
||||
|
||||
cp ../admin-root/*\(html|xml|txt|jar|gif|js|png|jpg\) "${AR}"
|
||||
mkdir -p "Firefly Helper/Server/plugins"
|
||||
mkdir -p "${AR}"
|
||||
mkdir -p "${AR}/lib-js"
|
||||
mkdir -p "${AR}/lib-js/script.aculo.us"
|
||||
|
||||
cp ../.build/ppc/mt-daapd "Firefly Helper/Server/firefly"
|
||||
cp ../.build/ppc/*so "Firefly Helper/Server/Plugins"
|
||||
cp ../.build/ppc/wavstreamer "Firefly Helper/Server"
|
||||
cp ../.build/ppc/alac "Firefly Helper/Server"
|
||||
cp ../admin-root/*.+(html|xml|txt|jar|gif|js|png|jpg) "${AR}"
|
||||
cp ../admin-root/CREDITS "${AR}"
|
||||
cp ../admin-root/lib-js/*js "${AR}/lib-js"
|
||||
cp ../admin-root/lib-js/script.aculo.us/*js "${AR}/li-js/script.aculo.us"
|
||||
cp ../admin-root/lib-js/script.aculo.us/*js "${AR}/lib-js/script.aculo.us"
|
||||
fi
|
||||
|
||||
pushd "Firefly Helper"
|
||||
@ -37,27 +62,62 @@ if [ "$?" -ne "0" ]; then
|
||||
echo "Could not build FireflyPrefs panel"
|
||||
exit 2
|
||||
fi
|
||||
popd
|
||||
|
||||
# Now, build the image
|
||||
|
||||
mkdir staging
|
||||
cp Install/root_DS_Store staging/.DS_Store
|
||||
mkdir staging/.background
|
||||
cp Install/background.png staging/.background/background.png
|
||||
cp Install/_background_DS_Store staging/.background/.DS_Store
|
||||
rm -rf staging
|
||||
rm -f tmp.dmg
|
||||
|
||||
STAGING_DIR="staging"
|
||||
|
||||
if [ "$EDIT" = "yes" ]; then
|
||||
# build the image and stage directly to it
|
||||
if [ -x "/Volumes/Install Firefly" ]; then
|
||||
echo "You'll want to unmount the volume you have mounted first."
|
||||
exit
|
||||
fi
|
||||
|
||||
hdiutil create -fs HFS+ -volname "Install Firefly" -size 10m tmp.dmg
|
||||
hdiutil attach tmp.dmg -readwrite
|
||||
|
||||
if [ -x "/Volumes/Install Firefly" ]; then
|
||||
STAGING_DIR="/Volumes/Install Firefly"
|
||||
else
|
||||
echo "Can't seem to make or attach tmp.dmg... Sorry..."
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$STAGING_DIR"
|
||||
|
||||
cp Install/root_DS_Store "$STAGING_DIR/.DS_Store"
|
||||
cp Install/_VolumeIcon.icns "$STAGING_DIR/.VolumeIcon.icns"
|
||||
mkdir "$STAGING_DIR/.background"
|
||||
cp Install/background.png "$STAGING_DIR/.background/background.png"
|
||||
cp Install/_background_DS_Store "$STAGING_DIR/.background/.DS_Store"
|
||||
|
||||
if [ ! -x FireflyPrefs/build/Release/Firefly.prefPane ]; then
|
||||
echo "Wait... I can't find the pref pane"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv FireflyPrefs/build/Release/Firefly.prefPane staging
|
||||
cp "Uninstall Firefly.app" staging
|
||||
cp -r "Install/Read Me First!.rtfd" staging
|
||||
mv FireflyPrefs/build/Release/Firefly.prefPane "$STAGING_DIR"
|
||||
|
||||
osacompile -o "Uninstall Firefly.app" "Uninstall Firefly.applescript"
|
||||
|
||||
mv "Uninstall Firefly.app" "$STAGING_DIR"
|
||||
cp -r "Install/Read Me First!.rtfd" "$STAGING_DIR"
|
||||
/Developer/Tools/SetFile -a E "$STAGING_DIR/Read Me First!.rtfd"
|
||||
/Developer/Tools/SetFile -a C "$STAGING_DIR"
|
||||
|
||||
if [ "$EDIT" = "no" ]; then
|
||||
hdiutil makehybrid -hfs -hfs-volume-name "Install Firefly" -hfs-openfolder staging staging -o tmp.dmg
|
||||
hdiutil convert -format UDZO tmp.dmg -o Firefly.dmg
|
||||
|
||||
rm -f Firefly.dmg
|
||||
rm -rf staging
|
||||
hdiutil convert -format UDZO tmp.dmg -o Firefly.dmg
|
||||
rm tmp.dmg
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user