source: rtems/contrib/mingw/msys-path.nsi @ f6cd0db

4.104.114.84.95
Last change on this file since f6cd0db was f6cd0db, checked in by Chris Johns <chrisj@…>, on 07/28/07 at 08:31:57

2007-07-28 Chris Johns <chisj@…>

  • README, build-rpms.sh, rtems.ini, build-exes.sh, rtems-tools.nsi: Updated to the new 4.8 build plus a new installer.
  • autoconf.def, automake.def, ba-wrap.sh, build-autotools.sh, msys-path.nsi, rtems-autotools.nsi, target-section-text, upload.sh, version: New to version 4.8. Autotools is built when installing.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1Function MsysPath
2  Push $R0
3  ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MSYS-1.0_is1" "Inno Setup: App Path"
4  Exch $R0
5FunctionEnd
6
7Function MsysDTKPath
8  Push $R0
9  ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MSYS-DTK_is1" "Inno Setup: App Path"
10  Exch $R0
11FunctionEnd
12
13Function MSYSCheckExes
14  Exch $R0
15  DetailPrint "Checking for MSYS $R0\bin\sh.exe."
16  IfFileExists "$R0\bin\sh.exe" +5 0
17   DetailPrint "Could not find $R0\bin\sh.exe."
18   StrCpy $R0 "$R0\bin\sh.exe"
19   Exch $R0
20   Return
21  DetailPrint "Checking for MSYS $R0\bin\m4.exe."
22  IfFileExists "$R0\bin\m4.exe" +5 0
23   DetailPrint "Could not find $R0\bin\m4.exe."
24   StrCpy $R0 "$R0\bin\m4.exe"
25   Exch $R0
26   Return
27  DetailPrint "Checking for MSYS $R0\bin\perl.exe."
28  IfFileExists "$R0\bin\perl.exe" +5 0
29   DetailPrint "Could not find $R0\bin\perl.exe."
30   StrCpy $R0 "$R0\bin\perl.exe"
31   Exch $R0
32   Return
33  StrCpy $R0 "ok"
34  Exch $R0
35FunctionEnd
36
37Function MSYSDetect
38  Push $R0
39  Push $R1
40  StrCpy $R1 "c:\msys\1.0"
41  DetailPrint "Checking MSYS default install path: $R1"
42  Push $R1
43  Call MSYSCheckExes
44  Pop $R0
45  StrCmp $R0 "ok" Found
46  DetailPrint "Checking Registry for MSYS Installed Path"
47  Call MsysPath
48  Pop $R0
49  ifErrors 0 +3
50   MessageBox MB_OK "MSYS Not Installed. Please install MSYS."
51   Abort
52  DetailPrint "Checking Registry for MSYS DTK Installed Path"
53  Call MsysDTKPath
54  Pop $R1
55  ifErrors 0 +3
56   MessageBox MB_OK "MSYS DTK Not Installed. Please install MSYS DTK."
57   Abort
58  StrCmp $R0 $R1 +3 0
59   MessageBox MB_OK "MSYS and MSYS DTK installed to different paths. This is not supported."
60   Abort
61  Push $R0
62  Call MSYSCheckExes
63  Pop $R0
64  StrCmp $R0 "ok" Found
65   MessageBox MB_OK "MSYS Executable '$R0' not found. Please install."
66   Abort
67 Found:
68  StrCpy $R0 $R1
69  DetailPrint "MSYS Found: $R0"
70  Pop $R1
71  Exch $R0
72FunctionEnd
73
74Function MSYSDetectSilent
75  Push $R0
76  Push $R1
77  StrCpy $R1 "c:\msys\1.0"
78  DetailPrint "Checking MSYS default install path: $R1"
79  Push $R1
80  Call MSYSCheckExes
81  Pop $R0
82  StrCmp $R0 "ok" Done
83  DetailPrint "Checking Registry for MSYS Installed Path"
84  Call MsysPath
85  Pop $R0
86  ifErrors 0 +3
87   StrCpy $R1 "not-found"
88   Goto Done
89  DetailPrint "Checking Registry for MSYS DTK Installed Path"
90  Call MsysDTKPath
91  Pop $R1
92  ifErrors 0 +3
93   StrCpy $R1 "not-found"
94   Goto Done
95  StrCmp $R0 $R1 +3 0
96   StrCpy $R1 "not-found"
97   Goto Done
98  Push $R0
99  Call MSYSCheckExes
100  Pop $R0
101  StrCmp $R0 "ok" Done
102   StrCpy $R1 "not-found"
103   Goto Done
104 Done:
105  StrCpy $R0 $R1
106  DetailPrint "MSYS Result: $R0"
107  Pop $R1
108  Exch $R0
109FunctionEnd
Note: See TracBrowser for help on using the repository browser.