We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware,  Documentation,  Website Suggestions › Processing IDE: sharing PDE's among sketches
Page Index Toggle Pages: 1
Processing IDE: sharing PDE's among sketches (Read 1799 times)
Processing IDE: sharing PDE's among sketches
Mar 11th, 2010, 9:44am
 
Hi all (first post!),

I've written some PDE files with code that I would like to share
among a few projects (simple stuff, not worth the effort of making
a proper library). I'm just wondering what the best way of doing
this? My directory set up looks like something like this:

code/project1/project1.pde
code/project2/project2.pde
code/lib/shared.pde

I would like shared.pde to be shared by project1 and
project2. I've tried creating symlinks:

code/project1/shared.pde -> ../lib/shared.pde
code/project2/shared.pde -> ../lib/shared.pde

But sometimes the IDE overwrites the symlink with
an actual file (making keeping files in sync tricky,
especially since I have them under revision control
(subversion).

Any suggestions would be appreciated!

Best regards,
Chris
Re: Processing IDE: sharing PDE's among sketches
Reply #1 - Mar 11th, 2010, 11:42am
 
A long time ago, I made a suggestion to allow putting simple .pde files (or .java ones) in a shared source folder, with perhaps some syntax to indicate we want one (or more) of those.
Currently, you have to pack your file(s) in a jar file to use them as a library, which is annoying if the file is still in progress.
Windows users doesn't even have the luxury to use a symlink...
Re: Processing IDE: sharing PDE's among sketches
Reply #2 - Mar 11th, 2010, 12:30pm
 
as far as i know its possible :
http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/

this probably make it easier to use :
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
Re: Processing IDE: sharing PDE's among sketches
Reply #3 - Mar 11th, 2010, 12:57pm
 
I knew I should have written "out of the box" or "without utilities"... Smiley
But well, I didn't know they added a command in Vista and this shell extension seems interesting, so thanks for the info, Cedric!
Re: Processing IDE: sharing PDE's among sketches
Reply #4 - Mar 11th, 2010, 4:16pm
 
Try making hard links to the files instead of a symbolic link; if you are lucky it will "modify" the hardinked files rather than create a new file to replace the existing link each time. This will allow you to keep the "copies" synchronised, at least. Maybe it is easiest to just take a copy of the not-quite-library files; new features aren't going to be needed in old sketches anyhow, and version problems will be "solved" by the necessary version always being in the folder it is needed.

With regards to linking under Windows, I've used NTFS Link for several years now. I don't know how I'd do without it.

-spxl
Re: Processing IDE: sharing PDE's among sketches
Reply #5 - Mar 14th, 2010, 12:39pm
 
Thanks for the advice -- unfortunately the IDE severs the hard links on save as it did with the soft links.

Cheers,
Chris
Page Index Toggle Pages: 1