Set the prefix into the MSYS fstab, This is a hack but it works.

This commit is contained in:
Chris Johns
2006-08-27 12:45:28 +00:00
parent e25ff2c625
commit 2ba11f8c75

View File

@@ -144,6 +144,36 @@ Function RTEMSMessage
FunctionEnd
; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm')
; Push '\\'
; Pop $R0
; Call StrSlash
; Pop $R0
; ;Now $R0 contains 'c:/this/and/that/filename.htm'
Function StrSlash
Exch $R0
Push $R1
Push $R2
StrCpy $R1 0
loop:
IntOp $R1 $R1 - 1
StrCpy $R2 $R0 1 $R1
StrCmp $R2 "" done
StrCmp $R2 "\" 0 loop
StrCpy $R2 $R0 $R1
Push $R1
IntOp $R1 $R1 + 1
StrCpy $R1 $R0 "" $R1
StrCpy $R0 "$R2/$R1"
Pop $R1
IntOp $R1 $R1 - 1
Goto loop
done:
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
Section -BatchFiles
FileOpen $9 $INSTDIR\rtems.bat w
!insertmacro FILE_WRITE_LINE $9 "@echo off"
@@ -191,6 +221,24 @@ Section -BatchFiles
FileClose $9
SectionEnd
Section -MSYSLinks
FindFirst $8 $1 c:\msys\1.0\etc\fstab
StrCmp $1 "" MSYSLinksdone
Push $INSTDIR
Call StrSlash
Pop $R0
DetailPrint "Setting MSYS fstab: $R0 -> ${TOOL_PREFIX}"
FileOpen $9 "c:\msys\1.0\etc\fstab" a
FileSeek $9 0 END
FileWrite $9 $R0
FileWriteByte $9 "32"
FileWrite $9 ${TOOL_PREFIX}
FileWriteByte $9 "10"
FileClose $9
MSYSLinksdone:
FindClose $8
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\rtems-${RTEMS_TARGET}-uninst.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \