4.104.114.95
Last change
on this file since 0e6d50c was
2e2cbfa9,
checked in by Chris Johns <chrisj@…>, on 08/22/07 at 23:52:43
|
2007-0823 Chris Johns <chisj@…>
- mingw-path.nsi: Change the forward slashes to back slashes for
Windows.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | ; |
---|
2 | ; $Id$ |
---|
3 | ; |
---|
4 | ; RTEMS Tools Installer. |
---|
5 | ; |
---|
6 | ; Copyright Chris Johns (chrisj@rtems.org) |
---|
7 | ; |
---|
8 | |
---|
9 | Function MinGWPath |
---|
10 | Push $R0 |
---|
11 | ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MinGW" "InstallLocation" |
---|
12 | Exch $R0 |
---|
13 | FunctionEnd |
---|
14 | |
---|
15 | Function MinGWCheckFile |
---|
16 | Exch $R0 |
---|
17 | DetailPrint "Checking for MinGW $R0." |
---|
18 | IfFileExists "$R0" +5 0 |
---|
19 | DetailPrint "Could not find $R0." |
---|
20 | Exch $R0 |
---|
21 | Return |
---|
22 | StrCpy $R0 "ok" |
---|
23 | Exch $R0 |
---|
24 | FunctionEnd |
---|
25 | |
---|
26 | Function MinGWCheckExes |
---|
27 | Exch $R0 |
---|
28 | Push $R1 |
---|
29 | StrCpy $R1 "$R0\bin\gcc.exe" |
---|
30 | Push $R1 |
---|
31 | Call MinGWCheckFile |
---|
32 | Pop $R1 |
---|
33 | StrCmp "ok" 0 Done |
---|
34 | StrCpy $R1 "$R0\bin\as.exe" |
---|
35 | Push $R1 |
---|
36 | Call MinGWCheckFile |
---|
37 | Pop $R1 |
---|
38 | StrCmp "ok" 0 Done |
---|
39 | StrCpy $R1 "$R0\bin\ld.exe" |
---|
40 | Push $R1 |
---|
41 | Call MinGWCheckFile |
---|
42 | Pop $R1 |
---|
43 | Done: |
---|
44 | StrCpy $R0 $R1 |
---|
45 | Pop $R1 |
---|
46 | Exch $R0 |
---|
47 | FunctionEnd |
---|
48 | |
---|
49 | Function MinGWDetect |
---|
50 | Push $R0 |
---|
51 | Push $R1 |
---|
52 | StrCpy $R1 "c:\mingw" |
---|
53 | DetailPrint "Checking MinGW default install path: $R1" |
---|
54 | Push $R1 |
---|
55 | Call MinGWCheckExes |
---|
56 | Pop $R0 |
---|
57 | StrCmp $R0 "ok" Found |
---|
58 | DetailPrint "Checking Registry for MinGW Installed Path" |
---|
59 | Call MinGWPath |
---|
60 | Pop $R0 |
---|
61 | ifErrors 0 +3 |
---|
62 | MessageBox MB_OK "MinGW Not Installed. Please install MinGW from http://www.mingw.org/" |
---|
63 | Abort |
---|
64 | Found: |
---|
65 | StrCpy $R0 $R1 |
---|
66 | DetailPrint "MinGW Found: $R0" |
---|
67 | Pop $R1 |
---|
68 | Exch $R0 |
---|
69 | FunctionEnd |
---|
Note: See
TracBrowser
for help on using the repository browser.