Browse files

Code review fix: move XP-specific setup_for_hacking instructions into XP

error message that the script prints, and move check for missing argument
before XP check to ensure that XP message doesn't print misleading paths.
  • Loading branch information...
1 parent e92773e commit 6f8a9812c0cdf0c738cdf7ba5a857177cdd41b4b @peterflynn peterflynn committed Oct 18, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 tools/setup_for_hacking.bat
15 tools/setup_for_hacking.bat
@@ -4,19 +4,18 @@ REM - Use full path of this batch file to determine root directory
set root_path=%~f0
set root_path=%root_path:~0,-27%
+REM - Check for parameter
+IF %1.==. GOTO Error
REM - Check for OS. This script works in Vista or later.
ver | findstr /i "5\.1\." > nul
-REM - Check for parameter
-IF %1.==. GOTO Error
REM - Remove existing 'dev' directory (if present)
rmdir %1\dev
REM - Make symlink
-REM On Win XP, use the junction tool (
-REM as follows: junction.exe %1\dev %root_path%
+REM (doesn't work on XP - see instructions below)
mklink /d %1\dev %root_path%
@@ -30,8 +29,8 @@ GOTO Exit
ECHO Sorry, this script doesn't run in Windows XP.
-ECHO To enable hacking, make a shortcut to
-ECHO %root_path%, name it
-ECHO "dev", and put it next to your Brackets.exe file
+ECHO To enable hacking, use the junction tool (
+ECHO as follows: junction.exe %1\dev %root_path%
+ECHO (in the folder containing Brackets.exe)

0 comments on commit 6f8a981

Please sign in to comment.