-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ videomass (5.0.25-1) UNRELEASED; urgency=medium | |
to restart. | ||
* Updated copyleft year. | ||
|
||
-- Gianluca Pernigotto <[email protected]> Tue, 14 Gen 2025 15:30:00 +0200 | ||
-- Gianluca Pernigotto <[email protected]> Tue, 14 Jan 2025 15:30:00 +0200 | ||
|
||
videomass (5.0.21-1) UNRELEASED; urgency=medium | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
Author: Gianluca Pernigotto <[email protected]> | ||
Copyleft - 2025 Gianluca Pernigotto <[email protected]> | ||
license: GPL3 | ||
Rev: Gen.14.2025 | ||
Rev: Jan.14.2025 | ||
Code checker: flake8, pylint | ||
This file is part of Videomass. | ||
|
@@ -234,27 +234,40 @@ def OnExit(self): | |
return False | ||
|
||
if self.appset['auto-restart-app']: | ||
auto_restart(self.appset['app'], self.appset['make_portable']) | ||
auto_restart(self.appset['ostype'], | ||
self.appset['app'], | ||
self.appset['make_portable'], | ||
) | ||
return True | ||
|
||
return True | ||
# ------------------------------------------------------------------- | ||
|
||
|
||
def auto_restart(apptype, portmode): | ||
def auto_restart(ostype, apptype, portmode): | ||
""" | ||
This function spawn the same executable again, automatically | ||
restarting this application (Videomass), for example after | ||
the wizard dialog or after applying settings that require | ||
the application to be restarted. | ||
""" | ||
if not ''.join(sys.argv): | ||
sys.exit() | ||
|
||
if apptype == 'pyinstaller': | ||
executable = sys.executable | ||
wx.Execute(f'{executable}', flags=wx.EXEC_SYNC) | ||
else: | ||
makeportable = '' if not portmode else f'--make-portable {portmode}' | ||
cmdargs = f'{sys.executable} {sys.argv[0]} {makeportable}' | ||
wx.Execute(cmdargs, flags=wx.EXEC_SYNC) | ||
makeportable = '' if not portmode else fr'--make-portable "{portmode}"' | ||
if ostype == 'Windows': | ||
if os.path.basename(sys.argv[0]) == 'launcher': | ||
cmdargs = f'{sys.executable} {sys.argv[0]} {makeportable}' | ||
else: | ||
cmdargs = f'{sys.argv[0]} {makeportable}' | ||
wx.Execute(f'{cmdargs}', flags=wx.EXEC_SYNC) | ||
else: | ||
cmdargs = f'{sys.executable} {sys.argv[0]} {makeportable}' | ||
wx.Execute(cmdargs, flags=wx.EXEC_SYNC) | ||
|
||
|
||
def main(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
Author: Gianluca Pernigotto <[email protected]> | ||
Copyleft - 2025 Gianluca Pernigotto <[email protected]> | ||
license: GPL3 | ||
Rev: Gen.14.2025 | ||
Rev: Jan.14.2025 | ||
Code checker: flake8, pylint | ||
This file is part of Videomass. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
Author: Gianluca Pernigotto <[email protected]> | ||
Copyleft - 2025 Gianluca Pernigotto <[email protected]> | ||
license: GPL3 | ||
Rev: Gen.14.2025 | ||
Rev: Jan.14.2025 | ||
Code checker: flake8, pylint | ||
This file is part of Videomass. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
Author: Gianluca Pernigotto <[email protected]> | ||
Copyleft - 2025 Gianluca Pernigotto <[email protected]> | ||
license: GPL3 | ||
Rev: Gen.14.2025 | ||
Rev: Jan.14.2025 | ||
Code checker: flake8, pylint | ||
This file is part of Videomass. | ||
|