Phabricator Administrator's Handbook/Arcanist/Microsoft Windows

This is an expansion of the official Arcanist installation guide on Windows that is somehow too generic and also an expansion of the good Mozilla Revision installation guide of Arcanist on Windows 10.

Installation guide
Even if Arcanist is very easy to be installed from a GNU/Linux distribution (thanks to the package manager), in Windows this is less true and you will have to setup some components:

Visual C++
First of all, Microsoft Windows 10 users may want to use Arcanist in both git Bash and the PowerShell. Both should work with this guide.

First of all install the Microsoft Visual C++ 2015-2019 Redistributable (x64).

To verify if you already have this software in your computer, check:


 * Settings → Apps → App & features.

If you have not the Microsoft Visual C++ in your system, you have to download it from the official Microsoft website:

https://support.microsoft.com/en-ca/help/2977003/the-latest-supported-visual-c-downloads

The filename is called  or something like that.

PHP
Arcanist requires PHP to be executed.

You can install a recent version of PHP, like the PHP 7.4, VC15 x64 Non Thread Safe from the official PHP website:

https://windows.php.net/download/

After you have downloaded the file, extract the zip somewhere. For example in:

C:\PHP

Now, from that directory, remember to copy the file  to.

Now that you have the file, edit it.

You will need the PHP cURL extension to allow Arcanist to communicates with the Internet. To do it, you will easily find this line in that configuration file:


 * extension=php_curl.dll

And you should remove the leading semicolon:

extension=php_curl.dll

Note: in PHP 7.4 its not  but just.

After this modification, find the line:

;extension_dir = "ext"

And update its pathname like in this example:

extension_dir = "C:\PHP\ext"

To try if everything works, try to execute this command:

C:\PHP\php.exe -i

If the command cites, you have configured PHP in the right way.

Git
If you have not git installed, you will need to download it from the official website and install it:

https://git-scm.com/download/win

Arcanist
Now you can download via git the Arcanist repository somewhere with this command:

git clone https://secure.phabricator.com/diffusion/ARC/ arcanist

Note: with this command it will be downloaded in an  directory inside your home. In this way you should have the file.

User path
You will need to add both  and   in your user's path or you will not be able to execute them so easily.

To configure the user's path, type  into your search bar (the one at the bottom of your desktop) and select Edit environment variables for your account.

This can also be done from:

Control Panel → All Control Panel Items → System → Advanced System Setting → Environment Variables…

Then:


 * select the Path variable under User variables for 
 * click Edit…
 * click New
 * type
 * click
 * add

Verify that everything works executing the Arcanist command, for example with the help menu:

arc help

Editor
Just ensure you have an editor installed that has a "blocking mode". Some Free as in Freedom editors with this mode: vim, nano and Notepad++.

If you want to use  but also you want it available from another place (e.g. from the PowerShell), run this command:

arc set-config editor "\"C:\Program Files\Git\usr\bin\vim.exe\""

If you would like to use another editor (like Notepad++), remember to replace the path from the above command, adjusting it for your needs. For example:

arc set-config editor "\"C:\Program Files (x86)\Notepad++\notepad++.exe\" -multiInst -nosession"