fix linux ssl errors
This commit is contained in:
parent
d52e78eb5e
commit
f1aa75f070
3 changed files with 77 additions and 25 deletions
68
.github/workflows/release.yml
vendored
68
.github/workflows/release.yml
vendored
|
|
@ -6,24 +6,29 @@ on:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- id: set-matrix
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_REF_NAME}
|
||||||
|
if [[ "$TAG" == *"-linux" ]]; then
|
||||||
|
echo 'matrix={"include":[{"os":"ubuntu-latest","artifact_name":"disco-reaper-linux","asset_name":"disco-reaper-linux.zip","executable_path":"dist/DiscoReaper"}]}' >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "$TAG" == *"-windows" ]]; then
|
||||||
|
echo 'matrix={"include":[{"os":"windows-latest","artifact_name":"disco-reaper-windows","asset_name":"disco-reaper-windows.zip","executable_path":"dist/DiscoReaper.exe"}]}' >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "$TAG" == *"-mac" ]]; then
|
||||||
|
echo 'matrix={"include":[{"os":"macos-latest","artifact_name":"disco-reaper-macos","asset_name":"disco-reaper-macos.zip","executable_path":"dist/DiscoReaper"}]}' >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo 'matrix={"include":[{"os":"ubuntu-latest","artifact_name":"disco-reaper-linux","asset_name":"disco-reaper-linux.zip","executable_path":"dist/DiscoReaper"},{"os":"windows-latest","artifact_name":"disco-reaper-windows","asset_name":"disco-reaper-windows.zip","executable_path":"dist/DiscoReaper.exe"},{"os":"macos-latest","artifact_name":"disco-reaper-macos","asset_name":"disco-reaper-macos.zip","executable_path":"dist/DiscoReaper"}]}' >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
needs: check-tag
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix: ${{ fromJson(needs.check-tag.outputs.matrix) }}
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
artifact_name: disco-reaper-linux
|
|
||||||
asset_name: disco-reaper-linux.zip
|
|
||||||
executable_path: dist/DiscoReaper
|
|
||||||
- os: windows-latest
|
|
||||||
artifact_name: disco-reaper-windows
|
|
||||||
asset_name: disco-reaper-windows.zip
|
|
||||||
executable_path: dist/DiscoReaper.exe
|
|
||||||
- os: macos-latest
|
|
||||||
artifact_name: disco-reaper-macos
|
|
||||||
asset_name: disco-reaper-macos.zip
|
|
||||||
executable_path: dist/DiscoReaper
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -40,7 +45,6 @@ jobs:
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install pyinstaller Pillow
|
pip install pyinstaller Pillow
|
||||||
|
|
||||||
|
|
||||||
- name: Bake Version
|
- name: Bake Version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -59,15 +63,32 @@ jobs:
|
||||||
- name: Prepare Release Asset (Linux/MacOS)
|
- name: Prepare Release Asset (Linux/MacOS)
|
||||||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
|
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
cp ${{ matrix.executable_path }} DiscoReaper
|
mkdir REAPER
|
||||||
chmod +x DiscoReaper
|
cp ${{ matrix.executable_path }} REAPER/DiscoReaper
|
||||||
zip ${{ matrix.asset_name }} DiscoReaper
|
chmod +x REAPER/DiscoReaper
|
||||||
|
|
||||||
|
# Create launcher for Linux/Mac
|
||||||
|
cat << 'EOF' > REAPER/Launch-Reaper.sh
|
||||||
|
#!/bin/bash
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
cd "$BASEDIR"
|
||||||
|
if [ -f "./DiscoReaper" ]; then
|
||||||
|
./DiscoReaper
|
||||||
|
else
|
||||||
|
echo "Error: DiscoReaper binary not found."
|
||||||
|
read -p "Press enter to exit..."
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
chmod +x REAPER/Launch-Reaper.sh
|
||||||
|
|
||||||
|
zip -r ${{ matrix.asset_name }} REAPER
|
||||||
|
|
||||||
- name: Prepare Release Asset (Windows)
|
- name: Prepare Release Asset (Windows)
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
copy ${{ matrix.executable_path }} DiscoReaper.exe
|
mkdir REAPER
|
||||||
powershell Compress-Archive -Path "DiscoReaper.exe" -DestinationPath "${{ matrix.asset_name }}"
|
copy ${{ matrix.executable_path }} REAPER\DiscoReaper.exe
|
||||||
|
powershell Compress-Archive -Path "REAPER" -DestinationPath "${{ matrix.asset_name }}"
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
@ -89,9 +110,6 @@ jobs:
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: artifacts/**/*.zip
|
||||||
artifacts/disco-reaper-linux/disco-reaper-linux.zip
|
|
||||||
artifacts/disco-reaper-windows/disco-reaper-windows.zip
|
|
||||||
artifacts/disco-reaper-macos/disco-reaper-macos.zip
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,35 @@ def relaunch_in_terminal():
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
def setup_ssl():
|
||||||
|
"""Configures SSL certificate paths for frozen environments."""
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Only strictly necessary for frozen builds on Linux/macOS
|
||||||
|
if not getattr(sys, 'frozen', False):
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
import certifi
|
||||||
|
ca_file = certifi.where()
|
||||||
|
os.environ["SSL_CERT_FILE"] = ca_file
|
||||||
|
os.environ["REQUESTS_CA_BUNDLE"] = ca_file
|
||||||
|
except ImportError:
|
||||||
|
# Fallback to common Linux CA bundle paths
|
||||||
|
ca_paths = [
|
||||||
|
"/etc/ssl/certs/ca-certificates.crt",
|
||||||
|
"/etc/pki/tls/certs/ca-bundle.crt",
|
||||||
|
"/etc/ssl/ca-bundle.pem",
|
||||||
|
"/etc/pki/tls/cacert.pem",
|
||||||
|
"/etc/ssl/cert.pem",
|
||||||
|
]
|
||||||
|
for path in ca_paths:
|
||||||
|
if os.path.exists(path):
|
||||||
|
os.environ["SSL_CERT_FILE"] = path
|
||||||
|
os.environ["REQUESTS_CA_BUNDLE"] = path
|
||||||
|
break
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import os
|
import os
|
||||||
# Ensure screenshots directory is configured (but not created yet)
|
# Ensure screenshots directory is configured (but not created yet)
|
||||||
|
|
@ -66,6 +95,7 @@ def main():
|
||||||
os.environ["TEXTUAL_SCREENSHOT_LOCATION"] = shot_path
|
os.environ["TEXTUAL_SCREENSHOT_LOCATION"] = shot_path
|
||||||
|
|
||||||
relaunch_in_terminal()
|
relaunch_in_terminal()
|
||||||
|
setup_ssl()
|
||||||
setup_logging()
|
setup_logging()
|
||||||
run_disco_reaper_tui()
|
run_disco_reaper_tui()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,8 @@ class OperationPane(Container):
|
||||||
# ── labels ────────────────────────────────────────────────────────────
|
# ── labels ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
def _update_info_labels(self):
|
def _update_info_labels(self):
|
||||||
|
if not self.is_mounted:
|
||||||
|
return
|
||||||
v = self.validation_results
|
v = self.validation_results
|
||||||
|
|
||||||
# Discord
|
# Discord
|
||||||
|
|
@ -339,6 +341,8 @@ class OperationPane(Container):
|
||||||
|
|
||||||
@work(exclusive=True)
|
@work(exclusive=True)
|
||||||
async def run_validate(self) -> None:
|
async def run_validate(self) -> None:
|
||||||
|
if not self.is_mounted:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
plat = "Fluxer" if self.target_platform == "fluxer" else "Stoat"
|
plat = "Fluxer" if self.target_platform == "fluxer" else "Stoat"
|
||||||
self.query_one("#op_lbl_t_header", Label).update(plat)
|
self.query_one("#op_lbl_t_header", Label).update(plat)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue