Re: Package location for runtime executable
From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 12/12/03
- Next message: Peter Below (TeamB): "Re: Deleting a directory containing files"
- Previous message: Peter Below (TeamB): "Re: Create Forms via Parameter"
- In reply to: Al Vas: "Package location for runtime executable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 12 Dec 2003 12:19:09 +0100
In article <3fd91e18@newsgroups.borland.com>, Al Vas wrote:
> I'm thinking this is not possible but will ask anyway. Now that I am
> packaging bpl files (due to resource limitation in Win9x), I have found
> there are quite a number due to using alot of third-party components. These
> sit in the exe directory. I was wondering if it is possible to put these in
> a sub-directory and somehow tell the executable to look in its sub-directory
> for bpl files. I am guessing no, because as part of the exe startup, it
> searches for the presence of all these bpl files, so you cannot place code
> that will run within the exe, that will specify a sub-directory.
Well, it is in fact the OS that does the searching, not the EXE. Packages and
DLLs are loaded before the first line of code executes in the host EXE.
As mentioned in other replies you could add your package directory to the
PATH, but that is not as easy as it sounds under Win32. MOst installer
packages offer the needed functionality, though.
However, there is another more app-specific way to handle this. An application
can (and actually should) be registered in the Windows registry under the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
registry key. Create a key under this key using your applications EXE name.
The default value of this key is the full pathname of the application. But you
can add another value named "Path", which specifies a folder that should be
added to the DLL search path for this application only. That is where you
would specify your package directory.
Look at the entry for Delphi32.exe to see an example.
> Alternatively, can I somehow make one bpl file out of many to reduce the
> number of files floating around?
Only if you have the source code for the units that should go into the
packages. Also read the licence statements for the 3rd-party stuff you want to
package this way. Sometimes you are restricted to distribute only the
manufacturers original packages and not allowed to make your own.
-- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be
- Next message: Peter Below (TeamB): "Re: Deleting a directory containing files"
- Previous message: Peter Below (TeamB): "Re: Create Forms via Parameter"
- In reply to: Al Vas: "Package location for runtime executable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|