File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ jobs:
3030 if : matrix.os == 'macos-latest'
3131 run : |
3232 pip install pillow
33- pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_mac.zip:ffmpeg/ffmpeg_mac.zip " \
33+ pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_mac.zip:ffmpeg" \
3434 --add-data "web:web" --add-data "js:js" --add-data "index.html:." --add-data "launch.html:." --add-data "style.css:." \
3535 --osx-bundle-identifier com.infinitode.scriptify --windowed main.py --version-file version_info.txt
3636
3737 - name : Build for Linux
3838 if : matrix.os == 'ubuntu-latest'
3939 run : |
40- pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_ubuntu.zip:ffmpeg/ffmpeg_ubuntu.zip " \
40+ pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_ubuntu.zip:ffmpeg" \
4141 --add-data "web:web" --add-data "js:js" --add-data "index.html:." --add-data "launch.html:." --add-data "style.css:." \
4242 --windowed main.py --version-file version_info.txt
4343
4949 - name : Build for Windows
5050 if : matrix.os == 'windows-latest'
5151 run : |
52- pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_windows.zip:ffmpeg/ffmpeg_windows.zip " `
52+ pyinstaller --onefile --name Scriptify --icon web/favicon.ico --add-data "ffmpeg/ffmpeg_windows.zip:ffmpeg" `
5353 --add-data "web:web" --add-data "js:js" --add-data "index.html:." --add-data "launch.html:." --add-data "style.css:." `
5454 main.py --version-file version_info.txt
5555
Original file line number Diff line number Diff line change @@ -57,13 +57,26 @@ def extract_ffmpeg():
5757
5858 # Paths
5959 archive_path = os .path .join (base_path , "ffmpeg" , archive_name )
60- extracted_path = os .path .join (temp_dir , extracted_binary )
6160
62- # Extract using shutil (built-in support for ZIP)
61+ # Extract using shutil
6362 try :
64- print (f"Extracting { archive_name } ..." )
63+ print (f"Extracting { archive_name } to { temp_dir } ..." )
6564 shutil .unpack_archive (archive_path , temp_dir )
6665
66+ # Debug: List extracted files
67+ extracted_files = os .listdir (temp_dir )
68+ print ("Extracted files:" , extracted_files )
69+
70+ # Find FFmpeg binary (handles nested folders)
71+ extracted_path = None
72+ for root , _ , files in os .walk (temp_dir ):
73+ if extracted_binary in files :
74+ extracted_path = os .path .join (root , extracted_binary )
75+ break
76+
77+ if extracted_path is None :
78+ raise FileNotFoundError (f"FFmpeg binary '{ extracted_binary } ' not found in extracted files." )
79+
6780 # Ensure correct executable permissions (Linux/macOS)
6881 if not sys .platform .startswith ("win" ):
6982 os .chmod (extracted_path , 0o755 )
You can’t perform that action at this time.
0 commit comments