Symlinking AddOn folders

From Warcraft Wiki
Jump to navigation Jump to search

Instead of having git repositories directly in your AddOns folders or copying them around, consider symlinking them. (Windows: New-Item for PowerShell or mklink for cmd)

New-Item -ItemType SymbolicLink -Path "D:\Game\World of Warcraft\_retail_\Interface\AddOns\HelloWorld" -Value "D:\Repo\HelloWorld"

Symlink between game flavors

This example symlinks the PTR and Beta clients to the Retail AddOns folder.

You might have to delete the Path folder first. You can also append -Force to the command if the Path folder already exists but is an empty folder.
New-Item -ItemType SymbolicLink -Path "D:\Game\World of Warcraft\_ptr_\Interface\AddOns" -Value "D:\Game\World of Warcraft\_retail_\Interface\AddOns" 
New-Item -ItemType SymbolicLink -Path "D:\Game\World of Warcraft\_beta_\Interface\AddOns" -Value "D:\Game\World of Warcraft\_retail_\Interface\AddOns"

Embedded libraries

If your addon is soft embedding libraries (e.g. Ace3) with .pkgmeta, a solution is to put those libraries as standalone addons in your AddOns folder and making sure they're listed in your TOC. Alternatively you can create even more symlinks for the libs.

## OptionalDeps: Ace3

Subfolders / modules

If your addon consists of multiple folders by using move-folders you can create symlinks to the subfolders, for example:

New-Item -ItemType SymbolicLink -Path "D:\Game\World of Warcraft\_retail_\Interface\AddOns\WardrobeSort" -Value "D:\Repo\WardrobeSort"
New-Item -ItemType SymbolicLink -Path "D:\Game\World of Warcraft\_retail_\Interface\AddOns\WardrobeSortData" -Value "D:\Repo\WardrobeSort\Data"