Linux New System - AdaptableApps/cornerstone GitHub Wiki

Cornerstone Low-Code Framework Wiki

New System

You will need to decide on a CsSystemCode for your system. This should be a short code that is unique to your system. It should be all lowercase and contain no spaces or special characters. It should be 3-5 characters long. e.g. if your company is called Acme and you are creating a CRM system then your code would be amcrm.

Source Repo

Create a new repo in your git provider (e.g. GitHub or GitLab or BitBucket) and clone it locally.

In the cloned repo folder on your machine run:

cornerstone new

Answer all the questions it asks to setup your new System

Environment Variables

You will need to add the following environment variables in your macOS .bashrc or .zshrc file (replacing {{SystemCode}} with your chosen system code):

export MY_COMPANY_ROOT=$HOME/Code/am<br> export {{SystemCode}}_ROOT=$MY_COMPANY_ROOT/{{SystemCode}}<br> export {{SystemCode}}_PACKAGES=${{SystemCode}}_ROOT/packages

Source Dynamo

Source Dynamo is a code automation tool to allow you to generate code so that your system is built quicker.

A licence for this is bundled with your Cornerstone Licence.

Ensure Source Dynamo is installed according to the wiki:

https://github.com/AdaptableApps/sourcedynamo-wiki.git

A folder in your src folder was created by the Cornerstone Cli for the Cornerstone code gen data spreadsheet:

${{SystemCode}}_ROOT/{{SystemCode}}.code.gen/Data

It also created the file $CORNERSTONE_PUBLIC_ROOT/codegen/{{SystemCode}}.code.gen.data_{{SystemCode}}_{{SystemVersion}}.xlsx

Paste the file to your folder ${{SystemCode}}_ROOT/{{SystemCode}}.code.gen/Data/

In the ${{SystemCode}}_ROOT/scripts folder add a script called sourcedynamo_codegen_{{SystemCode}}_release.sh with the following text :

sudo sourcedynamo action=codegen codegendatafile="${{SystemCode}}_ROOT/{{SystemCode}}.code.gen/Data/{CsSystemCode}.code.gen.data_{CsSystemCode}_{{SystemVersion}}.xlsx" productrootpath=${CsSystemCode}_ROOT

Fill in the data in the file $CORNERSTONE_PUBLIC_ROOT/codegen/{{SystemCode}}}.code.gen.data_{{SystemCode}}_{{SystemVersion}}.xlsx

Then you can run the code generator to generate all the code in your Cornerstone system's projects:

${{SystemCode}}_ROOT/scripts/sourcedynamo_codegen_{{SystemCode}}_release.sh