Editing a shell included in Bundle contents
Editing a shell included in Bundle contents
- Subject: Editing a shell included in Bundle contents
- From: Jay Louvion <email@hidden>
- Date: Tue, 11 Oct 2005 10:11:06 +0200
Title: Editing a shell included in Bundle contents
Now this seems to be a bit of a brain teaser, but it might seem a stroll in the park to some of you... So:
I’ve got an application bundle written in AS that alllows me to convert most films into mpg2 films. I use it in drag ‘n’ drop. I call a do shell using a shell command included in the bundle, thus:
set convert_shell to (quoted form of (POSIX path of ((path to me as text) & "contents:resources:loud_convert")))
set thecline to (convert_shell & " " & POSIX_path & " " & ConvertedFilmsPath)
do shell script thecline
That’s fine when the shell (loud_convert) doesn’t need to have an extra resource. But if I want to use an extra resource such as a silent audio track (to have a muted film), the shell (mute_convert) needs to be edited. Is there a way to edit a bundle resource on the fly ? If so a working example would be much more precious than a simple “yes”... :-)
Here is the “mute_convert” shell:
function convertFile() {
/opt/darwinports/bin/ffmpeg -y -i /Applications/GalleryMaker\ 2.16/resources/template-dvd/sound/silence.mp2 \
-i "$1" \
-target pal-dvd -aspect 4:3 -acodec mp2 -ab 128a \
-vcodec mpeg2video -b 3000 -g 25 "$2"
}
convertFile "$1" "$2"
The bit in bold type is referring to an existing path on one machine, but what if I wanted to include “silence.mp2” in the bundle, I would then have to have the shell edited every time it is run, right ?
TIA,
J.
Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva
T+4122 840 3272
F+4122 840 3271
skypeme:
jaylouvion
www.studiocasagrande.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden