From ced4273d4b36ceba151690064f8053af2c657886 Mon Sep 17 00:00:00 2001 From: JesseCol Date: Fri, 21 Nov 2025 21:56:26 -0800 Subject: [PATCH 1/2] Add docs about Global Cache Directory --- docs/usage.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/usage.md b/docs/usage.md index c7c0f32..9bdbe57 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -30,6 +30,7 @@ winapp init [base-directory] [options] - Creates development certificate and AppxManifest.xml - Sets up build tools and enables developer mode - Updates .gitignore to exclude generated files +- Stores sharable files in the global cache directory **Examples:** @@ -63,6 +64,7 @@ winapp restore [options] - Reads existing `winapp.yaml` configuration - Downloads/updates SDK packages to specified versions - Regenerates C++/WinRT headers and binaries +- Stores sharable files in the global cache directory **Examples:** @@ -425,3 +427,25 @@ All commands support these global options: - `--verbose`, `-v` - Enable verbose output for detailed logging - `--quiet`, `-q` - Suppress progress messages - `--help`, `-h` - Show command help + +--- + +### Global Cache Directory + +Winapp creates a directory to cache files that can be shared between multiple projects. + +By default, winapp creates a directory at `$UserProfile/.winapp` as the global cache directory. + +To use a different location, set the `WINAPP_CLI_CACHE_DIRECTORY` environment variable: + +```cmd +REM cmd - set a custom location for winapp's global cache +set WINAPP_CLI_CACHE_DIRECTORY=d:\temp\.winapp +``` + +```pwsh +# Powershell - set a custom location for winapp's global cache +$env:WINAPP_CLI_CACHE_DIRECTORY=d:\temp\.winapp +``` + +Winapp will create this directory automatically when you run commands like `init` or `restore`. \ No newline at end of file From ca941f2a580042248fbd15080cc17cd91bb3754f Mon Sep 17 00:00:00 2001 From: Jesse Collins Date: Mon, 1 Dec 2025 15:03:19 -0800 Subject: [PATCH 2/2] Put 'cmd' and 'pwsh' above the code snippets --- docs/usage.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 9bdbe57..2c83c11 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -436,15 +436,17 @@ Winapp creates a directory to cache files that can be shared between multiple pr By default, winapp creates a directory at `$UserProfile/.winapp` as the global cache directory. -To use a different location, set the `WINAPP_CLI_CACHE_DIRECTORY` environment variable: +To use a different location, set the `WINAPP_CLI_CACHE_DIRECTORY` environment variable. +In **cmd**: ```cmd -REM cmd - set a custom location for winapp's global cache +REM Set a custom location for winapp's global cache set WINAPP_CLI_CACHE_DIRECTORY=d:\temp\.winapp ``` +In **Powershell** and **pwsh**: ```pwsh -# Powershell - set a custom location for winapp's global cache +# Set a custom location for winapp's global cache $env:WINAPP_CLI_CACHE_DIRECTORY=d:\temp\.winapp ```