Hi,
I recently produced a program with multiple libraries that I created. I INSTALLed them using the @dir$ pointer and created an .EXE file. I duly installed this in the relevant Program Files directory (to test) and ran it. The problem came when it tried to 'unpack' the library files in the relevant subdirectory. Like many, I have the Program Files directory limited to access to unknown programs. Although this is easily overcome, it brought up something I was unaware of. That is, that the .EXE file doesn't use the library files from within the program but has to unpack them first and store them within the subfolder. Although, as stated, this is easy for me to overcome, it may cause complications if the program is used by others. The @lib$ libraries seem to get stored in a temp folder which is not normally restricted, but not the @dir$ ones.
This sounds like a simple statement, but I would appreciate any advisory comments to my predicament. Currently, I have reverted back to having all the routines that are not found in the @lib$ folder placed directly in the main program file.
Matt
Running Compiled Program With INSTALL @dir$ +
Re: Running Compiled Program With INSTALL @dir$ +
Hi Matt,
As I understand it, @dir$ points to the folder from which the program was loaded, and files in that directory can be accessed without providing a path string. As such, the ONLY place such files could be put is in the same directory as the main program - or you could not access them in this way. That means that, if you are going to use @dir$ in a compiled program you will need to put the executable in a writeable directory.
So it seems to me you have three options:
1) put any accessory files in the lib folder (at least while you compile them) and use @lib$. Note that it can be in a subfolder, so you could gather together all the bits you want to embed, put them in a folder called something like "my_prog_resources" within the lib directory, and compile them from there. That way they are easy to tidy up afterwards, and they don't clutter up your lib folder forever.
2) Place and run your executable in a writeable folder.
3) Roll them all into one, as you are doing. Obviously that goes against the modular approach you are trying to take!
Hope that is helpful, even if not a solution...
D
As I understand it, @dir$ points to the folder from which the program was loaded, and files in that directory can be accessed without providing a path string. As such, the ONLY place such files could be put is in the same directory as the main program - or you could not access them in this way. That means that, if you are going to use @dir$ in a compiled program you will need to put the executable in a writeable directory.
So it seems to me you have three options:
1) put any accessory files in the lib folder (at least while you compile them) and use @lib$. Note that it can be in a subfolder, so you could gather together all the bits you want to embed, put them in a folder called something like "my_prog_resources" within the lib directory, and compile them from there. That way they are easy to tidy up afterwards, and they don't clutter up your lib folder forever.
2) Place and run your executable in a writeable folder.
3) Roll them all into one, as you are doing. Obviously that goes against the modular approach you are trying to take!
Hope that is helpful, even if not a solution...
D
-
- Posts: 114
- Joined: Mon 16 Apr 2018, 06:17
Re: Running Compiled Program With INSTALL @dir$ +
That is helpful, thanks, D.
I was unaware of option 1, thanks.
Matt
I was unaware of option 1, thanks.
Matt