Skip to content

Commit

Permalink
docs : updated build and Work in progress files.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickorr committed Jul 16, 2024
1 parent 24e677a commit 3854076
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 11 deletions.
24 changes: 13 additions & 11 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
###Building
## Building

The BE plugin consist of three parts : the plugin SDK from Claris, pre-built code from the open source libraries we use, and the BE code itself.

Whenn downloading the plugin from github, you must use a version of git that supports git-lfs.
When downloading the plugin from GitHub, you must use a version of git that supports git-lfs.

If you're unfamiliar with git-lfs, we recommend https://desktop.github.com as it will handle that for you.
We also recommend you start by cloning the branch you want to build directly as there are a lot of files to download
and that will save you switching branches to download a second time.

###Plugin SDK
### Plugin SDK

The SDK comes from Claris and to get the latest version, download the FileMaker External Plug-In API from the link at the very bottom of :

https://www.claris.com/resources/downloads/
[https://www.claris.com/resources/downloads/]

Mac : place the FMWrapper.framework in the BaseElements-Plugin/Libraries/macOS directory.

iOS : Needs to be documented.

Windows : place the FMWrapper directory inside the SDK's Headers directory in the Headers directory. The version of FMWrapper.lib in the Libraries\win64 should be placed the Libraries directory.

Ubuntu : Needs to be documented.
Ubuntu : Needs to be documented - TODO.

###Pre Built Open Source Libraries
## Pre Built Open Source Libraries

So you do not need to compile the individual libraries to compile the plugin. All the required built versions of the libraries are included in this repo.

Expand All @@ -32,25 +32,27 @@ However, if you'd like to help us with compiling the libraries as well, there is

https://github.com/GoyaPtyLtd/BaseElements-Plugin-Libraries

###BE Plugin specific code
These libraries are a rapid work in progress, see the [WorkInProgress](WorkInProgress.md) document in the Development branch for the current state of play, and where to help out.

## BE Plugin specific code

All changes to code are submitted to the Development branch which should always compile and pass the tests. From there new releases are made which go to the main branch.

If you want to submit a change to the plugin, the best way to do that is to fork the repo, make and test your changes and then create a pull request.

###Building the plugin
## Building the plugin

The code uses Xcode on the Mac, Visual Studio on Windows and CodeBlocks on Linux. ( CodeBlocks is launched with sudo, and although this should not be necessary it does seem to solve a lot of other issues. )

You will need your own certificates for Mac or Win versions, you can get a Mac Developer certificate from Apple, and the Windows Certificates from most certificate providers. You don't need the certificate to compile and test if you authorise the plugin to run in FileMaker Pro.

You should have FileMaker Pro installed before compiling as the project puts the final version in the Extensions folder to start testing with. ( install FMS on linux instead ).

###macOS
### macOS

Once you've cloned the branch you want, then you will need to configure the code signing in Xcode with your developer account. Open the Project/BaseElements.xcodeproj file in Xcode. Choose a target and compile for that target.

###Windows
### Windows

The plug-in was built using Windows 11 Professional and Visual Studio 2022.

Expand All @@ -60,7 +62,7 @@ Some notes for windows :
- Unicode is used rather than the multi-byte character set.
- When doing both debug and release builds clean the project when switching from one tp the other.

###Linux
### Linux

The plug-in was built using Code::Blocks 20.03 on Ubuntu 22.04.3 (64-bit). The BaseElements plug-in is built as a static library ( all third-party libraries are built from source as static libraries ).

Expand Down
44 changes: 44 additions & 0 deletions WorkInProgress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Work in Progress

This is mostly a note taking section where we document what is happening and where things are at so that the other documentation can be mostly around having a current state document.

The big thing we started a while back was to resolve an issue with the Boost library that needed to be updated. However the instructions we had were incomplete and outdated. We needed a full set of documents for anyone to be able to compile any library on any platform, and then incorporate their new library version into the main plugin repo.

So we started [https://github.com/GoyaPtyLtd/BaseElements-Plugin-Libraries](https://github.com/GoyaPtyLtd/BaseElements-Plugin-Libraries) which is still a work in progress.

The documentation for the compiling on the Mac works 100% to get to the "compiled library" stage. However each new version of the library has changes in it that may require code changes in the main BE plugin.

## Everything starts with the Mac version

So we've currently managed to bring across and test these new libraries into the Mac version, and have them compile a working plugin :

* Boost

We currently have guessed that these libraries may be able to be copied across from libraries to main plugin without issue, it just requires someone to do each one at a time, then test locally, and confirm that the plugin passes tests once compiled.

* duktape
* images ( jpeg, libde, libheif, openjp, ImageMagick )
* jq
* xml ( iconv, xml, xslt )

We currently know that these libraries will require work to adapt the current code to changes in the library :

* curl ( openssl, libssh, curl, poco. openssl has known changes when going from 1.x to 3.x )
* font ( freetype, fontconfig, podofo. Podofo has had major changes to it's API )

So these libraries can't be updated until the changes are made in our plugin code to adapt to the changed library.

## After Mac is Linux

The second platform it should be relatively easy to work on will be the linux one, as the scripts to compile on Mac and on Linux are going to be very similar.

There are already shell scripts to compile on linux but they are just copies of bits and pieces from other places and are incomplete. They need to be mapped out the same as the Mac versions, then updated with the same compile options until everything compiles.

Then we can push any updated compiled libraries ( boost ) into the linux branch of the main plugin.

Plus we can work on compiling all the libraries on arm64, so that we can build an arm64 version of the plugin.

## Finally comes Windows

At this point I haven't even considered how to best script the library compilation on Windows, it's not my forte and I'll love some help from someone who knows Windows better than I do.

0 comments on commit 3854076

Please sign in to comment.