Development of daun-builder
This commit is contained in:
@@ -1 +1 @@
|
|||||||
pyinstaller --onefile --console --noconfirm --icon logo.ico daun.py
|
pyinstaller --onefile --console --noconfirm --icon ui/logo.ico daun.py
|
||||||
11
modules/thread.py
Normal file
11
modules/thread.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Module to easily create threads
|
||||||
|
import threading
|
||||||
|
|
||||||
|
|
||||||
|
def threaded(func):
|
||||||
|
"""
|
||||||
|
Decorator to start a function in a new thread
|
||||||
|
"""
|
||||||
|
def thr(*args, **kwargs):
|
||||||
|
threading.Thread(target=func, args=(*args,), kwargs={**kwargs, }).start()
|
||||||
|
return thr
|
||||||
@@ -3,3 +3,5 @@ pyimgur
|
|||||||
psutil
|
psutil
|
||||||
requests
|
requests
|
||||||
pyinstaller
|
pyinstaller
|
||||||
|
zstandard
|
||||||
|
nuitka
|
||||||
75
ui/main.py
75
ui/main.py
@@ -110,13 +110,13 @@ class Ui_MainWindow(object):
|
|||||||
self.daun_builder_logo.setFrameShadow(QtWidgets.QFrame.Raised)
|
self.daun_builder_logo.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.daun_builder_logo.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
self.daun_builder_logo.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
||||||
self.daun_builder_logo.setObjectName("daun_builder_logo")
|
self.daun_builder_logo.setObjectName("daun_builder_logo")
|
||||||
self.choose_button = QtWidgets.QPushButton(self.centralwidget)
|
self.choose_folder_button = QtWidgets.QPushButton(self.centralwidget)
|
||||||
self.choose_button.setGeometry(QtCore.QRect(450, 390, 101, 25))
|
self.choose_folder_button.setGeometry(QtCore.QRect(450, 390, 101, 25))
|
||||||
self.choose_button.setMouseTracking(False)
|
self.choose_folder_button.setMouseTracking(False)
|
||||||
self.choose_button.setTabletTracking(False)
|
self.choose_folder_button.setTabletTracking(False)
|
||||||
self.choose_button.setFocusPolicy(QtCore.Qt.TabFocus)
|
self.choose_folder_button.setFocusPolicy(QtCore.Qt.TabFocus)
|
||||||
self.choose_button.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
self.choose_folder_button.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
||||||
self.choose_button.setStyleSheet("QPushButton {\n"
|
self.choose_folder_button.setStyleSheet("QPushButton {\n"
|
||||||
" color: white;\n"
|
" color: white;\n"
|
||||||
" border-width: 1px;\n"
|
" border-width: 1px;\n"
|
||||||
" border-radius:6px;\n"
|
" border-radius:6px;\n"
|
||||||
@@ -136,9 +136,9 @@ class Ui_MainWindow(object):
|
|||||||
" background-color: #434343;\n"
|
" background-color: #434343;\n"
|
||||||
" border-color: #0000;\n"
|
" border-color: #0000;\n"
|
||||||
"}")
|
"}")
|
||||||
self.choose_button.setAutoDefault(False)
|
self.choose_folder_button.setAutoDefault(False)
|
||||||
self.choose_button.setFlat(False)
|
self.choose_folder_button.setFlat(False)
|
||||||
self.choose_button.setObjectName("choose_button")
|
self.choose_folder_button.setObjectName("choose_folder_button")
|
||||||
self.path_box = QtWidgets.QLineEdit(self.centralwidget)
|
self.path_box = QtWidgets.QLineEdit(self.centralwidget)
|
||||||
self.path_box.setGeometry(QtCore.QRect(285, 390, 160, 25))
|
self.path_box.setGeometry(QtCore.QRect(285, 390, 160, 25))
|
||||||
self.path_box.setStyleSheet("border-width: 1px;\n"
|
self.path_box.setStyleSheet("border-width: 1px;\n"
|
||||||
@@ -148,13 +148,13 @@ class Ui_MainWindow(object):
|
|||||||
"background-color: #242424;\n"
|
"background-color: #242424;\n"
|
||||||
"font: 10pt \"Segoe UI\";")
|
"font: 10pt \"Segoe UI\";")
|
||||||
self.path_box.setObjectName("path_box")
|
self.path_box.setObjectName("path_box")
|
||||||
self.choose_button_2 = QtWidgets.QPushButton(self.centralwidget)
|
self.choose_icon_button = QtWidgets.QPushButton(self.centralwidget)
|
||||||
self.choose_button_2.setGeometry(QtCore.QRect(285, 430, 160, 25))
|
self.choose_icon_button.setGeometry(QtCore.QRect(285, 430, 160, 25))
|
||||||
self.choose_button_2.setMouseTracking(False)
|
self.choose_icon_button.setMouseTracking(False)
|
||||||
self.choose_button_2.setTabletTracking(False)
|
self.choose_icon_button.setTabletTracking(False)
|
||||||
self.choose_button_2.setFocusPolicy(QtCore.Qt.TabFocus)
|
self.choose_icon_button.setFocusPolicy(QtCore.Qt.TabFocus)
|
||||||
self.choose_button_2.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
self.choose_icon_button.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
||||||
self.choose_button_2.setStyleSheet("QPushButton {\n"
|
self.choose_icon_button.setStyleSheet("QPushButton {\n"
|
||||||
" color: white;\n"
|
" color: white;\n"
|
||||||
" border-width: 1px;\n"
|
" border-width: 1px;\n"
|
||||||
" border-radius:6px;\n"
|
" border-radius:6px;\n"
|
||||||
@@ -174,9 +174,9 @@ class Ui_MainWindow(object):
|
|||||||
" background-color: #434343;\n"
|
" background-color: #434343;\n"
|
||||||
" border-color: #0000;\n"
|
" border-color: #0000;\n"
|
||||||
"}")
|
"}")
|
||||||
self.choose_button_2.setAutoDefault(False)
|
self.choose_icon_button.setAutoDefault(False)
|
||||||
self.choose_button_2.setFlat(False)
|
self.choose_icon_button.setFlat(False)
|
||||||
self.choose_button_2.setObjectName("choose_button_2")
|
self.choose_icon_button.setObjectName("choose_icon_button")
|
||||||
self.is_pyinstaller = QtWidgets.QRadioButton(self.centralwidget)
|
self.is_pyinstaller = QtWidgets.QRadioButton(self.centralwidget)
|
||||||
self.is_pyinstaller.setGeometry(QtCore.QRect(20, 415, 80, 15))
|
self.is_pyinstaller.setGeometry(QtCore.QRect(20, 415, 80, 15))
|
||||||
self.is_pyinstaller.setStyleSheet("font: 10pt \"Segoe UI\";")
|
self.is_pyinstaller.setStyleSheet("font: 10pt \"Segoe UI\";")
|
||||||
@@ -200,17 +200,33 @@ class Ui_MainWindow(object):
|
|||||||
"background-color: #242424;\n"
|
"background-color: #242424;\n"
|
||||||
"font: 10pt \"Segoe UI\";")
|
"font: 10pt \"Segoe UI\";")
|
||||||
self.builder_bg.setObjectName("builder_bg")
|
self.builder_bg.setObjectName("builder_bg")
|
||||||
|
self.options_bg = QtWidgets.QWidget(self.centralwidget)
|
||||||
|
self.options_bg.setGeometry(QtCore.QRect(140, 390, 141, 71))
|
||||||
|
self.options_bg.setStyleSheet("border-width: 1px;\n"
|
||||||
|
"border-radius:15px;\n"
|
||||||
|
"border-style: solid;\n"
|
||||||
|
"border-color: #303030;\n"
|
||||||
|
"padding: 10px;\n"
|
||||||
|
"background-color: #242424;\n"
|
||||||
|
"font: 10pt \"Segoe UI\";")
|
||||||
|
self.options_bg.setObjectName("options_bg")
|
||||||
|
self.enable_console_button = QtWidgets.QCheckBox(self.centralwidget)
|
||||||
|
self.enable_console_button.setGeometry(QtCore.QRect(150, 400, 121, 17))
|
||||||
|
self.enable_console_button.setStyleSheet("font: 10pt \"Segoe UI\";")
|
||||||
|
self.enable_console_button.setObjectName("enable_console_button")
|
||||||
self.builder_bg.raise_()
|
self.builder_bg.raise_()
|
||||||
self.build_button.raise_()
|
self.build_button.raise_()
|
||||||
self.modules_list.raise_()
|
self.modules_list.raise_()
|
||||||
self.desc_list.raise_()
|
self.desc_list.raise_()
|
||||||
self.daun_builder_logo.raise_()
|
self.daun_builder_logo.raise_()
|
||||||
self.choose_button.raise_()
|
self.choose_folder_button.raise_()
|
||||||
self.path_box.raise_()
|
self.path_box.raise_()
|
||||||
self.choose_button_2.raise_()
|
self.choose_icon_button.raise_()
|
||||||
self.is_pyinstaller.raise_()
|
self.is_pyinstaller.raise_()
|
||||||
self.is_nuitka.raise_()
|
self.is_nuitka.raise_()
|
||||||
self.label.raise_()
|
self.label.raise_()
|
||||||
|
self.options_bg.raise_()
|
||||||
|
self.enable_console_button.raise_()
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
@@ -220,26 +236,31 @@ class Ui_MainWindow(object):
|
|||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "daun builder"))
|
MainWindow.setWindowTitle(_translate("MainWindow", "daun builder"))
|
||||||
self.build_button.setText(_translate("MainWindow", "Build it"))
|
self.build_button.setText(_translate("MainWindow", "Build it"))
|
||||||
self.desc_list.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
self.desc_list.setHtml(_translate("MainWindow",
|
||||||
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
"p, li { white-space: pre-wrap; }\n"
|
||||||
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
|
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
|
||||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
|
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
|
||||||
self.daun_builder_logo.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
self.daun_builder_logo.setHtml(_translate("MainWindow",
|
||||||
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
"p, li { white-space: pre-wrap; }\n"
|
||||||
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:20pt; font-weight:400; font-style:normal;\">\n"
|
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:20pt; font-weight:400; font-style:normal;\">\n"
|
||||||
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">daun builder</p></body></html>"))
|
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">daun builder</p></body></html>"))
|
||||||
self.choose_button.setText(_translate("MainWindow", "Choose folder"))
|
self.choose_folder_button.setText(_translate("MainWindow", "Choose folder"))
|
||||||
self.choose_button_2.setText(_translate("MainWindow", "Choose custom icon"))
|
self.choose_icon_button.setText(_translate("MainWindow", "Choose custom icon"))
|
||||||
self.is_pyinstaller.setText(_translate("MainWindow", "pyinstaller"))
|
self.is_pyinstaller.setText(_translate("MainWindow", "pyinstaller"))
|
||||||
self.is_nuitka.setText(_translate("MainWindow", "nuitka"))
|
self.is_nuitka.setText(_translate("MainWindow", "nuitka"))
|
||||||
self.label.setText(_translate("MainWindow", "Choose builder"))
|
self.label.setText(_translate("MainWindow", "Choose builder"))
|
||||||
import images_rc
|
self.enable_console_button.setText(_translate("MainWindow", "Invisible window"))
|
||||||
|
|
||||||
|
|
||||||
|
import images_rc
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
MainWindow = QtWidgets.QMainWindow()
|
MainWindow = QtWidgets.QMainWindow()
|
||||||
ui = Ui_MainWindow()
|
ui = Ui_MainWindow()
|
||||||
|
|||||||
47
ui/main.ui
47
ui/main.ui
@@ -168,7 +168,7 @@ font: 10pt "Segoe UI";</string>
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="html">
|
<property name="html">
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Segoe UI'; font-size:10pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Segoe UI'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||||
@@ -215,7 +215,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<set>Qt::NoTextInteraction</set>
|
<set>Qt::NoTextInteraction</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="choose_button">
|
<widget class="QPushButton" name="choose_folder_button">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>450</x>
|
<x>450</x>
|
||||||
@@ -286,7 +286,7 @@ background-color: #242424;
|
|||||||
font: 10pt "Segoe UI";</string>
|
font: 10pt "Segoe UI";</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="choose_button_2">
|
<widget class="QPushButton" name="choose_icon_button">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>285</x>
|
<x>285</x>
|
||||||
@@ -409,17 +409,54 @@ background-color: #242424;
|
|||||||
font: 10pt "Segoe UI";</string>
|
font: 10pt "Segoe UI";</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="options_bg" native="true">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>140</x>
|
||||||
|
<y>390</y>
|
||||||
|
<width>141</width>
|
||||||
|
<height>71</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-width: 1px;
|
||||||
|
border-radius:15px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #303030;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #242424;
|
||||||
|
font: 10pt "Segoe UI";</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="enable_console_button">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>150</x>
|
||||||
|
<y>400</y>
|
||||||
|
<width>121</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 10pt "Segoe UI";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Invisible window</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<zorder>builder_bg</zorder>
|
<zorder>builder_bg</zorder>
|
||||||
<zorder>build_button</zorder>
|
<zorder>build_button</zorder>
|
||||||
<zorder>modules_list</zorder>
|
<zorder>modules_list</zorder>
|
||||||
<zorder>desc_list</zorder>
|
<zorder>desc_list</zorder>
|
||||||
<zorder>daun_builder_logo</zorder>
|
<zorder>daun_builder_logo</zorder>
|
||||||
<zorder>choose_button</zorder>
|
<zorder>choose_folder_button</zorder>
|
||||||
<zorder>path_box</zorder>
|
<zorder>path_box</zorder>
|
||||||
<zorder>choose_button_2</zorder>
|
<zorder>choose_icon_button</zorder>
|
||||||
<zorder>is_pyinstaller</zorder>
|
<zorder>is_pyinstaller</zorder>
|
||||||
<zorder>is_nuitka</zorder>
|
<zorder>is_nuitka</zorder>
|
||||||
<zorder>label</zorder>
|
<zorder>label</zorder>
|
||||||
|
<zorder>options_bg</zorder>
|
||||||
|
<zorder>enable_console_button</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user