forked from Imagelibrary/rtems
Set the prefix into the MSYS fstab, This is a hack but it works.
This commit is contained in:
@@ -144,6 +144,36 @@ Function RTEMSMessage
|
|||||||
|
|
||||||
FunctionEnd
|
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
|
Section -BatchFiles
|
||||||
FileOpen $9 $INSTDIR\rtems.bat w
|
FileOpen $9 $INSTDIR\rtems.bat w
|
||||||
!insertmacro FILE_WRITE_LINE $9 "@echo off"
|
!insertmacro FILE_WRITE_LINE $9 "@echo off"
|
||||||
@@ -191,6 +221,24 @@ Section -BatchFiles
|
|||||||
FileClose $9
|
FileClose $9
|
||||||
SectionEnd
|
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
|
Section -Post
|
||||||
WriteUninstaller "$INSTDIR\rtems-${RTEMS_TARGET}-uninst.exe"
|
WriteUninstaller "$INSTDIR\rtems-${RTEMS_TARGET}-uninst.exe"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user