メインコンテンツまでスキップ
バージョン: 次へ

Create deployment license

履歴
リリース内容
20 R10New autoLicenseTarget parameter
20追加

Create deployment license ( mergedApp ; autoLicenseTarget ) : Object
Create deployment license ( mergedApp ; buildLicense {; oemLicense} ) : Object

引数説明
mergedApp4D.FolderFolder containing the merged application
autoLicenseTargetIntegerTarget license for automatic license embedding
buildLicense4D.FileLicense required to generate the embedded license
oemLicense4D.File4D OEM XML Key license if server license
戻り値Objectステータス

説明

The Create deployment license command creates an embedded license file in the Licenses folder of the mergedApp built application. If the Licenses folder does not exist in the mergedApp folder, it is created by the command.

In mergedApp, pass a 4D.Folder object containing a reference to the folder containing the built application in which you want to embed a license.

Depending on the second parameter, you let 4D select automatically the license to use for the target or designate the license(s) to use.

Automatic license selection

If you pass the autoLicenseTarget parameter, you let 4D find and use the most appropriate license for the specified target. For more information on the automatic license selection, please refer to the Build application section.

The following constants are supported in the autoLicenseTarget parameter:

定数説明
4D Volume Desktopの場所1Create automatically a license for a 4D single-user application
4D Server5Create automatically a license for a 4D Server application

If no valid license is found, an error is generated.

Designating the license(s) to use

In license, pass a 4D.File object containing a reference to the license file used to generate the embedded license.

In the non-automatic mode, if the build requires a specific OEM license (4D OEM XML Keys) and if no such license is already installed in the Licenses folder of the building machine, you need to pass it using the oemLicense parameter. This parameter is useful if you dedicate a machine to build your applications.

戻り値

The command returns a status object containing the following properties:

プロパティDescription
successBooleanTrue if the license file has been generated
file4D.FileThe generated license file
statusTextTextDescription of the error if any
errorsCollectionエラーオブジェクトのコレクション
[].messageTextエラーメッセージ
[].errCodeNumberエラー番号
standaloneObject(only in automatic mode Description attributes for 4D Volume Desktop license
oemServerObject(only in automatic mode Description attributes for 4D Server OEM license
oemXMLKeyObject(only in automatic mode Description attributes for 4D Server XML Key license

Description attributes are:

プロパティDescription
absolutePlatformPathTextPath to the original license file retained
offerNameTextCommercial name of the license retained
productNumberNumberSerial number of the license retained
注記
  • The generated license must be used only with the application referenced by mergedApp.
  • It is necessary to regenerate the license each time the application is rebuilt.

例題 1

Use the automatic syntax to create a single-user 4D application:

 var $status : Object
 var $application : 4D.File
 $application:=Folder(fk desktop folder).folder("myApp.app")
 $status:=Create deployment license($application;4D Volume Desktop)

例題 2

Designate a license to use:

 var $status : Object
 var $application : 4D.File
 var $license : 4D.File
 $license:=Folder(fk licenses folder).file("4UUD200-xxx.license4D")
 $application:=Folder(fk desktop folder).folder("myApp.app")
 $status:=Create deployment license($application;$license)

参照

Blog post - Finalize an application with 4D commands

プロパティ

コマンド番号1811
スレッドセーフ