- Updated Changelog.

- Modified one error to be more helpful.
- Beginning of a German translation of RosBE (still missing: config, help). Do NOT translate it in another language yet. I still need to find a nice way to select the language.
Heeya, Waxy :-P

svn path=/trunk/tools/RosBE-Windows/; revision=363
This commit is contained in:
Daniel Reimer 2007-08-23 21:24:42 +00:00
parent 471641c71a
commit bd2970fed9
10 changed files with 720 additions and 2 deletions

View File

@ -32,7 +32,7 @@ if "%1" == "" (
if %logdiff% == 0 (
if not exist "RosBE-Logs\." (
if not exist ".svn\." (
echo Folder is empty. No Build can be performed.
echo Folder is empty. No Build can be performed without a Source Code.
goto :EOB
) else (
mkdir "RosBE-Logs"

View File

@ -1,7 +1,9 @@
*** Oct XXth, 2007 - RosBE 0.3.8 Released
- Added DrFred's Config Tool. (Daniel Reimer)
- Added ShortCut Tool (Daniel Reimer)
- Added ShortCut Tool. (Daniel Reimer)
- Updated w32api-3.9 to w32api-3.10. (except float.h which breaks build) (Daniel Reimer)
- Updated mingw-runtime-3.12 to mingw-runtime-3.13. (Daniel Reimer)
*** Aug XXst, 2007 - RosBE 0.3.7.2 Released (Unsupported)

View File

@ -0,0 +1,40 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/Build-Multi.cmd
:: PURPOSE: Perform the build of ReactOS, but use the -j option with the appropriate
:: number for the number of CPUs in the system.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
:: Colin Finck <mail@colinfinck.de>
:: Peter Ward <dralnix@gmail.com>
::
::
@echo off
title Kompiliert...
::
:: Clear variables before use.
::
set CPUCOUNT=
::
:: Get the number of CPUs in the system so we know how many jobs to execute.
:: To modify the number used alter the options used with cpucount:
:: No Option - Number of CPUs.
:: -x1 - Number of CPUs, Plus 1.
:: -x2 - Number of CPUs, Doubled.
::
for /f "usebackq" %%i in (`cpucount -x1`) do set CPUCOUNT=%%i
::
:: Set the build command
::
set MAKE_COMMAND="%_MINGWMAKE%" -j %CPUCOUNT% %1
::
:: Execute the shared build commands
::
call "%ROSBEBASEDIR%\Build-Shared.cmd" %2
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,103 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/Build-Shared.cmd
:: PURPOSE: Shared actions for "Build.cmd" and "Build-Multi.cmd".
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
:: Colin Finck <mail@colinfinck.de>
:: Peter Ward <dralnix@gmail.com>
::
::
@echo off
::
:: Take over the 2nd parameter of Build.cmd, which enables/disables stripping.
::
if "%1" == "strip" (
set ROS_LEAN_AND_MEAN = yes
goto :Build
)
if "%1" == "" (
set ROS_LEAN_AND_MEAN = no
goto :Build
)
:Build
::
:: Check if our log directory exists, if it doesn't, create it. Also check
:: if the default Path was editied by Config Tool. If so, update the
:: path.
::
if %logdiff% == 0 (
if not exist "RosBE-Logs\." (
if not exist ".svn\." (
echo Der Ordner ist leer. Kompilieren ist ohne Source-Code nicht möglich.
goto :EOB
) else (
mkdir "RosBE-Logs"
set _ROSBELOGDIR=RosBE-Logs
)
) else (
set _ROSBELOGDIR=RosBE-Logs
)
)
if %logdiff% == 1 (
if not exist "%ROSBE_LOGPATH%\." (
echo LogFolder does not exist.
) else (
set _ROSBELOGDIR=%ROSBE_LOGPATH%
)
)
)
::
:: Check if config.template.rbuild is newer than config.rbuild, if it is then
:: abort the build and inform the user.
::
if exist "config.rbuild" (
test "config.template.rbuild" -nt "config.rbuild"
if not errorlevel 1 (
echo.
echo *** config.template.rbuild ist neuer als config.rbuild ***
echo *** aborting build. Bitte aktualisieren Sie ihre ***
echo *** config.rbuild, indem Sie "config update" eintippen.***
echo.
goto :EOB
)
)
::
:: Get the current date and time for use in in our build log's file name.
::
call "%ROSBEBASEDIR%\TimeDate.cmd"
::
:: Now use mingw32-make to build ReactOS, passing along options, if any.
::
title Started: %TIMERAW%, Building...
if %ROSBE_SHOWTIME% == 1 (
if %ROSBE_WRITELOG% == 1 (
buildtime "%MAKE_COMMAND%" 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt"
)
if %ROSBE_WRITELOG% == 0 (
buildtime "%MAKE_COMMAND%" 2>&1
)
)
if %ROSBE_SHOWTIME% == 0 (
if %ROSBE_WRITELOG% == 1 (
"%MAKE_COMMAND%" 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt"
)
if %ROSBE_WRITELOG% == 0 (
"%MAKE_COMMAND%" 2>&1
)
)
::
:: Highlight the fact that building has ended.
::
flash
:EOB
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,25 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/Build.cmd
:: PURPOSE: Perform the build of ReactOS.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
:: Colin Finck <mail@colinfinck.de>
:: Peter Ward <dralnix@gmail.com>
::
::
@echo off
title Kompiliert...
::
:: Set the build command
::
set MAKE_COMMAND="%_MINGWMAKE%" %1
::
:: Execute the shared build commands
::
call "%ROSBEBASEDIR%\Build-Shared.cmd" %2
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,135 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/Clean.cmd
:: PURPOSE: Clean the ReactOS source directory.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
:: Peter Ward <dralnix@gmail.com>
::
::
@echo off
title Aufräumen...
if "%1" == "" (
::
: Check if we have something to clean, if so, clean it.
::
if exist "obj-i386\." (
echo ReactOS Source Ordner wird aufgeräumt...
::
: Run ReactOS's make clean.
::
"%_MINGWMAKE%" clean 1> NUL 2> NUL
::
: Remove directories/makefile.auto created by the build.
::
if exist "obj-i386\." (
rd /s /q "obj-i386" 1> NUL 2> NUL
)
if exist "output-i386\." (
rd /s /q "output-i386" 1> NUL 2> NUL
)
if exist "reactos\." (
rd /s /q "reactos" 1> NUL 2> NUL
)
if exist "makefile.auto" (
del "makefile.auto" 1> NUL 2> NUL
)
::
: Now delete auto-generated/copied files not removed by make clean.
::
del /f "media\inf\syssetup.inf" 1> NUL 2> NUL
del /f "include\roscfg.h" 1> NUL 2> NUL
del /f "dll\win32\ole32\nodrop.cur" 1> NUL 2> NUL
del /f "dll\win32\ole32\drag_move.cur" 1> NUL 2> NUL
del /f "dll\win32\ole32\drag_copy.cur" 1> NUL 2> NUL
del /f "dll\win32\ole32\drag_link.cur" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idc_divideropen.cur" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idc_copy.cur" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idc_divider.cur" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_view_small.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_std_large.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_view_large.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idi_tt_info_sm.ico" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idc_movebutton.cur" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idi_tt_warn_sm.ico" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idi_dragarrow.ico" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_hist_small.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_hist_large.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idt_check.bmp" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idi_tt_error_sm.ico" 1> NUL 2> NUL
del /f "dll\win32\comctl32\idb_std_small.bmp" 1> NUL 2> NUL
del /f "dll\win32\msi\instabsent.bmp" 1> NUL 2> NUL
del /f "dll\win32\msi\instlocal.bmp" 1> NUL 2> NUL
del /f "dll\win32\msi\instadvert.bmp" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\network.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\fontpics.bmp" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\pd32_nocollate.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\pd32_collate.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\folder.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\cdrom.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\floppy.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\pd32_landscape.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\folder2.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\800.bmp" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\pd32_portrait.ico" 1> NUL 2> NUL
del /f "dll\win32\comdlg32\hdisk.ico" 1> NUL 2> NUL
del /f "dll\ntdll\napi.S" 1> NUL 2> NUL
del /f "dll\ntdll\i386\napi.S" 1> NUL 2> NUL
rmdir /q "dll\ntdll\i386" 1> NUL 2> NUL
del /f "dll\win32\gdi32\misc\win32k.S" 1> NUL 2> NUL
del /f "dll\win32\gdi32\misc\i386\win32k.S" 1> NUL 2> NUL
rmdir /q "dll\win32\gdi32\misc\i386" 1> NUL 2> NUL
del /f "dll\win32\kernel32\errcodes.rc" 1> NUL 2> NUL
del /f "dll\win32\user32\misc\win32k.S" 1> NUL 2> NUL
del /f "dll\win32\user32\misc\i386\win32k.S" 1> NUL 2> NUL
rmdir /q "dll\win32\user32\misc\i386" 1> NUL 2> NUL
del /f "include\reactos\bugcodes.h" 1> NUL 2> NUL
del /f "include\reactos\buildno.h" 1> NUL 2> NUL
del /f "include\reactos\errcodes.h" 1> NUL 2> NUL
del /f "lib\win32ksys\win32k.S" 1> NUL 2> NUL
del /f "lib\win32ksys\i386\win32k.S" 1> NUL 2> NUL
rmdir /q "lib\win32ksys\i386" 1> NUL 2> NUL
del /f "ntoskrnl\bugcodes.rc" 1> NUL 2> NUL
del /f "ntoskrnl\ex\zw.S" 1> NUL 2> NUL
del /f "ntoskrnl\ex\i386\zw.S" 1> NUL 2> NUL
del /f "ntoskrnl\include\internal\napi.h" 1> NUL 2> NUL
del /f "subsystems\win32\win32k\dib\dib16gen.c" 1> NUL 2> NUL
del /f "subsystems\win32\win32k\dib\dib32gen.c" 1> NUL 2> NUL
del /f "subsystems\win32\win32k\dib\dib8gen.c" 1> NUL 2> NUL
del /f "subsystems\win32\win32k\include\napi.h" 1> NUL 2> NUL
echo ReactOS Source Ordner aufgeräumt.
) else (
echo ReactOS Source Ordner ist bereits aufgeräumt.
)
title ReactOS Build Environment %_VER%
goto :EOC
)
if "%1" == "logs" (
::
: Check if we have any logs to clean, if so, clean them.
::
if exist "%_ROSBELOGDIR%\*.txt" (
echo Kompilier-Logs werden gelöscht...
del /f "%_ROSBELOGDIR%\*.txt" 1> NUL 2> NUL
echo Alle Kompilier-Logs gelöscht.
) else (
echo Keine Logs zu löschen vorhanden.
)
goto :EOC
)
if not "%1" == "" (
echo Unbekannter Parameter. Versuchen Sie 'help [BEFEHL]'.
goto :EOC
)
:EOC
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,130 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/RosBE.cmd
:: PURPOSE: This script provides/sets up various build environments for
:: ReactOS. Currently it provides GCC 4.1.3 build environments.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
:: Peter Ward <dralnix@gmail.com>
::
::
@echo off
::
:: Set Defaults to work with and override them if edited by
:: Config Tool.
::
color 0A
set _VER=0.3.7.2
set ROSBEBASEDIR=%~dp0
for /f "usebackq" %%i in (`"echo %ROSBEBASEDIR%|%ROSBEBASEDIR%Tools\sed s/.$//g"`) do @SET ROSBEBASEDIR=%%i
set _ROSSOURCEDIRBASE=%CD%
set ROSBE_SHOWTIME=1
set ROSBE_WRITELOG=1
set _LOGDIR=%CD%\RosBE-Logs
if exist %ROSBEBASEDIR%\options.cmd (
goto :PREV
) else (
set logdiff=0
goto :NEXT
)
:PREV
call %ROSBEBASEDIR%\options.cmd
if %_LOGDIR% == %ROSBE_LOGPATH% (
set logdiff=0
) else (
set logdiff=1
)
:NEXT
title ReactOS Build Environment %_VER%
::
:: Make sure RosBE was initialized right.
::
if "%1" == "" (
cls
call :RosBE4
goto :EndCommandParse
)
if not "%1" == "" (
cls
echo Unbekannter Parameter. Anwendung wird geschlossen.
goto :ExitRosBE
)
:EndCommandParse
::
:: Load the Base Directory from the Shortcut-XML and set it as new
:: Source Directory and add PATH for Tools Folder.
::
set PATH=%ROSBEBASEDIR%\Tools;%PATH%
for /f "usebackq" %%i in (`"grep base= "%ROSBEBASEDIR%\srclist.xml"|cutz main"`) do @SET scut=%%i
echo Verwendeter Shortcut: %scut%
echo.
::
:: Display the current version of GCC, NASM, ld and make.
::
gcc -v 2>&1 | find "gcc version"
nasm -v
ld -v
mingw32-make -v | find "GNU Make"
::
:: Tell how to display the available commands.
::
echo.
echo Für eine Liste aller integrierten Befehle, tippen Sie: "help" ein.
echo ------------------------------------------------------------------
::
:: Load the macros that serve as our commands and set new Source
:: Directory / Default Source Directory.
::
doskey /macrofile="%ROSBEBASEDIR%\RosBE.mac"
if "%scut%" == "Default" (
set _ROSSOURCEDIR=%_ROSSOURCEDIRBASE%
) else (
call %ROSBEBASEDIR%\scut %scut%
)
::
:: Look if the Source Folder is empty. If so, ask for using "svn create".
::
dir /b "%_ROSSOURCEDIR%" 2>nul|findstr "." >nul
if errorlevel 1 (
echo Kein ReactOS Source gefunden. Bitte nutzen Sie "ssvn create", um ihn herunterzuladen.
goto :ExitRosBE
) else (
goto :ExitRosBE
)
goto :ExitRosBE
::
:: Display the banner and set up the environment for the GCC 4.x.x build
:: environment.
::
:RosBE4
::
:: Set the correct path for the build tools and set the MinGW make.
::
set PATH=%ROSBEBASEDIR%\4.1.3\bin;%ROSBEBASEDIR%\4.1.3\libexec\gcc\mingw32\4.1.3;%PATH%
set _MINGWMAKE=%ROSBEBASEDIR%\4.1.3\bin\mingw32-make.exe
set _MINGWVERSION=4.1.3
:: Set all paths (needed by Windows Vista)
set C_INCLUDE_PATH=%ROSBEBASEDIR%\4.1.3\include;%ROSBEBASEDIR%\4.1.3\lib\gcc\mingw32\4.1.3\include
set CPLUS_INCLUDE_PATH=%ROSBEBASEDIR%\4.1.3\include;%ROSBEBASEDIR%\4.1.3\include\c++\4.1.3;%ROSBEBASEDIR%\4.1.3\include\c++\4.1.3\mingw32;%ROSBEBASEDIR%\4.1.3\lib\gcc\mingw32\4.1.3\include
set LIBRARY_PATH=%ROSBEBASEDIR%\4.1.3\lib;%ROSBEBASEDIR%\4.1.3\lib\gcc\mingw32\4.1.3
echo *******************************************************************************
echo * *
echo * ReactOS Build Environment %_VER%-4.1.3-20070703 (prerelease) *
echo * *
echo *******************************************************************************
echo.
goto :EOF
:ExitRosBE

View File

@ -0,0 +1,56 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/reladdr2line.cmd
:: PURPOSE: Converts a value to hex and displays it.
:: COPYRIGHT: Copyright 2007 Christoph von Wittich <Christoph_vW@reactos.org>
:: Daniel Reimer <reimer.daniel@freenet.de>
::
::
@echo off
title relAddr2Line...
::
:: Receive the Parameters and decide what to do.
::
if "%1" == "" (
goto :MAN
)
if not "%1" == "" (
set _1=%1
if "%2" == "" (
goto :AUTO1
) else (
set _2=%2
goto :EOC
)
)
::
:: If Parameters were set, parse them, if not, ask the user to add them.
::
:MAN
echo Geben Sie den Pfad zur zu untersuchenden Anwendung ein.
SET /P _1=
:AUTO1
echo Geben Sie die Adresse ein, die Sie innerhalb der Anwendung untersuchen wollen.
SET /P _2=
:EOC
::
:: First get the ImageBase of the File. If its smaller than the given
:: Parameter, everything is ok, because it was already added onto the
:: adress and can be given directly to raddr2line. If not, add it and
:: give the result to raddr2line.
::
for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do SET baseaddr=0x%%i
if %%i LSS %_2% (
raddr2line "%_1%" "%_2%" 2>NUL
) else (
set /a baseaddr += 0x%_2%
for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i
raddr2line "%_1%" "%relbase%" 2>NUL
)
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,89 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/SVN.cmd
:: PURPOSE: Integrated SVN Client.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
::
::
@echo off
::
:: Receive the first Parameter and decide what to do.
::
if "%1" == "" (
echo Unbekannter Parameter. Versuchen Sie 'help [BEFEHL]'.
goto :ExitSVN
)
::
:: These two are directly parsed to svn.
::
if "%1" == "update" (
title Aktualisiert...
if not "%2" == "" (
svn update -r %2
) else (
svn update
)
goto :ExitSVN
)
if "%1" == "cleanup" (
title Aufräumen...
svn cleanup
goto :ExitSVN
)
::
:: Check if the Folder is empty. If not, output an error.
::
if "%1" == "create" (
title Erstellt...
if exist ".svn\." (
echo Dieser Ordner enthält bereits einen Source Code. Anwendung wird beendet.
goto :ExitSVN
)
dir /b 2>nul|findstr "." >nul
if errorlevel 1 (
svn checkout svn://svn.reactos.org/reactos/trunk/reactos
) else (
echo Dieser Ordner ist nicht leer. Fortsetzen ist riskant und kann Fehler verursachen. Anwendung wird beendet.
)
goto :ExitSVN
)
::
:: Output the rev of your and the Online Tree and tell the User if
:: its Up to Date or not.
::
if "%1" == "status" (
title Status
for /f "usebackq" %%i IN (`svnversion .`) DO @set OFFSVN=%%i
for /f "usebackq" %%j IN (`"svn info svn://svn.reactos.org/reactos/trunk/reactos|find "Revision:"|cutz svn"`) DO @set ONSVN=%%j
call :UP
goto :ExitSVN
)
if not "%1" == "" (
echo Unbekannter Parameter. Versuchen Sie 'help [BEFEHL]'.
goto :ExitSVN
)
:UP
echo Derzeitige Offline Revision: %OFFSVN%
echo Online HEAD Revision: %ONSVN%
echo.
if %OFFSVN% LSS %ONSVN% (
echo Ihr Code ist nicht aktuell. Wollen Sie ihn aktualisieren?
goto :UP2
)
if %OFFSVN% EQU %ONSVN% (
echo Ihr Code ist aktuell.
goto :ExitSVN
)
:UP2
SET /P XY="(yes), (no)"
if /I "%XY%"=="yes" %ROSBEBASEDIR%\ssvn update
if /I "%XY%"=="no" goto :ExitSVN
:ExitSVN
title ReactOS Build Environment %_VER%

View File

@ -0,0 +1,138 @@
::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GPL - See COPYING in the top level directory
:: FILE: Root/scut.cmd
:: PURPOSE: Shortcut Creator, Remover and Switcher.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
::
::
@echo off
title Wählen Sie Ihren Source Ordner...
::
:: Receive the first Parameter and decide what to do.
::
if /I "%1"=="" (
goto :DEF
)
if /I "%1"=="add" (
goto :ADD
)
if /I "%1"=="rem" (
goto :REM
)
if /I "%1"=="def" (
goto :DEF2
) else (
set XY=%1
goto :RUN
)
goto :END
::
:: Load Shortcut from XML and set it active.
::
:DEF
echo Wählen Sie Ihren Source Ordner:
SET /P XY=
:RUN
grep name=\"%XY%\" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp"
test -s "%ROSBEBASEDIR%\aaa.tmp"
if errorlevel 1 (
echo Ein Shortcut mit diesem Namen ist nicht vorhanden.
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
) else (
set /P dir=<"%ROSBEBASEDIR%\aaa.tmp"
call cd /D %dir%
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
)
::
:: Add new Shortcut to XML.
::
:ADD
if not "%2" == "" (
if not "%3" == "" (
set CUT=%2
set DIR=%3
goto :ADD23
) else (
set CUT=%2
goto :ADD2
)
) else (
goto :ADD1
)
:ADD1
echo Wählen Sie Ihren Shortcut:
SET /P CUT=
:ADD2
echo Wählen Sie Ihren Source Ordner:
SET /P DIR=
:ADD23
echo ^<property name="%CUT%" value="%DIR%" /^> > "%ROSBEBASEDIR%\aaa.tmp"
copy "%ROSBEBASEDIR%\srclist.xml" + "%ROSBEBASEDIR%\aaa.tmp" "%ROSBEBASEDIR%\srclist2.xml"
del "%ROSBEBASEDIR%\srclist.xml"
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
::
:: Remove Shortcut from XML.
::
:REM
if not "%2" == "" (
set CUTREM=%2
goto :REM1
)
echo Wählen Sie Ihren Shortcut:
SET /P CUTREM=
:REM1
grep name=\"%CUTREM%\" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp"
test -s "%ROSBEBASEDIR%\aaa.tmp"
if errorlevel 1 (
echo Ein Shortcut mit diesem Namen ist nicht vorhanden.
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
) else (
grep -v name=\"%CUTREM%\" "%ROSBEBASEDIR%\srclist.xml" > "%ROSBEBASEDIR%\srclist2.xml"
del "%ROSBEBASEDIR%\srclist.xml"
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
)
::
:: Set Default Shortcut.
::
:DEF2
if not "%2" == "" (
set DEF=%2
goto :DEF1
)
echo Wählen Sie Ihren neuen Standard-Shortcut:
SET /P DEF=
:DEF1
grep name=\"%DEF%\" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp"
test -s "%ROSBEBASEDIR%\aaa.tmp"
if errorlevel 1 (
echo Ein Shortcut mit diesem Namen ist nicht vorhanden.
del "%ROSBEBASEDIR%\aaa.tmp"
goto :END
) else (
sed "s/base=\".*\"/base=\"%DEF%\"/g" "%ROSBEBASEDIR%\srclist.xml" > "%ROSBEBASEDIR%\srclist2.xml"
del "%ROSBEBASEDIR%\srclist.xml"
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
del "%ROSBEBASEDIR%\aaa.tmp"
goto :PREEND
)
:PREEND
call "%ROSBEBASEDIR%\RosBE.cmd"
:END
title ReactOS Build Environment %_VER%