Imagine MemoryEx LH Compiler (Free Version) Overview
DownloadVersion 2.0.1.0-AMS9
The Imagine MemoryEx LH Compiler is an editor and compiler producing Lua Header files compatible with the MemoryEx Action Plugin, version 2 or higher. IMXLH takes strict Lua and one or more chunks of assembly script, and produces a small file that can be loaded by MemoryEx.
This is the free version of IMXLH which is identical to the donation version. The donation version is still in existence so that people can support Imagine Programming and future development of free software.
Check out the donation version if you want to support Imagine Programming
The Lua is compiled and obfuscated, and the assemblies are assembled and ready for execution. An LH's source-code can define constants, functions, structures, tables and assemblies in various scopes. The assemblies and functions sections will register the assembled ASM code and the functions to the value MemoryEx.LoadLH returns. Both assemblies and functions can be called immediately.
Each value in the registered sections will also be verified. For regular Lua the syntax will be checked, the structures in the structures section will be verified and checked if they are correct and the assembly's syntax will be checked.
MemoryEx and IMXLH also support a two-way verification process to ensure that you know for sure what LH file you load, and to prevent other applications from loading LH files you only want to be loaded by your software. In MemoryEx.LoadLH, you can specify a CRC32 checksum the to be loaded file should produce, if this checksum doesn't match, the LH file won't load. IMXLH supports a verification directive, allowing you to specify information the loading application should contain. If this information does not match, the LH file won't load. The verification process is optional, but recommended for project code.
Features
Feature | Description |
---|---|
Create re-usable compiled code | Using IMXLH, you can compile functions, structures, constants and assemblies for a single project, or create libraries you can use over and over again. These LuaHeader files, are basically definition files and function libraries for MemoryEx and Lua. |
Compile and obfuscate | IMXLH is using a customized compilation process for Lua code, the Lua source code is compiled and each chunk is compressed. None of the original source code is stored in the LH file. This means when MemoryEx.LoadLH loads an LH file, there won't be any source code in the memory buffers, which isn't the case with regular usage of AMS. |
A smaller footprint | The MemoryEx plugin and all the Lua in AMS projects may consume some drive space, especially if you have much code calling Windows API functions. That's why a compiled LH file shouldn't be a large one, IMXLH produces very small output containing all the information you have put in it. For example, a 412 KiB Lua file has been reported to compile to a 72 KiB product. |
Portability | Even though the code you may use in your LH file may be OS dependant, the LH system and MemoryEx is not. Every LH file will load on operating systems equal to or greater than Windows 2000. The assembled assemblies are also very portable, considering they are just instructions and memory operations. If you use dependencies, an assembly may be OS dependant. |
Lightweight editor | IMXLH comes with an editor, this editor is using the Scintilla control and a custom tab system to allow multiple opened scripts. The IMXLH Editor immediately reports back to you at compilation / syntax check moments. |
Customizable script editor | In the settings window of the editor, you can specify a custom font, tab size / tab method and colors for the Lua syntax highlighting. IMXLH comes with a few predefined syntax configurations, including the AMS default colors. |
Smart auto-complete system | As you type, the IMXLH editor will automatically suggest possibilities for the rest of your word or sentence. This auto-completion system is filled with functions and constants. If AMS is installed and the settings for this are not changes, IMXLH will automatically index all actions from Action Plugins and AMS action files. |
Smart help system | If AMS is installed, the IMXLH editor will index all Action Plugin help files and AMS documentation. If you press F1, IMXLH will check what word is at your current working position. If this is an action from a plugin, it will open the documentation for it (if it has any). If it is an action from AMS, it will open the AMS Help Topic on that action. It will open the IMXLH documentation by default, if no other documentation reference was found. |
Clever debugger and compiler | The compiler in IMXLH checks all sections for valid values, it will check the structures, functions, globals and assemblies. It will check if the syntax is correct and report back if it is not, describing in detail what syntax error occurred. It will also check the syntax for each assembly chunk in the source, once again reporting back on syntax errors or invalid symbols/instructions. It will also try to load the specified dependencies and report back if a dependency could not be found, or a function in a library could not be found. |
Quick template code | Using the edit menu, or Control + I, you can quickly insert a default temlate code using all sections of the LH format. This way, you can always be sure about correct syntax and what you can implement. In the edit menu, there is also an entry for a verification section template. |
Verification sections | IMXLH supports a verification section in each script. This section can be filled with certain data, when the application loading the LH file does not meet these verification fields, the LH file will not load. This verify section can verify version information, global variables that have to exist, their values and types, the main window title, the name of the current page and objects that have to exist on the current page. None of these values will be stored in the LH file! |
Public info and the finfo section | IMXLH also supports a field specifying which entries in the LH file are public. This means that, in a future LH viewer, only these entries will show up with additional information you provide. |
Flat-assembler | There is also a flat assembler implemented in IMXLH, however this assembler assembles the code and inserts the machine-code in the compiled LH file. This means that after the LH file is loaded, you can call that block of instructions immediately. |
Commandline Compiler | It is possible to compile Lua files to LH files using the new CLI compiler. By typing the command imxlh-cli in cmd or a batch file, you can compile a file easily without having to specify many parameters specifying how to compile the file. |
LHMake | Part of the commandline compiler; create a makefile specifying each step of the compilation process. This way, you can compile a whole project of Lua files to LH files and run tools initializing and finalizing the compilation process. This repository includes an example of the implementation of the lhmake tool. |
Downloads
Filename | Version / Changelog | |
---|---|---|
imxlh2-setup-free-2.0.1.0-AMS9-AMS9.zip | Fri 30 Aug 2024, version 2.0.1.0-AMS9 - View changes. | Download |
imxlh2-setup-free-2.0.0.0-AMS9-AMS9.zip | Mon 26 Aug 2024, version 2.0.0.0-AMS9 - View changes. | Download |
imxlh-setup-free-1.3.0.0.exe | Wed 15 Mar 2017, version 1.3.0.0 - View changes. | Download |
Additional Information
Before trying things out yourself, it would be wise to read the documentation regarding this compiler as some operations can cause unwanted behaviour if not executed well. Also read the fASM documentation, before using the assembler.
At the moment, custom settings for the editor are not yet implemented. A future version will contain a settings dialog so you can customize the editor.
Compatibility Information
- This software requires a Windows operating system equal to or greater than Windows 2000.
- The LH files compiled with the IMXLH compiler can only be loaded with the MemoryEx Action Plugin, version 2 or greater.
Special credits
- MadDogDean - For helping me test the product and being the original inspiration for developing this work. Also for his time and thoughts on the editor and endless useful feedback!