add python setuptools support
- add setup.py script,
- switch to use images via "share:" resource name
(this allows to work both versions of application:
- system wide installation,
- directly from source),
- add .desktop file,
- rename FlatCAM.py to flatcam and install it as an
executable script.
This commit is contained in:
35
flatcam
Executable file
35
flatcam
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python2
|
||||
############################################################
|
||||
# FlatCAM: 2D Post-processing for Manufacturing #
|
||||
# http://flatcam.org #
|
||||
# Author: Juan Pablo Caram (c) #
|
||||
# Date: 2/5/2014 #
|
||||
# MIT Licence #
|
||||
############################################################
|
||||
|
||||
import sys
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4 import QtCore
|
||||
from FlatCAMApp import App
|
||||
|
||||
|
||||
def debug_trace():
|
||||
"""
|
||||
Set a tracepoint in the Python debugger that works with Qt
|
||||
:return: None
|
||||
"""
|
||||
from PyQt4.QtCore import pyqtRemoveInputHook
|
||||
#from pdb import set_trace
|
||||
pyqtRemoveInputHook()
|
||||
#set_trace()
|
||||
|
||||
debug_trace()
|
||||
|
||||
# All X11 calling should be thread safe otherwise we have strange issues
|
||||
# QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
|
||||
# NOTE: Never talk to the GUI from threads! This is why I commented the above.
|
||||
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
QtCore.QDir.setSearchPaths("share", QtCore.QStringList(("share", "share/flatcam", "/usr/share/flatcam")));
|
||||
fc = App()
|
||||
sys.exit(app.exec_())
|
||||
Reference in New Issue
Block a user