1 | @ECHO OFF
|
2 |
|
3 |
|
4 | set root_path=%~f0
|
5 | set root_path=%root_path:~0,-27%
|
6 |
|
7 |
|
8 | IF %1.==. GOTO Error
|
9 |
|
10 |
|
11 | ver | findstr /i "5\.1\." > nul
|
12 | IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported
|
13 |
|
14 |
|
15 | rmdir %1\dev
|
16 |
|
17 |
|
18 |
|
19 | mklink /d %1\dev %root_path%
|
20 |
|
21 | GOTO Exit
|
22 |
|
23 | :Error
|
24 | ECHO Usage: setup_for_hacking.bat application_path
|
25 | ECHO Setup Brackets to use the HTML/CSS/JS files pulled from GitHub.
|
26 | ECHO Parameters: application_path - path that contains the Brackets application
|
27 | ECHO Example: setup_for_hacking.bat "c:\Program Files (x86)\Brackets Sprint 14"
|
28 | GOTO Exit
|
29 |
|
30 | :XPNotSupported
|
31 | ECHO Sorry, this script doesn't run in Windows XP.
|
32 | ECHO To enable hacking, use the junction tool (http://technet.microsoft.com/en-us/sysinternals/bb896768)
|
33 | ECHO as follows: junction.exe %1\dev %root_path%
|
34 | ECHO (in the folder containing Brackets.exe)
|
35 |
|
36 | :Exit
|