Add desktop shortcut and Windows exe packaging
Operators can double-click XlsxClean without using the terminal: Windows VBS/BAT launchers plus Install-DesktopShortcut, Linux .desktop installer, and a PyInstaller spec/build script for a standalone Windows exe. Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,18 @@ import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
PACKAGE_DIR = Path(__file__).resolve().parent
|
||||
|
||||
def _package_dir() -> Path:
|
||||
"""Directory containing package data (CSV/txt), including PyInstaller bundles."""
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
bundled = Path(sys._MEIPASS) / "xlsx_clean"
|
||||
if bundled.is_dir():
|
||||
return bundled
|
||||
return Path(sys._MEIPASS)
|
||||
return Path(__file__).resolve().parent
|
||||
|
||||
|
||||
PACKAGE_DIR = _package_dir()
|
||||
|
||||
# Historical Windows root used in file_data.csv
|
||||
DEFAULT_OPENCLOUD_ROOT = Path(r"D:\OpenCloud")
|
||||
|
||||
Reference in New Issue
Block a user