-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_portable.py
More file actions
169 lines (140 loc) ยท 4.81 KB
/
Copy pathcreate_portable.py
File metadata and controls
169 lines (140 loc) ยท 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
"""
Create a portable package with all files included
"""
import os
import shutil
from pathlib import Path
def create_portable_package():
"""Create a portable package with all necessary files"""
print("๐ต Creating SL Track Splitter Pro Portable Package")
print("=" * 55)
# Create portable directory
portable_dir = Path("SL_Track_Splitter_Pro_Portable_v2_1")
if portable_dir.exists():
shutil.rmtree(portable_dir)
portable_dir.mkdir()
# Copy the existing executable
exe_source = Path("dist/SL_Track_Splitter_Pro.exe")
if exe_source.exists():
shutil.copy2(exe_source, portable_dir / "SL Track Splitter Pro.exe")
print("โ
Executable copied")
else:
print("โ Executable not found! Run build first.")
return False
# Copy FFmpeg files
ffmpeg_files = ["ffmpeg.exe", "ffprobe.exe"]
for file in ffmpeg_files:
if Path(file).exists():
shutil.copy2(file, portable_dir / file)
print(f"โ
{file} copied")
else:
print(f"โ ๏ธ {file} not found")
# Copy launcher script
launcher_content = '''@echo off
title SL Track Splitter Pro - Starting...
echo SL Track Splitter Pro
echo =====================
echo.
echo Checking for FFmpeg...
if not exist "ffmpeg.exe" (
echo ERROR: FFmpeg not found!
echo Please ensure all files are in the same folder.
pause
exit
)
if not exist "ffprobe.exe" (
echo ERROR: FFprobe not found!
echo Please ensure all files are in the same folder.
pause
exit
)
echo SUCCESS: FFmpeg found!
echo.
echo Starting SL Track Splitter Pro...
echo.
"SL Track Splitter Pro.exe"
if errorlevel 1 (
echo.
echo ERROR: Application encountered an error
pause
)
'''
with open(portable_dir / "Start SL Track Splitter Pro.bat", "w", encoding='utf-8') as f:
f.write(launcher_content)
print("โ
Launcher created")
# Create comprehensive README
readme_content = '''# ๐ต SL Track Splitter Pro - Portable Version
## ๐ Quick Start
### Option 1: Use the Launcher (Recommended)
1. Double-click "Start SL Track Splitter Pro.bat"
2. The launcher will check for all required files
3. Application will start automatically
### Option 2: Run Directly
1. Double-click "SL Track Splitter Pro.exe"
2. Make sure ffmpeg.exe and ffprobe.exe are in the same folder
## ๐ Files Included
- `SL Track Splitter Pro.exe` - Main application
- `ffmpeg.exe` - Audio processing engine
- `ffprobe.exe` - Audio analysis tool
- `Start SL Track Splitter Pro.bat` - Safe launcher
- `README.txt` - This file
## โจ Features
- ๐จ Ultra-modern dark theme interface
- โก Real-time progress tracking
- ๐ฎ Dual Second Life presets (4.99s & 9.99s)
- ๐ Color-coded activity log
- ๐ต Support for multiple audio formats
- ๐ฑ Responsive design for all screen sizes
## ๐ฎ Second Life Presets
- **SL 4.99s**: Standard preset for regular uploads
- **SL 9.99s**: Maximum duration for longer chunks
- Both optimized for SL (44.1kHz, Mono, 16-bit WAV)
## ๐ Usage Guide
1. **Select Files**: Click "Select Audio Files" or drag & drop
2. **Configure**: Use presets or adjust settings manually
3. **Process**: Click "๐ Process Files" to split tracks
4. **Access**: Click "๐ Open Output" to get your files
## ๐ ๏ธ Troubleshooting
### "FFmpeg not found" Error
- Ensure all files are in the same folder
- Use the launcher script (recommended)
- Don't rename any files
### Application Won't Start
- Run as Administrator
- Check Windows Defender isn't blocking it
- Ensure you have Windows 10 or later
### No Output Files
- Check you have write permissions
- Ensure input audio files are valid
- Check the activity log for errors
## ๐จโ๐ป Creator
**salty.spicy (salty_a)**
- ๐ฎ Second Life: salty.spicy
- ๐ฌ Discord: salty_a
- ๐ง Created with โค๏ธ for the SL community
## ๐ License
Open source under MIT License
---
**Perfect for Second Life content creators!** ๐ต
'''
with open(portable_dir / "README.txt", "w", encoding='utf-8') as f:
f.write(readme_content)
print("โ
README created")
# Create version info
version_info = f'''SL Track Splitter Pro v2.0
Created by: salty.spicy (salty_a)
Build Date: {os.path.getmtime(__file__)}
Platform: Windows
Architecture: 64-bit
This is a portable version - no installation required!
'''
with open(portable_dir / "VERSION.txt", "w", encoding='utf-8') as f:
f.write(version_info)
print("โ
Version info created")
print(f"\n๐ Portable package created successfully!")
print(f"๐ Location: {portable_dir.absolute()}")
print(f"๐ฆ Size: {sum(f.stat().st_size for f in portable_dir.rglob('*') if f.is_file()) / (1024*1024):.1f} MB")
print("\n๐ Ready for distribution!")
return True
if __name__ == "__main__":
create_portable_package()