diff --git a/.gitignore b/.gitignore index 92d1b50..1381bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /flatcam-a9a4ec75db12.tar.gz +/flatcam-46454c293a9b.tar.gz diff --git a/flatcam-disable-checks-for-the-latest-version-of-the-program.patch b/flatcam-disable-checks-for-the-latest-version-of-the-program.patch new file mode 100644 index 0000000..036e4b7 --- /dev/null +++ b/flatcam-disable-checks-for-the-latest-version-of-the-program.patch @@ -0,0 +1,24 @@ +From 002a69f71632a3bb2d71302b24aae6b4d449557d Mon Sep 17 00:00:00 2001 +From: Damian Wrobel +Date: Sat, 8 Sep 2018 16:06:37 +0200 +Subject: [PATCH] Disable checks for the latest version of the program + +--- + FlatCAMApp.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/FlatCAMApp.py b/FlatCAMApp.py +index 61287ab..a7faf9d 100644 +--- a/FlatCAMApp.py ++++ b/FlatCAMApp.py +@@ -4270,6 +4270,7 @@ class App(QtCore.QObject): + FCProcessContainer.app = self + + def version_check(self): ++ return None + """ + Checks for the latest version of the program. Alerts the + user if theirs is outdated. This method is meant to be run +-- +2.10.5 + diff --git a/flatcam-setup-update.patch b/flatcam-setup-update.patch new file mode 100644 index 0000000..275caa9 --- /dev/null +++ b/flatcam-setup-update.patch @@ -0,0 +1,527 @@ +From 0d2cb7e53e629a1c8d5ba790752e4a4d605065bc Mon Sep 17 00:00:00 2001 +From: Damian Wrobel +Date: Sat, 8 Sep 2018 14:31:41 +0200 +Subject: [PATCH] update setup.py and fix accessing data files + +- Update setup.py to the latest source code + +- Data file should be accessed using 'share:' resource locator +instead of using direct path which doesn't work when flatcam +is system-wide installed. It looks that newly added files +started to use 'share/' instead of 'share:' path. +--- + FlatCAMApp.py | 18 +++++----- + FlatCAMDraw.py | 42 +++++++++++----------- + FlatCAMGUI.py | 108 +++++++++++++++++++++++++++---------------------------- + ObjectUI.py | 8 ++--- + ToolTransform.py | 6 ++-- + flatcam | 2 +- + setup.py | 8 +++-- + 7 files changed, 97 insertions(+), 95 deletions(-) + +diff --git a/FlatCAMApp.py b/FlatCAMApp.py +index 3fe46be..61287ab 100644 +--- a/FlatCAMApp.py ++++ b/FlatCAMApp.py +@@ -580,14 +580,14 @@ class App(QtCore.QObject): + ### Tools and Plugins ### + ######################### + self.dblsidedtool = DblSidedTool(self) +- self.dblsidedtool.install(icon=QtGui.QIcon('share/doubleside16.png'), separator=True) ++ self.dblsidedtool.install(icon=QtGui.QIcon('share:doubleside16.png'), separator=True) + + self.measurement_tool = Measurement(self) +- self.measurement_tool.install(icon=QtGui.QIcon('share/measure16.png')) ++ self.measurement_tool.install(icon=QtGui.QIcon('share:measure16.png')) + self.ui.measure_btn.triggered.connect(self.measurement_tool.run) + + self.transform_tool = ToolTransform(self) +- self.transform_tool.install(icon=QtGui.QIcon('share/transform.png'), pos=self.ui.menuedit) ++ self.transform_tool.install(icon=QtGui.QIcon('share:transform.png'), pos=self.ui.menuedit) + + self.draw = FlatCAMDraw(self, disabled=True) + +@@ -1139,7 +1139,7 @@ class App(QtCore.QObject): + layout1.addLayout(layout2) + + logo = QtGui.QLabel() +- logo.setPixmap(QtGui.QPixmap('share/flatcam_icon256.png')) ++ logo.setPixmap(QtGui.QPixmap('share:flatcam_icon256.png')) + layout2.addWidget(logo, stretch=0) + + title = QtGui.QLabel( +@@ -4190,11 +4190,11 @@ class App(QtCore.QObject): + + # TODO: Move this to constructor + icons = { +- "gerber": "share/flatcam_icon16.png", +- "excellon": "share/drill16.png", +- "cncjob": "share/cnc16.png", +- "project": "share/project16.png", +- "svg": "share/geometry16.png" ++ "gerber": "share:flatcam_icon16.png", ++ "excellon": "share:drill16.png", ++ "cncjob": "share:cnc16.png", ++ "project": "share:project16.png", ++ "svg": "share:geometry16.png" + } + + openers = { +diff --git a/FlatCAMDraw.py b/FlatCAMDraw.py +index 6a3ccc3..7eb9d97 100644 +--- a/FlatCAMDraw.py ++++ b/FlatCAMDraw.py +@@ -696,32 +696,32 @@ class FlatCAMDraw(QtCore.QObject): + self.drawing_toolbar.setDisabled(disabled) + self.app.ui.addToolBar(self.drawing_toolbar) + +- self.select_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/pointer32.png'), "Select 'Esc'") ++ self.select_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:pointer32.png'), "Select 'Esc'") + # Separator + self.drawing_toolbar.addSeparator() +- self.add_circle_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/circle32.png'), 'Add Circle') +- self.add_arc_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/arc32.png'), 'Add Arc') +- self.add_rectangle_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/rectangle32.png'), 'Add Rectangle') +- self.add_polygon_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/polygon32.png'), 'Add Polygon') +- self.add_path_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/path32.png'), 'Add Path') ++ self.add_circle_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:circle32.png'), 'Add Circle') ++ self.add_arc_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:arc32.png'), 'Add Arc') ++ self.add_rectangle_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:rectangle32.png'), 'Add Rectangle') ++ self.add_polygon_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:polygon32.png'), 'Add Polygon') ++ self.add_path_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:path32.png'), 'Add Path') + + # Separator + self.drawing_toolbar.addSeparator() +- self.union_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/union32.png'), 'Polygon Union') +- self.intersection_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/intersection32.png'), 'Polygon Intersection') +- self.subtract_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/subtract32.png'), 'Polygon Subtraction') +- self.cutpath_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/cutpath32.png'), 'Cut Path') ++ self.union_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:union32.png'), 'Polygon Union') ++ self.intersection_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:intersection32.png'), 'Polygon Intersection') ++ self.subtract_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:subtract32.png'), 'Polygon Subtraction') ++ self.cutpath_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:cutpath32.png'), 'Cut Path') + + # Separator + self.drawing_toolbar.addSeparator() +- self.move_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/move32.png'), "Move Objects 'm'") +- self.copy_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/copy32.png'), "Copy Objects 'c'") +- self.delete_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share/deleteshape32.png'), "Delete Shape '-'") ++ self.move_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:move32.png'), "Move Objects 'm'") ++ self.copy_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:copy32.png'), "Copy Objects 'c'") ++ self.delete_btn = self.drawing_toolbar.addAction(QtGui.QIcon('share:deleteshape32.png'), "Delete Shape '-'") + + ### Snap Toolbar ### + + self.snap_toolbar = QtGui.QToolBar("Grid Toolbar") +- self.grid_snap_btn = self.snap_toolbar.addAction(QtGui.QIcon('share/grid32.png'), 'Snap to grid') ++ self.grid_snap_btn = self.snap_toolbar.addAction(QtGui.QIcon('share:grid32.png'), 'Snap to grid') + self.grid_gap_x_entry = FCEntry() + + self.grid_gap_x_entry.setMaximumWidth(70) +@@ -733,7 +733,7 @@ class FlatCAMDraw(QtCore.QObject): + self.snap_toolbar.addWidget(self.grid_gap_y_entry) + + +- self.corner_snap_btn = self.snap_toolbar.addAction(QtGui.QIcon('share/corner32.png'), 'Snap to corner') ++ self.corner_snap_btn = self.snap_toolbar.addAction(QtGui.QIcon('share:corner32.png'), 'Snap to corner') + self.snap_max_dist_entry = FCEntry() + + self.snap_max_dist_entry.setMaximumWidth(70) +@@ -752,17 +752,17 @@ class FlatCAMDraw(QtCore.QObject): + # self.add_rectangle_menuitem = self.menu.addAction(QtGui.QIcon('share:rectangle16.png'), 'Add Rectangle') + # self.add_polygon_menuitem = self.menu.addAction(QtGui.QIcon('share:polygon16.png'), 'Add Polygon') + # self.add_path_menuitem = self.menu.addAction(QtGui.QIcon('share:path16.png'), 'Add Path') +- self.union_menuitem = self.menu.addAction(QtGui.QIcon('share/union16.png'), 'Polygon Union') +- self.intersection_menuitem = self.menu.addAction(QtGui.QIcon('share/intersection16.png'), 'Polygon Intersection') ++ self.union_menuitem = self.menu.addAction(QtGui.QIcon('share:union16.png'), 'Polygon Union') ++ self.intersection_menuitem = self.menu.addAction(QtGui.QIcon('share:intersection16.png'), 'Polygon Intersection') + # self.subtract_menuitem = self.menu.addAction(QtGui.QIcon('share:subtract16.png'), 'Polygon Subtraction') +- self.cutpath_menuitem = self.menu.addAction(QtGui.QIcon('share/cutpath16.png'), 'Cut Path') ++ self.cutpath_menuitem = self.menu.addAction(QtGui.QIcon('share:cutpath16.png'), 'Cut Path') + # Add Separator + self.menu.addSeparator() + # self.move_menuitem = self.menu.addAction(QtGui.QIcon('share:move16.png'), "Move Objects 'm'") + # self.copy_menuitem = self.menu.addAction(QtGui.QIcon('share:copy16.png'), "Copy Objects 'c'") +- self.delete_menuitem = self.menu.addAction(QtGui.QIcon('share/deleteshape16.png'), "Delete Shape '-'") +- self.buffer_menuitem = self.menu.addAction(QtGui.QIcon('share/buffer16.png'), "Buffer selection 'b'") +- self.paint_menuitem = self.menu.addAction(QtGui.QIcon('share/paint16.png'), "Paint selection") ++ self.delete_menuitem = self.menu.addAction(QtGui.QIcon('share:deleteshape16.png'), "Delete Shape '-'") ++ self.buffer_menuitem = self.menu.addAction(QtGui.QIcon('share:buffer16.png'), "Buffer selection 'b'") ++ self.paint_menuitem = self.menu.addAction(QtGui.QIcon('share:paint16.png'), "Paint selection") + self.menu.addSeparator() + + self.paint_menuitem.triggered.connect(self.on_paint_tool) +diff --git a/FlatCAMGUI.py b/FlatCAMGUI.py +index 0c3829d..be2b159 100644 +--- a/FlatCAMGUI.py ++++ b/FlatCAMGUI.py +@@ -28,66 +28,66 @@ class FlatCAMGUI(QtGui.QMainWindow): + self.menufile = self.menu.addMenu('&File') + + # New +- self.menufilenew = QtGui.QAction(QtGui.QIcon('share/file16.png'), '&New project', self) ++ self.menufilenew = QtGui.QAction(QtGui.QIcon('share:file16.png'), '&New project', self) + self.menufile.addAction(self.menufilenew) + + # Recent +- self.recent = self.menufile.addMenu(QtGui.QIcon('share/folder16.png'), "Open recent ...") ++ self.recent = self.menufile.addMenu(QtGui.QIcon('share:folder16.png'), "Open recent ...") + + # Separator + self.menufile.addSeparator() + + # Open gerber ... +- self.menufileopengerber = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Open &Gerber ...', self) ++ self.menufileopengerber = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Open &Gerber ...', self) + self.menufile.addAction(self.menufileopengerber) + + # Open Excellon ... +- self.menufileopenexcellon = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Open &Excellon ...', self) ++ self.menufileopenexcellon = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Open &Excellon ...', self) + self.menufile.addAction(self.menufileopenexcellon) + + # Open G-Code ... +- self.menufileopengcode = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Open G-&Code ...', self) ++ self.menufileopengcode = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Open G-&Code ...', self) + self.menufile.addAction(self.menufileopengcode) + + # Open Project ... +- self.menufileopenproject = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Open &Project ...', self) ++ self.menufileopenproject = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Open &Project ...', self) + self.menufile.addAction(self.menufileopenproject) + + # Separator + self.menufile.addSeparator() + + # Import SVG ... +- self.menufileimportsvg = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Import &SVG ...', self) ++ self.menufileimportsvg = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Import &SVG ...', self) + self.menufile.addAction(self.menufileimportsvg) + + # Export SVG ... +- self.menufileexportsvg = QtGui.QAction(QtGui.QIcon('share/folder16.png'), 'Export &SVG ...', self) ++ self.menufileexportsvg = QtGui.QAction(QtGui.QIcon('share:folder16.png'), 'Export &SVG ...', self) + self.menufile.addAction(self.menufileexportsvg) + + # Separator + self.menufile.addSeparator() + + # Save Project +- self.menufilesaveproject = QtGui.QAction(QtGui.QIcon('share/floppy16.png'), '&Save Project', self) ++ self.menufilesaveproject = QtGui.QAction(QtGui.QIcon('share:floppy16.png'), '&Save Project', self) + self.menufile.addAction(self.menufilesaveproject) + + # Save Project As ... +- self.menufilesaveprojectas = QtGui.QAction(QtGui.QIcon('share/floppy16.png'), 'Save Project &As ...', self) ++ self.menufilesaveprojectas = QtGui.QAction(QtGui.QIcon('share:floppy16.png'), 'Save Project &As ...', self) + self.menufile.addAction(self.menufilesaveprojectas) + + # Save Project Copy ... +- self.menufilesaveprojectcopy = QtGui.QAction(QtGui.QIcon('share/floppy16.png'), 'Save Project C&opy ...', self) ++ self.menufilesaveprojectcopy = QtGui.QAction(QtGui.QIcon('share:floppy16.png'), 'Save Project C&opy ...', self) + self.menufile.addAction(self.menufilesaveprojectcopy) + + # Save Defaults +- self.menufilesavedefaults = QtGui.QAction(QtGui.QIcon('share/floppy16.png'), 'Save &Defaults', self) ++ self.menufilesavedefaults = QtGui.QAction(QtGui.QIcon('share:floppy16.png'), 'Save &Defaults', self) + self.menufile.addAction(self.menufilesavedefaults) + + # Separator + self.menufile.addSeparator() + + # Quit +- self.exit_action = QtGui.QAction(QtGui.QIcon('share/power16.png'), '&Exit', self) ++ self.exit_action = QtGui.QAction(QtGui.QIcon('share:power16.png'), '&Exit', self) + self.menufile.addAction(self.exit_action) + # exitAction.setShortcut('Ctrl+Q') + # exitAction.setStatusTip('Exit application') +@@ -95,19 +95,19 @@ class FlatCAMGUI(QtGui.QMainWindow): + + ### Edit ### + self.menuedit = self.menu.addMenu('&Edit') +- self.menueditnew = self.menuedit.addAction(QtGui.QIcon('share/new_geo16.png'), 'New Geometry') +- self.menueditedit = self.menuedit.addAction(QtGui.QIcon('share/edit16.png'), 'Edit Geometry') +- self.menueditok = self.menuedit.addAction(QtGui.QIcon('share/edit_ok16.png'), 'Update Geometry') ++ self.menueditnew = self.menuedit.addAction(QtGui.QIcon('share:new_geo16.png'), 'New Geometry') ++ self.menueditedit = self.menuedit.addAction(QtGui.QIcon('share:edit16.png'), 'Edit Geometry') ++ self.menueditok = self.menuedit.addAction(QtGui.QIcon('share:edit_ok16.png'), 'Update Geometry') + # Separator + self.menuedit.addSeparator() +- self.menueditjoin = self.menuedit.addAction(QtGui.QIcon('share/join16.png'), 'Join Geometry') +- self.menueditdelete = self.menuedit.addAction(QtGui.QIcon('share/trash16.png'), 'Delete') ++ self.menueditjoin = self.menuedit.addAction(QtGui.QIcon('share:join16.png'), 'Join Geometry') ++ self.menueditdelete = self.menuedit.addAction(QtGui.QIcon('share:trash16.png'), 'Delete') + self.menuedit.addSeparator() + + + ### Options ### + self.menuoptions = self.menu.addMenu('&Options') +- self.menuoptions_transfer = self.menuoptions.addMenu(QtGui.QIcon('share/transfer.png'), 'Transfer options') ++ self.menuoptions_transfer = self.menuoptions.addMenu(QtGui.QIcon('share:transfer.png'), 'Transfer options') + self.menuoptions_transfer_a2p = self.menuoptions_transfer.addAction("Application to Project") + self.menuoptions_transfer_p2a = self.menuoptions_transfer.addAction("Project to Application") + self.menuoptions_transfer_p2o = self.menuoptions_transfer.addAction("Project to Object") +@@ -117,58 +117,58 @@ class FlatCAMGUI(QtGui.QMainWindow): + + ### View ### + self.menuview = self.menu.addMenu('&View') +- self.menuviewdisableall = self.menuview.addAction(QtGui.QIcon('share/clear_plot16.png'), 'Disable all plots') +- self.menuviewdisableother = self.menuview.addAction(QtGui.QIcon('share/clear_plot16.png'), ++ self.menuviewdisableall = self.menuview.addAction(QtGui.QIcon('share:clear_plot16.png'), 'Disable all plots') ++ self.menuviewdisableother = self.menuview.addAction(QtGui.QIcon('share:clear_plot16.png'), + 'Disable all plots but this one') +- self.menuviewenable = self.menuview.addAction(QtGui.QIcon('share/replot16.png'), 'Enable all plots') ++ self.menuviewenable = self.menuview.addAction(QtGui.QIcon('share:replot16.png'), 'Enable all plots') + + ### Tool ### + + self.menutool = QtGui.QMenu('&Tool') + self.menutoolaction = self.menu.addMenu(self.menutool) +- self.menutoolshell = self.menutool.addAction(QtGui.QIcon('share/shell16.png'), '&Command Line') ++ self.menutoolshell = self.menutool.addAction(QtGui.QIcon('share:shell16.png'), '&Command Line') + + ### Help ### + self.menuhelp = self.menu.addMenu('&Help') +- self.menuhelp_about = self.menuhelp.addAction(QtGui.QIcon('share/tv16.png'), 'About FlatCAM') +- self.menuhelp_home = self.menuhelp.addAction(QtGui.QIcon('share/home16.png'), 'Home') +- self.menuhelp_manual = self.menuhelp.addAction(QtGui.QIcon('share/globe16.png'), 'Manual') ++ self.menuhelp_about = self.menuhelp.addAction(QtGui.QIcon('share:tv16.png'), 'About FlatCAM') ++ self.menuhelp_home = self.menuhelp.addAction(QtGui.QIcon('share:home16.png'), 'Home') ++ self.menuhelp_manual = self.menuhelp.addAction(QtGui.QIcon('share:globe16.png'), 'Manual') + + ############### + ### Toolbar ### + ############### + self.toolbarfile = QtGui.QToolBar('File Toolbar') + self.addToolBar(self.toolbarfile) +- self.open_gerber_btn = self.toolbarfile.addAction(QtGui.QIcon('share/flatcam_icon32.png'), "Open &Gerber") +- self.open_exc_btn = self.toolbarfile.addAction(QtGui.QIcon('share/drill32.png'), "Open &Excellon") +- self.open_gcode_btn = self.toolbarfile.addAction(QtGui.QIcon('share/cnc32.png'), "Open Gco&de") +- self.save_btn = self.toolbarfile.addAction(QtGui.QIcon('share/floppy32.png'), 'Save Project &As ...') ++ self.open_gerber_btn = self.toolbarfile.addAction(QtGui.QIcon('share:flatcam_icon32.png'), "Open &Gerber") ++ self.open_exc_btn = self.toolbarfile.addAction(QtGui.QIcon('share:drill32.png'), "Open &Excellon") ++ self.open_gcode_btn = self.toolbarfile.addAction(QtGui.QIcon('share:cnc32.png'), "Open Gco&de") ++ self.save_btn = self.toolbarfile.addAction(QtGui.QIcon('share:floppy32.png'), 'Save Project &As ...') + + self.toolbarview= QtGui.QToolBar('View Toolbar') + self.addToolBar(self.toolbarview) +- self.zoom_fit_btn = self.toolbarview.addAction(QtGui.QIcon('share/zoom_fit32.png'), "&Zoom Fit") +- self.zoom_out_btn = self.toolbarview.addAction(QtGui.QIcon('share/zoom_out32.png'), "&Zoom Out") +- self.zoom_in_btn = self.toolbarview.addAction(QtGui.QIcon('share/zoom_in32.png'), "&Zoom In") ++ self.zoom_fit_btn = self.toolbarview.addAction(QtGui.QIcon('share:zoom_fit32.png'), "&Zoom Fit") ++ self.zoom_out_btn = self.toolbarview.addAction(QtGui.QIcon('share:zoom_out32.png'), "&Zoom Out") ++ self.zoom_in_btn = self.toolbarview.addAction(QtGui.QIcon('share:zoom_in32.png'), "&Zoom In") + # Separator + self.toolbarview.addSeparator() +- self.clear_plot_btn = self.toolbarview.addAction(QtGui.QIcon('share/clear_plot32.png'), "&Clear Plot") +- self.replot_btn = self.toolbarview.addAction(QtGui.QIcon('share/replot32.png'), "&Replot") ++ self.clear_plot_btn = self.toolbarview.addAction(QtGui.QIcon('share:clear_plot32.png'), "&Clear Plot") ++ self.replot_btn = self.toolbarview.addAction(QtGui.QIcon('share:replot32.png'), "&Replot") + + self.toolbareditobj = QtGui.QToolBar('Obj.Editor Toolbar') + self.addToolBar(self.toolbareditobj) +- self.newgeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share/new_geo32.png'), "New Blank Geometry") +- self.editgeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share/edit32.png'), "Edit Geometry") +- self.updategeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share/edit_ok32.png'), "Update Geometry") ++ self.newgeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share:new_geo32.png'), "New Blank Geometry") ++ self.editgeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share:edit32.png'), "Edit Geometry") ++ self.updategeo_btn = self.toolbareditobj.addAction(QtGui.QIcon('share:edit_ok32.png'), "Update Geometry") + self.updategeo_btn.setEnabled(False) + + self.toolbaredit = QtGui.QToolBar('Edit Toolbar') + self.addToolBar(self.toolbaredit) +- self.delete_btn = self.toolbaredit.addAction(QtGui.QIcon('share/delete32.png'), "&Delete") ++ self.delete_btn = self.toolbaredit.addAction(QtGui.QIcon('share:delete32.png'), "&Delete") + + self.toolbartools = QtGui.QToolBar('Tools Toolbar') + self.addToolBar(self.toolbartools) +- self.shell_btn = self.toolbartools.addAction(QtGui.QIcon('share/shell32.png'), "&Command Line") +- self.measure_btn = self.toolbartools.addAction(QtGui.QIcon('share/measure32.png'), "&Measurement Tool") ++ self.shell_btn = self.toolbartools.addAction(QtGui.QIcon('share:shell32.png'), "&Command Line") ++ self.measure_btn = self.toolbartools.addAction(QtGui.QIcon('share:measure32.png'), "&Measurement Tool") + + ################ + ### Splitter ### +@@ -208,7 +208,7 @@ class FlatCAMGUI(QtGui.QMainWindow): + self.options_tab_layout.addLayout(hlay1) + + self.icon = QtGui.QLabel() +- self.icon.setPixmap(QtGui.QPixmap('share/gear48.png')) ++ self.icon.setPixmap(QtGui.QPixmap('share:gear48.png')) + hlay1.addWidget(self.icon) + + self.options_combo = QtGui.QComboBox() +@@ -276,12 +276,12 @@ class FlatCAMGUI(QtGui.QMainWindow): + ### Icons ### + ############# + self.app_icon = QtGui.QIcon() +- self.app_icon.addFile('share/flatcam_icon16.png', QtCore.QSize(16, 16)) +- self.app_icon.addFile('share/flatcam_icon24.png', QtCore.QSize(24, 24)) +- self.app_icon.addFile('share/flatcam_icon32.png', QtCore.QSize(32, 32)) +- self.app_icon.addFile('share/flatcam_icon48.png', QtCore.QSize(48, 48)) +- self.app_icon.addFile('share/flatcam_icon128.png', QtCore.QSize(128, 128)) +- self.app_icon.addFile('share/flatcam_icon256.png', QtCore.QSize(256, 256)) ++ self.app_icon.addFile('share:flatcam_icon16.png', QtCore.QSize(16, 16)) ++ self.app_icon.addFile('share:flatcam_icon24.png', QtCore.QSize(24, 24)) ++ self.app_icon.addFile('share:flatcam_icon32.png', QtCore.QSize(32, 32)) ++ self.app_icon.addFile('share:flatcam_icon48.png', QtCore.QSize(48, 48)) ++ self.app_icon.addFile('share:flatcam_icon128.png', QtCore.QSize(128, 128)) ++ self.app_icon.addFile('share:flatcam_icon256.png', QtCore.QSize(256, 256)) + self.setWindowIcon(self.app_icon) + + self.setGeometry(100, 100, 1024, 650) +@@ -307,7 +307,7 @@ class FlatCAMActivityView(QtGui.QWidget): + + self.icon = QtGui.QLabel(self) + self.icon.setGeometry(0, 0, 12, 12) +- self.movie = QtGui.QMovie("share/active.gif") ++ self.movie = QtGui.QMovie("share:active.gif") + self.icon.setMovie(self.movie) + #self.movie.start() + +@@ -338,7 +338,7 @@ class FlatCAMInfoBar(QtGui.QWidget): + + self.icon = QtGui.QLabel(self) + self.icon.setGeometry(0, 0, 12, 12) +- self.pmap = QtGui.QPixmap('share/graylight12.png') ++ self.pmap = QtGui.QPixmap('share:graylight12.png') + self.icon.setPixmap(self.pmap) + + layout = QtGui.QHBoxLayout() +@@ -363,13 +363,13 @@ class FlatCAMInfoBar(QtGui.QWidget): + level = str(level) + self.pmap.fill() + if level == "error": +- self.pmap = QtGui.QPixmap('share/redlight12.png') ++ self.pmap = QtGui.QPixmap('share:redlight12.png') + elif level == "success": +- self.pmap = QtGui.QPixmap('share/greenlight12.png') ++ self.pmap = QtGui.QPixmap('share:greenlight12.png') + elif level == "warning": +- self.pmap = QtGui.QPixmap('share/yellowlight12.png') ++ self.pmap = QtGui.QPixmap('share:yellowlight12.png') + else: +- self.pmap = QtGui.QPixmap('share/graylight12.png') ++ self.pmap = QtGui.QPixmap('share:graylight12.png') + + self.icon.setPixmap(self.pmap) + self.set_text_(text) +diff --git a/ObjectUI.py b/ObjectUI.py +index 9d7fafe..43b312e 100644 +--- a/ObjectUI.py ++++ b/ObjectUI.py +@@ -11,7 +11,7 @@ class ObjectUI(QtGui.QWidget): + put UI elements in ObjectUI.custom_box (QtGui.QLayout). + """ + +- def __init__(self, icon_file='share/flatcam_icon32.png', title='FlatCAM Object', parent=None): ++ def __init__(self, icon_file='share:flatcam_icon32.png', title='FlatCAM Object', parent=None): + QtGui.QWidget.__init__(self, parent=parent) + + layout = QtGui.QVBoxLayout() +@@ -157,7 +157,7 @@ class CNCObjectUI(ObjectUI): + be placed in ``self.custom_box`` to preserve the layout. + """ + +- ObjectUI.__init__(self, title='CNC Job Object', icon_file='share/cnc32.png', parent=parent) ++ ObjectUI.__init__(self, title='CNC Job Object', icon_file='share:cnc32.png', parent=parent) + + # Scale and offset are not available for CNCJob objects. + # Hiding from the GUI. +@@ -289,7 +289,7 @@ class GeometryObjectUI(ObjectUI): + """ + + def __init__(self, parent=None): +- super(GeometryObjectUI, self).__init__(title='Geometry Object', icon_file='share/geometry32.png', parent=parent) ++ super(GeometryObjectUI, self).__init__(title='Geometry Object', icon_file='share:geometry32.png', parent=parent) + + ## Plot options + self.plot_options_label = QtGui.QLabel("Plot Options:") +@@ -508,7 +508,7 @@ class ExcellonObjectUI(ObjectUI): + + def __init__(self, parent=None): + ObjectUI.__init__(self, title='Excellon Object', +- icon_file='share/drill32.png', ++ icon_file='share:drill32.png', + parent=parent) + + #### Plot options #### +diff --git a/ToolTransform.py b/ToolTransform.py +index 65aa824..5d7173b 100644 +--- a/ToolTransform.py ++++ b/ToolTransform.py +@@ -195,7 +195,7 @@ class ToolTransform(FlatCAMTool): + warningbox = QtGui.QMessageBox() + warningbox.setText(msg) + warningbox.setWindowTitle("Warning ...") +- warningbox.setWindowIcon(QtGui.QIcon('share/warning.png')) ++ warningbox.setWindowIcon(QtGui.QIcon('share:warning.png')) + warningbox.setStandardButtons(QtGui.QMessageBox.Ok) + warningbox.setDefaultButton(QtGui.QMessageBox.Ok) + warningbox.exec_() +@@ -239,7 +239,7 @@ class ToolTransform(FlatCAMTool): + warningbox = QtGui.QMessageBox() + warningbox.setText(msg) + warningbox.setWindowTitle("Warning ...") +- warningbox.setWindowIcon(QtGui.QIcon('share/warning.png')) ++ warningbox.setWindowIcon(QtGui.QIcon('share:warning.png')) + warningbox.setStandardButtons(QtGui.QMessageBox.Ok) + warningbox.setDefaultButton(QtGui.QMessageBox.Ok) + warningbox.exec_() +@@ -289,7 +289,7 @@ class ToolTransform(FlatCAMTool): + warningbox = QtGui.QMessageBox() + warningbox.setText(msg) + warningbox.setWindowTitle("Warning ...") +- warningbox.setWindowIcon(QtGui.QIcon('share/warning.png')) ++ warningbox.setWindowIcon(QtGui.QIcon('share:warning.png')) + warningbox.setStandardButtons(QtGui.QMessageBox.Ok) + warningbox.setDefaultButton(QtGui.QMessageBox.Ok) + warningbox.exec_() +diff --git a/flatcam b/flatcam +index fb3daa8..f50c938 100755 +--- a/flatcam ++++ b/flatcam +@@ -30,6 +30,6 @@ debug_trace() + # NOTE: Never talk to the GUI from threads! This is why I commented the above. + + app = QtGui.QApplication(sys.argv) +-QtCore.QDir.setSearchPaths("share", str(("share", "share/flatcam", "/usr/share/flatcam"))); ++QtCore.QDir.setSearchPaths("share", ["share", "share/flatcam", "/usr/share/flatcam"]); + fc = App() + sys.exit(app.exec_()) +diff --git a/setup.py b/setup.py +index 38c8466..88a9058 100644 +--- a/setup.py ++++ b/setup.py +@@ -35,7 +35,6 @@ setup( + + py_modules=[ + "camlib", +- "DblSidedTool", + "FlatCAMApp", + "FlatCAMCommon", + "FlatCAMDraw", +@@ -47,15 +46,18 @@ setup( + "FlatCAMVersion", + "FlatCAMWorker", + "GUIElements", +- "MeasurementTool", + "ObjectCollection", + "ObjectUI", + "PlotCanvas", + "svgparse", +- "termwidget" ++ "termwidget", ++ "ToolDblSided", ++ "ToolMeasurement", ++ "ToolTransform" + ], + + install_requires=[ ++ 'PyQt4', + 'simplejson', + 'numpy>=1.8', + 'scipy', +-- +2.10.5 + diff --git a/flatcam.spec b/flatcam.spec index 6d821eb..9eb2b56 100644 --- a/flatcam.spec +++ b/flatcam.spec @@ -1,34 +1,42 @@ -%global date 20170701 -%global commit0 a9a4ec75db12dd69290c87ff5ed8a7998911ff4b +%global date 20180606 +%global commit0 46454c293a9b390c931b52eb6217ca47e13b0231 %global shortcommit0 %(c=%{commit0}; echo ${c:0:12}) + +%global date_year %(c=%{date}; printf %d ${c:0:4}) +%global date_month %(c=%{date}; printf %d ${c:4:2}) +%global date_day %(c=%{date}; printf %d ${c:6:2}) + %global the_owner jpcgt Name: flatcam Version: 8.5 -Release: 10.%{date}git%{shortcommit0}%{?dist} +Release: 11.%{date}git%{shortcommit0}%{?dist} Summary: 2D Computer-Aided PCB Manufacturing License: MIT Url: http://flatcam.org/ Source0: https://bitbucket.org/%{the_owner}/%{name}/get/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz # Reported upstream as: https://bitbucket.org/jpcgt/flatcam/pull-requests/74 Patch0: https://bitbucket.org/dwrobel/%{name}/commits/bf0c59ba2b9c78815270607f6d814e93af410cf8/raw#/%{name}.appdata.xml - +# Reported upstream as: https://bitbucket.org/jpcgt/flatcam/pull-requests/125 +Patch1: https://bitbucket.org/dwrobel/flatcam/commits/0d2cb7e53e629a1c8d5ba790752e4a4d605065bc/raw#/%{name}-setup-update.patch +# Disable checks for the latest version of the program +Patch2: https://bitbucket.org/dwrobel/flatcam/commits/002a69f71632a3bb2d71302b24aae6b4d449557d/raw#/%{name}-disable-checks-for-the-latest-version-of-the-program.patch BuildArch: noarch BuildRequires: /usr/bin/git -BuildRequires: python2-devel +BuildRequires: python3-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib -Requires: %{py2_dist simplejson} +Requires: %{py3_dist simplejson} Requires: PyQt4 -Requires: %{py2_dist numpy} -Requires: %{py2_dist scipy} -Requires: python-svg-path -Requires: %{py2_dist matplotlib} -Requires: python2-matplotlib-qt4 -Requires: %{py2_dist rtree} -Requires: %{py2_dist shapely} +Requires: %{py3_dist numpy} +Requires: %{py3_dist scipy} +Requires: python3-svg-path +Requires: %{py3_dist matplotlib} +Requires: python3-matplotlib-qt4 +Requires: %{py3_dist rtree} +Requires: %{py3_dist shapely} Requires: hicolor-icon-theme @@ -42,13 +50,18 @@ CAD program, and create G-Code for Isolation routing. %autosetup -S git -n %{the_owner}-%{name}-%{shortcommit0} rm -f setup_ubuntu.sh setup_ubuntu.sh upgrade_geos.sh +# Update version string in About menu +sed -i -e "s/\(\"number\":\).*/\1 \"git-%{shortcommit0}\",/g" \ + -e "s/\(\"date\":\).*/\1 \(%{date_year}, %{date_month}, %{date_day}\),/g" \ + FlatCAMVersion.py + %build -%py2_build +%py3_build %install -%py2_install +%py3_install # install icon file install -d %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/ @@ -66,7 +79,7 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata %license LICENSE %doc README.md %{_bindir}/%{name} -%{python2_sitelib}/* +%{python3_sitelib}/* %dir %{_datadir}/%{name}/ %{_datadir}/%{name}/* %{_datadir}/applications/%{name}.desktop @@ -75,6 +88,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata %changelog +* Sat Sep 08 2018 Damian Wrobel - 8.5-11.20180606git46454c293a9b +- Update to the latest version +- Switch to python3 + * Fri Jul 13 2018 Fedora Release Engineering - 8.5-10.20170701gita9a4ec75db12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 5a6e212..13626cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (flatcam-a9a4ec75db12.tar.gz) = 641ce2319efcdd1fc7503196d8cf38595ab2967845285e9934e72ba51e11ab0cfd7b4e60558f3e4f142f5e01283d27e3c132349aab046e9edfc71a01236a61be +SHA512 (flatcam-46454c293a9b.tar.gz) = 83cf9aa236faec6e96ef2ca31e310b05d82fc8122f46ee065be5ca4efc70e05d1aa75d849dd439c352c0d45003350877a7befeb221656720210d1e02277522be