microelly2 / freecad-pluginloader

GNU Lesser General Public License v3.0
10 stars 7 forks source link

Install instructions for Archlinux #1

Closed kkoksvik closed 9 years ago

kkoksvik commented 9 years ago

Install files to /usr/share/freecad/Mod/plugins

kkoksvik commented 9 years ago

After further testing this does not seem to fix anything. It seams like there are explicit path references to all scripts that are called.

When starting FreeCAD and trying to install the Symbols plugin i get this:

[kjetil@Arch freecad-pluginloader]$ freecad FreeCAD 0.16, Libs: 0.16R4971 (Git) © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015

mod/plugins/InitGui start A mod/plugins/ INITGUI plugins 2 /usr/share/freecad/Mod/plugins /usr/share/freecad/Mod/plugins/pluginloader.py try open config file /usr/lib/freecad/Mod/plugins/pluginloaderconfig.yaml dict {'menu test - cmd2': {'exec': 'import plugins;plugins.plugin1.p1.info1()'}, 'menu tes - fun': {'exec': 'FreeCAD.ActiveDocument.addObject("Part::Box","Box")'}, 'menu test - command1': {'exec': 'import plugins;plugins.plugin1.info2()'}} dict {'Windows': 'c:/haha', 'Linux': 'UserAppData/Mod/testdir'} {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/testdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip', 'sourcedir': 'plugin_defaults-master', 'status': 'ignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'} start done {'base': {'tmprelease': 'UserHomePath/tmp/release', 'zipex': 'UserHomePath/tmp/yyya'}, 'data': {'FEMWorkbench': {'exec': 'FreeCADGui.activateWorkbench("FemWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/fem.png'}, 'PartWorkbench': {'exec': 'FreeCADGui.activateWorkbench("PartWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/part.png'}, 'RobotWorkbench': {'exec': 'FreeCADGui.activateWorkbench("RobotWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/robot.png'}, 'ShipWorkbench': {'exec': 'FreeCADGui.activateWorkbench("ShipWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/ship.png'}}, 'defaults': {'author': 'noname', 'backup': 'UserHomePath/tmp/bak_', 'description': 'no description', 'destdir': '/tmp/destdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('_default Method FreeCAD-Dir=AppHomePath/! HOME-Dir=UserHomePath/! UserData-Dir=UserAppData/!\n')", 'format': 'zipdir', 'icon': 'AppHomePath/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip', 'sourcedir': 'plugin_defaults-master', 'status': 'ignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'plugins': {'FreeCAD-makros': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/tmp/FreeCAD-macros', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zip', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/FreeCAD/FreeCAD-macros/archive/master.zip', 'sourcedir': 'FreeCAD-macros-master', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'animation': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak', 'description': 'no description', 'destdir': '/tmp/destdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/Animation/icons/animation.png', 'menu': 'Animation Workbench', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip', 'sourcedir': 'plugin_defaults-master', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'assembly animation': {'author': 'JMG', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/ExplodedAssemblyAnimation', 'exec': 'FreeCADGui.activateWorkbench("ExplodedAnimation")', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/icon_createroute.png', 'menu': 'Assembly Animation Workbench', 'method': 'zip', 'name': 'ExplodedAssemblyAnimation', 'source': 'https://github.com/JMG1/FreeCAD_ExplodedAssemblyAnimationWorkbench/archive/master.zip', 'sourcedir': 'FreeCAD_ExplodedAssemblyAnimationWorkbench-master', 'status': 'noignore', 'timestamp': None, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'assembly animation dropbox': {'author': 'JMG', 'backup': '/home/kjetil/.FreeCAD/Mod/ExplodedAssemblyAnimation', 'comment': 'demo for dropbox download', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/ExplodedAssemblyAnimation', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'ExplodedAssemblyAnimation', 'source': 'https://www.dropbox.com/s/qxvtavsp4g539jq/ExplodedAssemblyAnimation.zip?dl=1', 'sourcedir': 'ExplodedAssemblyAnimation', 'status': 'ignore', 'timestamp': None, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'assembly2': {'author': 'hamish2914', 'backup': '/home/kjetil/.FreeCAD/Mod/assembly2', 'description': 'Assembly Workbench in python', 'destdir': '/home/kjetil/.FreeCAD/Mod/assembly2', 'exec': 'FreeCADGui.activateWorkbench("Assembly2Workbench")', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/assembly2.png', 'menu': 'Assembly2 Workbench', 'method': 'zip', 'name': 'assembly2', 'source': 'https://github.com/hamish2014/FreeCAD_assembly2/archive/master.zip', 'sourcedir': 'FreeCAD_assembly2-master', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'bolts': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/usr/lib/freecad/Mod/BOLTS', 'exec': 'import BOLTS;BOLTS.show_widget()', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/bolts.png', 'menu': 'Bolts Library', 'method': 'zip', 'name': 'bolts', 'requires': 'pyside-tools', 'source': 'http://www.bolts-library.org/de/downloads/freecad/BOLTS_FreeCAD_0.3_lgpl2.1+.zip', 'sourcedir': 'BOLTS', 'status': 'noignore', 'timestamp': 0, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'circular text': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Macros/circular_text.py', 'exec': 'fn="/usr/lib/freecad/Mod/plugins/FreeCAD-library/PartsLibrary.FCMacro";exec open(fn).read()', 'format': 'flatfile', 'icon': '/usr/lib/freecad/Mod/plugins/icons/circulartext.png', 'menu': 'Circular Text Macro', 'method': 'zip', 'name': 'defaultName', 'source': 'http://forum.freecadweb.org/download/file.php?id=11170', 'sourcedir': '.', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'curaengin': {'author': 'noname', 'backup': '/home/kjetil/.FreeCAD/Mod/curaengine', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/curaengine', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'Cura Engine Workbench', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/cblt2l/FreeCAD-CuraEngine-Plugin/archive/master.zip', 'sourcedir': 'FreeCAD-CuraEngine-Plugin-master', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'defaulttest': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/testdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip', 'sourcedir': 'plugin_defaults-master', 'status': 'ignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'drawing dimensioning': {'author': 'hamish2914', 'backup': '/home/kjetil/tmp/bak_', 'description': 'Drawing Dim ...', 'destdir': '/home/kjetil/.FreeCAD/Mod/drawing_dimensioning', 'exec': 'FreeCADGui.activateWorkbench("DrawingDimensioningWorkbench")', 'format': 'zipdir', 'history': 'https://github.com/hamish2014/FreeCAD_drawing_dimensioning/commits/master/', 'icon': '/usr/lib/freecad/Mod/plugins/icons/drawing_dim.png', 'info': 'https://github.com/hamish2014/FreeCAD_drawing_dimensioning/blob/master/README.md', 'menu': 'Drawing Dimensioning Workbench', 'method': 'zip', 'name': 'drawing Dimsioning', 'source': 'https://github.com/hamish2014/FreeCAD_drawing_dimensioning/archive/master.zip', 'sourcedir': 'FreeCAD_drawing_dimensioning-master', 'status': 'noignore', 'timestamp': 'https://github.com/hamish2014/FreeCAD_assembly2/master/release', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'loadtest': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/testdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'loader test', 'source': 'https://github.com/microelly2/freecad-sipoc/archive/master.zip', 'sourcedir': 'freecad-sipoc-master', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'menutest2': {'author': 'microelly2', 'backup': '/home/kjetil/tmp/bak_', 'description': 'Single Point Configuration', 'destdir': '/usr/lib/freecad/Mod/plugins/plugin3', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**_default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'Single Point Configuration Macro', 'menuitems': {'menu tes - fun': {'exec': 'FreeCAD.ActiveDocument.addObject("Part::Box","Box")'}, 'menu test - cmd2': {'exec': 'import plugins;plugins.plugin1.p1.info1()'}, 'menu test - command1': {'exec': 'import plugins;plugins.plugin1.info2()'}}, 'method': 'zip', 'name': 'sipoc', 'source': 'https://github.com/microelly2/freecad-sipoc/archive/master.zip', 'sourcedir': 'freecad-sipoc-master', 'status': 'noignore', 'timestamp': 'https://raw.githubusercontent.com/microelly2/freecad-sipoc/master/release', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'partlib': {'author': 'yorik', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/tmp/test', 'exec': 'fn="/usr/lib/freecad/Mod/plugins/FreeCAD-library/PartsLibrary.FCMacro";exec open(fn).read()', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/master.png', 'menu': 'Parts Library', 'method': 'zip', 'name': 'partlib', 'source': 'https://github.com/yorikvanhavre/FreeCAD-library/archive/master.zip', 'sourcedir': 'FreeCAD-library-master', 'status': 'noignore', 'timestamp': 0, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'pcb': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/PCB', 'exec': 'FreeCADGui.activateWorkbench("PCB")', 'format': 'zipdir', 'icon': '/home/kjetil/.FreeCAD/Mod/PCB/data/board.svg', 'menu': 'PCB Workbench', 'method': '7z', 'name': 'defaultName', 'source': 'http://sourceforge.net/projects/eaglepcb2freecad/files/latest/download?source=files', 'sourcedir': '.', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'screw maker': {'author': 'ulrich brammer', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Macros/screw_maker.py', 'exec': 'fn="/home/microelly2/.FreeCAD/Macros/screw_maker1_7.py";exec open(fn).read()', 'format': 'zipfile', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'Screw Maker Macro', 'method': 'zip', 'name': 'defaultName', 'source': 'http://forum.freecadweb.org/download/file.php?id=5449', 'sourcedir': '.', 'status': 'noignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'sipoc': {'author': 'microelly2', 'backup': '/home/kjetil/tmp/bak', 'description': 'Single Point Configuration', 'destdir': '/usr/lib/freecad/Mod/plugins/plugin3', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('****default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'sipoc', 'source': 'https://github.com/microelly2/freecad-sipoc/archive/master.zip', 'sourcedir': 'freecad-sipoc-master', 'status': 'ignore', 'timestamp': 'https://raw.githubusercontent.com/microelly2/freecad-sipoc/master/release', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'symbollib': {'author': 'yorik', 'backup': '/usr/lib/freecad/Mod/plugins/FreeCAD-symbols', 'description': 'symbols for drawing page', 'destdir': '/usr/lib/freecad/Mod/plugins/FreeCAD-symbols', 'exec': 'fn="/usr/lib/freecad/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro";exec open(fn).read()', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/first_angle.png', 'menu': 'Drawing Symbols Library', 'method': 'zip', 'name': 'symbols', 'source': 'https://github.com/FreeCAD/FreeCAD-symbols/archive/master.zip', 'sourcedir': 'FreeCAD-symbols-master', 'status': 'noignore', 'timestamp': 0, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}, 'workfeature': {'author': 'noname', 'backup': '/home/kjetil/tmp/bak_', 'description': 'no description', 'destdir': '/usr/lib/freecad/Mod/plugins/WorkFeature', 'exec': 'fn="/usr/lib/freecad/Mod/plugins/WorkFeature/start_WF.FCMacro";exec open(fn).read()', 'format': 'zipdir', 'icon': '/usr/lib/freecad/Mod/plugins/icons/WF_wf.png', 'menu': 'Workfeature Macro', 'method': 'zip', 'name': 'workfeature', 'source': 'https://github.com/Rentlau/WorkFeature/archive/master.zip', 'sourcedir': 'WorkFeature-master', 'status': 'noignore', 'timestamp': 0, 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}}, 'tabs': {'My Favorites': {'FEM': {'exec': 'FreeCADGui.activateWorkbench("FemWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/fem.png'}, 'Part': {'exec': 'FreeCADGui.activateWorkbench("PartWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/part.png'}}, 'Other Workbenches': {'1 Part': {'exec': 'FreeCADGui.activateWorkbench("PartWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/part.png'}, '2 Ship': {'exec': 'FreeCADGui.activateWorkbench("ShipWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/ship.png'}, '3 Robot': {'exec': 'FreeCADGui.activateWorkbench("RobotWorkbench")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/robot.png'}, '4 Dummy': {'exec': 'import FreeCAD;FreeCAD.Console.PrintWarning("Nothing to do!")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/master.png'}, '5 Create Box': {'exec': 'FreeCAD.ActiveDocument.addObject("Part::Box","Box")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/part.png'}, '6 Greeting': {'exec': 'FreeCAD.Console.PrintWarning("Hello World!")', 'icon': '/usr/lib/freecad/Mod/plugins/icons/sun.png'}}}} init mod/plugins/InitGui.py done tabs sind da ---------------------- My Favorites Other Workbenches ------------done------------------ FreeCAD-makros animation assembly animation assembly animation dropbox assembly2 bolts circular text curaengin defaulttest drawing dimensioning loadtest menutest2 partlib pcb screw maker sipoc symbollib workfeature done run !fn="/usr/lib/freecad/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro";exec open(fn).read()! Traceback (most recent call last): File "", line 60, in run File "", line 1, in IOError: [Errno 2] No such file or directory: '/usr/lib/freecad/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro' ^CTraceback (most recent call last): File "", line 1, in <type 'exceptions.KeyboardInterrupt'>:

microelly2 commented 9 years ago

I have changed the absolute pathes to relative ones.

what I'm wondering about: 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('**default Method FreeCAD-Dir=/usr/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')",

Is freecad installed into /usr ? This is the origin template before macro substitution

'*****default Method FreeCAD-Dir=AppHomePath/! HOME-Dir=UserHomePath/! UserData-Dir=UserAppData/!\n')

In this case the pluginloader should be in /usr/Mod/plugins

kkoksvik commented 9 years ago

I am using the freecad-git from AUR. Git instalations from AUR might be a bit different than the offisial Arch install. From the PKGBUILD it shows it installed in /usr https://aur.archlinux.org/packages/fr/freecad-git/PKGBUILD cmake .. \ -DCMAKE_INSTALL_PREFIX:PATH="/usr" \ -DCMAKE_INSTALL_DOCDIR:PATH="share/freecad/doc" \ -DCMAKE_INSTALL_DATADIR:PATH="share/freecad" \ -DCMAKE_INSTALL_LIBDIR:PATH="lib/freecad" \ -DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc/ \ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \ -DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic \ -DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON

make

I was looking around comparing instalation folders between .deb and PKBUILD. It seams that plugins and pythoncode is spread between /usr/lib and /usr/share in the deb file. There are also a bin folder under /usr/lib. It all seams a bit confusing.

kkoksvik commented 9 years ago

"In this case the pluginloader should be in /usr/Mod/plugins"

Would it not be cleaner to have it be in (-DCMAKE_INSTALL_DATADIR:PATH) where there already is a Mod folder.

I think that the deb build is a bit strange, and that plugins is not intended to be installed under a lib folder.

Some lines from Filesystem Hierarchy Standard

Miscellaneous architecture-independent application-specific static files and subdirectories must be placed in /usr/share.

/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts. [22]

Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory. [23]

These are vague assumptions, so I might very well be wrong.

kkoksvik commented 9 years ago

I now have InitGui.py pluginloader.py and pluginloaderconfig.yaml installed in /usr/share/freecad/Mod/plugins/ This way the plugin starts fine and i can navigate it.

First time trying to install symbols library i got an error. Traceback (most recent call last): File "/usr/share/freecad/Mod/plugins/pluginloader.py", line 274, in on_pushButton03_clicked self.master.install(sel.text()) File "/usr/share/freecad/Mod/plugins/pluginloader.py", line 376, in install os.makedirs(directory) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/home/kjetil/tmp/yyya/..'

I solved this in pluginloader.py by changing line 157 to: os.makedirs(zipextract)

Trying to install symbols library again I get the following. It is trying to install in /usr/Mod/plugins/FreeCAD-symbols'

wolud rather it be installed in /usr/shared/freecad/Mod/plugins/

pluginloader started ... ['loadtest', 'bolts', 'assembly animation dropbox', 'screw maker', 'sipoc', 'pcb', 'partlib', 'menutest2', 'assembly animation', 'FreeCAD-makros', 'assembly2', 'workfeature', 'curaengin', 'animation', 'defaulttest', 'circular text', 'symbollib', 'drawing dimensioning'] <pluginloader.MyWidget object at 0x7f4b086251b8> widget shown super ende widget shown symbollib {'status': 'noignore', 'description': 'symbols for drawing page', 'author': 'yorik', 'timestamp': 0, 'format': 'zipdir', 'exec': 'fn="/usr/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro";exec open(fn).read()', 'destdir': '/usr/Mod/plugins/FreeCAD-symbols', 'name': 'symbols', 'source': 'https://github.com/FreeCAD/FreeCAD-symbols/archive/master.zip', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp', 'menu': 'Drawing Symbols Library', 'icon': '/usr/Mod/plugins/icons/first_angle.png', 'backup': '/usr/Mod/plugins/FreeCAD-symbols', 'method': 'zip', 'sourcedir': 'FreeCAD-symbols-master'} install or update symbollib no local version info available /home/kjetil/tmp/release no web version info available Local Version: 99999999999999999999999 Web Version : Need Update 3 /home/kjetil/tmp/yyya True zipfile: /home/kjetil/tmp/yyya.zip https://github.com/FreeCAD/FreeCAD-symbols/archive/master.zip vor download targetfile:/home/kjetil/tmp/yyya.zip extrakts /home/kjetil/tmp/yyya/FreeCAD-symbols-master /usr/Mod/plugins/FreeCAD-symbols backup Traceback (most recent call last): File "/usr/share/freecad/Mod/plugins/pluginloader.py", line 274, in on_pushButton03_clicked self.master.install(sel.text()) File "/usr/share/freecad/Mod/plugins/pluginloader.py", line 431, in install os.mkdir(destination) OSError: [Errno 13] Permission denied: '/usr/Mod/plugins/FreeCAD-symbols'

microelly2 commented 9 years ago

First problem: I use three freecad variables.

AppHomePath == Place where freecad is installed, from there Mod is the Mod-Subdir UserHomePath == $HOME UserAppData == $HOME/.FreeCAD If these variables do not work for your installation you have to replace them in the complete yaml file with your hardcoded /some/where/else.

EDIT:

import platform os=platform.system() I can check the platform to modifiy something, what is the outcome of platform for your system? In this case I can add something (I have still one testcase Linux and Windows)

defaulttest: status: ignore destdir: Linux: UserAppData/Mod/testdir Windows: c:/haha

FreeCAD-Dir=AppHomePath/! HOME-Dir=UserHomePath/! UserData-Dir=UserAppData/

The second problem you can avoid when you replace AppHomePath by UserAppData. then all will be installed into your environment instead of the global - should be not a problem if your machine is only used by you. Or you give yourself full acces to the /usr/Mod directory.

kkoksvik commented 9 years ago

Why are you installing some applications to AppHomePath? Normally this is a administrative task and should require root privileges. I think it is expected that installation to these places be done with the distributions packageanager. Even Crome and Firefox is as far as I know not allowed to install to locations outside Home folder without package-manager.

kkoksvik commented 9 years ago

Could this be a solution? Change to sudo user within a python script http://stackoverflow.com/questions/5191878/change-to-sudo-user-within-a-python-script

microelly2 commented 9 years ago

There is no need to install into the AppHomePath, all can be done user local. Until now I have done tests into both directories. The shortest way is the switch from AppHomePath to UserAppData. However, I have to support the other way too because I have a lot of (windows) machines with multi users and I want to install my modules only once for all. In this case I run the updates from my administrator account. I will investigate the sudo option you mentioned.

kkoksvik commented 9 years ago

God reasons all around. Thanks :-) I will continue testing.

microelly2 commented 9 years ago

thank you for your help testing it.

kkoksvik commented 9 years ago

Thank you for making it :-)