Skip to content

Delphinus.Install.json

Vinícius Felipe Botelho Barbosa edited this page Sep 9, 2021 · 12 revisions

Delphinus.Install.json

This file specifies steps needed for the installation.

⚠️ Because GitHub is case-sensitive all of the file names must match EXACTLY.

An example content can look like this:

{
        "search_pathes": 
	[
		{
			"pathes": "Core;Core\\Interfaces",
			"platforms": "Win32;Win64;OSX32"
		}
	],
	"browsing_pathes": 
	[
		{
			"pathes": "Core;Core\\Interfaces",
			"platforms": "Win32;Win64;OSX32"
		}
	],
	
	"source_folders":
	[
		{
			"folder": "source",
			"base": "source",
			"recursive": true,
			"filter": "*;*.*"
		}
	],

    "raw_folders":
    [
        {
            "folder": "DelphiXEBinaries"
        }
    ],
	
	"projects":
	[
		{
			"project": "Packages\\DelphiXE6\\MyGroupProject.Groupproj"
		}
	],

    "experts":
    [
           {
                   "expert": "MyExpert.dll"
           }
    ]
}

search_pathes

Specifies an array of path-entries which are added to the global Search Path in the IDE

pathes: contains the pathes, relative to the source folder(see source_folders), seperated by semicolon ";".

platforms: Specifies the platforms, to add the specified pathes to. If you do not specify this, Win32 is assumed. Currently supported values:

  • Win32
  • Win64
  • OSX32
  • OSX64
  • Android
  • Android64
  • IOSDevice32
  • IOSDevice64
  • Linux64

The identifiers used here, are the same as from a DelphiProject-Files Platforms section.

browsing_pathes

same as search_pathes but adds the specified pathes to the global Browsing Path in the IDE

source_folders

specifies the folders and their files to copy into the source-subdirectory of the installation

folder: specifies the relative path of a folder in your repository to copy into the source-subdirectory

base: specifies the base-part of your relative path, which is cut off. This is usefull if your source is already stored in a subdirectory of your repository called "source". This would lead to a targetpath like (InstallarionDirectory)\source\source, where the first "source" is the components source-folder, and the second one comes from your repository. Example to avoid this:

"folder": "source\\Core",
"base": "source"

this will copy the folder Source\Core to (InstallationDirectory)\source\core

recursive: specifies if it iterates through all subdirectories

filter: specifies a list of filters seperated by semicolon ";" to tell which files to copy. You can use stars "*" as Wildcards, to specify simple masks, like ".pas" or ".dfm". Internally the Delphi function MatchesMask is used.

raw_folders

Allows you to import precompiled binaries (Exe, DLL, BPL, etc). In case you want to distribute a Project which is closed source, this is the way to go.
folder:
Specifies the root folder for importing files. From there it will expect these subfolders:

  • lib
  • bin
  • dcp
  • bpl
  • designbpl

In each of those subfolders(if you use them) you add a subfolder for each Platform you want to import. The folders have the name of the platform. In those Platformfolders, you add your binaries. Each of the folders above has a specific set of rules:

lib
Will copy all files to the components lib-directory, recursive. Folder structure is preserved.

bin
Will copy all files to the components bin-directory, recursive. Folder structure is preserved.

dcp
Will copy all files to Delphis dcp-directory, not recursive. Subfolders are skipped.

bpl
Will copy all files to Delphis bpl-directory, not recursive. Subfolders are skipped.

designbpl
Will copy *.bpl files to Delphis bpl-directory and register them, not recursive, supports only Win32. Subfolders are skipped.

If you want to import a Win32-DLL for registering it as an expert, for example, it will look like this:

YourFolder\Bin\Win32\MyExpert.dll

projects

Specifies a list of projects to compile. If a project is a package, the path of the precompiled DCUs is added to the search_pathes before any other specified search_pathes. If a package includes the Designtime-Flag, it's automatically installed for the IDE. A Project is compiled for the enabled platforms in its Project-File (if no platform is specified, like for XE, Win32 is assumed)

project: specifies a path to a .dproj Project-File or a .groupproj GroupProjectfile relative to the Source-Folder of the directory the component is installed to.

experts

Allows you to register IDE-Experts. Experts are registered with their binary-name.

expert:
Specifies the DLL to register as IDE-Expert. Delphinus looks for this file into the Win32-Binary-Folder of a Componentinstallation. The binary must either be generated by compiling a Project under projects or by importing it using raw_folders

hot_reload: (Default is False)
Specifies if the IDE-Expert can be loaded/unloaded at any given time. If TRUE, Delphinus will load/unload the Expert right after installation/uninstallation. Otherwhise the user will be notified to restart his IDE.

⚠️ IMPORTANT
The default value is FALSE not without a reason. To support hot_reload you must carefully clean up everything in your TerminateWizardProc. Do not set it to true under the following conditions:

  • You don't know what you are doing
  • You did some runtimepatches to the IDE
  • You registered a Wizard using the RegisterWizardProc given as parameter in the Initialization

If you still think it is an option for you, please test it carefully.

Info: For all elements of search_pathes, browsing_pathes, source_folders, raw_folders, projects and experts, the properties compiler_min, compiler_max (to specify a range, see info.json) and compiler (to specify a specific version) are supported. These allow you to specify specific compilers for each element which results in skipping of an element if the compiler version does not fit.

Clone this wiki locally