Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
pyscripter edited this pageApr 15, 2020 ·2 revisions

Using P4D with Python 2.6, 3.0

Note: This appears to no longer be an issue with recent versions of Python.

Python 2.6 and Python 3.0 rely on Microsoft C++ dynamic link libraries which are installedusing Side by Side installation and are no longer placed in the Windows System32directory.

This affects Delphi programs using P4D. The problem that will occur is that you willnot be able to load c-extensions such as _socket.pyd,_ctypes.pyd and the importing ofmodules such socket and ctypes will fail.

To resolve this you need to add a manifest to your Delphi application. Here is anexample of the manifest file that PyScripter uses.

FileXP_UAC.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">  <assemblyIdentity    version="1.0.0.0"    processorArchitecture="*"    name="PyScripter"    type="win32"/>  <dependency>    <dependentAssembly>      <assemblyIdentity        type="win32"        name="Microsoft.Windows.Common-Controls"        version="6.0.0.0"        processorArchitecture="*"        publicKeyToken="6595b64144ccf1df"        language="*"/>    </dependentAssembly>  </dependency>  <dependency>    <dependentAssembly>      <assemblyIdentity        type="win32"        name="Microsoft.VC90.CRT"        version="9.0.21022.8"        processorArchitecture="x86"        publicKeyToken="1fc8b3b9a1e18e3b"        language="*"/>    </dependentAssembly>  </dependency>    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">    <security>      <requestedPrivileges>        <requestedExecutionLevel level="asInvoker"/>      </requestedPrivileges>    </security>  </trustInfo>  <asmv3:application>    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">      <dpiAware>true</dpiAware>    </asmv3:windowsSettings>  </asmv3:application></assembly>

The key here is the dependency on Microsoft.VC90.CRT.

To use this manifest in Delphi you need to create a file say

FileXP_UAC.rc

1 24 ".\XP_UAC.manifest"

then compile the file ito XP_UAC.res using brcc32.exe and link the resulting file into your application.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp