From 22c6b8b57f2a56c7c4269460bd094c786f3aaec7 Mon Sep 17 00:00:00 2001 From: Dpeta Date: Sun, 8 May 2022 04:15:25 +0200 Subject: [PATCH] linux build * --- pyinstaller.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pyinstaller.py b/pyinstaller.py index d0d8ea5..68333bd 100644 --- a/pyinstaller.py +++ b/pyinstaller.py @@ -283,7 +283,10 @@ if sys.platform == 'win32': shutil.copy(x, os.path.join('dist', data_files[x])) files = os.listdir('dist') - os.mkdir(os.path.join('dist', 'Pesterchum')) + try: + os.mkdir(os.path.join('dist', 'Pesterchum')) + except FileExistsError: + pass for x in files: shutil.move(os.path.join('dist',x), os.path.join('dist', 'Pesterchum')) @@ -353,7 +356,7 @@ elif sys.platform == 'linux': for x in add_data: run_linux.append('--add-data=%s' % x.replace(';',':') ) if windowed == 'y': - run_win32.append('--windowed') + run_linux.append('--windowed') print(run_linux) PyInstaller.__main__.run(run_linux) @@ -372,9 +375,15 @@ elif sys.platform == 'linux': shutil.copy(x, os.path.join('dist', data_files[x])) files = os.listdir('dist') - os.mkdir(os.path.join('dist', 'Pesterchum')) + try: + os.mkdir(os.path.join('dist', 'Pesterchum')) + except FileExistsError: + pass for x in files: - shutil.move(os.path.join('dist',x), os.path.join('dist', 'Pesterchum')) + try: + shutil.move(os.path.join('dist',x), os.path.join('dist', 'Pesterchum')) + except FileExistsError: + pass #shutil.copy(os.path.join('build', 'Pesterchum', 'xref-Pesterchum.html'), # os.path.join('dist', 'Pesterchum', 'xref-Pesterchum.html')) #shutil.copy(os.path.join('build', 'Pesterchum', 'Analysis-00.toc'),