Brand operator UI, shortcut, and exe as New QC Sheet
Keep the xlsx_clean package name; show New QC Sheet in the web window title/heading, Desktop shortcut, and Windows PyInstaller output. Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
This commit is contained in:
@@ -9,5 +9,5 @@ if errorlevel 1 (
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo Desktop shortcut created: XlsxClean
|
||||
echo Desktop shortcut created: New QC Sheet
|
||||
pause
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
# Creates %USERPROFILE%\Desktop\XlsxClean.lnk -> desktop\XlsxClean.vbs
|
||||
# Creates %USERPROFILE%\Desktop\New QC Sheet.lnk -> desktop\XlsxClean.vbs
|
||||
$ErrorActionPreference = "Stop"
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$target = Join-Path $PSScriptRoot "XlsxClean.vbs"
|
||||
$desktop = [Environment]::GetFolderPath("Desktop")
|
||||
$shortcutPath = Join-Path $desktop "XlsxClean.lnk"
|
||||
$shortcutPath = Join-Path $desktop "New QC Sheet.lnk"
|
||||
|
||||
if (-not (Test-Path $target)) {
|
||||
throw "Launcher not found: $target"
|
||||
}
|
||||
|
||||
# Remove older shortcut name if present
|
||||
$legacy = Join-Path $desktop "XlsxClean.lnk"
|
||||
if (Test-Path $legacy) {
|
||||
Remove-Item $legacy -Force
|
||||
}
|
||||
|
||||
$wsh = New-Object -ComObject WScript.Shell
|
||||
$shortcut = $wsh.CreateShortcut($shortcutPath)
|
||||
$shortcut.TargetPath = $target
|
||||
$shortcut.WorkingDirectory = $repoRoot
|
||||
$shortcut.WindowStyle = 7
|
||||
$shortcut.Description = "Open xlsx-clean"
|
||||
$shortcut.Description = "Open New QC Sheet"
|
||||
$iconCandidate = Join-Path $PSScriptRoot "xlsx-clean.ico"
|
||||
if (Test-Path $iconCandidate) {
|
||||
$shortcut.IconLocation = "$iconCandidate,0"
|
||||
|
||||
@@ -29,5 +29,5 @@ if errorlevel 1 (
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Setup complete. Double-click the XlsxClean icon on your Desktop.
|
||||
echo Setup complete. Double-click the New QC Sheet icon on your Desktop.
|
||||
pause
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
REM Build dist\XlsxClean\XlsxClean.exe on Windows with uv, then Desktop shortcut.
|
||||
REM Build dist\New QC Sheet\New QC Sheet.exe on Windows with uv, then Desktop shortcut.
|
||||
setlocal
|
||||
cd /d "%~dp0\.."
|
||||
|
||||
@@ -27,7 +27,7 @@ if errorlevel 1 (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set EXE=%CD%\dist\XlsxClean\XlsxClean.exe
|
||||
set EXE=%CD%\dist\New QC Sheet\New QC Sheet.exe
|
||||
if not exist "%EXE%" (
|
||||
echo Expected exe not found: %EXE%
|
||||
pause
|
||||
@@ -37,18 +37,20 @@ if not exist "%EXE%" (
|
||||
echo Creating Desktop shortcut to the exe...
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$desk=[Environment]::GetFolderPath('Desktop');" ^
|
||||
"$lnk=Join-Path $desk 'XlsxClean.lnk';" ^
|
||||
"$lnk=Join-Path $desk 'New QC Sheet.lnk';" ^
|
||||
"$legacy=Join-Path $desk 'XlsxClean.lnk';" ^
|
||||
"if (Test-Path $legacy) { Remove-Item $legacy -Force };" ^
|
||||
"$ico=Join-Path '%CD%' 'desktop\xlsx-clean.ico';" ^
|
||||
"$w=New-Object -ComObject WScript.Shell;" ^
|
||||
"$s=$w.CreateShortcut($lnk);" ^
|
||||
"$s.TargetPath='%EXE%';" ^
|
||||
"$s.WorkingDirectory='%~dp0..\dist\XlsxClean';" ^
|
||||
"$s.Description='Open xlsx-clean';" ^
|
||||
"$s.WorkingDirectory='%~dp0..\dist\New QC Sheet';" ^
|
||||
"$s.Description='Open New QC Sheet';" ^
|
||||
"if (Test-Path $ico) { $s.IconLocation = $ico };" ^
|
||||
"$s.Save();" ^
|
||||
"Write-Host Created $lnk"
|
||||
|
||||
echo.
|
||||
echo Done. Double-click the XlsxClean icon on your Desktop.
|
||||
echo Exe folder: dist\XlsxClean\
|
||||
echo Done. Double-click the New QC Sheet icon on your Desktop.
|
||||
echo Exe folder: dist\New QC Sheet\
|
||||
pause
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Install a Desktop shortcut that launches the xlsx-clean web UI."""
|
||||
"""Install a Desktop shortcut that launches New QC Sheet."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
DESKTOP_DIR = Path(__file__).resolve().parent
|
||||
APP_DISPLAY_NAME = "New QC Sheet"
|
||||
|
||||
|
||||
def _user_desktop() -> Path:
|
||||
@@ -34,7 +35,7 @@ def install_windows() -> Path:
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
return _user_desktop() / "XlsxClean.lnk"
|
||||
return _user_desktop() / f"{APP_DISPLAY_NAME}.lnk"
|
||||
|
||||
|
||||
def install_linux() -> Path:
|
||||
@@ -43,17 +44,20 @@ def install_linux() -> Path:
|
||||
python = REPO_ROOT / ".venv" / "bin" / "python"
|
||||
if not python.is_file():
|
||||
python = Path(sys.executable)
|
||||
out = desktop / "XlsxClean.desktop"
|
||||
out = desktop / f"{APP_DISPLAY_NAME}.desktop"
|
||||
legacy = desktop / "XlsxClean.desktop"
|
||||
if legacy.is_file():
|
||||
legacy.unlink()
|
||||
exec_line = (
|
||||
f'{python} -m xlsx_clean.web_app --host 127.0.0.1 --port 8080'
|
||||
f"{python} -m xlsx_clean.web_app --host 127.0.0.1 --port 8080"
|
||||
)
|
||||
icon_png = DESKTOP_DIR / "xlsx-clean.png"
|
||||
icon_line = str(icon_png) if icon_png.is_file() else "applications-office"
|
||||
content = f"""[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=XlsxClean
|
||||
Comment=Create a new QC datasheet (xlsx-clean web UI)
|
||||
Name={APP_DISPLAY_NAME}
|
||||
Comment=Create a new QC datasheet
|
||||
Exec={exec_line}
|
||||
Path={REPO_ROOT}
|
||||
Icon={icon_line}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=XlsxClean
|
||||
Comment=Create a new QC datasheet (xlsx-clean web UI)
|
||||
Name=New QC Sheet
|
||||
Comment=Create a new QC datasheet
|
||||
# Exec is filled by install_desktop_shortcut.py; placeholder for manual edits:
|
||||
Exec=bash -lc 'cd "$(dirname "%k")/.." && (.venv/bin/python -m xlsx_clean.web_app --host 127.0.0.1 --port 8080)'
|
||||
Path=
|
||||
|
||||
Reference in New Issue
Block a user