mirror of
https://github.com/JDM170/SaveWizard
synced 2025-04-20 22:30:42 +07:00
Update
* small README update * change exec() to exec_() * added config parsing when app starting up * setup.py fixes (for cx_Freeze build) * updated requirements Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
@@ -24,4 +24,4 @@ Commands to build project:
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
#### Since the program is in development, I won't give up help and guidance on my errors in the code.
|
#### If you've found a bug - please open an issue
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ if __name__ == '__main__':
|
|||||||
app = QApplication(argv)
|
app = QApplication(argv)
|
||||||
win = EditorWindow()
|
win = EditorWindow()
|
||||||
win.show()
|
win.show()
|
||||||
exit(app.exec())
|
exit(app.exec_())
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ if __name__ == '__main__':
|
|||||||
app = QApplication(argv)
|
app = QApplication(argv)
|
||||||
win = MainWindow()
|
win = MainWindow()
|
||||||
win.show()
|
win.show()
|
||||||
exit(app.exec())
|
exit(app.exec_())
|
||||||
|
|||||||
@@ -8,19 +8,19 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>360</width>
|
<width>360</width>
|
||||||
<height>350</height>
|
<height>400</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>360</width>
|
<width>360</width>
|
||||||
<height>350</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>360</width>
|
<width>360</width>
|
||||||
<height>350</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -38,21 +38,11 @@
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>341</width>
|
<width>341</width>
|
||||||
<height>81</height>
|
<height>104</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="basic_inf_layout">
|
<layout class="QGridLayout" name="basic_inf_layout">
|
||||||
<item row="0" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="QLineEdit" name="money_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QCheckBox" name="money_dont_change">
|
<widget class="QCheckBox" name="money_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -65,7 +55,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="xp_label">
|
<widget class="QLabel" name="xp_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -78,7 +68,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="xp_edit">
|
<widget class="QLineEdit" name="xp_edit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -88,7 +78,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="money_edit">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
<widget class="QCheckBox" name="xp_dont_change">
|
<widget class="QCheckBox" name="xp_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -101,20 +101,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="1">
|
||||||
<widget class="QLabel" name="loan_limit_label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Loan limit:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="loan_limit_edit">
|
<widget class="QLineEdit" name="loan_limit_edit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -124,7 +111,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QCheckBox" name="loan_limit_dont_change">
|
<widget class="QCheckBox" name="loan_limit_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -137,7 +124,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="money_label">
|
<widget class="QLabel" name="money_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -150,6 +137,34 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="loan_limit_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Loan limit:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="basic_inf_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Basic info</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="path_button">
|
<widget class="QPushButton" name="path_button">
|
||||||
@@ -178,7 +193,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>130</x>
|
<x>130</x>
|
||||||
<y>310</y>
|
<y>360</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -200,7 +215,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>80</x>
|
<x>80</x>
|
||||||
<y>350</y>
|
<y>400</y>
|
||||||
<width>211</width>
|
<width>211</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -222,92 +237,13 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>140</y>
|
<y>160</y>
|
||||||
<width>341</width>
|
<width>341</width>
|
||||||
<height>161</height>
|
<height>191</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="skills_layout">
|
<layout class="QGridLayout" name="skills_layout">
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="long_distance_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="urgent_delivery_label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>13</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Urgent delivery:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="QCheckBox" name="ecodriving_dont_change">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Don't change</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="adr_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLineEdit" name="urgent_delivery_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QCheckBox" name="fragile_cargo_dont_change">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Don't change</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QLineEdit" name="ecodriving_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QCheckBox" name="high_value_cargo_dont_change">
|
<widget class="QCheckBox" name="high_value_cargo_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -320,30 +256,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="2">
|
||||||
<widget class="QLineEdit" name="fragile_cargo_edit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QCheckBox" name="adr_dont_change">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Times New Roman</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Don't change</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QCheckBox" name="long_distance_dont_change">
|
<widget class="QCheckBox" name="long_distance_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -356,8 +269,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QLineEdit" name="high_value_cargo_edit">
|
<widget class="QLineEdit" name="ecodriving_edit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Times New Roman</family>
|
<family>Times New Roman</family>
|
||||||
@@ -366,33 +279,30 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="high_value_cargo_label">
|
<widget class="QCheckBox" name="adr_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Times New Roman</family>
|
<family>Times New Roman</family>
|
||||||
<pointsize>13</pointsize>
|
<pointsize>10</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>High value cargo:</string>
|
<string>Don't change</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="1">
|
||||||
<widget class="QLabel" name="fragile_cargo_label">
|
<widget class="QLineEdit" name="fragile_cargo_edit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Times New Roman</family>
|
<family>Times New Roman</family>
|
||||||
<pointsize>13</pointsize>
|
<pointsize>10</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string>Fragile cargo:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="ecodriving_label">
|
<widget class="QLabel" name="ecodriving_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -405,7 +315,30 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="high_value_cargo_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>High value cargo:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="high_value_cargo_edit">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
<widget class="QCheckBox" name="urgent_delivery_dont_change">
|
<widget class="QCheckBox" name="urgent_delivery_dont_change">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -418,7 +351,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="fragile_cargo_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Fragile cargo:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="long_distance_label">
|
<widget class="QLabel" name="long_distance_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -431,7 +377,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="adr_label">
|
<widget class="QLabel" name="adr_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@@ -444,6 +390,90 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="urgent_delivery_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Urgent delivery:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="long_distance_edit">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="urgent_delivery_edit">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="QCheckBox" name="fragile_cargo_dont_change">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't change</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QCheckBox" name="ecodriving_dont_change">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't change</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="adr_edit">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Times New Roman</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="skills_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Skills</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="apply">
|
<widget class="QPushButton" name="apply">
|
||||||
@@ -453,7 +483,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>250</x>
|
<x>250</x>
|
||||||
<y>310</y>
|
<y>360</y>
|
||||||
<width>101</width>
|
<width>101</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -475,7 +505,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>310</y>
|
<y>360</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -489,6 +519,19 @@
|
|||||||
<string>Unlock garages</string>
|
<string>Unlock garages</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="updates_checkbox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>180</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>181</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Check updates on startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>path_button</tabstop>
|
<tabstop>path_button</tabstop>
|
||||||
|
|||||||
@@ -7,13 +7,16 @@ from ctypes import CDLL
|
|||||||
from PyQt5.QtCore import Qt, QRegExp
|
from PyQt5.QtCore import Qt, QRegExp
|
||||||
from PyQt5.QtGui import QRegExpValidator
|
from PyQt5.QtGui import QRegExpValidator
|
||||||
from PyQt5.QtWidgets import QDialog, QFileDialog
|
from PyQt5.QtWidgets import QDialog, QFileDialog
|
||||||
|
from ast import literal_eval
|
||||||
from .form import Ui_MainWindow
|
from .form import Ui_MainWindow
|
||||||
from util import *
|
from util import *
|
||||||
from dataIO import dataIO
|
from dataIO import dataIO
|
||||||
from module_second.script import SecondWindow
|
from module_second.script import SecondWindow
|
||||||
|
from module_parsing.script import check_remote_hashes, update_configs
|
||||||
|
from statics import update_config_name
|
||||||
|
|
||||||
|
|
||||||
libdecrypt = CDLL("{}\SII_Decrypt.dll".format(getcwd()))
|
libdecrypt = CDLL("{}\\SII_Decrypt.dll".format(getcwd()))
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QDialog, Ui_MainWindow):
|
class MainWindow(QDialog, Ui_MainWindow):
|
||||||
@@ -24,6 +27,18 @@ class MainWindow(QDialog, Ui_MainWindow):
|
|||||||
self.ui = Ui_MainWindow()
|
self.ui = Ui_MainWindow()
|
||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
update_cfg = {"update_on_start": False}
|
||||||
|
if isfile(update_config_name):
|
||||||
|
with open(update_config_name, "r") as f:
|
||||||
|
update_cfg = literal_eval(f.read())
|
||||||
|
|
||||||
|
update_bool = update_cfg.get("update_on_start")
|
||||||
|
if update_bool:
|
||||||
|
self.ui.updates_checkbox.setChecked(update_bool)
|
||||||
|
update_list = check_remote_hashes()
|
||||||
|
if update_list and len(update_list) > 0:
|
||||||
|
update_configs(update_list)
|
||||||
|
|
||||||
self.file_path = ""
|
self.file_path = ""
|
||||||
self.old_file = ""
|
self.old_file = ""
|
||||||
|
|
||||||
@@ -63,6 +78,7 @@ class MainWindow(QDialog, Ui_MainWindow):
|
|||||||
|
|
||||||
# Connecting buttons
|
# Connecting buttons
|
||||||
self.ui.path_button.clicked.connect(self.open_file_dialog)
|
self.ui.path_button.clicked.connect(self.open_file_dialog)
|
||||||
|
self.ui.updates_checkbox.clicked.connect(self.update_on_startup)
|
||||||
self.ui.second_window.clicked.connect(self.open_second_win)
|
self.ui.second_window.clicked.connect(self.open_second_win)
|
||||||
self.ui.backup.clicked.connect(self.recover_backup)
|
self.ui.backup.clicked.connect(self.recover_backup)
|
||||||
self.ui.apply.clicked.connect(self.apply_changes)
|
self.ui.apply.clicked.connect(self.apply_changes)
|
||||||
@@ -174,9 +190,13 @@ class MainWindow(QDialog, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def update_on_startup(self):
|
||||||
|
with open(update_config_name, "w") as f:
|
||||||
|
f.write(str({"update_on_start": self.ui.updates_checkbox.isChecked()}))
|
||||||
|
|
||||||
def open_second_win(self):
|
def open_second_win(self):
|
||||||
second_win = SecondWindow(self.selected_game, self.owns, self)
|
second_win = SecondWindow(self.selected_game, self.owns, self)
|
||||||
second_win.exec()
|
second_win.exec_()
|
||||||
|
|
||||||
def recover_backup(self):
|
def recover_backup(self):
|
||||||
backup_path = self.file_path + ".swbak"
|
backup_path = self.file_path + ".swbak"
|
||||||
@@ -191,24 +211,25 @@ class MainWindow(QDialog, Ui_MainWindow):
|
|||||||
self.get_file_data(self.file_path)
|
self.get_file_data(self.file_path)
|
||||||
|
|
||||||
def apply_changes(self):
|
def apply_changes(self):
|
||||||
if not self.ui.dont_change_all_inf.isChecked():
|
if self.ui.dont_change_all_inf.isChecked():
|
||||||
for key, value in self.basic_edits.items():
|
return
|
||||||
if value[0].isChecked() is False:
|
for key, value in self.basic_edits.items():
|
||||||
util.set_value(util.search_line(value[1]), key.text())
|
if value[0].isChecked() is False:
|
||||||
value[0].setChecked(True)
|
util.set_value(util.search_line(value[1]), key.text())
|
||||||
if self.ui.adr_dont_change.isChecked() is False:
|
value[0].setChecked(True)
|
||||||
adr_set = self.get_adr_from_line()
|
if self.ui.adr_dont_change.isChecked() is False:
|
||||||
if len(adr_set) < 6:
|
adr_set = self.get_adr_from_line()
|
||||||
QMessageBox.critical(self, "Error", "ADR can't have less than 6 elements.")
|
if len(adr_set) < 6:
|
||||||
elif len(adr_set) > 6:
|
QMessageBox.critical(self, "Error", "ADR can't have less than 6 elements.")
|
||||||
QMessageBox.critical(self, "Error", "ADR can't have more than 6 elements.")
|
elif len(adr_set) > 6:
|
||||||
else:
|
QMessageBox.critical(self, "Error", "ADR can't have more than 6 elements.")
|
||||||
adr_new = int("".join(adr_set), 2)
|
else:
|
||||||
util.set_value(util.search_line("adr:"), str(adr_new))
|
adr_new = int("".join(adr_set), 2)
|
||||||
for key, value in self.skill_edits.items():
|
util.set_value(util.search_line("adr:"), str(adr_new))
|
||||||
if value[0].isChecked() is False:
|
for key, value in self.skill_edits.items():
|
||||||
util.set_value(util.search_line(value[1]), key.text())
|
if value[0].isChecked() is False:
|
||||||
value[0].setChecked(True)
|
util.set_value(util.search_line(value[1]), key.text())
|
||||||
|
value[0].setChecked(True)
|
||||||
backup = self.file_path + ".swbak"
|
backup = self.file_path + ".swbak"
|
||||||
with open(backup, "w") as f:
|
with open(backup, "w") as f:
|
||||||
f.write(self.old_file)
|
f.write(self.old_file)
|
||||||
|
|||||||
@@ -48,19 +48,14 @@ def check_remote_hashes():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def update_configs(cfg_list, ans_upd=0):
|
def update_configs(cfg_list):
|
||||||
"""
|
"""
|
||||||
:param cfg_list: config list to update
|
:param cfg_list: config list to update
|
||||||
:param ans_upd: ask user to update configs, update or not, remember answer or not
|
|
||||||
"""
|
"""
|
||||||
if ans_upd in (0, 1):
|
for cfg in cfg_list:
|
||||||
for cfg in cfg_list:
|
check_path(cfg)
|
||||||
check_path(cfg)
|
response_status, response = get_response_result(github_link + cfg)
|
||||||
response_status, response = get_response_result(github_link + cfg)
|
if response_status:
|
||||||
if response_status:
|
remote_cfg = literal_eval(response.text)
|
||||||
remote_cfg = literal_eval(response.text)
|
if dataIO.is_valid_json(cfg) or os.path.exists(cfg):
|
||||||
if dataIO.is_valid_json(cfg) or os.path.exists(cfg):
|
dataIO.save_json(cfg, remote_cfg)
|
||||||
dataIO.save_json(cfg, remote_cfg)
|
|
||||||
if ans_upd in (1, 3):
|
|
||||||
with open(update_config_name, "w") as f:
|
|
||||||
f.write(str({"answer_updates": ans_upd == 3, "update_on_start": ans_upd == 1}))
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
altgraph==0.17.4
|
altgraph==0.17.4
|
||||||
certifi==2023.11.17
|
certifi==2023.11.17
|
||||||
charset-normalizer==3.3.2
|
charset-normalizer==3.3.2
|
||||||
cx-Freeze==6.15.12
|
cx-Freeze==7.0.0
|
||||||
cx-Logging==3.1.0
|
cx-Logging==3.1.0
|
||||||
idna==3.6
|
idna==3.6
|
||||||
lief==0.13.2
|
lief==0.14.0
|
||||||
packaging==23.2
|
packaging==23.2
|
||||||
pefile==2023.2.7
|
pefile==2023.2.7
|
||||||
pyinstaller==6.3.0
|
pyinstaller==6.3.0
|
||||||
|
|||||||
8
setup.py
8
setup.py
@@ -13,8 +13,8 @@ executables = [
|
|||||||
Executable('init_config_editor.py', target_name='SaveWizard_Config_Editor.exe', base=base)
|
Executable('init_config_editor.py', target_name='SaveWizard_Config_Editor.exe', base=base)
|
||||||
]
|
]
|
||||||
|
|
||||||
excludes = ['html', 'pydoc_data', 'unittest', 'xml', 'pwd', 'shlex', 'platform', 'webbrowser', 'pydoc', 'tty',
|
excludes = ['html', 'pydoc_data', 'unittest', 'xml', 'pwd', 'shlex', 'platform', 'webbrowser', 'pydoc',
|
||||||
'inspect', 'doctest', 'plistlib', 'subprocess', 'bz2', '_strptime', 'dummy_threading']
|
'tty', 'doctest', 'plistlib', 'subprocess', 'bz2', '_strptime', 'dummy_threading']
|
||||||
|
|
||||||
includes = ['pkgutil', 'enum', 'queue']
|
includes = ['pkgutil', 'enum', 'queue']
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ zip_include_packages = [
|
|||||||
# PyQt5
|
# PyQt5
|
||||||
'PyQt5',
|
'PyQt5',
|
||||||
# Modules for parsing cfg's
|
# Modules for parsing cfg's
|
||||||
'requests', 'logging', 'certifi', 'chardet', 'idna', 'urllib3',
|
'requests', 'logging', 'certifi', 'chardet', 'idna', 'urllib3', 'inspect',
|
||||||
# Self-written modules
|
# Self-written modules
|
||||||
'module_parsing', 'module_main', 'module_second', 'module_config_editor'
|
'module_parsing', 'module_main', 'module_second', 'module_config_editor'
|
||||||
]
|
]
|
||||||
@@ -49,7 +49,7 @@ options = {
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='SaveWizard',
|
name='SaveWizard',
|
||||||
version='1.4',
|
version='1.4.1',
|
||||||
description='For editing ETS2 sii files',
|
description='For editing ETS2 sii files',
|
||||||
executables=executables,
|
executables=executables,
|
||||||
options=options,
|
options=options,
|
||||||
|
|||||||
Reference in New Issue
Block a user