For the "Recent Messages" preview... Here lies a really long analysis of the proposed fix.
Kindof a funkey setup here, it was previously on a different partition, I have a symlink from /Users/jpouellet/Desktop -> /Volumes/SHARE/Desktop, where SHARE is an NTFS partition that I share between OS X and OpenBSD when I dual boot, and the file path was /Volumes/SHARE/Desktop/asdf.ldr and I was telling L3P to access it as /Users/jpouellet/Desktop/asdf.ldr, but that wasn't the issue because the symlink is completely transparent, and it was obviously able to read it just fine because it generated a valid POV-Ray output file of the model.
Just to double check that it wasn't the problem, I moved the file to /asdf.ldr and got the same results (.pov generated, POV-Ray not launched).
In any case, there aren't any special characters in the file path or anything (which I suspect is the reason you asked about the path).
I looked further into what was changed to try to figure out exactly what you did to make it "work on your system."
I assume, based on what I saw, that what wasn't working on your system, was not L3P Launcher itself, but in rather POV-Ray, and thus you resorted to using MegaPov, just as I have myself.
From what I can gather, you created another application (Open in MegaPOV.app) which, as far as I can tell, is just a wrapper for another applescript (it has all the defining characteristics of an applescript that was just saved as an "Application" from AppleScript Editor) whose purpose appears to be to gather (from the L3PLauncher gui?) what pov files were created, and open those in MegaPOV.
Haha, and I was still expecting it to launch POV-Ray, but no, "SendOutputToPOV.applescript" has been turned into a launcher for "Open in MegaPOV.app"
Just to be sure, I checked to be certain that AppleScript recognized my MegaPOV installation:
Code:
$ osascript
tell application "MegaPOV" to activate
^D
and yup, it works just fine.
I am curious as to why you bundled the new applescript in an application which is launched by the old applescript file (incurring all the overhead of the data associated with the new application) instead of just modifying the old applescript file, but then again, I don't fully understand the idiosyncrasies of AppleScript.
Now on to the issues of relative file paths...
The so-called applescript
Code:
L3P Launcher.app/Contents/Resources/Open in MegaPOV.app/Contents/Resources/Scripts/main.scpt
is actually being executed by
Code:
L3P Launcher.app/Contents/Resources/Open in MegaPOV.app/Contents/MacOS/applet
and thus has the working directory of
Code:
/Applications/L3P Launcher.app/Contents/Resources/Open in MegaPOV.app/Contents/MacOS/
In the script, you try to execute gsed as ./gsed, which implies that gsed is in the working directory of the currently executing application, which, in this case, it is not, it is in
Code:
/Applications/L3P Launcher.app/Contents/Resources/
which is the same directory as "Open in MegaPOV.app" but (perhaps not intuitively) is not your working directory.
Furthermore, when I tried to execute the version of gsed you distributed, I get the following errors:
Code:
$ /Applications/L3P\ Launcher.app/Contents/Resources/gsed
dyld: Library not loaded: /sw/lib/libintl.3.dylib
Referenced from: /Applications/L3P Launcher.app/Contents/Resources/gsed
Reason: image not found
Trace/BPT trap
$ ls /sw/lib/
ls: /sw/lib/: No such file or directory
as well as
so obviously it must rely on some libraries installed by fink, so it can't just be shipped off as-is and expected to work.
Would it be possible to use normal sed instead of gsed? If not, perl is also an option as it is installed by default on OS X, and you can use the -e flag to specify the code in-line.
As a side note, the beauty of the old POV-Ray launching code was that (back on systems where POV-Ray still worked) it automatically rendered the model as soon as it was opened by POV-Ray. The MegaPPOV code you provided appears to me to primarily be a complicated way of obtaining the name of the file to open, and opening it in MegaPOV. Since its primary function is to open the file, and it doesn't do any gui-scripting of the opening application (as the old code did), I believe it should be opened with
Code:
$ open [i]<the file>[/i]
or in applescript:
Code:
do shell script "open " & quoted form of [i]<the file>[/i]
instead of
Code:
tell application "MegaPOV"
activate
open [i]<the file>[/i]
end tell
so that it would use whatever application people set as the default on their system for opening POV files. This way, if POV-Ray does start to work again on mac in the future, the changes to this application would not need to be reverted.
Finally, (perhaps you did this, and I'm unaware) it would be best to modify the sources of this program and not the resulting build. As it stands right now, the next time somebody modifies the source and re-compiles it, your changes will be lost. The sources may be found in L3P_Launcher_.8/source (the directory that contains the Xcode project) in the download found on the
page I linked to earlier.
Phew, this took a long time to write, hope it helps, at least a little.