Skip to content

Commit 20dc926

Browse files
committed
chore: untrack victoria doc
1 parent e861bdf commit 20dc926

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# crush-specific stuff
22
.crush/
3+
VICTORIA.md
34

45
# THIS GETS TEMPLATED vvv
56
crush.json
67

7-
# VICTORIA.md master is kept in victoria-main
8-
VICTORIA.md
98

109
# mac BS
1110
.DS_Store

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ python3 victoria.py
9797
This gives you the most control and is the same across macOS, Linux, and Windows (PowerShell).
9898
All modes store configuration and data in `~/Victoria` (or `%USERPROFILE%\Victoria` on Windows).
9999

100+
To refresh the bundled `VICTORIA.md` knowledge base during development, run:
101+
102+
```bash
103+
python3 victoria.py --dev
104+
```
105+
100106
#### Customizing the launch tool
101107

102108
Victoria uses the `crush` CLI by default. Set the following environment variables to swap in a different tool or config files:
@@ -140,17 +146,19 @@ After that, it’s double-click and go.
140146

141147
## 📦 Packaging for macOS and Windows
142148

143-
You can build standalone packages so Victoria can be launched without a terminal.
149+
You can build standalone packages so Victoria can be launched from Finder. The macOS app opens a terminal window for interaction.
144150

145151
### macOS `.app`
146152

153+
Before packaging, fetch `VICTORIA.md` from its private repository and place it in the project root. It is ignored by git.
154+
147155
1. Run:
148156

149157
```bash
150158
./package_mac.sh
151159
```
152160

153-
The script uses `uvx pyinstaller`, so no `pip install` is required. The bundle will be created at `dist/Victoria.app`.
161+
The script uses `uvx pyinstaller`, so no `pip install` is required. The bundle will be created at `dist/Victoria.app`. It bundles `CRUSH.md`, `VICTORIA.md`, `crush.template.json`, `snowflake.mcp.json`, and `.crushignore` for runtime reference.
154162

155163
2. Share the app internally by either wrapping it in a DMG or zipping the bundle:
156164

@@ -170,6 +178,8 @@ You can build standalone packages so Victoria can be launched without a terminal
170178

171179
### Windows `.exe` and Installer
172180

181+
Before packaging, fetch `VICTORIA.md` from its private repository and place it in the project root. It is ignored by git.
182+
173183
1. Install [Inno Setup](https://jrsoftware.org/isinfo.php) (make sure `iscc` is on your PATH). PyInstaller is invoked via `uvx`, so you don't need to install it.
174184
2. To change the installer version, edit `installer_win.iss` and update `MyAppVersion` on line 2.
175185
3. Run `package_win.bat` from Command Prompt or PowerShell:
@@ -178,7 +188,7 @@ You can build standalone packages so Victoria can be launched without a terminal
178188
.\package_win.bat
179189
```
180190
181-
This produces both a standalone executable (`dist/Victoria.exe`) and an installer (`dist/VictoriaSetup.exe`).
191+
This produces both a standalone executable (`dist/Victoria.exe`) and an installer (`dist/VictoriaSetup.exe`). The build bundles `CRUSH.md` and `VICTORIA.md` alongside the configuration templates for runtime reference.
182192
183193
To upgrade Victoria on Windows, build a new installer with an updated version number and run it; Inno Setup will replace the previous installation automatically while preserving the same AppId.
184194
Both packaged versions automatically use the `~/Victoria` folder (or `%USERPROFILE%\Victoria` on Windows) for configuration and data.

package_mac.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/usr/bin/env bash
22
set -e
3-
uvx pyinstaller --noconfirm --windowed --name Victoria \
3+
uvx pyinstaller --noconfirm --console --name Victoria \
44
--icon assets/icon.icns \
55
--add-data "crush.template.json:." \
66
--add-data "snowflake.mcp.json:." \
77
--add-data ".crushignore:." \
8+
--add-data "CRUSH.md:." \
9+
--add-data "VICTORIA.md:." \
810
victoria.py

package_win.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ uvx pyinstaller --noconfirm --onefile --name Victoria ^
44
--add-data "crush.template.json;." ^
55
--add-data "snowflake.mcp.json;." ^
66
--add-data ".crushignore;." ^
7+
--add-data "CRUSH.md;." ^
8+
--add-data "VICTORIA.md;." ^
79
victoria.py
810
REM Build installer with Inno Setup (iscc must be on PATH)
911
iscc installer_win.iss

victoria.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Cross-platform terminal compatibility with graceful degradation
1313
"""
1414

15+
import argparse
1516
import json
1617
import os
1718
import re
@@ -44,12 +45,22 @@ def resource_path(name: str) -> Path:
4445
return base / name
4546

4647
def ensure_default_files():
47-
for fname in [".crushignore", "CRUSH.md"]:
48+
for fname in [".crushignore", "CRUSH.md", VICTORIA_FILE]:
4849
src = resource_path(fname)
4950
dst = APP_HOME / fname
5051
if src.exists() and not dst.exists():
5152
shutil.copy(src, dst)
5253

54+
55+
def parse_args():
56+
parser = argparse.ArgumentParser(description="Victoria launcher")
57+
parser.add_argument(
58+
"--dev",
59+
action="store_true",
60+
help="Enable developer mode to refresh VICTORIA.md",
61+
)
62+
return parser.parse_args()
63+
5364
SNOWFLAKE_ENV_VARS = [
5465
"SNOWFLAKE_ACCOUNT",
5566
"SNOWFLAKE_USER",
@@ -700,6 +711,9 @@ def open_victoria_folder():
700711
warn(f"Could not open Victoria folder: {e}")
701712

702713
def main():
714+
args = parse_args()
715+
dev_mode = args.dev or os.environ.get("VICTORIA_DEV") == "1"
716+
703717
ensure_default_files()
704718
clear_screen()
705719
banner()
@@ -716,8 +730,10 @@ def main():
716730
print(f"{T.DIM}Debug: Terminal caps: {TERM_CAPS}{T.NC}")
717731

718732
time.sleep(1)
719-
720-
prompt_update_victoria()
733+
734+
if dev_mode:
735+
prompt_update_victoria()
736+
721737
preflight()
722738

723739
choice = course_menu()

0 commit comments

Comments
 (0)