Skip to content

Add cross-platform support for Linux#2

Open
chadthomas31 wants to merge 1 commit intohabahabai:mainfrom
chadthomas31:linux-cross-platform-support
Open

Add cross-platform support for Linux#2
chadthomas31 wants to merge 1 commit intohabahabai:mainfrom
chadthomas31:linux-cross-platform-support

Conversation

@chadthomas31
Copy link

🐧 Add Linux Cross-Platform Support

📋 Addresses Q1 2026 Roadmap Item: This PR implements Linux support as outlined in the project roadmap.

🎯 Problem

Currently, mailstorm only runs on Windows due to:

  • Windows-specific imports (winreg)
  • Hard-coded Windows Tor paths
  • WebView2 dependencies
  • Windows-specific subprocess handling

✅ Solution

Made the application platform-aware with conditional logic for Windows vs Linux.

Changes:

  • Make winreg import conditional (Windows only)
  • Add platform-specific Tor paths (tor/tor for Linux, .exe for Windows)
  • Skip WebView2 check/install on non-Windows systems (uses GTK webkit instead)
  • Remove Windows-specific STARTUPINFO on Linux
  • Add Linux-compatible proxy settings for GTK webkit
  • Create build.sh for Linux builds with PyInstaller
  • Add .gitignore for build artifacts and Tor bundles

🧪 Testing

  • ✅ Tested on Pop_OS 22.04 (Ubuntu-based)
  • ✅ Successfully launches Tor and bootstraps to 100%
  • ✅ Connects to .onion site through Tor proxy
  • ✅ GTK webview renders correctly
  • ✅ Built with PyInstaller 6.17.0
  • ✅ Used Tor Expert Bundle 15.0.3 for Linux (x86_64)

📋 Linux Setup Instructions

Dependencies:

sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0
pip install -r requirements.txt

Build:

# Download Tor Expert Bundle for Linux from torproject.org
# Extract to mailstorm/tor/
chmod +x build.sh
./build.sh
./dist/main

🤝 Backwards Compatibility

All Windows functionality remains unchanged. The app detects the platform at runtime and uses appropriate code paths.

📸 Screenshot

Application running successfully on Linux:

  • Tor bootstrapped to 100%
  • GTK webview displaying .onion site
  • Email validation working through Tor proxy

- Make winreg import conditional (Windows only)
- Add platform-specific Tor paths (tor/tor for Linux, .exe for Windows)
- Skip WebView2 check/install on non-Windows systems
- Remove Windows-specific STARTUPINFO on Linux
- Add Linux-compatible proxy settings for GTK webkit
- Create build.sh for Linux builds with PyInstaller
- Add .gitignore for build artifacts and Tor bundles
- Successfully tested on Pop_OS 22.04 with Tor Expert Bundle 15.0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant