mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-20 04:26:28 +02:00
Fix incompatibility with recent cx_Freeze
The run() function of the startup script now gets the main module name as a parameter.
This commit is contained in:
parent
d312d635f0
commit
b9a7174886
1 changed files with 6 additions and 3 deletions
|
@ -30,11 +30,14 @@ sys.frozen = True
|
|||
sys.path = sys.path[:4]
|
||||
|
||||
|
||||
def run():
|
||||
def run(*args):
|
||||
m = __import__("__main__")
|
||||
importer = zipimport.zipimporter(os.path.dirname(os.__file__))
|
||||
name, ext = os.path.splitext(os.path.basename(os.path.normcase(FILE_NAME)))
|
||||
moduleName = "%s__main__" % name
|
||||
if len(args) == 0:
|
||||
name, ext = os.path.splitext(os.path.basename(os.path.normcase(FILE_NAME)))
|
||||
moduleName = "%s__main__" % name
|
||||
else:
|
||||
moduleName = args[0]
|
||||
code = importer.get_code(moduleName)
|
||||
exec(code, m.__dict__)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue