Codex Delphi Expert
- Is an expert that can be installed into the Delphi IDE
- Helps boost your productivity
- Installs under the Tools menu
- Is completely free
- Has an installer that can be obtained from the KastriFree project
- Supports Delphi 10.1 Berlin and Delphi Tokyo 10.2
The global options for Codex can be managed by clicking Tools|Codex|Options:
Available options are:
- Load last opened project – opens the project that was loaded last, prior to shutting down the Delphi IDE
- Show Favorites menu – Inserts a menu item in the File menu in Delphi called Favorites, and populates with the Favorite Files items managed with GExperts
- Delete .stat files – deletes .stat files generated by the IDE (at present, this function could be more reliable than it is)
- Adjust Project Options dialog size – automatically adjusts the height of the Project Options dialog, based on the available screen area
The old ACTED tool has been retired, and functionality has been migrated into Codex. The following items are available under the Android Tools menu:
Used for deleting binaries from source folders. Currently supports removal of .exe, .dcu and .o files.
Codex has menu items that provide shortcuts (including keyboard shortcuts) to pages in the Delphi IDE Options dialog, namely:
- Environment Variables
- SDK Manager
The Image Assets menu item enables when a project is opened in the IDE. It helps manage icons/splash screen images in the project options for mobile applications. Invoking Image Assets presents this dialog:
Image Assets uses the directory of the current project, and searches for images that match the sizes for the icon/splash images required for mobile apps. If the “Include subdirs..” checkbox is checked, it will also search in subdirectories. The path edit box or ellipsis button can be used to select a different directory.
The image assets required for mobile projects is listed on the left hand side, whilst the matching images that have been found are listed on the right. Clicking Apply will apply the images found to the project options of the current project. If the “Remove existing entries..” checkbox is checked, any existing entries (such as the default FMX entries) will be replaced with the found images.
LogCat Viewer (Android Tools) (added in v1.1.0, currently in beta)
Shows a non-modal window that behaves somewhat like Monitor, which comes with the Android SDK, in the tools folder below the SDK root (run using monitor.bat)
To start logging, select a connected device and click the Start logging button
Checking the Filter On Current Project checkbox filters messages based on the current project and is available if the project has the Android platform
Unchecking the Auto Scroll checkbox stops the grid from scrolling to the bottom automatically
SDK Frameworks Import (added in v1.1.0, currently in beta)
This function allows you to import new iOS and macOS SDK frameworks in “bulk”, i.e. other than having to add them manually, individually, to each SDK where they’re needed. If you have a number of frameworks that you use in a project that are not included by default, this can save a lot of time when a new SDK is released, or when upgrading to a new version of Delphi.
In order to use this function, you need to create an import file, which is basically the same as the .defaultsdkpaths files you will find in the bin folder of the Delphi installation, except that it contains only the frameworks that need to be imported. When installing Codex, an example import file: iOSSDKFrameworksImport.Example.xml, is installed into the \Users\Public\Documents\Codex\Common folder, and you can modify this file to suit your needs.
When using this function, the following dialog is presented:
The first tab is for importing into existing SDKs. This modifies the registry settings, so after importing, you will need to(unfortunately) restart Delphi, bring up the SDK Manager, and click the “Update Local Cache” button for each selected SDK.
The second tab is for importing into the SDK defaults files:
This is for creating new versions of the defaultsdkpaths files, which are used by Delphi when adding an SDK. The new files will ensure that the additional frameworks will be added when the SDK is added, so the local file cache will have the required files.
As far as is understood, the file shown selected in the picture above (i.e. iOSDevice.defaultsdkpaths) is used when an SDK is being imported that Delphi is yet to support, e.g. iOS 12 in Delphi Tokyo 10.2.3, so you may want to select that by default when importing new frameworks.
Unless you are running Delphi with elevated privileges, you will need to select an output folder which has the appropriate permissions. Once imported, the resulting file(s) can be copied into the bin folder of the Delphi installation when Windows may prompt you for permission to write to that folder.
In both importing for existing SDKs, and importing into default SDKs, you will be presented with a summary of results, indicating which imports succeeded.
If the “Show Favorites” global option is enabled, and there are Favorite Files configured using GExperts, Codex will insert a “Favorites” menu in the File menu:
The top item in the “Regular” submenu example above is a special case, which is a reference to a folder. Files that are added to GExperts’ Favorite Files entries that end in .fav will be treated as being a favorite for the folder in which the file is contained, e.g:
Clicking a favorite entry in the Favorites menu that represents a folder, will present a open file dialog for that folder.