q2rad 0.1.174__tar.gz → 0.1.176__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- {q2rad-0.1.174 → q2rad-0.1.176}/PKG-INFO +1 -1
- {q2rad-0.1.174 → q2rad-0.1.176}/pyproject.toml +1 -1
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2make.py +29 -6
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2rad.py +1 -1
- q2rad-0.1.176/q2rad/version.py +1 -0
- q2rad-0.1.174/q2rad/version.py +0 -1
- {q2rad-0.1.174 → q2rad-0.1.176}/LICENSE +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/README.md +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/__init__.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/__main__.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2actions.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2appmanager.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2appselector.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2constants.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2forms.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2lines.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2market.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2modules.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2packages.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2queries.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2raddb.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2reports.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2stylesettings.py +0 -0
- {q2rad-0.1.174 → q2rad-0.1.176}/q2rad/q2utils.py +0 -0
|
@@ -22,12 +22,13 @@ from q2gui.q2dialogs import q2mess, q2wait, q2ask
|
|
|
22
22
|
from q2rad.q2appselector import Q2AppSelect
|
|
23
23
|
from q2db.db import Q2Db
|
|
24
24
|
from q2rad.q2appmanager import AppManager
|
|
25
|
+
from q2gui import q2app
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def create_q2apps_sqlite(dist_folder):
|
|
28
29
|
database_folder_name = "databases"
|
|
29
|
-
database_name_prefix = "app1"
|
|
30
30
|
appsel = Q2AppSelect(f"{dist_folder}/q2apps.sqlite")
|
|
31
|
+
database_name_prefix = os.path.basename(appsel.q2_app.app_url) if appsel.q2_app.app_url else "app1"
|
|
31
32
|
appsel.db.insert(
|
|
32
33
|
"applications",
|
|
33
34
|
{
|
|
@@ -49,12 +50,20 @@ def create_q2apps_sqlite(dist_folder):
|
|
|
49
50
|
)
|
|
50
51
|
appsel.q2_app.migrate_db_logic(db_logic)
|
|
51
52
|
AppManager().import_json_app(AppManager().get_app_json(), db_logic)
|
|
53
|
+
db_logic.close()
|
|
54
|
+
db_logic = None
|
|
52
55
|
|
|
53
56
|
|
|
54
57
|
def make_binary(self):
|
|
55
58
|
form = Q2Form()
|
|
56
59
|
form.add_control("make_folder", "Working folder", datatype="char", data="make")
|
|
57
|
-
form.add_control(
|
|
60
|
+
form.add_control(
|
|
61
|
+
"binary_name",
|
|
62
|
+
"Application name",
|
|
63
|
+
datatype="char",
|
|
64
|
+
data=os.path.basename(q2app.q2_app.app_url) if q2app.q2_app.app_url else "q2-app",
|
|
65
|
+
)
|
|
66
|
+
form.add_control("onefile", "One file", datatype="char", control="check")
|
|
58
67
|
form.ok_button = 1
|
|
59
68
|
form.cancel_button = 1
|
|
60
69
|
form.show_form("Build binary")
|
|
@@ -66,6 +75,7 @@ def make_binary(self):
|
|
|
66
75
|
|
|
67
76
|
make_folder = os.path.abspath(form.s.make_folder)
|
|
68
77
|
binary_name = form.s.binary_name
|
|
78
|
+
onefile = "--onefile" if form.s.onefile else ""
|
|
69
79
|
if not os.path.isdir(make_folder):
|
|
70
80
|
os.mkdir(make_folder)
|
|
71
81
|
if not os.path.isdir(make_folder):
|
|
@@ -74,7 +84,7 @@ def make_binary(self):
|
|
|
74
84
|
main = "from q2rad.q2rad import Q2RadApp;app = Q2RadApp();app.run()"
|
|
75
85
|
open(f"{make_folder}/{binary_name}.py", "w").write(main)
|
|
76
86
|
|
|
77
|
-
dist_folder = os.path.abspath(f"{make_folder}
|
|
87
|
+
dist_folder = os.path.abspath(f"{make_folder}/dist/{binary_name}")
|
|
78
88
|
|
|
79
89
|
terminal = Q2Terminal(callback=print)
|
|
80
90
|
# pynstaller_executable = os.path.dirname(sys.executable) + "/pyinstaller"
|
|
@@ -105,17 +115,30 @@ def make_binary(self):
|
|
|
105
115
|
if not os.path.isfile(os.path.abspath(f"{make_folder}/q2rad.ico")):
|
|
106
116
|
shutil.copy("assets/q2rad.ico", os.path.abspath(f"{make_folder}/q2rad.ico"))
|
|
107
117
|
# run pyinstaller
|
|
108
|
-
terminal.run(
|
|
109
|
-
|
|
118
|
+
terminal.run(
|
|
119
|
+
f"{pynstaller_executable} -y --noconsole --clean {onefile} "
|
|
120
|
+
f" {packages} -i q2rad.ico '{binary_name}.py'"
|
|
121
|
+
)
|
|
110
122
|
if not os.path.isdir(os.path.abspath(f"{dist_folder}/assets")):
|
|
111
123
|
shutil.copytree("assets", os.path.abspath(f"{dist_folder}/assets"))
|
|
112
124
|
create_q2apps_sqlite(f"{dist_folder}")
|
|
113
125
|
|
|
126
|
+
if onefile:
|
|
127
|
+
dist_folder = os.path.abspath(f"{make_folder}/dist")
|
|
128
|
+
for x in os.listdir(dist_folder):
|
|
129
|
+
if os.path.isfile(os.path.join(dist_folder, x)):
|
|
130
|
+
shutil.move(os.path.join(dist_folder, x), os.path.join(dist_folder, binary_name, x))
|
|
131
|
+
|
|
114
132
|
w.close()
|
|
115
133
|
|
|
116
134
|
if terminal.exit_code != 0:
|
|
117
135
|
q2mess("Error occured while making binary! See output for details.")
|
|
118
136
|
else:
|
|
119
|
-
if
|
|
137
|
+
if (
|
|
138
|
+
q2ask(
|
|
139
|
+
f"Success! You binary is located in <b>{dist_folder}</b> <br>Do you want to open the folder?"
|
|
140
|
+
)
|
|
141
|
+
== 2
|
|
142
|
+
):
|
|
120
143
|
open_folder(dist_folder)
|
|
121
144
|
terminal.close()
|
|
@@ -79,7 +79,7 @@ import traceback
|
|
|
79
79
|
# TODO: excel custom format 2 report
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
q2_modules = ["q2rad", "q2gui", "q2db", "q2report", "q2terminal", "q2data2docx"
|
|
82
|
+
q2_modules = ["q2rad", "q2gui", "q2db", "q2report", "q2terminal", "q2data2docx"]
|
|
83
83
|
const = q2const()
|
|
84
84
|
_ = gettext.gettext
|
|
85
85
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.176"
|
q2rad-0.1.174/q2rad/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.174"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|