mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Provide release dir as absolute path during sample build
This commit is contained in:
3
samples/PythonWXPython/.gitignore
vendored
3
samples/PythonWXPython/.gitignore
vendored
@@ -40,6 +40,9 @@ MANIFEST
|
|||||||
*.manifest
|
*.manifest
|
||||||
*.spec
|
*.spec
|
||||||
|
|
||||||
|
# Velopack
|
||||||
|
_build_config.py
|
||||||
|
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
pip-log.txt
|
||||||
pip-delete-this-directory.txt
|
pip-delete-this-directory.txt
|
||||||
|
|||||||
@@ -9,13 +9,12 @@ if "%~1"=="" (
|
|||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Installing dependencies
|
echo Installing dependencies
|
||||||
uv sync
|
uv sync
|
||||||
|
|
||||||
|
echo update_url = R"%~dp0releases" > _build_config.py
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Building Python application
|
echo Building Python application
|
||||||
uv run pyinstaller --onedir --windowed --noconfirm main.py
|
uv run pyinstaller --onedir --windowed --noconfirm main.py
|
||||||
@@ -32,4 +31,3 @@ rmdir /S /Q build 2>nul
|
|||||||
rmdir /S /Q dist 2>nul
|
rmdir /S /Q dist 2>nul
|
||||||
rmdir /S /Q publish 2>nul
|
rmdir /S /Q publish 2>nul
|
||||||
del /Q main.spec 2>nul
|
del /Q main.spec 2>nul
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import logging
|
|||||||
import wx
|
import wx
|
||||||
|
|
||||||
import velopack
|
import velopack
|
||||||
|
from _build_config import update_url
|
||||||
|
|
||||||
class BufferedLogHandler(logging.Handler):
|
class BufferedLogHandler(logging.Handler):
|
||||||
"""Buffers log messages and provides access to them"""
|
"""Buffers log messages and provides access to them"""
|
||||||
@@ -84,7 +85,7 @@ class MainFrame(wx.Frame):
|
|||||||
|
|
||||||
def on_check(self, event):
|
def on_check(self, event):
|
||||||
try:
|
try:
|
||||||
self.update_manager = velopack.UpdateManager("../../releases/")
|
self.update_manager = velopack.UpdateManager(update_url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Failed to initialize update manager: {e}")
|
logging.error(f"Failed to initialize update manager: {e}")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user