Skip to content

Commit

Permalink
updates Linux build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
myTonino committed Jul 18, 2015
1 parent 758ab6a commit f4056d1
Show file tree
Hide file tree
Showing 42 changed files with 28,018 additions and 27,527 deletions.
73 changes: 46 additions & 27 deletions artisanlib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def __dependencies_for_freezing():
from scipy.interpolate import UnivariateSpline
import PyQt4.QtSvg
import PyQt4.QtXml
import PyQt4.QtDBus # needed for QT5 builds
# for gevent bundling
from gevent import core, resolver_thread, resolver_ares, socket,\
threadpool, thread, threading, select, subprocess,\
Expand Down Expand Up @@ -8182,28 +8183,28 @@ def __init__(self, parent = None):
self.button_3.setFocusPolicy(Qt.NoFocus)
self.button_3.setStyleSheet(self.pushbuttonstyles["FC START"])
self.button_3.setMinimumHeight(50)
self.button_3.setToolTip(QApplication.translate("Tooltip", "Marks the begining of First Crack (FCs)", None))
self.button_3.setToolTip(QApplication.translate("Tooltip", "First Crack Start", None))
self.connect(self.button_3, SIGNAL("clicked()"), self.qmc.mark1Cstart)

self.button_4 = QPushButton(QApplication.translate("Button", "FC\nEND", None))
self.button_4.setFocusPolicy(Qt.NoFocus)
self.button_4.setStyleSheet(self.pushbuttonstyles["FC END"])
self.button_4.setMinimumHeight(50)
self.button_4.setToolTip(QApplication.translate("Tooltip", "Marks the end of First Crack (FCs)", None))
self.button_4.setToolTip(QApplication.translate("Tooltip", "First Crack End", None))
self.connect(self.button_4, SIGNAL("clicked()"), self.qmc.mark1Cend)

self.button_5 = QPushButton(QApplication.translate("Button", "SC\nSTART", None))
self.button_5.setFocusPolicy(Qt.NoFocus)
self.button_5.setStyleSheet(self.pushbuttonstyles["SC START"])
self.button_5.setMinimumHeight(50)
self.button_5.setToolTip(QApplication.translate("Tooltip", "Marks the begining of Second Crack (SCs)", None))
self.button_5.setToolTip(QApplication.translate("Tooltip", "Second Crack Start", None))
self.connect(self.button_5, SIGNAL("clicked()"), self.qmc.mark2Cstart)

self.button_6 = QPushButton(QApplication.translate("Button", "SC\nEND", None))
self.button_6.setFocusPolicy(Qt.NoFocus)
self.button_6.setStyleSheet(self.pushbuttonstyles["SC END"])
self.button_6.setMinimumHeight(50)
self.button_6.setToolTip(QApplication.translate("Tooltip", "Marks the end of Second Crack (SCe)", None))
self.button_6.setToolTip(QApplication.translate("Tooltip", "Second Crack End", None))
self.connect(self.button_6, SIGNAL("clicked()"), self.qmc.mark2Cend)

#create RESET button
Expand All @@ -8224,15 +8225,15 @@ def __init__(self, parent = None):
self.button_8.setFocusPolicy(Qt.NoFocus)
self.button_8.setStyleSheet(self.pushbuttonstyles["CHARGE"])
self.button_8.setMinimumHeight(50)
self.button_8.setToolTip(QApplication.translate("Tooltip", "Marks the begining of the roast (beans in)", None))
self.button_8.setToolTip(QApplication.translate("Tooltip", "Charge", None))
self.connect(self.button_8, SIGNAL("clicked()"), self.qmc.markCharge)

#create DROP button
self.button_9 = QPushButton(QApplication.translate("Button", "DROP", None))
self.button_9.setFocusPolicy(Qt.NoFocus)
self.button_9.setStyleSheet(self.pushbuttonstyles["DROP"])
self.button_9.setMinimumHeight(50)
self.button_9.setToolTip(QApplication.translate("Tooltip", "Marks the end of the roast (drop beans)", None))
self.button_9.setToolTip(QApplication.translate("Tooltip", "Drop", None))
self.connect(self.button_9, SIGNAL("clicked()"), self.qmc.markDrop)

#create PID control button
Expand All @@ -8247,7 +8248,7 @@ def __init__(self, parent = None):
self.button_11.setFocusPolicy(Qt.NoFocus)
self.button_11.setStyleSheet(self.pushbuttonstyles["EVENT"])
self.button_11.setMinimumHeight(50)
self.button_11.setToolTip(QApplication.translate("Tooltip", "Marks an Event", None))
self.button_11.setToolTip(QApplication.translate("Tooltip", "Event", None))
self.connect(self.button_11, SIGNAL("clicked()"), self.qmc.EventRecord)

#create PID+5 button
Expand Down Expand Up @@ -8319,15 +8320,15 @@ def __init__(self, parent = None):
self.button_19.setStyleSheet(self.pushbuttonstyles["DRY END"])
#self.button_19.setMaximumSize(90, 50)
self.button_19.setMinimumHeight(50)
self.button_19.setToolTip(QApplication.translate("Tooltip", "Marks the end of the Drying phase (DRYEND)", None))
self.button_19.setToolTip(QApplication.translate("Tooltip", "Dry End", None))
self.connect(self.button_19, SIGNAL("clicked()"), self.qmc.markDryEnd)

#create COOLe button
self.button_20 = QPushButton(QApplication.translate("Button", "COOL\nEND", None))
self.button_20.setFocusPolicy(Qt.NoFocus)
self.button_20.setStyleSheet(self.pushbuttonstyles["COOL END"])
self.button_20.setMinimumHeight(50)
self.button_20.setToolTip(QApplication.translate("Tooltip", "Marks the end of the Cooling phase (COOLEND)", None))
self.button_20.setToolTip(QApplication.translate("Tooltip", "Cool End", None))
self.connect(self.button_20, SIGNAL("clicked()"), self.qmc.markCoolEnd)

#connect PID sv easy buttons
Expand Down Expand Up @@ -12219,7 +12220,7 @@ def getProfile(self):
# write roast time
try:
profile["roasttime"] = encodeLocal(self.qmc.roastdate.time().toString())
profile["roastepoch"] = self.qmc.roastepoch
profile["roastepoch"] = self.qmc.roastdate.toTime_t()
profile["roasttzoffset"] = self.qmc.roasttzoffset
except:
pass
Expand Down Expand Up @@ -12378,6 +12379,7 @@ def fileImportRoastLogger(self):

#loads the settings at the start of application. See the oppposite closeEventSettings()
def settingsLoad(self, filename=None):
res = False
try:
if filename:
settings = QSettings(filename,QSettings.IniFormat)
Expand Down Expand Up @@ -13138,8 +13140,10 @@ def settingsLoad(self, filename=None):
self.realignbuttons()
self.update_extraeventbuttons_visibility()
settings.endGroup()
res = True

except Exception:
res = False
# import traceback
# traceback.print_exc(file=sys.stdout)
_, _, exc_tb = sys.exc_info()
Expand Down Expand Up @@ -13168,10 +13172,12 @@ def settingsLoad(self, filename=None):
except:
pass
except Exception:
res = False
# import traceback
# traceback.print_exc(file=sys.stdout)
_, _, exc_tb = sys.exc_info()
QMessageBox.information(self,QApplication.translate("Error Message", "Error",None),QApplication.translate("Error Message", "Exception:",None) + " settingsLoad() @line " + str(exc_tb.tb_lineno))
return res

def startWebLCDs(self,force=False):
try:
Expand Down Expand Up @@ -15230,22 +15236,35 @@ def loadSettings(self,fn=None):
filename = self.ArtisanOpenFileDialog()
if filename:
try:
aw.settingsLoad(filename)
# update recentSettings menu
settings = QSettings()
files = settings.value('recentSettingList').toStringList()
try:
files.removeAll(filename)
except ValueError:
pass
files.insert(0, filename)
del files[self.MaxRecentFiles:]
settings.setValue('recentSettingList', files)
for widget in QApplication.topLevelWidgets():
if isinstance(widget, ApplicationWindow):
widget.updateRecentSettingActions()
aw.qmc.reset(soundOn=False)
self.sendmessage(QApplication.translate("Message","Settings loaded", None))
res = aw.settingsLoad(filename)
if res:
# update recentSettings menu
settings = QSettings()
files = settings.value('recentSettingList').toStringList()
try:
files.removeAll(filename)
except ValueError:
pass
files.insert(0, filename)
del files[self.MaxRecentFiles:]
settings.setValue('recentSettingList', files)
for widget in QApplication.topLevelWidgets():
if isinstance(widget, ApplicationWindow):
widget.updateRecentSettingActions()
aw.qmc.reset(soundOn=False)
self.sendmessage(QApplication.translate("Message","Settings loaded", None))
else:
# remove file from the recent file list
settings = QSettings()
files = settings.value('recentSettingList').toStringList()
try:
files.removeAll(filename)
except ValueError:
pass
settings.setValue('recentSettingList', files)
for widget in QApplication.topLevelWidgets():
if isinstance(widget, ApplicationWindow):
widget.updateRecentSettingActions()
except:
# remove file from the recent file list
settings = QSettings()
Expand Down Expand Up @@ -16825,7 +16844,7 @@ def __init__(self, parent = None):
pass
self.connect(self.styleComboBox,SIGNAL("currentIndexChanged(int)"),lambda i:self.setappearance())
self.resolutionSpinBox = QSpinBox()
self.resolutionSpinBox.setRange(40,200)
self.resolutionSpinBox.setRange(40,300)
self.resolutionSpinBox.setSingleStep(5)
self.resolutionSpinBox.setValue(aw.dpi)
self.resolutionSpinBox.setFocusPolicy(Qt.NoFocus)
Expand Down
29 changes: 17 additions & 12 deletions build-centos.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

QT=/usr/local/Trolltech/Qt-4.8.6/
QT=/usr/local/Qt-5.4.2/

# translations
pylupdate4 artisan.pro
Expand Down Expand Up @@ -42,31 +42,36 @@ mkdir dist/Resources
mkdir dist/Resources/qt_plugins
mkdir dist/Resources/qt_plugins/imageformats
mkdir dist/Resources/qt_plugins/iconengines
mkdir dist/Resources/qt_plugins/platforms
cp $QT/plugins/imageformats/libqsvg.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqsvg.so
cp $QT/plugins/imageformats/libqgif.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqgif.so
#cp $QT/plugins/imageformats/libqjpeg.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#cp $QT/plugins/imageformats/libqtiff.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
cp $QT/plugins/iconengines/libqsvgicon.so dist/Resources/qt_plugins/iconengines
patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
cp $QT/plugins/platforms/libqxcb.so dist/Resources/qt_plugins/platforms
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/platforms/libqxcb.so
cp qt.conf dist
mkdir dist/translations
cp translations/*.qm dist/translations
cp $QT/translations/qt_ar.qm dist/translations
cp $QT/translations/qt_de.qm dist/translations
cp $QT/translations/qt_es.qm dist/translations
cp $QT/translations/qt_fi.qm dist/translations
cp $QT/translations/qt_fr.qm dist/translations
cp $QT/translations/qt_sv.qm dist/translations
cp $QT/translations/qt_zh_CN.qm dist/translations
cp $QT/translations/qt_zh_TW.qm dist/translations
cp $QT/translations/qt_he.qm dist/translations
cp $QT/translations/qt_hu.qm dist/translations
cp $QT/translations/qt_it.qm dist/translations
cp $QT/translations/qt_ja.qm dist/translations
cp $QT/translations/qt_ko.qm dist/translations
cp $QT/translations/qt_pl.qm dist/translations
cp $QT/translations/qt_pt.qm dist/translations
cp $QT/translations/qt_ru.qm dist/translations
cp $QT/translations/qt_ar.qm dist/translations
cp $QT/translations/qt_ja.qm dist/translations
cp $QT/translations/qt_hu.qm dist/translations
cp $QT/translations/qt_he.qm dist/translations
cp $QT/translations/qt_pl.qm dist/translations
cp $QT/translations/qt_sv.qm dist/translations
cp $QT/translations/qt_zh_CN.qm dist/translations
cp $QT/translations/qt_zh_TW.qm dist/translations
tar -cf dist-centos.tar dist
29 changes: 17 additions & 12 deletions build-centos64.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

QT=/usr/local/Trolltech/Qt-4.8.6/
QT=/usr/local/Qt5.4.2/5.4/gcc_64/

# translations
pylupdate4 artisan.pro
Expand Down Expand Up @@ -42,31 +42,36 @@ mkdir dist/Resources
mkdir dist/Resources/qt_plugins
mkdir dist/Resources/qt_plugins/imageformats
mkdir dist/Resources/qt_plugins/iconengines
mkdir dist/Resources/qt_plugins/platforms
cp $QT/plugins/imageformats/libqsvg.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqsvg.so
cp $QT/plugins/imageformats/libqgif.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqgif.so
#cp $QT/plugins/imageformats/libqjpeg.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#cp $QT/plugins/imageformats/libqtiff.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
cp $QT/plugins/iconengines/libqsvgicon.so dist/Resources/qt_plugins/iconengines
patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
cp $QT/plugins/platforms/libqxcb.so dist/Resources/qt_plugins/platforms
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/platforms/libqxcb.so
cp qt.conf dist
mkdir dist/translations
cp translations/*.qm dist/translations
cp $QT/translations/qt_ar.qm dist/translations
cp $QT/translations/qt_de.qm dist/translations
cp $QT/translations/qt_es.qm dist/translations
cp $QT/translations/qt_fi.qm dist/translations
cp $QT/translations/qt_fr.qm dist/translations
cp $QT/translations/qt_sv.qm dist/translations
cp $QT/translations/qt_zh_CN.qm dist/translations
cp $QT/translations/qt_zh_TW.qm dist/translations
cp $QT/translations/qt_he.qm dist/translations
cp $QT/translations/qt_hu.qm dist/translations
cp $QT/translations/qt_it.qm dist/translations
cp $QT/translations/qt_ja.qm dist/translations
cp $QT/translations/qt_ko.qm dist/translations
cp $QT/translations/qt_pl.qm dist/translations
cp $QT/translations/qt_pt.qm dist/translations
cp $QT/translations/qt_ru.qm dist/translations
cp $QT/translations/qt_ar.qm dist/translations
cp $QT/translations/qt_ja.qm dist/translations
cp $QT/translations/qt_hu.qm dist/translations
cp $QT/translations/qt_he.qm dist/translations
cp $QT/translations/qt_pl.qm dist/translations
cp $QT/translations/qt_sv.qm dist/translations
cp $QT/translations/qt_zh_CN.qm dist/translations
cp $QT/translations/qt_zh_TW.qm dist/translations
tar -cf dist-centos64.tar dist
4 changes: 2 additions & 2 deletions build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ python setup-mac.py py2app

# recreate the translations with PyQt4/Qt4 for the Windows releases that are behind

export PATH=$ORGPATH
lrelease -verbose artisan.pro
#export PATH=$ORGPATH
#lrelease -verbose artisan.pro
11 changes: 7 additions & 4 deletions build-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

QT=/usr/local/Trolltech/Qt-4.8.6/
QT=/usr/local/Qt-5.4.2/

# translations
pylupdate4 artisan.pro
Expand Down Expand Up @@ -42,16 +42,19 @@ mkdir dist/Resources
mkdir dist/Resources/qt_plugins
mkdir dist/Resources/qt_plugins/imageformats
mkdir dist/Resources/qt_plugins/iconengines
mkdir dist/Resources/qt_plugins/platforms
cp $QT/plugins/imageformats/libqsvg.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqsvg.so
cp $QT/plugins/imageformats/libqgif.so dist/Resources/qt_plugins/imageformats
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqgif.so
#cp $QT/plugins/imageformats/libqjpeg.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqjpeg.so
#cp $QT/plugins/imageformats/libqtiff.so dist/Resources/qt_plugins/imageformats
#patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
#patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/imageformats/libqtiff.so
cp $QT/plugins/iconengines/libqsvgicon.so dist/Resources/qt_plugins/iconengines
patchelf --set-rpath '/../../..${ORIGIN}:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/iconengines/libqsvgicon.so
cp $QT/plugins/platforms/libqxcb.so dist/Resources/qt_plugins/platforms
patchelf --set-rpath '${ORIGIN}/../../..:${ORIGIN}/../../../../lib' dist/Resources/qt_plugins/platforms/libqxcb.so
cp qt.conf dist
mkdir dist/translations
cp translations/*.qm dist/translations
Expand Down
Loading

0 comments on commit f4056d1

Please sign in to comment.