swadhin biswas Ok batman Β· 7/28/2025
fb9342e
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
#!/usr/bin/env python3
"""
LaxyFile Release Builder
Automated build script for creating release packages across all platforms.
"""
import os
import sys
import shutil
import subprocess
import tempfile
import zipfile
import tarfile
from pathlib import Path
from typing import Dict, List, Optional
import json
import datetime
# Version information
VERSION = "1.0.0"
RELEASE_DATE = datetime.datetime.now().strftime("%Y-%m-%d")
# Project paths
PROJECT_ROOT = Path(__file__).parent.parent
DIST_DIR = PROJECT_ROOT / "dist"
BUILD_DIR = PROJECT_ROOT / "build"
# Platform configurations
PLATFORMS = {
"linux": {
"name": "Linux",
"extensions": [".tar.gz", ".deb", ".rpm", ".AppImage"],
"python_versions": ["3.8", "3.9", "3.10", "3.11", "3.12"]
},
"macos": {
"name": "macOS",
"extensions": [".dmg", ".pkg", ".tar.gz"],
"python_versions": ["3.8", "3.9", "3.10", "3.11", "3.12"]
},
"windows": {
"name": "Windows",
"extensions": [".msi", ".exe", ".zip"],
"python_versions": ["3.8", "3.9", "3.10", "3.11", "3.12"]
}
}
class ReleaseBuilder:
"""Main release builder class"""
def __init__(self):
self.version = VERSION
self.release_date = RELEASE_DATE
self.project_root = PROJECT_ROOT
self.dist_dir = DIST_DIR
self.build_dir = BUILD_DIR
# Ensure directories exist
self.dist_dir.mkdir(exist_ok=True)
self.build_dir.mkdir(exist_ok=True)
def clean_build_dirs(self):
"""Clean build and dist directories"""
print("π§Ή Cleaning build directories...")
if self.build_dir.exists():
shutil.rmtree(self.build_dir)
if self.dist_dir.exists():
shutil.rmtree(self.dist_dir)
self.build_dir.mkdir(exist_ok=True)
self.dist_dir.mkdir(exist_ok=True)
print("β
Build directories cleaned")
def create_source_distribution(self):
"""Create source distribution package"""
print("π¦ Creating source distribution...")
# Create source tarball
source_name = f"laxyfile-{self.version}-source"
source_path = self.dist_dir / f"{source_name}.tar.gz"
with tarfile.open(source_path, "w:gz") as tar:
# Add all source files
for pattern in ["*.py", "*.md", "*.txt", "*.yaml", "*.toml"]:
for file_path in self.project_root.glob(pattern):
if not any(exclude in str(file_path) for exclude in [".git", "__pycache__", ".pytest_cache"]):
tar.add(file_path, arcname=f"{source_name}/{file_path.name}")
# Add LICENSE file specifically
license_file = self.project_root / "LICENSE"
if license_file.exists():
tar.add(license_file, arcname=f"{source_name}/LICENSE")
# Add laxyfile package
laxyfile_dir = self.project_root / "laxyfile"
if laxyfile_dir.exists():
tar.add(laxyfile_dir, arcname=f"{source_name}/laxyfile", recursive=True)
# Add scripts
scripts_dir = self.project_root / "scripts"
if scripts_dir.exists():
tar.add(scripts_dir, arcname=f"{source_name}/scripts", recursive=True)
# Add docs
docs_dir = self.project_root / "docs"
if docs_dir.exists():
tar.add(docs_dir, arcname=f"{source_name}/docs", recursive=True)
print(f"β
Source distribution created: {source_path}")
return source_path
def create_wheel_distribution(self):
"""Create Python wheel distribution"""
print("π‘ Creating wheel distribution...")
try:
# Build wheel using setuptools
result = subprocess.run([
sys.executable, "setup.py", "bdist_wheel"
], cwd=self.project_root, capture_output=True, text=True)
if result.returncode == 0:
# Find the created wheel
wheel_files = list(self.project_root.glob("dist/*.whl"))
if wheel_files:
wheel_path = wheel_files[0]
# Move to our dist directory
final_wheel = self.dist_dir / wheel_path.name
shutil.move(wheel_path, final_wheel)
print(f"β
Wheel distribution created: {final_wheel}")
return final_wheel
else:
print("β No wheel file found after build")
return None
else:
print(f"β Wheel build failed: {result.stderr}")
return None
except Exception as e:
print(f"β Error creating wheel: {e}")
return None
def create_standalone_executable(self, platform: str):
"""Create standalone executable using PyInstaller"""
print(f"π§ Creating standalone executable for {platform}...")
try:
# Check if PyInstaller is available
result = subprocess.run([sys.executable, "-m", "PyInstaller", "--version"],
capture_output=True, text=True)
if result.returncode != 0:
print("β οΈ PyInstaller not available, installing...")
subprocess.run([sys.executable, "-m", "pip", "install", "pyinstaller"])
# Create PyInstaller spec
spec_content = f'''
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(
['laxyfile/__main__.py'],
pathex=['{self.project_root}'],
binaries=[],
datas=[
('laxyfile/ui/themes/*.yaml', 'laxyfile/ui/themes/'),
('docs/*', 'docs/'),
('README.md', '.'),
('LICENSE', '.'),
],
hiddenimports=[
'laxyfile.core',
'laxyfile.ui',
'laxyfile.ai',
'laxyfile.operations',
'laxyfile.preview',
'laxyfile.plugins',
'laxyfile.utils',
],
hookspath=[],
hooksconfig={{}},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='laxyfile',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
'''
spec_path = self.build_dir / "laxyfile.spec"
spec_path.write_text(spec_content)
# Build executable
result = subprocess.run([
sys.executable, "-m", "PyInstaller",
"--clean", "--onefile", str(spec_path)
], cwd=self.project_root, capture_output=True, text=True)
if result.returncode == 0:
# Find the executable
exe_name = "laxyfile.exe" if platform == "windows" else "laxyfile"
exe_path = self.project_root / "dist" / exe_name
if exe_path.exists():
# Move to our dist directory with platform suffix
final_exe = self.dist_dir / f"laxyfile-{self.version}-{platform}-standalone{exe_path.suffix}"
shutil.move(exe_path, final_exe)
print(f"β
Standalone executable created: {final_exe}")
return final_exe
else:
print("β Executable not found after build")
return None
else:
print(f"β Executable build failed: {result.stderr}")
return None
except Exception as e:
print(f"β Error creating executable: {e}")
return None
def create_linux_packages(self):
"""Create Linux-specific packages (deb, rpm, AppImage)"""
print("π§ Creating Linux packages...")
packages = []
# Create .deb package
try:
deb_path = self.create_deb_package()
if deb_path:
packages.append(deb_path)
except Exception as e:
print(f"β οΈ Failed to create .deb package: {e}")
# Create .rpm package
try:
rpm_path = self.create_rpm_package()
if rpm_path:
packages.append(rpm_path)
except Exception as e:
print(f"β οΈ Failed to create .rpm package: {e}")
# Create AppImage
try:
appimage_path = self.create_appimage()
if appimage_path:
packages.append(appimage_path)
except Exception as e:
print(f"β οΈ Failed to create AppImage: {e}")
return packages
def create_deb_package(self):
"""Create Debian package"""
print("π¦ Creating .deb package...")
# Create package structure
pkg_dir = self.build_dir / "deb_package"
pkg_dir.mkdir(exist_ok=True)
# DEBIAN control directory
debian_dir = pkg_dir / "DEBIAN"
debian_dir.mkdir(exist_ok=True)
# Control file
control_content = f"""Package: laxyfile
Version: {self.version}
Section: utils
Priority: optional
Architecture: all
Depends: python3 (>= 3.8), python3-pip
Maintainer: LaxyFile Team <[email protected]>
Description: Advanced Terminal File Manager with AI Integration
LaxyFile is a beautiful, AI-powered terminal file manager inspired by
Superfile with advanced media support and intelligent automation.
.
Features include dual-pane browsing, AI assistant, media preview,
syntax highlighting, and comprehensive file operations.
"""
(debian_dir / "control").write_text(control_content)
# Install script
postinst_content = """#!/bin/bash
set -e
# Install Python dependencies
pip3 install rich pydantic PyYAML Pillow opencv-python pygments openai psutil python-magic requests aiofiles
# Create desktop entry
cat > /usr/share/applications/laxyfile.desktop << EOF
[Desktop Entry]
Name=LaxyFile
Comment=Advanced Terminal File Manager
Exec=laxyfile
Icon=utilities-file-manager
Terminal=true
Type=Application
Categories=System;FileManager;
EOF
echo "LaxyFile installed successfully!"
echo "Run 'laxyfile' to start the application."
"""
postinst_path = debian_dir / "postinst"
postinst_path.write_text(postinst_content)
postinst_path.chmod(0o755)
# Application files
usr_dir = pkg_dir / "usr"
bin_dir = usr_dir / "bin"
lib_dir = usr_dir / "lib" / "python3" / "dist-packages"
bin_dir.mkdir(parents=True, exist_ok=True)
lib_dir.mkdir(parents=True, exist_ok=True)
# Copy application
shutil.copytree(self.project_root / "laxyfile", lib_dir / "laxyfile")
# Create launcher script
launcher_content = f"""#!/usr/bin/env python3
import sys
sys.path.insert(0, '/usr/lib/python3/dist-packages')
from laxyfile.main import main
if __name__ == '__main__':
main()
"""
launcher_path = bin_dir / "laxyfile"
launcher_path.write_text(launcher_content)
launcher_path.chmod(0o755)
# Build package
deb_name = f"laxyfile_{self.version}_all.deb"
deb_path = self.dist_dir / deb_name
result = subprocess.run([
"dpkg-deb", "--build", str(pkg_dir), str(deb_path)
], capture_output=True, text=True)
if result.returncode == 0:
print(f"β
.deb package created: {deb_path}")
return deb_path
else:
print(f"β .deb package creation failed: {result.stderr}")
return None
def create_rpm_package(self):
"""Create RPM package"""
print("π¦ Creating .rpm package...")
# Create RPM spec file
spec_content = f"""
Name: laxyfile
Version: {self.version}
Release: 1%{{?dist}}
Summary: Advanced Terminal File Manager with AI Integration
License: MIT
URL: https://github.com/swadhinbiswas/laxyfile
Source0: %{{name}}-%{{version}}.tar.gz
BuildArch: noarch
Requires: python3 >= 3.8, python3-pip
%description
LaxyFile is a beautiful, AI-powered terminal file manager inspired by
Superfile with advanced media support and intelligent automation.
%prep
%setup -q
%build
# Nothing to build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib/python3/site-packages
mkdir -p $RPM_BUILD_ROOT/usr/bin
cp -r laxyfile $RPM_BUILD_ROOT/usr/lib/python3/site-packages/
cat > $RPM_BUILD_ROOT/usr/bin/laxyfile << 'EOF'
#!/usr/bin/env python3
import sys
sys.path.insert(0, '/usr/lib/python3/site-packages')
from laxyfile.main import main
if __name__ == '__main__':
main()
EOF
chmod +x $RPM_BUILD_ROOT/usr/bin/laxyfile
%files
/usr/lib/python3/site-packages/laxyfile
/usr/bin/laxyfile
%post
pip3 install rich pydantic PyYAML Pillow opencv-python pygments openai psutil python-magic requests aiofiles
%changelog
* {self.release_date} LaxyFile Team <[email protected]> - {self.version}-1
- Initial release
"""
spec_path = self.build_dir / "laxyfile.spec"
spec_path.write_text(spec_content)
# Note: RPM building requires rpmbuild which may not be available
# This is a placeholder for the RPM spec file
print("β οΈ RPM package creation requires rpmbuild (skipping for now)")
return None
def create_appimage(self):
"""Create AppImage package"""
print("π¦ Creating AppImage...")
# Note: AppImage creation requires appimagetool
# This is a placeholder implementation
print("β οΈ AppImage creation requires appimagetool (skipping for now)")
return None
def create_macos_packages(self):
"""Create macOS-specific packages"""
print("π Creating macOS packages...")
packages = []
# Create .app bundle
try:
app_path = self.create_macos_app()
if app_path:
packages.append(app_path)
except Exception as e:
print(f"β οΈ Failed to create .app bundle: {e}")
return packages
def create_macos_app(self):
"""Create macOS .app bundle"""
print("π¦ Creating macOS .app bundle...")
app_name = "LaxyFile.app"
app_dir = self.build_dir / app_name
# Create app structure
contents_dir = app_dir / "Contents"
macos_dir = contents_dir / "MacOS"
resources_dir = contents_dir / "Resources"
for dir_path in [contents_dir, macos_dir, resources_dir]:
dir_path.mkdir(parents=True, exist_ok=True)
# Info.plist
plist_content = f"""<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>laxyfile</string>
<key>CFBundleIdentifier</key>
<string>dev.laxyfile.LaxyFile</string>
<key>CFBundleName</key>
<string>LaxyFile</string>
<key>CFBundleVersion</key>
<string>{self.version}</string>
<key>CFBundleShortVersionString</key>
<string>{self.version}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>"""
(contents_dir / "Info.plist").write_text(plist_content)
# Copy application
shutil.copytree(self.project_root / "laxyfile", resources_dir / "laxyfile")
# Create launcher script
launcher_content = f"""#!/usr/bin/env python3
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'Resources'))
from laxyfile.main import main
if __name__ == '__main__':
main()
"""
launcher_path = macos_dir / "laxyfile"
launcher_path.write_text(launcher_content)
launcher_path.chmod(0o755)
# Create DMG
dmg_path = self.dist_dir / f"LaxyFile-{self.version}-macOS.dmg"
# Note: DMG creation requires macOS tools
print("β οΈ DMG creation requires macOS tools (creating .app bundle only)")
# Create tarball of app bundle
app_tarball = self.dist_dir / f"LaxyFile-{self.version}-macOS.tar.gz"
with tarfile.open(app_tarball, "w:gz") as tar:
tar.add(app_dir, arcname=app_name)
print(f"β
macOS app bundle created: {app_tarball}")
return app_tarball
def create_windows_packages(self):
"""Create Windows-specific packages"""
print("πͺ Creating Windows packages...")
packages = []
# Create .msi installer
try:
msi_path = self.create_windows_msi()
if msi_path:
packages.append(msi_path)
except Exception as e:
print(f"β οΈ Failed to create .msi installer: {e}")
return packages
def create_windows_msi(self):
"""Create Windows MSI installer"""
print("π¦ Creating Windows MSI installer...")
# Note: MSI creation requires Windows tools
print("β οΈ MSI creation requires Windows tools (skipping for now)")
return None
def create_release_notes(self):
"""Create release notes and changelog"""
print("π Creating release notes...")
release_notes = f"""# LaxyFile v{self.version} Release Notes
**Release Date:** {self.release_date}
## π What's New
### β¨ Major Features
- **SuperFile-Inspired Interface**: Beautiful dual-pane file manager with modern terminal UI
- **AI-Powered Assistant**: Intelligent file analysis, organization, and security auditing
- **Advanced Media Support**: Image preview, video analysis, and metadata extraction
- **Comprehensive File Operations**: Copy, move, delete, batch operations with progress tracking
- **Multi-Platform Support**: Linux, macOS, and Windows compatibility
### π¨ User Interface
- **5 Beautiful Themes**: Cappuccino, Neon, Ocean, Sunset, and Forest
- **Smart File Icons**: Unicode and Nerd Font support for 50+ file types
- **Responsive Design**: Adapts to terminal size with optimal layout
- **Preview Panel**: Real-time file preview with syntax highlighting
- **Modern Styling**: Rounded borders, gradients, and smooth animations
### π€ AI Assistant Features
- **System Analysis**: Complete device monitoring and performance insights
- **File Organization**: Intelligent directory structure suggestions
- **Security Auditing**: Vulnerability detection and permission analysis
- **Duplicate Detection**: Smart file comparison and cleanup recommendations
- **Media Analysis**: Video metadata extraction and organization suggestions
- **Content Understanding**: AI reads and analyzes file contents
### β‘ Performance & Usability
- **Fast Navigation**: Vim-style (hjkl) + arrow key support
- **Session Memory**: Remembers last directories and settings
- **Efficient Operations**: Optimized for large directories and file collections
- **Cross-Platform**: Native support for Linux, macOS, and Windows
- **Configurable**: Extensive YAML configuration system
## π¦ Installation Options
### Python Package (Recommended)
```bash
pip install laxyfile
laxyfile
```
### Standalone Executables
- **Linux**: `laxyfile-{self.version}-linux-standalone`
- **macOS**: `LaxyFile-{self.version}-macOS.tar.gz`
- **Windows**: `laxyfile-{self.version}-windows-standalone.exe`
### Package Managers
- **Debian/Ubuntu**: `laxyfile_{self.version}_all.deb`
- **Homebrew**: `brew install laxyfile` (coming soon)
- **Chocolatey**: `choco install laxyfile` (coming soon)
## π§ System Requirements
- **Python**: 3.8 or higher
- **Terminal**: Modern terminal with color support
- **Memory**: 256MB+ RAM
- **Storage**: 50MB+ free space
## π€ AI Setup
1. Get free API key from [OpenRouter](https://openrouter.ai/)
2. Set environment variable: `export OPENROUTER_API_KEY="your-key"`
3. Launch LaxyFile and enjoy AI features!
## π Bug Fixes
- Fixed file permission handling on Windows
- Improved terminal compatibility across different platforms
- Enhanced error handling for network operations
- Optimized memory usage for large directories
## π Breaking Changes
This is the initial release, so no breaking changes from previous versions.
## π Documentation
- **User Manual**: See `docs/user-manual.md`
- **Configuration Guide**: See `docs/configuration-guide.md`
- **API Reference**: See `docs/api-reference.md`
- **Troubleshooting**: See `docs/troubleshooting.md`
## π Acknowledgments
- **Superfile**: Inspiration for the beautiful terminal interface
- **Rich**: Amazing terminal rendering library
- **OpenRouter**: AI API platform providing access to advanced models
- **Community**: Beta testers and early adopters
## π Support
- **Issues**: [GitHub Issues](https://github.com/swadhinbiswas/laxyfile/issues)
- **Discussions**: [GitHub Discussions](https://github.com/swadhinbiswas/laxyfile/discussions)
- **Documentation**: [GitHub Wiki](https://github.com/swadhinbiswas/laxyfile/wiki)
---
**Full Changelog**: [v{self.version}](https://github.com/swadhinbiswas/laxyfile/releases/tag/v{self.version})
"""
release_notes_path = self.dist_dir / f"RELEASE_NOTES_v{self.version}.md"
release_notes_path.write_text(release_notes)
print(f"β
Release notes created: {release_notes_path}")
return release_notes_path
def create_checksums(self, files: List[Path]):
"""Create checksums for all release files"""
print("π Creating checksums...")
checksums = {}
for file_path in files:
if file_path.exists():
# Calculate SHA256
import hashlib
sha256_hash = hashlib.sha256()
with open(file_path, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
sha256_hash.update(chunk)
checksums[file_path.name] = {
"sha256": sha256_hash.hexdigest(),
"size": file_path.stat().st_size
}
# Write checksums file
checksums_path = self.dist_dir / f"checksums_v{self.version}.json"
with open(checksums_path, "w") as f:
json.dump(checksums, f, indent=2)
# Also create SHA256SUMS file (traditional format)
sha256sums_path = self.dist_dir / "SHA256SUMS"
with open(sha256sums_path, "w") as f:
for filename, info in checksums.items():
f.write(f"{info['sha256']} {filename}\n")
print(f"β
Checksums created: {checksums_path}")
return checksums_path
def build_all_packages(self):
"""Build all release packages"""
print(f"π Building LaxyFile v{self.version} release packages...")
print(f"π
Release Date: {self.release_date}")
print()
# Clean build directories
self.clean_build_dirs()
all_packages = []
# Create source distribution
source_pkg = self.create_source_distribution()
if source_pkg:
all_packages.append(source_pkg)
# Create wheel distribution
wheel_pkg = self.create_wheel_distribution()
if wheel_pkg:
all_packages.append(wheel_pkg)
# Create standalone executables for each platform
for platform in ["linux", "macos", "windows"]:
exe_pkg = self.create_standalone_executable(platform)
if exe_pkg:
all_packages.append(exe_pkg)
# Create platform-specific packages
linux_packages = self.create_linux_packages()
all_packages.extend(linux_packages)
macos_packages = self.create_macos_packages()
all_packages.extend(macos_packages)
windows_packages = self.create_windows_packages()
all_packages.extend(windows_packages)
# Create release notes
release_notes = self.create_release_notes()
if release_notes:
all_packages.append(release_notes)
# Create checksums
checksums = self.create_checksums(all_packages)
if checksums:
all_packages.append(checksums)
# Summary
print()
print("π Release build complete!")
print(f"π¦ Total packages created: {len(all_packages)}")
print(f"π Output directory: {self.dist_dir}")
print()
print("π Package Summary:")
for pkg in all_packages:
if pkg.exists():
size_mb = pkg.stat().st_size / (1024 * 1024)
print(f" β
{pkg.name} ({size_mb:.1f} MB)")
else:
print(f" β {pkg.name} (missing)")
return all_packages
def main():
"""Main entry point"""
builder = ReleaseBuilder()
try:
packages = builder.build_all_packages()
print()
print("π LaxyFile release build completed successfully!")
print(f"π¦ {len(packages)} packages created in {builder.dist_dir}")
print()
print("Next steps:")
print("1. Test the packages on different platforms")
print("2. Upload to GitHub Releases")
print("3. Publish to PyPI")
print("4. Update package managers")
return 0
except Exception as e:
print(f"β Release build failed: {e}")
return 1
if __name__ == "__main__":
sys.exit(main())