Skip to content

0.9.4

Compare
Choose a tag to compare
@trevordevore trevordevore released this 29 Apr 19:48
· 16 commits to develop since this release
  • Set mapping for libraries in extension’s code folder. See notes below.
  • Allow files/folders packaged with helper to specify destination. See notes below.
  • Add Windows x86-64 to list of standalone builder platforms.
  • Add processor awareness to packager.
    Accounts for windows 64-bit builds and allows the package files and package folders sections of a helper.yml file to specify if file should be included with 32 or 64 for architecture for a platform.
  • Stop using kAppStackname when unloading app.
    If the app tried to quit on Windows by returning false from InitializeApplication the executable would remain open in the background and would be listed under Background processes in the Task Manager.
  • Report errors if a copy files section file can't be read in during packaging.
  • [Undo Manager] Target codepoint 1 so that multi-codepoint chars don’t throw an error.
  • [Window Manager] Check for a valid number, not for empty.

Set mapping for libraries in extension’s code folder

An extension can use a third party library (.dylib, .so, .dll, .framework, etc.). If it does then the library is placed in subfolder of a ./code folder for development and in the ./Externals folder when packaged. This update supports automatic loading of libraries. This is primarily used in helpers.

An extension definition can now include a code key which is a list. Each element is the name of the library to load, with or without the extension. If the extension is not provided then it will be guessed depending on the platform the applciation is running on. Using the library name, laodExtensionCode will figure out the correct path and set the revLibraryMapping[libraryname] property to the full path to the library. This is what allows FFI to resolve bindings in the LCB code.

Examples from helper.yml files. This example tells Levure to map a libhunspell.dll file to the libhunspell library.

extensions:
  - filename: hunspell.lcm
    source: hunspell.lcb
    code:
      - libhunspell.dll
    platform: windows

This example will map libtidy.dylib, libtidy.so, or libtidy.dll to the libtidy library depending on which platform the app is running on.

extensions:
  - filename: htmltidy.lcm
    source: htmltidy.lcb
    code:
      - libtidy

Allow files/folders packaged with helper to specify destination

package files and package folders in a helper.yml file can now include a destination key. This is useful for extension libraries that need to be copied to the ./Externals folder when packaging.

Example 1:

package files:
  - filename: code/x86-win32/WinSparkle.dll
    destination: ./Externals
    platform: windows
    architecture: 32
package folders:
  - filename: code/x86_64-mac/Sparkle.framework
    destination: ./Externals
    platform: macos

Example 2:

package files:
  - filename: code/x86-win32/libhunspell.dll
    destination: ./Externals
    platform: windows
    architecture: 32
  - filename: code/x86_64-win32/libhunspell.dll
    destination: ./Externals
    platform: windows
    architecture: 64