I changed the gui to use Python 2.7 and it runs fine from the
/src/emc/usr_intf/lhgui directory when I make it an executable.
So far the steps I've taken are:
added lhgui to src/emc/usr_intf/lhgui
added submakefile to src/emc/usr_intf/lhgui
added emc/usr_intf/lhgui \ to src/Makefile
added lhgui.desktop to debian/usr/share/applications
after building I see lhgui in /bin and lib/python/lhgui I have
__init__.py and lh_gui.py
after make I did the following
You now need to run 'sudo make setuid' in order to run in place.
john@cave-mint ~/emc-lh-gui/src $ sudo make setuid
[sudo] password for john:
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read
john@cave-mint ~/emc-lh-gui/src $ cd ..
john@cave-mint ~/emc-lh-gui $ . ./scripts/rip-environment
john@cave-mint ~/emc-lh-gui $ lhgui
Traceback (most recent call last):
File "/home/john/emc-lh-gui/bin/lhgui", line 22, in <module>
from lh_gui import Ui_lh_gui
ImportError: No module named lh_gui
john@cave-mint ~/emc-lh-gui $
So I'm missing something but not sure what, the Submakefile is attached.
Also a screenshot of the launcher. What the launcher does is give the
user a place to make the selections and when you press Run Latency
Histogram the launcher disappears from the screen until you exit the
latency-histogram.
I created a branch jthornton/latency-histogram-gui should I push that
for review?
Thanks
JT
LHGUI_MODULES = lh_gui
PYTARGETS += ../bin/lhgui ../lib/python/lhgui/__init__.py $(patsubst
%,../lib/python/lhgui/%.py,$(LHGUI_MODULES)) \
PYI18NSRCS += emc/usr_intf/lhgui/lhgui.py $(patsubst
%,emc/usr_intf/lhgui/%.py,$(LHGUI_MODULES)) \
emc/usr_intf/lhgui/lh_gui.ui
../lib/python/lhgui/__init__.py:
@mkdir -p ../lib/python/lhgui
@touch $@
../lib/python/lhgui/%: emc/usr_intf/lhgui/%
@$(ECHO) Syntax checking python script $(notdir $@)
$(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(),
sys.argv[1], "exec")' $<
$(ECHO) Copying python script $(notdir $@)
$(Q)mkdir -p ../lib/python/lhgui
$(Q)cp $< $@
../share/linuxcnc/lh_gui.ui: emc/usr_intf/lhgui/lh_gui.ui
$(ECHO) Copying ui file $(notdir $@)
$(Q)mkdir -p $(dir $@)
$(Q)cp -f $< $@
../bin/lhgui: emc/usr_intf/lhgui/lhgui.py
@$(ECHO) Syntax checking python script $(notdir $@)
$(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(),
sys.argv[1], "exec")' $<
$(ECHO) Copying python script $(notdir $@)
$(Q)(echo '#!$(PYTHON)'; sed '1 { /^#!/d; }' $<) > [email protected] && chmod +x
[email protected] && mv -f [email protected] $@
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers