that’s a very good question. I wonder if it’s possible by modifying the PATH variable, perhaps with a .bat file that modifys the PATH (adding the current directory/libs) and then loads the app
that’s how we are doing in on linux now (because it doesn’t even search for .so’s in the same directory) - we have a bash script that modifies that environment variable (LD_LIBRARY_PATH) and loads the app.
The problem with altering the PATH variable, is that I am not sure if that is a permanent thing, or if you would run into problems later on about that.
Another option might be loading the dlls explicitly in the code with a call to LoadLibrary, or LoadLibraryEx, but I’m not sure how that could work.
we’ll experiment a bit and see if something can work on that front.
take care!
zach
ps : 0F 0.03 (release) has a “data” directory for everything, that should clean things up alot too - we are thinking on the same lines
create a file “clickToLaunchApp.bat” to site side by side with the exe
the content of the bat file should look like this:
path = %PATH%;libs
openFrameworks.exe
change the exe name if necessary
now if you double click the .bat file, that app will look in the right place for the DLLs and run. If you click the exe itself, it doesn’t find them (because of the paths it looks for). The change to the environment variable (path) exists only as long as that console window is open.
When I run the bat file, the output is :
path = [my;system;paths];libs
openframeworks.exe not recognised.
I tried an absolute path too, but that doesn’t work.
The thing is, this bath file appends the path to the end of the path variable, so each time you run it, it adds another instance of the lib path to the end, if that makes sense. When I look in the environment variables via windows, it doesn’t list them though, but when i run the batch file from the command line, when it prints the path = it has many instances of libs.
It is essential to remember that any changes that are made in a command window only endure until the window is closed. For permanent changes, use the method discussed in another section.
A batch file is simply a text file with the extension .bat. You can edit a batch file with any text editor, or, if you are an amstrads’nostalgic go on **edit **command under MS Dos.
or
What should I put inside the bat file if it’s not same directory as exe?
To give you an answer about what to put in the bat file, we might need to know your folder structure. Type or paste your English text here and click on the “Check Text” button.