-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo_build.py
More file actions
90 lines (78 loc) · 3.19 KB
/
Copy pathdemo_build.py
File metadata and controls
90 lines (78 loc) · 3.19 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
"""
Demo of Complete Automated Build System for TutorDraw
Shows how the complete installer system works
"""
import os
import platform
from pathlib import Path
def demo_build_process():
"""Demonstrate the complete build process"""
print("=" * 60)
print("TUTORIAL: COMPLETE AUTOMATED BUILD DEMO")
print("=" * 60)
# Detect current platform
system = platform.system().lower()
machine = platform.machine().lower()
arch = "64" if "64" in machine or "amd64" in machine or "x86_64" in machine else "32"
print(f"Current Platform: {system.upper()} {arch}-bit")
print()
# Show what installers will be created
print("INSTALLERS THAT WILL BE CREATED:")
print("=" * 40)
installers = {
"Windows": {
"MSI": "build_dist/windows/installer/TutorDraw-Installer.msi",
"Portable": "build_dist/windows/portable/TutorDraw-Win64-Portable.zip"
},
"Linux": {
"DEB": "build_dist/linux/installer/TutorDraw-Ubuntu-Installer.deb",
"RPM": "build_dist/linux/installer/TutorDraw-Fedora-Installer.rpm",
"AppImage": "build_dist/linux/installer/TutorDraw-Linux-Installer.AppImage",
"Portable": "build_dist/linux/portable/TutorDraw-Linux64-Portable.tar.gz"
},
"macOS": {
"DMG": "build_dist/macos/installer/TutorDraw-Installer.dmg",
"PKG": "build_dist/macos/installer/TutorDraw-Installer.pkg",
"Portable": "build_dist/macos/portable/TutorDraw-macOS-Portable.app.zip"
},
"Android": {
"APK": "build_dist/android/installer/TutorDraw-Android-Installer.apk"
}
}
for platform_name, packages in installers.items():
print(f"\n{platform_name}:")
for package_type, path in packages.items():
status = "✓ WILL CREATE" if (system == platform_name.lower() or platform_name == "Android") else "○ CROSS-BUILD"
print(f" {package_type:12}: {status} → {path}")
print()
print("BUILD COMMANDS:")
print("=" * 20)
print("Single command for everything:")
print(" python build.py")
print()
print("Platform-specific builds:")
print(" python build_complete.py --platform windows")
print(" python build_complete.py --platform linux")
print(" python build_complete.py --platform macos")
print(" python build_complete.py --platform android")
print()
print("List all available build scripts:")
print(" python build_complete.py --list")
print()
# Show the build script locations
print("BUILD SCRIPT LOCATIONS:")
print("=" * 25)
scripts = [
"build_dist/installers/build_windows_installer.bat",
"build_dist/installers/build_linux_installer.sh",
"build_dist/installers/build_macos_installer.sh",
"build_dist/android/build_apk.sh"
]
for script in scripts:
exists = "✓ EXISTS" if os.path.exists(script) else "○ WILL CREATE"
print(f" {exists}: {script}")
print()
print("🎉 COMPLETE AUTOMATED BUILD SYSTEM READY!")
print("Run 'python build.py' to create all installer packages automatically")
if __name__ == "__main__":
demo_build_process()