mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Replaced the use of runpy for running Qt by a simple subprocess call. runpy would cause weird QTimer warnings.
This commit is contained in:
parent
357a02c74b
commit
b217309618
4
build.py
4
build.py
@ -72,7 +72,7 @@ def build_cocoa(edition, dev, help_destpath):
|
|||||||
'pe': 'cocoa/pe/build/{0}/dupeGuru\\ PE.app',
|
'pe': 'cocoa/pe/build/{0}/dupeGuru\\ PE.app',
|
||||||
}[edition].format(subfolder)
|
}[edition].format(subfolder)
|
||||||
tmpl = open('run_template_cocoa.py', 'rt').read()
|
tmpl = open('run_template_cocoa.py', 'rt').read()
|
||||||
run_contents = tmpl.format(app_path=app_path)
|
run_contents = tmpl.replace('{{app_path}}', app_path)
|
||||||
open('run.py', 'wt').write(run_contents)
|
open('run.py', 'wt').write(run_contents)
|
||||||
|
|
||||||
def build_qt(edition, dev):
|
def build_qt(edition, dev):
|
||||||
@ -80,7 +80,7 @@ def build_qt(edition, dev):
|
|||||||
print_and_do("pyrcc4 -py3 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py')))
|
print_and_do("pyrcc4 -py3 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py')))
|
||||||
print("Creating the run.py file")
|
print("Creating the run.py file")
|
||||||
tmpl = open('run_template_qt.py', 'rt').read()
|
tmpl = open('run_template_qt.py', 'rt').read()
|
||||||
run_contents = tmpl.format(edition=edition)
|
run_contents = tmpl.replace('{{edition}}', edition)
|
||||||
open('run.py', 'wt').write(run_contents)
|
open('run.py', 'wt').write(run_contents)
|
||||||
|
|
||||||
def build_pe_modules(ui):
|
def build_pe_modules(ui):
|
||||||
|
@ -4,7 +4,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
return os.system('open {app_path}')
|
return os.system('open {{app_path}}')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
@ -3,14 +3,13 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path as op
|
import os.path as op
|
||||||
import runpy
|
import subprocess
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
scriptpath = op.abspath(__file__)
|
scriptpath = op.abspath(__file__)
|
||||||
scriptfolder = op.dirname(scriptpath)
|
scriptfolder = op.dirname(scriptpath)
|
||||||
sys.path.insert(0, scriptfolder)
|
newenv = {'PYTHONPATH': scriptfolder}
|
||||||
del sys.argv[0]
|
subprocess.Popen([sys.executable, '-m', 'qt.{{edition}}.start'], env=newenv)
|
||||||
runpy.run_module('qt.{edition}.start', run_name="__main__")
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
Loading…
x
Reference in New Issue
Block a user