lf-lang / installation

Installation scripts for Lingua Franca tools
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Do not just dump jars in .local/lib #12

Closed cmnrd closed 1 year ago

cmnrd commented 1 year ago

It seems like currently the install script just unpacks the archive in .local. Effectively, this dumps all jars in .local/lib. I think this is a bad idea for multiple reasons:

A more robust approach would be to unpack the archive in .local/share/lf-cli (or something along those lines) and add symbolic links, e.g., from ./local/bin/lfc to ./local/share/lf-cli/bin/lfc. Then we can easily delete the .local/share/lf-cli before (re)installing.

lhstrh commented 1 year ago

Right, this is exactly what I was thinking. Initially, I thought that a solution would be to change the directory structure in the produced archive (i.e., have bin and lib/lingua-franca/... instead of just bin and lib), but looking at the Gradle docs, this doesn't seem straightforward. Installing in a share directory and creating symlinks, on the other hands, is easy to do. I'll go ahead and implement this.