add version
This commit is contained in:
parent
1d95599925
commit
40a81de2ad
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,4 +8,5 @@ _build/
|
|||||||
*.old
|
*.old
|
||||||
# Python cache files
|
# Python cache files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
_version.py
|
||||||
@ -2,16 +2,45 @@
|
|||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
a = Analysis(scripts=['C:\\src\\____GitProjects\\GitUtility\\GitUtility.py'], pathex=['C:\\src\\____GitProjects\\GitUtility'], binaries=[], datas=[('C:\\src\\____GitProjects\\GitUtility\\git_svn_sync.ini', '.')], hiddenimports=[], hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=None, noarchive=False,)
|
import os
|
||||||
|
a = Analysis(scripts=['gitutility\\__main__.py'],
|
||||||
|
pathex=['gitutility'],
|
||||||
|
binaries=[],
|
||||||
|
datas=[('C:\\src\\____GitProjects\\GitUtility\\git_svn_sync.ini', '.')],
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[],
|
||||||
|
win_no_prefer_redirects=False,
|
||||||
|
win_private_assemblies=False,
|
||||||
|
cipher=None,
|
||||||
|
noarchive=False)
|
||||||
|
|
||||||
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
|
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
|
||||||
|
|
||||||
exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], name='GitUtility',
|
exe = EXE(pyz,
|
||||||
|
a.scripts,
|
||||||
|
[], # Binaries/Datas usually handled by Analysis/COLLECT
|
||||||
|
exclude_binaries=True, # Let COLLECT handle binaries in one-dir
|
||||||
|
name='GitUtility',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True, # Use UPX based on config
|
||||||
upx_exclude=[],
|
|
||||||
runtime_tmpdir=None,
|
runtime_tmpdir=None,
|
||||||
console=False,)
|
console=False, # Set console based on GUI checkbox
|
||||||
coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=True, upx_exclude=[], name='GitUtility',)
|
disable_windowed_traceback=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
icon='GitUtility.ico')
|
||||||
|
|
||||||
|
coll = COLLECT(exe,
|
||||||
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
|
a.datas,
|
||||||
|
strip=False,
|
||||||
|
upx=True, # Match UPX setting
|
||||||
|
upx_exclude=[],
|
||||||
|
name='GitUtility')
|
||||||
|
|||||||
@ -55,7 +55,23 @@ from gitutility.async_tasks.async_result_handler import (
|
|||||||
AsyncResultHandler,
|
AsyncResultHandler,
|
||||||
) # Result processor
|
) # Result processor
|
||||||
|
|
||||||
# ---<<< FINE MODIFICA IMPORT >>>---
|
# --- Import Version Info FOR THE WRAPPER ITSELF ---
|
||||||
|
try:
|
||||||
|
# Use absolute import based on package name
|
||||||
|
from gitutility import _version as wrapper_version
|
||||||
|
WRAPPER_APP_VERSION_STRING = f"{wrapper_version.__version__} ({wrapper_version.GIT_BRANCH}/{wrapper_version.GIT_COMMIT_HASH[:7]})"
|
||||||
|
WRAPPER_BUILD_INFO = f"Wrapper Built: {wrapper_version.BUILD_TIMESTAMP}"
|
||||||
|
except ImportError:
|
||||||
|
# This might happen if you run the wrapper directly from source
|
||||||
|
# without generating its _version.py first (if you use that approach for the wrapper itself)
|
||||||
|
WRAPPER_APP_VERSION_STRING = "(Dev Wrapper)"
|
||||||
|
WRAPPER_BUILD_INFO = "Wrapper build time unknown"
|
||||||
|
|
||||||
|
# --- Constants for Version Generation ---
|
||||||
|
DEFAULT_VERSION = "0.0.0+unknown"
|
||||||
|
DEFAULT_COMMIT = "Unknown"
|
||||||
|
DEFAULT_BRANCH = "Unknown"
|
||||||
|
# --- End Constants ---
|
||||||
|
|
||||||
|
|
||||||
class GitSvnSyncApp:
|
class GitSvnSyncApp:
|
||||||
@ -80,7 +96,7 @@ class GitSvnSyncApp:
|
|||||||
master (tk.Tk): The main Tkinter root window.
|
master (tk.Tk): The main Tkinter root window.
|
||||||
"""
|
"""
|
||||||
self.master: tk.Tk = master
|
self.master: tk.Tk = master
|
||||||
master.title("Git Utility (Bundle & Remote Manager)")
|
master.title(f"Git Utility (Bundle & Remote Manager) - {WRAPPER_APP_VERSION_STRING}")
|
||||||
# Define behavior on window close button press
|
# Define behavior on window close button press
|
||||||
master.protocol("WM_DELETE_WINDOW", self.on_closing)
|
master.protocol("WM_DELETE_WINDOW", self.on_closing)
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,6 @@ except ImportError:
|
|||||||
# Non importiamo più classi di Dialog, Editor, Viewer qui perché sono in file separati
|
# Non importiamo più classi di Dialog, Editor, Viewer qui perché sono in file separati
|
||||||
# Non importiamo moduli di logica (ActionHandler, GitCommands, etc.)
|
# Non importiamo moduli di logica (ActionHandler, GitCommands, etc.)
|
||||||
|
|
||||||
|
|
||||||
class MainFrame(ttk.Frame):
|
class MainFrame(ttk.Frame):
|
||||||
"""
|
"""
|
||||||
The main application frame, containing the profile management bar,
|
The main application frame, containing the profile management bar,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user