-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_source.sh
More file actions
executable file
·252 lines (213 loc) · 6.75 KB
/
build_source.sh
File metadata and controls
executable file
·252 lines (213 loc) · 6.75 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
#!/bin/bash
# VoxPlayer Source Distribution Build Script
# Creates a .tar.gz source distribution
set -e
echo "========================================"
echo "VoxPlayer Source Distribution Builder"
echo "========================================"
echo ""
# Clean previous builds
rm -rf VoxPlayer-1.0.0 VoxPlayer-1.0.0.tar.gz
echo "Creating source distribution..."
# Create source directory
mkdir -p VoxPlayer-1.0.0
# Copy source files
cp app.py VoxPlayer-1.0.0/
cp requirements.txt VoxPlayer-1.0.0/
cp README.md VoxPlayer-1.0.0/
cp LICENSE VoxPlayer-1.0.0/
cp CHANGELOG.md VoxPlayer-1.0.0/
cp CONTRIBUTING.md VoxPlayer-1.0.0/
cp ROADMAP.md VoxPlayer-1.0.0/
cp DEVELOPMENT_GOALS.md VoxPlayer-1.0.0/
cp icon.ico VoxPlayer-1.0.0/
cp voxplayer.spec VoxPlayer-1.0.0/
cp version_info.txt VoxPlayer-1.0.0/
cp VoxPlayer_Installer.iss VoxPlayer-1.0.0/
cp test.py VoxPlayer-1.0.0/
cp run.py VoxPlayer-1.0.0/
cp run.bat VoxPlayer-1.0.0/
# Copy build scripts
cp build_simple.bat VoxPlayer-1.0.0/
cp create_release.bat VoxPlayer-1.0.0/
cp build_installer.bat VoxPlayer-1.0.0/
cp build_macos.sh VoxPlayer-1.0.0/
cp build_debian.sh VoxPlayer-1.0.0/
cp build_rpm.sh VoxPlayer-1.0.0/
cp build_arch.sh VoxPlayer-1.0.0/
cp build_source.sh VoxPlayer-1.0.0/
# Copy file association scripts
cp register_file_associations.bat VoxPlayer-1.0.0/
cp unregister_file_associations.bat VoxPlayer-1.0.0/
cp test_file_associations.bat VoxPlayer-1.0.0/
# Create setup.py for source distribution
cat > VoxPlayer-1.0.0/setup.py << 'EOF'
#!/usr/bin/env python3
"""
VoxPlayer Setup Script
"""
from setuptools import setup, find_packages
import os
# Read README file
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# Read requirements
with open("requirements.txt", "r", encoding="utf-8") as fh:
requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")]
setup(
name="voxplayer",
version="1.0.0",
author="VoxHash",
author_email="voxhash@example.com",
description="Ultra-compact media player with professional file association support",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/voxhash/voxplayer",
project_urls={
"Bug Reports": "https://github.com/voxhash/voxplayer/issues",
"Source": "https://github.com/voxhash/voxplayer",
"Documentation": "https://github.com/voxhash/voxplayer#readme",
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"Topic :: Multimedia :: Video :: Display",
"Topic :: Multimedia :: Sound/Audio :: Players",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
],
keywords="media player video audio playlist pyqt6 desktop application",
packages=find_packages(),
py_modules=["app"],
python_requires=">=3.8",
install_requires=requirements,
entry_points={
"console_scripts": [
"voxplayer=app:main",
],
},
include_package_data=True,
package_data={
"": ["*.md", "*.txt", "*.ico", "*.spec", "*.iss", "*.bat", "*.sh"],
},
zip_safe=False,
)
EOF
# Create MANIFEST.in
cat > VoxPlayer-1.0.0/MANIFEST.in << 'EOF'
include README.md
include LICENSE
include CHANGELOG.md
include CONTRIBUTING.md
include ROADMAP.md
include DEVELOPMENT_GOALS.md
include requirements.txt
include icon.ico
include voxplayer.spec
include version_info.txt
include VoxPlayer_Installer.iss
include test.py
include run.py
include run.bat
include build_simple.bat
include create_release.bat
include build_installer.bat
include build_macos.sh
include build_debian.sh
include build_rpm.sh
include build_arch.sh
include build_source.sh
include register_file_associations.bat
include unregister_file_associations.bat
include test_file_associations.bat
EOF
# Create installation instructions
cat > VoxPlayer-1.0.0/INSTALL.md << 'EOF'
# VoxPlayer Installation Instructions
## Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
## Installation
### Method 1: Using pip (Recommended)
```bash
# Install from source
pip install VoxPlayer-1.0.0.tar.gz
# Run VoxPlayer
voxplayer
```
### Method 2: Manual Installation
```bash
# Extract the source
tar -xzf VoxPlayer-1.0.0.tar.gz
cd VoxPlayer-1.0.0
# Install dependencies
pip install -r requirements.txt
# Run VoxPlayer
python app.py
```
## Platform-Specific Installation
### Windows
- Use the provided batch files for easy installation
- Run `build_simple.bat` to create an executable
- Run `register_file_associations.bat` as Administrator for file associations
### macOS
- Run `build_macos.sh` to create a .dmg installer
- Requires Xcode Command Line Tools and Homebrew
### Linux
- **Debian/Ubuntu**: Run `build_debian.sh` to create a .deb package
- **Fedora/CentOS/RHEL**: Run `build_rpm.sh` to create a .rpm package
- **Arch Linux**: Run `build_arch.sh` to create a pacman package
## Dependencies
- PyQt6 (GUI framework)
- PyQt6-QtMultimedia (Media playback)
- PyQt6-QtMultimediaWidgets (Media widgets)
- requests (HTTP requests)
- Other dependencies listed in requirements.txt
## Troubleshooting
If you encounter issues:
1. Ensure Python 3.8+ is installed
2. Install all dependencies: `pip install -r requirements.txt`
3. Check that PyQt6 is properly installed
4. Run from command line to see error messages
## Support
- GitHub Issues: https://github.com/voxhash/voxplayer/issues
- GitHub Discussions: https://github.com/voxhash/voxplayer/discussions
- Creator: VoxHash
EOF
# Create the tarball
tar -czf VoxPlayer-1.0.0.tar.gz VoxPlayer-1.0.0/
# Clean up
rm -rf VoxPlayer-1.0.0
if [ -f "VoxPlayer-1.0.0.tar.gz" ]; then
echo ""
echo "========================================"
echo "Source distribution completed successfully!"
echo "========================================"
echo ""
echo "Files created:"
echo "- VoxPlayer-1.0.0.tar.gz (Source distribution)"
echo ""
echo "Installation:"
echo "pip install VoxPlayer-1.0.0.tar.gz"
echo ""
echo "Or extract and install manually:"
echo "tar -xzf VoxPlayer-1.0.0.tar.gz"
echo "cd VoxPlayer-1.0.0"
echo "pip install -r requirements.txt"
echo "python app.py"
echo ""
echo "File size: $(du -h VoxPlayer-1.0.0.tar.gz | cut -f1)"
echo ""
else
echo "ERROR: Source distribution creation failed"
exit 1
fi