freelanceprogrammers.org Forum Index » Delphi
Windows 9x - Deployment
Joined: 24 Apr 2005
Posts: 12
Windows 9x - Deployment
Hi,
I have successfully deployed a simple P4D-application on Windows XP systems.
When I run the application on Windows 98, however, it complains it could not
find "Python24.dll", although it resides in the same directory as the
executable.
Copying the .dll into C:WindowsSystem or System32 does not make any
difference either.
Any ideas?
Thanks,
-Andreas
Joined: 29 Apr 2005
Posts: 103
Windows 9x - Deployment
> I have successfully deployed a simple P4D-application on Windows XP
> systems.
Great!
> When I run the application on Windows 98, however, it complains it could
> not
> find "Python24.dll", although it resides in the same directory as the
> executable.
>
> Copying the .dll into C:WindowsSystem or System32 does not make any
> difference either.
>
> Any ideas?
Yes, try to set the property DllPath of TPythonEngine in the OnBeforeLoad
event:
PythonEngine1.DllPath := ExtractFilePath(Application.ExeName)
Hope that helps,
Morgan
Joined: 24 Apr 2005
Posts: 12
Windows 9x - Deployment
I had already set the DllPath property to the application directory for
testing purposes, with the same result: It makes no difference ...
-Andreas
----- Original Message -----
From: "Morgan Martinet" <yahoo@...>
To: <pythonfordelphi@yahoogroups.com>
Sent: Sunday, May 01, 2005 5:54 PM
Subject: RE: [pythonfordelphi] Windows 9x - Deployment
>> I have successfully deployed a simple P4D-application on Windows XP
>> systems.
> Great!
>
>> When I run the application on Windows 98, however, it complains it could
>> not
>> find "Python24.dll", although it resides in the same directory as the
>> executable.
>>
>> Copying the .dll into C:WindowsSystem or System32 does not make any
>> difference either.
>>
>> Any ideas?
> Yes, try to set the property DllPath of TPythonEngine in the OnBeforeLoad
> event:
> PythonEngine1.DllPath := ExtractFilePath(Application.ExeName)
>
> Hope that helps,
>
> Morgan
>
>
>
>
>
> To Post a message, send it to: pythonfordelphi@eGroups.com
>
> To Unsubscribe, send a blank message to:
> pythonfordelphi-unsubscribe@eGroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
Joined: 29 Apr 2005
Posts: 103
Windows 9x - Deployment
> I had already set the DllPath property to the application
directory for
> testing purposes, with the same result: It makes no difference ...
Can you make sure that in the following
code:
procedure TPythonEngine.DoOpenDll(const
aDllName : String);
var
i : Integer;
begin
if UseLastKnownVersion then
for i:=
Integer(COMPILED_FOR_PYTHON_VERSION_INDEX) to High(PYTHON_KNOWN_VERSIONS) do
begin
FDLLHandle := LoadLibrary(PChar(GetDllPath+PYTHON_KNOWN_VERSIONS[i].DllName));
[…]
The expression in red is your expected
filename???
Maybe DllPath was not properly assigned
when DoOpenDll was executed?
Otherwise, try to write a simple Delphi app that would try to execute LoadLibrary with the
same information in Win98…
Bye,
Morgan
Joined: 01 May 2005
Posts: 7
Windows 9x - Deployment
Hi Andreas
Hmmm...which 98 is it? First or Second Edition?
Could you run Dependency Viewer, http://www.dependencywalker.com/ on
your app? It shows the order in which everything is loaded, and the
paths, so it might give a clue!
Rich
Morgan Martinet wrote:
> I had already set the DllPath property
to the application
directory for
> testing purposes, with the same result:
It makes no difference ...
Can you make
sure that in the following
code:
procedure
TPythonEngine.DoOpenDll(const
aDllName : String);
var
i : Integer;
begin
if
UseLastKnownVersion then
for i:=
Integer(COMPILED_FOR_PYTHON_VERSION_INDEX) to
High(PYTHON_KNOWN_VERSIONS) do
begin
FDLLHandle
:= LoadLibrary(PChar(GetDllPath+PYTHON_KNOWN_VERSIONS[i].DllName));
[…]
The expression
in red is your expected
filename???
Maybe DllPath
was not properly assigned
when DoOpenDll was executed?
Otherwise, try
to write a simple Delphi app that
would try to execute LoadLibrary with the
same information in Win98…
Bye,
Morgan
To Post a message, send it to: pythonfordelphi@eGroups.com
To Unsubscribe, send a blank message to:
pythonfordelphi-unsubscribe@eGroups.com
Joined: 24 Apr 2005
Posts: 12
Windows 9x - Deployment
I did. The path is exactly the same on both operating systems (XP + 98SE).
-Andreas
----- Original Message -----
From: Morgan Martinet
To: pythonfordelphi@yahoogroups.com
Sent: Sunday, May 01, 2005 7:09 PM
Subject: RE: [pythonfordelphi] Windows 9x - Deployment
> I had already set the DllPath property to the application directory for
> testing purposes, with the same result: It makes no difference ...
Can you make sure that in the following code:
procedure TPythonEngine.DoOpenDll(const aDllName : String);
var
i : Integer;
begin
if UseLastKnownVersion then
for i:= Integer(COMPILED_FOR_PYTHON_VERSION_INDEX) to
High(PYTHON_KNOWN_VERSIONS) do
begin
FDLLHandle :=
LoadLibrary(PChar(GetDllPath+PYTHON_KNOWN_VERSIONS[i].DllName));
[.]
The expression in red is your expected filename???
Maybe DllPath was not properly assigned when DoOpenDll was executed?
Otherwise, try to write a simple Delphi app that would try to execute
LoadLibrary with the same information in Win98.
Bye,
Morgan
To Post a message, send it to: pythonfordelphi@eGroups.com
To Unsubscribe, send a blank message to:
pythonfordelphi-unsubscribe@eGroups.com
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/pythonfordelphi/
To unsubscribe from this group, send an email to:
pythonfordelphi-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 24 Apr 2005
Posts: 12
Windows 9x - Deployment
Hi Richard,
Windows 98SE (see the Dependency Walker log for more details). I created the
following console application:
######################
program Py9x;
{$APPTYPE CONSOLE}
uses
SysUtils, PythonEngine;
var
PyEngine: TPythonEngine;
begin
PyEngine := TPythonEngine.Create(nil);
PyEngine.PyFlags := [pfIgnoreEnvironmentFlag];
PyEngine.LoadDll;
PyEngine.Free;
WriteLn(`Done.`);
ReadLn;
end.
######################
It runs fine on XP systems, but fails with the same error "Python24.dll
could not be found" on my 98SE system. Here is the log file:
######################
--------------------------------------------------------------------------------
Starting profile on 01.05.05 at 14:36:05
Operating System: Microsoft Windows 98 (32-bit), version 4.10.2222 A (Second
Edition)
Program Executable: c:expPY9X.EXE
Program Arguments:
Starting Directory: C:Exp
Search Path: C:WINDOWS;C:WINDOWSCOMMAND
Options Selected:
Simulate ShellExecute by inserting any App Paths directories into the
PATH environment variable.
Log DllMain calls for process attach and process detach messages.
Hook the process to gather more detailed dependency information.
Log LoadLibrary function calls.
Log GetProcAddress function calls.
Log debug output messages.
Automatically open and profile child processes.
--------------------------------------------------------------------------------
Started "PY9X.EXE" (process 0xFFFD7CDF) at address 0x00400000. Successfully
hooked module.
Loaded "OLE32.DLL" at address 0x7FF20000. Successfully hooked module.
Loaded "OLEAUT32.DLL" at address 0x7FE80000. Successfully hooked module.
Loaded "ADVAPI32.DLL" at address 0xBFE80000. Shared module not hooked.
Loaded "GDI32.DLL" at address 0xBFF20000. Shared module not hooked.
Loaded "USER32.DLL" at address 0xBFF50000. Shared module not hooked.
Loaded "KERNEL32.DLL" at address 0xBFF70000. Shared module not hooked.
Entrypoint reached. All implicit modules have been loaded.
Injected "DEPENDS.DLL" at address 0x08370000.
DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL" called.
DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL"
returned 1 (0x1).
DllMain(0x7FF20000, DLL_PROCESS_ATTACH, 0x00000001) in "OLE32.DLL" called.
DllMain(0x7FF20000, DLL_PROCESS_ATTACH, 0x00000001) in "OLE32.DLL" returned
1 (0x1).
DllMain(0x7FE80000, DLL_PROCESS_ATTACH, 0x00000001) in "OLEAUT32.DLL"
called.
GetProcAddress(0xBFF70000 [KERNEL32.DLL], "IsTNT") called from
"OLEAUT32.DLL" at address 0x7FE8D0C2 and returned NULL. Error: Das
angegebene Modul wurde nicht gefunden (126).
GetProcAddress(0xBFF70000 [KERNEL32.DLL], "IsProcessorFeaturePresent")
called from "OLEAUT32.DLL" at address 0x7FE8DF0D and returned 0x82B2CA88.
DllMain(0x7FE80000, DLL_PROCESS_ATTACH, 0x00000001) in "OLEAUT32.DLL"
returned 1 (0x1).
DllMain(0x7FE80000, DLL_PROCESS_DETACH, 0x00000001) in "OLEAUT32.DLL"
called.
DllMain(0x7FE80000, DLL_PROCESS_DETACH, 0x00000001) in "OLEAUT32.DLL"
returned 1 (0x1).
DllMain(0x7FF20000, DLL_PROCESS_DETACH, 0x00000001) in "OLE32.DLL" called.
DllMain(0x7FF20000, DLL_PROCESS_DETACH, 0x00000001) in "OLE32.DLL" returned
1 (0x1).
DllMain(0x08370000, DLL_PROCESS_DETACH, 0x00000001) in "DEPENDS.DLL" called.
DllMain(0x08370000, DLL_PROCESS_DETACH, 0x00000001) in "DEPENDS.DLL"
returned 1 (0x1).
Exited "PY9X.EXE" (process 0xFFFD7CDF) with code 1 (0x1).
######################
Thanks for your help!
-Andreas
----- Original Message -----
From: Richard Wright
To: pythonfordelphi@yahoogroups.com
Sent: Sunday, May 01, 2005 8:07 PM
Subject: Re: [pythonfordelphi] Windows 9x - Deployment
Hi Andreas
Hmmm...which 98 is it? First or Second Edition?
Could you run Dependency Viewer, http://www.dependencywalker.com/ on your
app? It shows the order in which everything is loaded, and the paths, so it
might give a clue!
Rich
Morgan Martinet wrote:
> I had already set the DllPath property to the application directory for
> testing purposes, with the same result: It makes no difference ...
Can you make sure that in the following code:
procedure TPythonEngine.DoOpenDll(const aDllName : String);
var
i : Integer;
begin
if UseLastKnownVersion then
for i:= Integer(COMPILED_FOR_PYTHON_VERSION_INDEX) to
High(PYTHON_KNOWN_VERSIONS) do
begin
FDLLHandle :=
LoadLibrary(PChar(GetDllPath+PYTHON_KNOWN_VERSIONS[i].DllName));
[.]
The expression in red is your expected filename???
Maybe DllPath was not properly assigned when DoOpenDll was executed?
Otherwise, try to write a simple Delphi app that would try to execute
LoadLibrary with the same information in Win98.
Bye,
Morgan
To Post a message, send it to: pythonfordelphi@eGroups.com
To Unsubscribe, send a blank message to:
pythonfordelphi-unsubscribe@eGroups.com
To Post a message, send it to: pythonfordelphi@eGroups.com
To Unsubscribe, send a blank message to:
pythonfordelphi-unsubscribe@eGroups.com
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/pythonfordelphi/
To unsubscribe from this group, send an email to:
pythonfordelphi-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 29 Apr 2005
Posts: 103
Windows 9x - Deployment
Try the tool on the Python dll too!
From: pythonfordelphi@yahoogroups.com
[mailto:pythonfordelphi@yahoogroups.com]
On Behalf Of Richard Wright
Sent: May 1, 2005 2:08 PM
To: pythonfordelphi@yahoogroups.com
Subject: Re: [pythonfordelphi]
Windows 9x - Deployment
Hi Andreas
Hmmm...which 98 is it? First or Second Edition?
Could you run Dependency Viewer, http://www.dependencywalker.com/
on your app? It shows the order in which everything is loaded, and the
paths, so it might give a clue!
Rich
Joined: 24 Apr 2005
Posts: 12
Windows 9x - Deployment
Morgan, excellent idea. It revelead msvcr71.dll was missing on the Win98 SE
system. If it is present, the console application runs fine.
Is msvcr71.dll bundled with any Windows 9x updates or newer version of
Office? It`s relatively small (340 KB) and can easily be compressed to less
than half the size (148 KB), still curious though.
Thanks for all your help, highly appreciated!
-Andreas
----- Original Message -----
From: Morgan Martinet
To: pythonfordelphi@yahoogroups.com
Sent: Sunday, May 01, 2005 8:28 PM
Subject: RE: [pythonfordelphi] Windows 9x - Deployment
Try the tool on the Python dll too!
From: pythonfordelphi@yahoogroups.com
[mailto:pythonfordelphi@yahoogroups.com] On Behalf Of Richard Wright
Sent: May 1, 2005 2:08 PM
To: pythonfordelphi@yahoogroups.com
Subject: Re: [pythonfordelphi] Windows 9x - Deployment
Hi Andreas
Hmmm...which 98 is it? First or Second Edition?
Could you run Dependency Viewer, http://www.dependencywalker.com/ on your
app? It shows the order in which everything is loaded, and the paths, so it
might give a clue!
Rich
To Post a message, send it to: pythonfordelphi@eGroups.com
To Unsubscribe, send a blank message to:
pythonfordelphi-unsubscribe@eGroups.com
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/pythonfordelphi/
To unsubscribe from this group, send an email to:
pythonfordelphi-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 29 Apr 2005
Posts: 103
Windows 9x - Deployment
> Morgan, excellent idea. It revelead msvcr71.dll was missing on the Win98
> SE
> system. If it is present, the console application runs fine.
>
> Is msvcr71.dll bundled with any Windows 9x updates or newer version of
> Office? It`s relatively small (340 KB) and can easily be compressed to
> less
> than half the size (148 KB), still curious though.
>
> Thanks for all your help, highly appreciated!
I`m glad you could make it work!
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







