浏览代码

Windows installation guide

Downloading via file_get_contents & creation of BAT file
Daniel Jackson 13 年之前
父节点
当前提交
53b20367ec
共有 1 个文件被更改,包括 27 次插入1 次删除
  1. 27 1
      doc/00-intro.md

+ 27 - 1
doc/00-intro.md

@@ -42,7 +42,7 @@ which describes the project's dependencies.
 We are simply stating that our project requires some `monolog/monolog` package,
 We are simply stating that our project requires some `monolog/monolog` package,
 any version beginning with `1.0`.
 any version beginning with `1.0`.
 
 
-## Installation
+## Installation - *nix
 
 
 ### Downloading the Composer Executable
 ### Downloading the Composer Executable
 
 
@@ -84,6 +84,32 @@ Next, run the `install` command to resolve and download dependencies:
 
 
 This will download monolog into the `vendor/monolog/monolog` directory.
 This will download monolog into the `vendor/monolog/monolog` directory.
 
 
+## Installation - Windows
+
+### Downloading the Composer Executable
+
+Change to a directory on your `PATH`
+
+    C:\Users\username>cd C:\bin
+    C:\bin>php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
+
+Create a new `.BAT` file alongside composer
+
+    C:\bin>notepad composer.bat
+    
+Paste the following:
+
+    @ECHO OFF
+    SET composerScript=composer.phar
+    php %~dp0%composerScript% %*
+    
+Save the file. Close your current terminal. Test usage with a new terminal:
+
+    C:\Users\username>composer -V
+    Composer version 27d8904
+    
+    C:\Users\username>
+
 ## Autoloading
 ## Autoloading
 
 
 Besides downloading the library, Composer also prepares an autoload file that's
 Besides downloading the library, Composer also prepares an autoload file that's