- Reestructuración de ficheros y directorios general
- merge v0.01 --> Añadido fileselector - Añadidas fuentes de Gem y Pure Data - pix2jpg incluído en Gem. Archivos de construcción de Gem modificados. - Añadido fichero ompiling.txt con instrucciones de compilación
This commit is contained in:
parent
c9adfd020b
commit
e85d191b46
3100 changed files with 775434 additions and 3073 deletions
BIN
Gem/build/osx-dmginstaller/DS_Store
Normal file
BIN
Gem/build/osx-dmginstaller/DS_Store
Normal file
Binary file not shown.
52
Gem/build/osx-dmginstaller/buildinstaller.sh
Executable file
52
Gem/build/osx-dmginstaller/buildinstaller.sh
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
## this is shamelessly taken from Pd-extended...
|
||||
|
||||
SRCDIR=$1
|
||||
PACKAGE_NAME=${SRCDIR%/}
|
||||
VOLUME_NAME="${PACKAGE_NAME}"
|
||||
VOLUME_NAME="Gem Installer"
|
||||
|
||||
DESTDIR="/Volumes/${VOLUME_NAME}"
|
||||
|
||||
if [ -d "${SRCDIR}" ]; then
|
||||
echo "creating Gem installer from ${SRCDIR}"
|
||||
else
|
||||
echo "please provide a valid /path/to/Gem" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
hdiutil create -format UDRW -fs HFS+ -srcfolder "${SRCDIR}" -volname "${VOLUME_NAME}" build.dmg
|
||||
# detach one with the same name first
|
||||
hdiutil detach "${DESTDIR}"
|
||||
hdiutil attach build.dmg
|
||||
#install -p ${SRCDIR}${manualsdir}/Pd/ReadMe.html "${DESTDIR}"
|
||||
|
||||
# add link to /Library/Pd for easy install
|
||||
SYSTEMINSTALLER="${DESTDIR}/Gem System-wide Installer.app"
|
||||
/usr/bin/osacompile -o "${SYSTEMINSTALLER}" installer_system.applescript
|
||||
./icon2app "${SYSTEMINSTALLER}" /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GroupFolder.icns
|
||||
|
||||
## add link to ~/Library/Pd for easy install
|
||||
USERINSTALLER="${DESTDIR}/Gem User-specific Installer.app"
|
||||
/usr/bin/osacompile -o "${USERINSTALLER}" installer_user.applescript
|
||||
./icon2app "${USERINSTALLER}" /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/UsersFolderIcon.icns
|
||||
|
||||
# a manually crafted .DS_Store file
|
||||
test -e DS_Store && install -p DS_Store "${DESTDIR}/.DS_Store"
|
||||
|
||||
# To enable the local image icon
|
||||
#install -p VolumeIcon.icns "${DESTDIR}/.VolumeIcon.icns"
|
||||
#/Developer/Tools/SetFile -a C "${DESTDIR}/.VolumeIcon.icns" "${DESTDIR}"
|
||||
|
||||
chmod -R a-w "${DESTDIR}/${PD_APP_NAME}.app/Contents/Resources"
|
||||
|
||||
hdiutil detach $(mount | grep "${VOLUME_NAME}" | cut -d ' ' -f 1)
|
||||
echo "now creating RO-image ${PACKAGE_NAME}.dmg from build.dmg"
|
||||
hdiutil convert -format UDZO -o "${PACKAGE_NAME}.dmg" build.dmg && rm -f build.dmg
|
||||
|
||||
# install license
|
||||
hdiutil unflatten "${PACKAGE_NAME}.dmg"
|
||||
/Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r SLA.r -a -o "${PACKAGE_NAME}.dmg"
|
||||
hdiutil flatten "${PACKAGE_NAME}.dmg"
|
||||
|
11
Gem/build/osx-dmginstaller/droplet_system.applescript
Normal file
11
Gem/build/osx-dmginstaller/droplet_system.applescript
Normal file
|
@ -0,0 +1,11 @@
|
|||
#compile this with
|
||||
# > /usr/bin/osacompile -o droplet.app droplet.as
|
||||
|
||||
on open thefiles
|
||||
set outputFolder to (path to library folder as text) & "Pd:"
|
||||
do shell script "/bin/mkdir -p " & quoted form of POSIX path of outputFolder
|
||||
tell application "Finder"
|
||||
duplicate thefiles to outputFolder replacing true
|
||||
end tell
|
||||
end open
|
||||
|
11
Gem/build/osx-dmginstaller/droplet_user.applescript
Normal file
11
Gem/build/osx-dmginstaller/droplet_user.applescript
Normal file
|
@ -0,0 +1,11 @@
|
|||
#compile this with
|
||||
# > /usr/bin/osacompile -o droplet.app droplet.as
|
||||
|
||||
on open thefiles
|
||||
set outputFolder to (path to library folder from user domain as text) & "Pd:"
|
||||
do shell script "/bin/mkdir -p " & quoted form of POSIX path of outputFolder
|
||||
tell application "Finder"
|
||||
duplicate thefiles to outputFolder replacing true
|
||||
end tell
|
||||
end open
|
||||
|
97
Gem/build/osx-dmginstaller/icon2app
Executable file
97
Gem/build/osx-dmginstaller/icon2app
Executable file
|
@ -0,0 +1,97 @@
|
|||
#!/bin/sh
|
||||
|
||||
## OSX cmdline utility
|
||||
## changes the icon of an app (or any other folder)
|
||||
|
||||
# example iconfile: /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/HomeFolderIcon.icns
|
||||
|
||||
OLDDIR=$(pwd)
|
||||
|
||||
usage () {
|
||||
echo "$0 <app or directory(writeable)> <iconfile.icns>" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
mywhich() {
|
||||
for i in $@
|
||||
do
|
||||
if [ -x "$(which $i)" ]; then
|
||||
echo "$(which $i)"
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo "unable to find executable: $@" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
APP=$1
|
||||
ICON=$2
|
||||
|
||||
DEVTOOLS=/Developer/Tools
|
||||
REZ=$(mywhich Rez ${DEVTOOLS}/Rez)
|
||||
SETFILE=$(mywhich SetFile ${DEVTOOLS}/SetFile)
|
||||
|
||||
if [ "x${REZ}" = "x" ]; then exit 1; fi
|
||||
if [ "x${SETFILE}" = "x" ]; then exit 1; fi
|
||||
|
||||
if [ -f "${ICON}" ]; then
|
||||
:
|
||||
else
|
||||
if [ -f "${OLDDIR}/${ICON}" ]; then
|
||||
ICON="${OLDDIR}/${ICON}"
|
||||
else
|
||||
usage
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "${APP}" ]; then
|
||||
# this is the output file
|
||||
ICONFILE=$'Icon\r'
|
||||
RSRCFILE="${ICONFILE}"
|
||||
DIR=${APP}
|
||||
else
|
||||
if [ -f "${APP}" ]; then
|
||||
:
|
||||
else
|
||||
usage
|
||||
fi
|
||||
DIR=${APP%/*}
|
||||
if [ "x${DIR}" = "x" ]; then
|
||||
DIR=.
|
||||
fi
|
||||
if [ "x${DIR}" = "x${APP}" ]; then
|
||||
DIR=.
|
||||
fi
|
||||
|
||||
# this is the output file
|
||||
ICONFILE=${APP##*/}
|
||||
RSRCFILE="${ICONFILE}.r"
|
||||
fi
|
||||
|
||||
echo DIR $DIR
|
||||
echo ICO $ICONFILE
|
||||
echo RSR $RSRCFILE
|
||||
|
||||
cd "${DIR}"
|
||||
|
||||
touch "${RSRCFILE}" || usage
|
||||
cat << EOF > "${RSRCFILE}"
|
||||
/*
|
||||
* process this file with:
|
||||
* ${REZ} <thisfile> -o <file-to-add-icon-to>
|
||||
* after that, enable the icon with
|
||||
* ${SETFILE} -a C <file-to-add-icon-to>
|
||||
*/
|
||||
read 'icns' (-16455) "${ICON}";
|
||||
EOF
|
||||
|
||||
Rez "${RSRCFILE}" -o "${ICONFILE}"
|
||||
if [ "x${RSRCFILE}" = "x${ICONFILE}" ]; then
|
||||
# we are woriking on a directory
|
||||
SetFile -a C .
|
||||
else
|
||||
# we are woriking on a file
|
||||
SetFile -a C "${ICONFILE}"
|
||||
rm "${RSRCFILE}"
|
||||
fi
|
||||
|
31
Gem/build/osx-dmginstaller/installer_system.applescript
Normal file
31
Gem/build/osx-dmginstaller/installer_system.applescript
Normal file
|
@ -0,0 +1,31 @@
|
|||
try
|
||||
-- create the output folder if necessary
|
||||
set outputFolder to (path to library folder as text) & "Pd:"
|
||||
do shell script "/bin/mkdir -p " & quoted form of POSIX path of outputFolder
|
||||
|
||||
-- find the directories on the dmg disk
|
||||
set myPath to path to me
|
||||
tell application "Finder"
|
||||
set myContainer to container of myPath
|
||||
set installDirs to (folders of myContainer) as alias list
|
||||
end tell
|
||||
|
||||
-- copy the templates to the output folder
|
||||
-- NOTE: the script will error if any of the templates already exist
|
||||
-- therefore we use a repeat loop and duplicate each file separately with a try block
|
||||
-- around it to avoid errors in case some templates have already been installed.
|
||||
tell application "Finder"
|
||||
repeat with aDir in installDirs
|
||||
try
|
||||
duplicate aDir to folder outputFolder with replacing
|
||||
end try
|
||||
end repeat
|
||||
end tell
|
||||
|
||||
-- tell the user everything was OK
|
||||
tell me to activate
|
||||
display dialog "Gem and friends were successfully installed! You may now use them in Pd." buttons {"OK"} default button 1 with title "Gem System-wide Installer" with icon note
|
||||
on error
|
||||
tell me to activate
|
||||
display dialog "There was an error installing Gem and friends. Please manually install them by copying" & (installDirs) & "to the following folder." & return & return & (POSIX path of outputFolder) buttons {"OK"} default button 1 with title "Gem System-wide Installer"
|
||||
end try
|
31
Gem/build/osx-dmginstaller/installer_user.applescript
Normal file
31
Gem/build/osx-dmginstaller/installer_user.applescript
Normal file
|
@ -0,0 +1,31 @@
|
|||
try
|
||||
-- create the output folder if necessary
|
||||
set outputFolder to (path to library folder from user domain as text) & "Pd:"
|
||||
do shell script "/bin/mkdir -p " & quoted form of POSIX path of outputFolder
|
||||
|
||||
-- find the directories on the dmg disk
|
||||
set myPath to path to me
|
||||
tell application "Finder"
|
||||
set myContainer to container of myPath
|
||||
set installDirs to (folders of myContainer) as alias list
|
||||
end tell
|
||||
|
||||
-- copy the templates to the output folder
|
||||
-- NOTE: the script will error if any of the templates already exist
|
||||
-- therefore we use a repeat loop and duplicate each file separately with a try block
|
||||
-- around it to avoid errors in case some templates have already been installed.
|
||||
tell application "Finder"
|
||||
repeat with aDir in installDirs
|
||||
try
|
||||
duplicate aDir to folder outputFolder with replacing
|
||||
end try
|
||||
end repeat
|
||||
end tell
|
||||
|
||||
-- tell the user everything was OK
|
||||
tell me to activate
|
||||
display dialog "Gem and friends were successfully installed! You may now use them in Pd." buttons {"OK"} default button 1 with title "Gem User-specific Installer" with icon note
|
||||
on error
|
||||
tell me to activate
|
||||
display dialog "There was an error installing Gem and friends. Please manually install them by copying" & (installDirs) & "to the following folder." & return & return & (POSIX path of outputFolder) buttons {"OK"} default button 1 with title "Gem User-specific Installer"
|
||||
end try
|
Loading…
Add table
Add a link
Reference in a new issue