Author |
Message |
Joh. Roedel (johroedel)
New member Username: johroedel
Post Number: 1 Registered: 12-2009
| Posted on Wednesday, December 09, 2009 - 11:02 am: | |
Hello! Does anyone know how to open or run a pde file in FlexPDE from the command line on MacOS X? I have the student version 5.1 running on OS 10.4.11 (PPC). I can open flexpde GUI, but I do not know how to open a pde-file from command line. Which might be related: If I double click on a pde-file flexpde opens, but again without the selected pde-file. I have to open it "manually" via "open file". Did I miss something or is there something wrong on my system? |
Marek Nelson (mgnelson)
Moderator Username: mgnelson
Post Number: 166 Registered: 07-2007
| Posted on Wednesday, December 09, 2009 - 02:16 pm: | |
1) The path to the Mac executable is a little obscure due to the way they package executables and it's resources into an application "bundle". Detailed information about this can be found on Mac's support website, but below is a brief discussion. The "Application" that a user sees (and double-clicks) in the Finder browser window is actually a hidden directory (name.app) that is used to store many different types of components. The executable is located in the "Contents/MacOS" subdirectory of the application bundle. So, in order to run FlexPDE from the command line (assuming you are in the FlexPDE installation directory containing the bundle) you need to type: > flexpde5.app/Contents/MacOS/flexpde5 not just > flexpde5 If you installed FlexPDE in the default place, the full path to the executable would be "/Applications/FlexPDE5/flexpde5.app/Contents/MacOS/flexpde5". For example, to open and run a pde file named "test.pde" from the command line : > /Applications/FlexPDE5/flexpde5.app/Contents/MacOS/flexpde5 -R test 2) Currently you have to open the pde file manually (there is nothing wrong with your system.) FlexPDE code is ported from Windows and we know how to associate the files with the application on the Mac, but do not yet have the functionality to open the file once FlexPDE is opened. FlexPDE also ignores the "drag-and-drop" of a file onto the application. We hope to add these functionalities in the future, but we have no time estimate on their implementation.
|
Joh. Roedel (johroedel)
New member Username: johroedel
Post Number: 2 Registered: 12-2009
| Posted on Thursday, December 10, 2009 - 03:18 pm: | |
Well, thank you very much. I tried to open the application bundle with " open flexpde5.app ..." and with that I was able to open the GUI but "open" ignores any additional arguments. At least, now I got a bit further - but not quite successfull. Now flexpde says "Invalid switch" if I use the -R filename option. What did I wrong? |
Marek Nelson (mgnelson)
Moderator Username: mgnelson
Post Number: 167 Registered: 07-2007
| Posted on Thursday, December 10, 2009 - 05:12 pm: | |
I am not familiar with using the "open" utility. When I try to pass the -R option through "open", it reports that it can't find the file "-R", so I don't know how you are getting the switch to FlexPDE in the first place. It also appears that FlexPDE does not open the file named with "open" just as it does not open a double-clicked file. So, you will have to run FlexPDE from the command line directly, not using "open". When I run FlexPDE directly (not using "open") I have no such error : > /Applications/FlexPDE5/flexpde5.app/Contents/MacOS/flexpde5 -R filename You don't need to use the -R switch, that just automatically runs the file. If you omit the -R switch FlexPDE will just open the file. Also, you do not need to include the .pde extension in the filename. A list of command line switches for FlexPDE can be found in the Help index under "command line switches". The switches are case insensitive, so both -R and -r will work.
|
Joh. Roedel (johroedel)
Junior Member Username: johroedel
Post Number: 3 Registered: 12-2009
| Posted on Friday, December 11, 2009 - 04:33 am: | |
Right, it seems to me that "open" does actuallay the same as double clicking on an icon. for instance I can typen "open test.pde" and it starts flexpde (in this case I have to use the extension). The problem with the invalid switch does not appear if I start the program from the directory where the pde file is located, but not where the application bundle is installed. Actually, it is logical, to go that way. I simply misunderstood your first advice. Sorry. Thank you for the help! Now I can play with flexpde and scripts. I'm looking forward to post more serios problems ;-) Best regards |
|