简体   繁体   English

Delphi Xe2软件包x64

[英]Delphi Xe2 Package x64

Let's admit, I create new package in Delphi Xe2. 让我们承认,我在Delphi Xe2中创建了新软件包。 I keep under a name "My". 我的名字叫“我的”。 I add a simple component "MyComponent". 我添加了一个简单的组件“ MyComponent”。 I compile, I receive file Bpl in C:\\Users\\Public\\Documents\\RAD Studio\\9.0\\Bpl\\My.bpl. 我编译后,在C:\\ Users \\ Public \\ Documents \\ RAD Studio \\ 9.0 \\ Bpl \\ My.bpl中收到文件Bpl。

I add a platform "Win x64". 我添加一个平台“ Win x64”。 I compile, I receive C:\\Users\\Public\\Documents\\RAD Studio\\9.0\\Bpl\\Win64\\My.bpl. 我编译后,收到C:\\ Users \\ Public \\ Documents \\ RAD Studio \\ 9.0 \\ Bpl \\ Win64 \\ My.bpl。

...\\Bpl\\Win64\\My.bpl to establish as new package does not give, writes "is not windows x32 applications". ... \\ Bpl \\ Win64 \\ My.bpl建立为新包不给,写“不是Windows x32应用程序”。 The first is established normally and on a palette the component appears "MyComponent". 第一个正常建立,并且在组件上的组件显示为“ MyComponent”。 If to bring to are mute the index of a mouse will appear hint where it will be written, that it x32-compatible. 如果要静音,则鼠标索引将显示将其写入的位置的提示,表明它与x32兼容。 And at native component Delphi - at all x32-64 compatible. 并且在本机组件Delphi中-在所有x32-64兼容。 Together with a disk to Xe2 there is a free disk with Free and Tral components if to put therefrom for example OverByteIcs or Ip*Works, that at them at all components will be 32-64х compatibility. 连同Xe2的磁盘一起,如果有Free和Tral组件(例如OverByteIcs或Ip * Works),则还有一个空闲磁盘,它们在所有组件上的兼容性均为32-64х。

Questions: 1. How to establish the x64 the version package? 问题:1.如何建立x64版本软件包? 2. How to achieve, that the component had a compatibility 32-64, and not just 32? 2.如何实现该组件具有32-64的兼容性,而不仅仅是32?

PS Bad English language: ON PS不良英语:ON

The Delphi IDE is 32 bit and so can only load 32 bit designtime packages. Delphi IDE是32位的,因此只能加载32位的设计时程序包。 You can of course create 64 bit runtime packages. 您当然可以创建64位运行时程序包。

Has earned, has understood! 已赚,已了解!

  1. We create empty package 我们创建空包
  2. We add the component, for example Button and it is specified what platforms for a component ( the key moment are necessary! ) 我们添加了组件,例如Button,并指定了组件的平台( 关键时刻必不可少!

Example

unit GuButton;

interface

uses
  System. SysUtils, System. Classes, Vcl. Controls, Vcl. StdCtrls;

type
  [ComponentPlatformsAttribute (pidWin32 or pidWin64)] // !!!!!!!!!!!!!!!
  TButtonGu = class (TButton)
  private
    {Private declarations}
  protected
    {Protected declarations}
  public
    {Public declarations}
  published
    {Published declarations}
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents (' Gu ', [TButtonGu]);
end;

We keep, we compile under x32. 我们保持,我们在x32下编译。 We add a platform x64 (in options should be registered, that directories under platforms different). 我们添加了一个平台x64(在应注册的选项中,该目录与平台下的目录不同)。 We compile under x64. 我们在x64下编译。 We receive 2 BPL (as in the first question). 我们收到2 BPL(与第一个问题一样)。 We establish x32. 我们建立x32。 We look - new component ButtonGu - 32-64 compatible was added. 我们看-新组件ButtonGu-添加了32-64兼容。

Here I that wanted, all thanks. 在这里,我想要的,非常感谢。 In addition http://docwiki.embarcadero.com/RADStudio/en/64-bit_Cross-Platform_Application_Development_for_Windows 此外, http://docwiki.embarcadero.com/RADStudio/zh/64-bit_Cross-Platform_Application_Development_for_Windows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM