Skip to content

Commit

Permalink
check for OS compatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanslack committed Jan 14, 2025
1 parent 6308df0 commit febda9b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License: GPL3
Change Log:

+------------------------------------+
Mon, 14 Gen 2025 V.5.0.25
Mon, 14 Jan 2025 V.5.0.25

* Checking the output folder before running processes.
* Requires minimum Python version 3.9.0 .
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 19 additions & 6 deletions videomass/gui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion videomass/vdms_dialogs/wizard_dlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion videomass/vdms_main/main_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion videomass/vdms_sys/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit febda9b

Please sign in to comment.