diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 5e10ebd..e7ee99c 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies run: | pip install -r requirements.txt - pip install pyinstaller + pip install pyinstaller pyinstaller-hooks-contrib - name: Download Tor Binaries shell: bash @@ -48,6 +48,7 @@ jobs: run: | if [ "$RUNNER_OS" == "Windows" ]; then SEP=";"; else SEP=":"; fi pyinstaller --onefile \ + --collect-all onionshare_cli \ --add-data "voxvera/locales${SEP}voxvera/locales" \ --add-data "voxvera/src${SEP}voxvera/src" \ --add-data "voxvera/templates${SEP}voxvera/templates" \ diff --git a/UPCOMING_RELEASE.md b/UPCOMING_RELEASE.md index 8b13789..57a986d 100644 --- a/UPCOMING_RELEASE.md +++ b/UPCOMING_RELEASE.md @@ -1 +1,8 @@ +# VoxVera v0.2.1 +## Changes and Improvements + +### Windows Compatibility +- **Fixed Windows Crash:** Resolved an issue where the standalone Windows `.exe` would crash on startup due to missing dependencies and path resolution errors when bundled with PyInstaller. +- **Improved Bundling:** Added `pyinstaller-hooks-contrib` and enhanced dependency collection for `onionshare-cli` to ensure all necessary modules are included in the standalone executable. +- **Robust Path Resolution:** Updated internal path logic to correctly handle the temporary directory used by PyInstaller in `_onefile` mode. diff --git a/pyproject.toml b/pyproject.toml index 4f3ca5e..551d426 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ voxvera = ["templates/**", "src/**", "resources/**", "locales/**", "resources/bi [project] name = "voxvera" -version = "0.2.0" +version = "0.2.1" description = "VoxVera CLI utilities" readme = "README.md" authors = [{name = "VoxVera"}] diff --git a/voxvera/__init__.py b/voxvera/__init__.py index 6f294c3..39d3488 100644 --- a/voxvera/__init__.py +++ b/voxvera/__init__.py @@ -1,12 +1,13 @@ import sys from pathlib import Path -__version__ = "0.2.0" +__version__ = "0.2.1" # Add the vendor directory to sys.path as a fallback. -# For standard installs (pip/pipx), the installed dependencies in the venv -# should take priority. We append here so vendor acts as a fallback. -vendor_dir = Path(__file__).parent / "vendor" +if getattr(sys, 'frozen', False): + vendor_dir = Path(sys._MEIPASS).joinpath("voxvera", "vendor") +else: + vendor_dir = Path(__file__).parent / "vendor" if vendor_dir.exists(): if str(vendor_dir) not in sys.path: sys.path.append(str(vendor_dir)) diff --git a/voxvera/cli.py b/voxvera/cli.py index a3cb31c..236ec42 100644 --- a/voxvera/cli.py +++ b/voxvera/cli.py @@ -15,7 +15,10 @@ from rich.console import Console from voxvera import __version__ # package root (contains bundled templates and src/) -ROOT = Path(__file__).resolve().parent +if getattr(sys, 'frozen', False): + ROOT = Path(sys._MEIPASS).joinpath("voxvera") +else: + ROOT = Path(__file__).resolve().parent # Global locale state CURRENT_LOCALE = {} diff --git a/voxvera/host/voxvera/config.json b/voxvera/host/voxvera/config.json index e6f1f8a..c05d634 100644 --- a/voxvera/host/voxvera/config.json +++ b/voxvera/host/voxvera/config.json @@ -5,8 +5,8 @@ "subtitle": "DO ~~NOT~~ DISTRIBUTE", "headline": "OPERATION VOX VERA", "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message. \n\nUse memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting. \n\nPrivacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.\n\nJoin us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.\n", - "url_message": "Follow this link to learn more. Use Tor Browser.", - "url": "https://voxvera.org/", - "tear_off_link": "http://5gwnlvdopooskthgkvgiwdrcmdgd5uv7yrkajpwa6jdrz6oxnhyjdeqd.onion", + "url_message": "Get VoxVera and start spreading your message.", + "url": "https://github.com/PR0M3TH3AN/VoxVera", + "tear_off_link": "https://voxvera.org/", "binary_message": "0110010 0101011 0110010 0111101 0110100" -} \ No newline at end of file +} diff --git a/voxvera/host/voxvera/download/voxvera-source.zip b/voxvera/host/voxvera/download/voxvera-source.zip new file mode 100644 index 0000000..80b7219 Binary files /dev/null and b/voxvera/host/voxvera/download/voxvera-source.zip differ diff --git a/voxvera/host/voxvera/index.html b/voxvera/host/voxvera/index.html index a71ffb3..db81a8c 100644 --- a/voxvera/host/voxvera/index.html +++ b/voxvera/host/voxvera/index.html @@ -7,7 +7,7 @@ Vox Vera Printable Flyers