Skip to content

Commit

Permalink
- reduces the size of linux builds
Browse files Browse the repository at this point in the history
- removes incorrectly reconstructed custom events outside of the CHARGE to DROP period on quitting the designer (Discussion #1696)
  • Loading branch information
MAKOMO committed Sep 16, 2024
1 parent b9778f9 commit c6fc0af
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
22 changes: 21 additions & 1 deletion src/artisan-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,33 @@ hiddenimports_list=[
'babel.numbers'
]

EXCLUDES = [
'PyQt5',
'PyQt6.Multimedia',
'PyQt6.Network',
'PyQt6.OpenGL',
'PyQt6.PrintSupport',
'PyQt6.QtQml',
'PyQt6.QtQuick',
'PyQt6.QtWebChannel',
'PyQt6.QtPositioning',
'PyQt6.QtRemoteObjects',
'PyQt6.QtSensors',
'PyQt6.QtSerialPort',
'PyQt6.QtSpatialAudio',
'PyQt6.QtTest',
'PyQt6.QtTextToSpeech',
'PyQt6.QtWebEngineQuick',
'PyQt6.QtWebEngineWidgets'
]

a = Analysis(['artisan.py'],
pathex=[path],
binaries=BINARIES,
datas=[],
hookspath=[],
runtime_hooks=[],
excludes=['PyQt5'],
excludes=EXCLUDES,
hiddenimports=hiddenimports_list,
win_no_prefer_redirects=False,
win_private_assemblies=False,
Expand Down
17 changes: 12 additions & 5 deletions src/artisanlib/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class tgraphcanvas(FigureCanvas):
'l_eventtype3dots', 'l_eventtype4dots', 'l_eteventannos', 'l_bteventannos', 'l_eventtype1annos', 'l_eventtype2annos', 'l_eventtype3annos',
'l_eventtype4annos', 'l_annotations', 'l_background_annotations', 'l_annotations_dict', 'l_annotations_pos_dict', 'l_event_flags_dict',
'l_event_flags_pos_dict', 'ai', 'timeclock', 'threadserver', 'designerflag', 'designerconnections', 'mousepress', 'indexpoint',
'workingline', 'eventtimecopy', 'specialeventsStringscopy', 'specialeventsvaluecopy', 'specialeventstypecopy', 'currentx', 'currenty',
'workingline', 'eventtimecopy', 'etypescopy', 'specialeventsStringscopy', 'specialeventsvaluecopy', 'specialeventstypecopy', 'currentx', 'currenty',
'designertimeinit', 'BTsplinedegree', 'ETsplinedegree', 'reproducedesigner', 'designertemp1init', 'designertemp2init', 'ax_background_designer', 'designer_timez', 'time_step_size',
'_designer_orange_mark', '_designer_orange_mark_shown', '_designer_blue_mark', '_designer_blue_mark_shown', 'l_temp1_markers', 'l_temp2_markers',
'l_stat1', 'l_stat2', 'l_stat3', 'l_div1', 'l_div2', 'l_div3', 'l_div4',
Expand Down Expand Up @@ -1960,6 +1960,7 @@ def __init__(self, parent:QWidget, dpi:int, locale:str, aw:'ApplicationWindow')
self.indexpoint:int = 0
self.workingline:int = 2 #selects 1:ET or 2:BT
self.eventtimecopy:List[float] = []
self.etypescopy:List[str] = []
self.specialeventsStringscopy:List[str] = []
self.specialeventsvaluecopy:List[float] = []
self.specialeventstypecopy:List[int] = []
Expand Down Expand Up @@ -15952,6 +15953,7 @@ def designer(self) -> None:
#
# reset also the special event copy held for the designer
self.eventtimecopy = []
self.eventtimecopy = []
self.specialeventsStringscopy = []
self.specialeventsvaluecopy = []
self.specialeventstypecopy = []
Expand Down Expand Up @@ -16088,6 +16090,7 @@ def initfromprofile(self) -> bool:
for spe in self.specialevents:
#save relative time of events
self.eventtimecopy.append(self.timex[spe]-self.timex[self.timeindex[0]])
self.etypescopy = self.etypes[:]

#find lowest point from profile to be converted
lpindex = self.aw.findTP()
Expand Down Expand Up @@ -16932,10 +16935,14 @@ def convert_designer(self) -> None:
if self.eventtimecopy:
self.clearEvents() # first clear previous special event lists
for i, etc in enumerate(self.eventtimecopy):
self.addEvent(self.time2index(etc + self.timex[self.timeindex[0]]),
self.specialeventstypecopy[i],
self.specialeventsStringscopy[i],
self.specialeventsvaluecopy[i])
tx_idx:int = self.time2index(etc + self.timex[self.timeindex[0]])
if tx_idx > -1:
# only if event time is between CHARGE and DROP we reconstruct the event
self.addEvent(tx_idx,
self.specialeventstypecopy[i],
self.specialeventsStringscopy[i],
self.specialeventsvaluecopy[i])
self.etypes = self.etypescopy[:]

#check for extra devices
num = len(self.timex)
Expand Down
9 changes: 7 additions & 2 deletions src/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ cp -R includes/Icons/* dist/Icons
rm -rf dist/_internal/libQt5*
rm -rf dist/_internal/PyQt5

rm -rf dist/_internal/PyQt6/Qt6/translations
rm -rf dist/_internal/PyQt6/Qt6/qml/QtQuick3D
#rm -rf dist/_internal/PyQt6/Qt6/translations # some translations (qt, qtbase and qtconnectivity) are used!
#rm -rf dist/_internal/PyQt6/Qt6/qml/QtQuick3D

# remove matplotlib sample data
rm -rf dist/_internal/matplotlib/mpl-data/sample_data
# remove large unused fontTools source file
rm -rf dist/_internal/fontTools/misc/bezierTools.c

# remove automatically collected libs that might break things on some installations (eg. Ubuntu 16.04)
# so it is better to rely on the system installed once
Expand Down
3 changes: 2 additions & 1 deletion wiki/ReleaseHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ v3.0.3
- adds control function to [Diedrich DR](https://artisan-scope.org/machines/diedrich/) machine setup and adds [Diedrich CR](https://artisan-scope.org/machines/diedrich/) machine setup

* CHANGES
- start the scheduler automatically on connected to artisan.plus if there are incompleted scheduled items
- start the scheduler automatically on connected to artisan.plus if there are incomplete scheduled items

* FIXES
- updates Cropster XLS importer ([Issue #1685](../../../issues/1685))
- fixes regression which broke SV number switching for Fuji PIDs ([Discussion #1683](../../../discussions/1683))
- fixes missing statistic content ([Discussion #1689](../../../discussions/1689))
- fixes a regression which prevented loading settings written (slightly broken) by Artisan v3.0 ([Discussion #1692](../../../discussions/1692))
- fixes a regression communicating with some serial MODBUS devices resulting from a more strict protocol interpretation by the underlying MODBUS pymodbus lib 3.7 introduced in Artisan v3.0.2, by adding a 'strict' flag (default off) to the serial MODBUS configuration ([Issue #1694](../../../issues/1694))
- removes incorrectly reconstructed custom events outside of the CHARGE to DROP period on quitting the designer ([Discussion #1696](../../../discussions/1696))



Expand Down

0 comments on commit c6fc0af

Please sign in to comment.