Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding options to launch other freecad-related appilications #30

Closed
looooo opened this issue Dec 11, 2019 · 2 comments
Closed

adding options to launch other freecad-related appilications #30

looooo opened this issue Dec 11, 2019 · 2 comments

Comments

@looooo
Copy link
Contributor

looooo commented Dec 11, 2019

What do you think about adding the possibility to add other applications (like python, freecadcmd) with the appimage? I guess it's easy to add some switches to the initialization script.

@probonopd
Copy link
Collaborator

probonopd commented Dec 18, 2019

As for freecadcmdI agree that it should go into the AppImage. It could be made possible to be invoked with something like

if [ ! -z $APPIMAGE ] ; then
  BINARY_NAME=$(basename "$ARGV0")
else
  BINARY_NAME=$(basename "$0")
fi
if [ ! -z "$1" ] && [ -e "$HERE/bin/$1" ] ; then
  MAIN="$HERE/bin/$1" ; shift
elif [ ! -z "$1" ] && [ -e "$HERE/usr/bin/$1" ] ; then
  MAIN="$HERE/usr/bin/$1" ; shift
elif [ -e "$HERE/bin/$BINARY_NAME" ] ; then
  MAIN="$HERE/bin/$BINARY_NAME"
elif [ -e "$HERE/usr/bin/$BINARY_NAME" ] ; then
  MAIN="$HERE/usr/bin/$BINARY_NAME"
else
  MAIN="$HERE/usr/bin/freecad"
fi

https://gitlab.com/inkscape/inkscape/blob/31dae0dc04d6bef0fc93706711ea918ce5187c7c/packaging/appimage/AppRun#L8-29

This would allow the AppImage to be symlinked to, e.g., /usr/local/bin/freecadcmd and/or to be called with ./FreeCAD*.AppImage freecadcmd.

As for Python, it depends:
Bundling it means everything is working as tested out of the box, but any Python modules installed by the user in their local Python installation will not show up in FreeCAD and since the AppImage is read-only, they cannot add Python modules to the bundled instance (without unpacking the AppImage).

@triplus
Copy link
Contributor

triplus commented Feb 8, 2020

Thanks for the info. I added such support: e328a1e

Some examples:

./FreeCAD.AppImage
./FreeCAD.AppImage freecadcmd
./FreeCAD.AppImage python --version
./FreeCAD.AppImage python
./FreeCAD.AppImage python ./test.py
./FreeCAD.AppImage ccx -version
./FreeCAD.AppImage ccx -i test

Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants