From c3efedb8965de245fab92a7b9ccb12f269a9615e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Wed, 3 Apr 2024 12:51:39 -0400 Subject: [PATCH] Start WhiskyCmd docs --- src/SUMMARY.md | 1 + src/paths.md | 2 +- src/whiskycmd.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 src/whiskycmd.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 60d9042f..961f7b0f 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -3,6 +3,7 @@ - [Guide](./guide.md) - [Common Issues](./common-issues.md) - [What's Where?](./paths.md) +- [WhiskyCmd](./whiskycmd.md) - [Whisky vs. CrossOver](./cx.md) - [Game Support](./game-support/README.md) - [Armored Core VI: Fires of Rubicon](./game-support/armored-core-6.md) diff --git a/src/paths.md b/src/paths.md index 3689a852..9c692bee 100644 --- a/src/paths.md +++ b/src/paths.md @@ -7,7 +7,7 @@ Whisky installs files to the following locations: | GPTK | `~/Library/Application Support/com.isaacmarovitz.Whisky/Libraries` | | Bottles | `~/Library/Containers/com.isaacmarovitz.Whisky/Bottles` | | Logs | `~/Library/Logs/com.isaacmarovitz.Whisky` | -| WhiskyCMD | `/usr/local/bin/whisky` | +| WhiskyCmd | `/usr/local/bin/whisky` | # Uninstalling Whisky diff --git a/src/whiskycmd.md b/src/whiskycmd.md new file mode 100644 index 00000000..b5e10e25 --- /dev/null +++ b/src/whiskycmd.md @@ -0,0 +1,85 @@ +# WhiskyCmd + +WhiskyCmd is an optional CLI tool that allows you to list, create, and delete bottles, +as well as run programs directly from the command line. +This can be helpful if you're trying to automate certain tasks in Whisky, +or want to use Whisky bottles from another app. + +## Installation + +WhiskyCmd can be installed through the app by clicking `Whisky > Install Whisky CLI...`. +This will create a symlink between `/Applications/Whisky.app/Contents/Resources/WhiskyCmd` and `/usr/local/bin/whisky`. +When you update the main Whisky app, the CLI tool will automatically link to the updated binary. + +## Running Commands + +After installing WhiskyCmd, it will be available on PATH. In a new terminal session, +verify that the installation is working by typing `whisky`, you should see the following or similar output: + +```shell +$ whisky + +OVERVIEW: A CLI interface for Whisky. + +USAGE: whisky + +OPTIONS: + -h, --help Show help information. + +SUBCOMMANDS: + list List existing bottles. + create Create a new bottle. + add Add an existing bottle. + delete Delete an existing bottle from disk. + remove Remove an existing bottle from Whisky. + run Run a program with Whisky. + + See 'whisky help ' for detailed help. +``` + +## List + +List takes no arguments, and returns an ASCII table of all bottles registered to `BottleVM.plist`, +located at `~/Library/Containers/com.isaacmarovitz.Whisky/BottleVM.plist`. + +**Example Output:** + +```shell +$ whisky list + ++-------+-----------------+--------------------------------------------------------------------------+ +| Name | Windows Version | Path | ++-------+-----------------+--------------------------------------------------------------------------+ +| Steam | Windows 10 | ~/Library/Containers/Whisky/Bottles/72DC05EA-4D0C-47E5-8A16-9A5DAE62A118 | ++-------+-----------------+--------------------------------------------------------------------------+ +``` + +## Create + +Create takes a name for a new bottle to be made at your default bottle creation directory, +as specified in the UI. It is currently not possible to specify a desired Windows version, +it will always default to Windows 10. + +> [!CAUTION] +> This command currently does not actually initialise the bottle with Wine. +> This will be resolved in a future version of WhiskyCmd. + +```shell +$ whisky create Example + +Created new bottle "Example". +``` + +## Add + +Takes a path to an existing `Metadata.plist` and adds it to your `BottleVM.plist`. + +> [!CAUTION] +> This path is not sanitised as a valid Whisky bottle. +> Specifying the wrong path may have unintended consequences. + +```shell +$ whisky add ~/Library/Containers/Whisky/Bottles/Example/Metadata.plist + +Bottle "Example" added. +``` \ No newline at end of file