Author: dreimer
Date: Sat Jul 14 16:48:37 2007
New Revision: 27652
URL:
http://svn.reactos.org/svn/reactos?rev=27652&view=rev
Log:
- Use LogicLib in NSIS Scripts.
- Fix a bug in reladdr2line.cmd. (NO I still have no idea what it does and how to merge.)
Modified:
trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
trunk/tools/RosBE-Windows/RosBE.nsi
trunk/tools/RosBE-Windows/WriteEnvStr.nsh
Modified: trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/reladdr2l…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/reladdr2line.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/reladdr2line.cmd Sat Jul 14 16:48:37 2007
@@ -12,7 +12,7 @@
for /f "tokens=2" %%i in ('"objdump -p %1 2>NUL | findstr
ImageBase"') do SET baseaddr=0x%%i
set /a baseaddr += 0x%2
-for /f %%i in ('echoh %baseaddr%"') do set relbase=%%i
-raddr2line %1 %relbase% 2>NUL
+for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i
+raddr2line "%1" "%relbase%" 2>NUL
title ReactOS Build Environment %_VER%
Modified: trunk/tools/RosBE-Windows/RosBE.nsi
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
==============================================================================
--- trunk/tools/RosBE-Windows/RosBE.nsi (original)
+++ trunk/tools/RosBE-Windows/RosBE.nsi Sat Jul 14 16:48:37 2007
@@ -34,6 +34,7 @@
!include "MUI.nsh"
!include "RosSourceDir.nsh"
!include "WriteEnvStr.nsh"
+!include "LogicLib.nsh"
;; MUI begin.
@@ -225,8 +226,12 @@
ReadRegStr $R1 HKCU \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"DisplayVersion"
- StrCmp $R1 "${PRODUCT_VERSION}" SameVersion
- StrCmp $R0 "" NoPreviousVersion
+ ${If} $R1 == "${PRODUCT_VERSION}"
+ goto SameVersion
+ ${EndIf}
+ ${If} $R0 == ""
+ goto NoPreviousVersion
+ ${EndIf}
MessageBox MB_YESNO|MB_ICONQUESTION \
"A previous version of the ${PRODUCT_NAME} was found. You must
uninstall it before installing this version.$\n$\nDo you want to do that now?" \
IDNO UninstallPrevious_no \
@@ -246,7 +251,11 @@
Function CheckAdminOrCurrent
userInfo::getAccountType
pop $R0
- strCmp $R0 "Admin" IsAdmin IsNotAdmin
+ ${If} $R0 == "Admin"
+ goto IsAdmin
+ ${else}
+ goto IsNotAdmin
+ ${EndIf}
IsAdmin:
Return
IsNotAdmin:
@@ -258,7 +267,11 @@
Function un.CheckAdminOrCurrent
userInfo::getAccountType
pop $R0
- strCmp $R0 "Admin" IsAdmin IsNotAdmin
+ ${If} $R0 == "Admin"
+ goto IsAdmin
+ ${else}
+ goto IsNotAdmin
+ ${EndIf}
IsAdmin:
Return
IsNotAdmin:
Modified: trunk/tools/RosBE-Windows/WriteEnvStr.nsh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/WriteEnvStr.ns…
==============================================================================
--- trunk/tools/RosBE-Windows/WriteEnvStr.nsh (original)
+++ trunk/tools/RosBE-Windows/WriteEnvStr.nsh Sat Jul 14 16:48:37 2007
@@ -2,6 +2,7 @@
!define _WriteEnvStr_nsh
!include "WinMessages.nsh"
+!include "LogicLib.nsh"
!ifndef WriteEnvStr_RegKey
!define WriteEnvStr_RegKey 'HKCU "Environment"'
@@ -24,7 +25,9 @@
Call IsNT
Pop $2
- StrCmp $2 1 WriteEnvStr_NT
+ ${if} $2 == "1"
+ goto WriteEnvStr_NT
+ ${endif}
; Not on NT
StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:)
FileOpen $2 "$2\autoexec.bat" a
@@ -63,7 +66,9 @@
Call un.IsNT
Pop $1
- StrCmp $1 1 DeleteEnvStr_NT
+ ${if} $1 == "1"
+ goto DeleteEnvStr_NT
+ ${endif}
; Not on NT
StrCpy $1 $WINDIR 2
FileOpen $1 "$1\autoexec.bat" r
@@ -76,8 +81,12 @@
FileRead $1 $3
StrLen $5 $0
StrCpy $5 $3 $5
- StrCmp $5 $0 DeleteEnvStr_dosLoop
- StrCmp $5 "" DeleteEnvStr_dosLoopEnd
+ ${if} $5 == "$0"
+ goto DeleteEnvStr_dosLoop
+ ${endif}
+ ${if} $5 == ""
+ goto DeleteEnvStr_dosLoopEnd
+ ${endif}
FileWrite $2 $3
Goto DeleteEnvStr_dosLoop