PLCnext / PLCnext_CLI

The PLCnext CLI is our tool for programming in high level languages for the PLCnext Technology ecosystem. Build an up-to-date version of the PLCnext CLI that includes the very latest bug fixes, or even build your own customised version. Test the newest features or contribute your ideas.
Apache License 2.0
10 stars 3 forks source link

Improvement Request: PLCnext should be suitable for collaborative programming and larger scale projects #17

Closed SetTrend closed 9 months ago

SetTrend commented 1 year ago

From the logs while building a PLCnext project I noticed a serious issue:

Current Situation

Currently, in a PLCnext project, references to the PLCnext SDK in GCC .make files are written as absolute file paths:

Absolute SDK path

This impedes PLCnext projects from being compiled in a colaborative environment, such as other local installations, and in particular CI/CD build pipelines. Azure DevOps, GitHub and GitLab will be using file paths different from local installations. Installing SDKs to arbitrary, absolute file locations isn't permitted in these environments.

Using absolute file paths keeps PLCnext programming restricted to minor, one-man projects.

Desired Situation

All PLCnext project files, incl. .cmake files should be portable. They should compile anywhere, regardless of particular project or SDK file location.

A suggested approach would be to have a single environment variable (e.,g. PLCNEXT_SDK_ROOT) point to an PLCnext SDK root file path and have PLCnext SDK installers install all SDKs into sub directories of that root file path:

%PLCNEXT_SDK_ROOT%AXC-F-2152_2022.0.4
%PLCNEXT_SDK_ROOT%AXC-F-2152_2022.6

The new, proposed environment variable, along with the corresponding path suffixes should then be used by all CMAKE files.

mluhmann commented 1 year ago

The project itself is portable. The intermediate and the bin folder are not portable and should be excluded from sharing. The information about the SDK path on the system is known by the Toolchain and the intermediate folder need to be generated on each system individually.