diff options
author | Chris Johns <chrisj@rtems.org> | 2006-08-27 12:45:28 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2006-08-27 12:45:28 +0000 |
commit | 2ba11f8c75881d1ad11519ff8756875dd9f62229 (patch) | |
tree | 065d81011e0847bc92cbff2b8cf45e7d228c0ef5 /contrib/mingw | |
parent | Ignore more build output files. (diff) | |
download | rtems-2ba11f8c75881d1ad11519ff8756875dd9f62229.tar.bz2 |
Set the prefix into the MSYS fstab, This is a hack but it works.
Diffstat (limited to 'contrib/mingw')
-rw-r--r-- | contrib/mingw/rtems-tools.nsi | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/mingw/rtems-tools.nsi b/contrib/mingw/rtems-tools.nsi index 5e902dfb0a..3558a3b380 100644 --- a/contrib/mingw/rtems-tools.nsi +++ b/contrib/mingw/rtems-tools.nsi @@ -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}" \ |