Add instructions and usb creator application

parent 9c93d944
# MBetter USB Creator - Build Instructions
## Prerequisites
### Linux:
```bash
# Install Python and Qt dependencies
sudo apt update
sudo apt install python3 python3-pip python3-pyqt6 genisoimage
# Install Python dependencies
pip3 install -r requirements.txt
```
### Windows:
```cmd
# Install Python 3.9+ from python.org
# Install dependencies
pip install -r requirements.txt
# Install 7-zip (required for ISO extraction)
# Download from: https://www.7-zip.org/
```
## Building Standalone Executable
### Automatic Build:
```bash
# Run the build script (installs deps and builds)
python3 build_usb_creator.py
```
### Manual Build:
```bash
# Install dependencies
pip3 install -r requirements.txt
# Build executable
pyinstaller --clean usb_creator.spec
```
## Running
### From Source:
```bash
# Linux (requires sudo)
sudo python3 usb_creator_gui.py
# Windows (run as Administrator)
python usb_creator_gui.py
```
### Standalone Executable:
```bash
# Linux
sudo ./dist/MBetterUSBCreator
# Windows
# Right-click → Run as Administrator
dist\MBetterUSBCreator.exe
```
## Features
- ✓ Cross-platform (Linux/Windows)
- ✓ ISO file selection and validation
- ✓ USB device auto-detection
- ✓ Optional root password configuration
- ✓ Optional OpenVPN config integration
- ✓ Progress indicators and logging
- ✓ Safe USB device selection (prevents system disk selection)
- ✓ Standalone executable (no Python installation required)
## Usage
1. **Select ISO**: Browse for your MBetter ISO file
2. **Choose USB**: Select target USB device from dropdown
3. **Configure Password** (Optional): Set custom root password for installed system
4. **Add VPN Config** (Optional): Include OpenVPN configuration files
5. **Create USB**: Click to start the USB creation process
The created USB will:
- Boot to live environment with autologin
- Automatically start installation process
- Use your custom root password (if set)
- Include VPN configuration in installed system (if provided)
- Work completely offline
...@@ -17,7 +17,7 @@ d-i netcfg/choose_interface select auto ...@@ -17,7 +17,7 @@ d-i netcfg/choose_interface select auto
# d-i netcfg/wireless_key string # d-i netcfg/wireless_key string
# User accounts - predefined (root password set by set_root_password.sh) # User accounts - predefined (root password set by set_root_password.sh)
d-i passwd/root-password password changeme d-i passwd/root-password-crypted password $1$9PLz.myr$Sd9D85G5IkVTW5wfkwLkz1
d-i passwd/make-user boolean false d-i passwd/make-user boolean false
# Time configuration - predefined # Time configuration - predefined
......
# MBetter USB Creator - Python Dependencies # MBetter USB Creator Requirements
# Install with: pip install -r requirements.txt PyQt6>=6.0.0
pyinstaller>=5.0.0
# Qt GUI Framework (required for the USB creator GUI)
PyQt6>=6.4.0
# Build tool for creating standalone executables
pyinstaller>=5.13.0
# Additional dependencies for cross-platform compatibility
setuptools>=65.0.0
wheel>=0.38.0
# Optional: For better Windows compatibility
pywin32>=306; sys_platform == "win32"
# Development dependencies (optional)
# Uncomment if you want to modify the USB creator
# pylint>=2.15.0
# black>=22.0.0
# pytest>=7.0.0
\ No newline at end of file
# -*- mode: python ; coding: utf-8 -*-
import sys
import os
block_cipher = None
# Determine if we're running on Windows
is_windows = sys.platform.startswith('win')
a = Analysis(
['usb_creator_gui.py'],
pathex=[],
binaries=[],
datas=[
# Add any data files here if needed
],
hiddenimports=[
'PyQt6.QtCore',
'PyQt6.QtGui',
'PyQt6.QtWidgets',
],
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='MBetterUSBCreator' if not is_windows else 'MBetterUSBCreator.exe',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False, # No console window
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='icon.ico' if is_windows else None,
)
# Create app bundle on macOS
if sys.platform == 'darwin':
app = BUNDLE(exe,
name='MBetterUSBCreator.app',
icon='icon.icns',
bundle_identifier='com.mbetter.usbcreator')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment