diff options
author | Chris Johns <chrisj@rtems.org> | 2007-08-04 06:24:12 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2007-08-04 06:24:12 +0000 |
commit | 56f6b90763f719373f7e618d8d82047edc2baa48 (patch) | |
tree | 02612d7c3e5365259600896678ebdd2aba6b01ac /contrib/mingw | |
parent | GCC_RPMREL = 21 (diff) | |
download | rtems-56f6b90763f719373f7e618d8d82047edc2baa48.tar.bz2 |
2007-08-03 Chris Johns <chisj@rtems.org>
* rtems_logo.bmp: Clipped to get the correct proportions
in the installer's header.
* upload.sh: Install only the specific build installers.
* rtems.ini: Change to show the actual web paths.
* version: Build 15.
* build-exes.sh, msys-path.nsi, rtems-autotools.nsi,
rtems-tools.nsi: Fixed MSYS path detection. Fixed the uninstaller
registry data. Changed the way the top level is generated. Now all
the sections are added no matter what target is specified.
Diffstat (limited to 'contrib/mingw')
-rw-r--r-- | contrib/mingw/ChangeLog | 15 | ||||
-rwxr-xr-x | contrib/mingw/build-exes.sh | 172 | ||||
-rw-r--r-- | contrib/mingw/msys-path.nsi | 6 | ||||
-rw-r--r-- | contrib/mingw/rtems-autotools.nsi | 12 | ||||
-rw-r--r-- | contrib/mingw/rtems-tools.nsi | 10 | ||||
-rw-r--r-- | contrib/mingw/rtems.ini | 137 | ||||
-rw-r--r-- | contrib/mingw/rtems_logo.bmp | bin | 143022 -> 115974 bytes | |||
-rwxr-xr-x | contrib/mingw/upload.sh | 2 | ||||
-rw-r--r-- | contrib/mingw/version | 2 |
9 files changed, 218 insertions, 138 deletions
diff --git a/contrib/mingw/ChangeLog b/contrib/mingw/ChangeLog index 1114876ac0..1b8639d7cd 100644 --- a/contrib/mingw/ChangeLog +++ b/contrib/mingw/ChangeLog @@ -1,3 +1,18 @@ +2007-08-03 Chris Johns <chisj@rtems.org> + * rtems_logo.bmp: Clipped to get the correct proportions + in the installer's header. + + * upload.sh: Install only the specific build installers. + + * rtems.ini: Change to show the actual web paths. + + * version: Build 15. + + * build-exes.sh, msys-path.nsi, rtems-autotools.nsi, + rtems-tools.nsi: Fixed MSYS path detection. Fixed the uninstaller + registry data. Changed the way the top level is generated. Now all + the sections are added no matter what target is specified. + 2007-07-28 Chris Johns <chisj@rtems.org> * README, build-rpms.sh, rtems.ini, build-exes.sh, rtems-tools.nsi: Updated to the new 4.8 build plus a new diff --git a/contrib/mingw/build-exes.sh b/contrib/mingw/build-exes.sh index cfda043e34..2017dd83a4 100755 --- a/contrib/mingw/build-exes.sh +++ b/contrib/mingw/build-exes.sh @@ -8,7 +8,7 @@ # script. # -echo $* +echo $0 $* source=$(dirname $0) @@ -130,16 +130,97 @@ get_rpm_list() } # +# Write target installer code. +# +# $1 - target +# $2 - target section test +# $3 - size of the tools +# $4 - Installer output file name +# $5 - Output file +# +target_installer_exec() +{ + local t=$1 + local tst=$2 + local size_in_k=$3 + local outfile=$4 + local of=$5 + + echo "" >> $of + echo "; Target: $t" >> $of + echo "Section \"${!tst}\" Section_$t" >> $of + echo " AddSize $size_in_k" >> $of + echo " StrCpy \$1 \$EXEDIR\\$outfile" >> $of + echo " DetailPrint \"Checking for \$1\"" >> $of + echo " IfFileExists \$1 ${t}_found" >> $of + echo " StrCpy \$1 \$INSTDIR\\Packages\\$outfile" >> $of + echo " DetailPrint \"Checking for \$1\"" >> $of + echo " IfFileExists \$1 ${t}_found" >> $of + echo " SetOutPath \"\$INSTDIR\Packages\"" >> $of + echo " DetailPrint \"Downloading $rtems_url/$outfile\"" >> $of + echo " NSISdl::download $rtems_url/$outfile $outfile" >> $of + echo " Pop \$R0" >> $of + echo " StrCmp \$R0 \"success\" ${t}_found_2 ${t}_not_found_2" >> $of + echo " ${t}_not_found_2:" >> $of + echo " SetDetailsView show" >> $of + echo " DetailPrint \"Download failed: \$R0\"" >> $of + echo " MessageBox MB_OK \"Download failed: \$R0\"" >> $of + echo " Goto ${t}_done" >> $of + echo " ${t}_found_2:" >> $of + echo " Strcpy \$1 \"\$INSTDIR\\Packages\\$outfile\"" >> $of + echo " ${t}_found:" >> $of + echo " DetailPrint \"Installing: \$1\"" >> $of + echo " ExecWait '\"\$1\" /S /D=\$INSTDIR' \$0" >> $of + echo " BringToFront" >> $of + echo " IntCmp \$0 0 +3" >> $of + echo " MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \"${!tst} install failed. Do you wish to continue ?\" IDYES +2" >> $of + echo " Abort" >> $of + echo " ${t}_done:" >> $of + echo "SectionEnd" >> $of +} + +# +# Get the size if kilo-bytes of the package as the listed files. +# +# $1 - relocation directory of installed files. +# +get_size_in_k() +{ + if [ ! -d $1 ]; then + terminate "target directory not found: $1" + fi + if [ ! -f $1/files.txt ]; then + terminate "target files not found: $1/files.txt" + fi + + local here=$(pwd) + check "getting the current directory" + cd $1 + check "changing directory: $1" + + local size_in_k=$(du -c -k $(cat files.txt) | grep total | sed -e "s/\t.*//g") + check "getting total size" + + cd $here + check "changing directory: $here" + + echo $size_in_k +} + +# # Create the installer given the architecture and package. # # $1 - architecture/processor # $2 - package # $3 - package name +# $4 - outfile +# create_installer() { local p=$1 local t=$2 local n=$3 + local outfile=$4 rpm_options="--ignoreos --force --nodeps --noorder " @@ -174,6 +255,8 @@ create_installer() echo "$files" > $treloc/files.txt check "write the file list" + size_in_k=$(get_size_in_k $treloc) + of=$treloc/rtems-files.nsi echo "!macro RTEMS_INSTALL_FILES" > $of @@ -265,8 +348,6 @@ create_installer() $mkdir -p $rtems_binary check "make the RTEMS binary install point: $rtems_binary" - outfile=rtems$version-tools-$n-$tool_build.exe - of=$treloc/rtems.nsi echo "!define RTEMS_TARGET \"$n\"" > $of echo "!define RTEMS_VERSION \"$version\"" >> $of @@ -279,6 +360,7 @@ create_installer() echo "!define RTEMS_LICENSE_FILE \"$source/rtems-license.rtf\"" >> $of echo "!define RTEMS_OUTFILE \"$outfile\"" >> $of echo "!define TOOL_PREFIX \"$prefix\"" >> $of + echo "!define RTEMS_TOOLS_SIZE \"$size_in_k\"" >> $of if [ $n = $common_label ]; then echo "!define COMMON_FILES" >> $of @@ -295,41 +377,7 @@ create_installer() $cp $source/rtems.ini $treloc/rtems.ini check "coping the dialog definition file: $treloc/rtems.ini" - echo "makensis $of" - $makensis $of - check "making the installer: $of" - - if [ $n != $common_label ]; then - of=$relocation/rtems-sections.nsi - tst=${t}_section_text - echo "" >> $of - echo "; Target: $t" >> $of - echo "Section \"${!tst}\" Section_$t" >> $of - echo " StrCpy \$1 \$EXEDIR\\$outfile" >> $of - echo " DetailPrint \"Checking for \$1\"" >> $of - echo " IfFileExists \$1 ${t}_found" >> $of - echo " StrCpy \$1 \$INSTDIR\\Packages\\$outfile" >> $of - echo " DetailPrint \"Checking for \$1\"" >> $of - echo " IfFileExists \$1 ${t}_found" >> $of - echo " SetOutPath \"\$INSTDIR\\Packages\"" >> $of - echo " DetailPrint \"Downloading $rtems_url/$outfile\"" >> $of - echo " NSISdl::download $rtems_url/$outfile $outfile" >> $of - echo " Pop \$R0" >> $of - echo " StrCmp \$R0 \"success\" ${t}_found_2 ${t}_not_found_2" >> $of - echo " ${t}_not_found_2:" >> $of - echo " SetDetailsView show" >> $of - echo " DetailPrint \"Download failed: \$R0\"" >> $of - echo " MessageBox MB_OK \"Download failed: \$R0\"" >> $of - echo " Goto ${t}_done" >> $of - echo " ${t}_found_2:" >> $of - echo " Strcpy \$1 \"\$INSTDIR\\Packages\\$outfile\"" >> $of - echo " ${t}_found:" >> $of - echo " DetailPrint \"Installing: \$1\"" >> $of - echo " ExecWait '\"\$1\" /S'" >> $of - echo " BringToFront" >> $of - echo " ${t}_done:" >> $of - echo "SectionEnd" >> $of - else + if [ $n = $common_label ]; then echo "Section -SecCommon" >> $of echo " SetOutPath \"\$INSTDIR"\" >> $of echo " File \"\${RTEMS_SOURCE}/AUTHORS"\" >> $of @@ -337,6 +385,11 @@ create_installer() echo " File \"\${RTEMS_SOURCE}/README\"" >> $of echo "SectionEnd" >> $of fi + + echo "makensis $of" + $makensis $of + check "making the installer: $of" + fi } @@ -360,6 +413,8 @@ create_autotools_installer() $mkdir -p $rtems_binary check "make the RTEMS binary install point: $rtems_binary" + size_in_k=2000 + outfile=rtems$version-tools-$n-$tool_build.exe of=$treloc/rtems.nsi @@ -374,6 +429,7 @@ create_autotools_installer() echo "!define RTEMS_LICENSE_FILE \"$source/rtems-license.rtf\"" >> $of echo "!define RTEMS_OUTFILE \"$outfile\"" >> $of echo "!define TOOL_PREFIX \"$prefix\"" >> $of + echo "!define RTEMS_TOOLS_SIZE \"$size_in_k\"" >> $of . $source/autoconf.def @@ -420,32 +476,6 @@ create_autotools_installer() echo "makensis $of" $makensis $of check "making the installer: $of" - - of=$relocation/rtems-sections.nsi - tst=${t}_section_text - echo "" >> $of - echo "; Target: $t" >> $of - echo "Section \"${!tst}\" Section_$t" >> $of - echo " StrCpy \$1 \$EXEDIR\\$outfile" >> $of - echo " IfFileExists \$1 ${t}_found" >> $of - echo " SetOutPath \"\$INSTDIR\Packages\"" >> $of - echo " DetailPrint \"Downloading $rtems_url/$outfile\"" >> $of - echo " NSISdl::download $rtems_url/$outfile $outfile" >> $of - echo " Pop \$R0" >> $of - echo " StrCmp \$R0 \"success\" ${t}_found_2 ${t}_not_found_2" >> $of - echo " ${t}_not_found_2:" >> $of - echo " SetDetailsView show" >> $of - echo " DetailPrint \"Download failed: \$R0\"" >> $of - echo " MessageBox MB_OK \"Download failed: \$R0\"" >> $of - echo " Goto ${t}_done" >> $of - echo " ${t}_found_2:" >> $of - echo " Strcpy \$1 \"\$INSTDIR\\Packages\\$outfile\"" >> $of - echo " ${t}_found:" >> $of - echo " DetailPrint \"Installing: \$1\"" >> $of - echo " ExecWait '\"\$1\" /S'" >> $of - echo " BringToFront" >> $of - echo " ${t}_done:" >> $of - echo "SectionEnd" >> $of } # @@ -455,10 +485,20 @@ for p in $mingw32_cpu_list do echo "; Components based on each target." > $relocation/rtems-sections.nsi create_autotools_installer noarch auto autotools + target_installer_exec auto auto_section_text 2000 \ + rtems$version-tools-autotools-$tool_build.exe \ + $relocation/rtems-sections.nsi for t in $targets do - create_installer $p $t $t + create_installer $p $t $t rtems$version-tools-$t-$tool_build.exe + done + for t in $(cat $source/targets) + do + target_installer_exec $t ${t}_section_text \ + $(get_size_in_k $relocation/$t) \ + rtems$version-tools-$t-$tool_build.exe \ + $relocation/rtems-sections.nsi done # Must be done last - create_installer $p $common_label $common_label + create_installer $p $common_label $common_label $version-tools-$tool_build.exe done diff --git a/contrib/mingw/msys-path.nsi b/contrib/mingw/msys-path.nsi index 3697ce3ac7..e99972b379 100644 --- a/contrib/mingw/msys-path.nsi +++ b/contrib/mingw/msys-path.nsi @@ -47,13 +47,13 @@ Function MSYSDetect Call MsysPath Pop $R0 ifErrors 0 +3 - MessageBox MB_OK "MSYS Not Installed. Please install MSYS." + MessageBox MB_OK "MSYS Not Installed. Please install MSYS from http://www.mingw.org/" Abort DetailPrint "Checking Registry for MSYS DTK Installed Path" Call MsysDTKPath Pop $R1 ifErrors 0 +3 - MessageBox MB_OK "MSYS DTK Not Installed. Please install MSYS DTK." + MessageBox MB_OK "MSYS DTK Not Installed. Please install MSYS DTK from http://www.mingw.org/" Abort StrCmp $R0 $R1 +3 0 MessageBox MB_OK "MSYS and MSYS DTK installed to different paths. This is not supported." @@ -62,7 +62,7 @@ Function MSYSDetect Call MSYSCheckExes Pop $R0 StrCmp $R0 "ok" Found - MessageBox MB_OK "MSYS Executable '$R0' not found. Please install." + MessageBox MB_OK "MSYS Executable '$R0' not found. Please install from http://www.mingw.org/" Abort Found: StrCpy $R0 $R1 diff --git a/contrib/mingw/rtems-autotools.nsi b/contrib/mingw/rtems-autotools.nsi index e426a913eb..846fb87625 100644 --- a/contrib/mingw/rtems-autotools.nsi +++ b/contrib/mingw/rtems-autotools.nsi @@ -70,13 +70,16 @@ CRCCheck force Section "RTEMS ${RTEMS_TARGET} Tools" SecTools SetDetailsView show + AddSize ${RTEMS_TOOLS_SIZE} /* * Detect if MSYS is installed. */ Call MSYSDetect Pop $9 - + StrCmp $9 "not-found" 0 +3 + MessageBox MB_OK "Could not find a valid MSYS. Please install from http://www.mingw.org/" + Abort SetOutPath "$INSTDIR\Uninstall" SetOutPath "$INSTDIR\Packages\Build" SetOutPath "$INSTDIR\Packages\Build" @@ -351,13 +354,14 @@ done: FunctionEnd Section -Post - WriteUninstaller "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe" + StrCpy $R0 "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe" + WriteUninstaller "$R0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ "DisplayName" "$(^Name)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ - "UninstallString" "$INSTDIR\uninst.exe" + "UninstallString" "$R0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ - "DisplayVersion" "${PRODUCT_VERSION}" + "DisplayVersion" "${PRODUCT_VERSION} Build-${RTEMS_BUILD_VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ diff --git a/contrib/mingw/rtems-tools.nsi b/contrib/mingw/rtems-tools.nsi index e9115cac7f..92787e6188 100644 --- a/contrib/mingw/rtems-tools.nsi +++ b/contrib/mingw/rtems-tools.nsi @@ -73,6 +73,7 @@ CRCCheck force !include "${RTEMS_SOURCE}/msys-path.nsi" Section -SecFiles + AddSize ${RTEMS_TOOLS_SIZE} !insertmacro RTEMS_INSTALL_FILES SectionEnd @@ -269,16 +270,17 @@ SectionEnd Section -Post !ifdef COMMON_FILES - WriteUninstaller "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-uninst.exe" + StrCpy $R0 "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-uninst.exe" !else - WriteUninstaller "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe" + StrCpy $R0 "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe" !endif + WriteUninstaller "$R0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ "DisplayName" "$(^Name)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ - "UninstallString" "$INSTDIR\uninst.exe" + "UninstallString" "$R0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ - "DisplayVersion" "${PRODUCT_VERSION}" + "DisplayVersion" "${PRODUCT_VERSION} Build-${RTEMS_BUILD_VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ diff --git a/contrib/mingw/rtems.ini b/contrib/mingw/rtems.ini index fcec74441e..d4a0185daa 100644 --- a/contrib/mingw/rtems.ini +++ b/contrib/mingw/rtems.ini @@ -1,59 +1,78 @@ -;
-; $Id$
-; Ini file generated by the HM NIS Edit IO designer.
-;
-[Settings]
-NumFields=6
-
-[Field 1]
-Type=Label
-Text=RTEMS Tools for Windows is a set of MinGW tools suitable for compiling RTEMS and RTEMS applications. You should install download and install the MinGW runtime and if you wish to build RTEMS and if you need autoconf or automake support the MSYS and MSYS DTK packages as well. You can find the MinGW and MSYS installers on the MinGW web site.\r\n\r\nFurther information and the source code with patches can be located via the link below.
-Left=0
-Right=292
-Top=25
-Bottom=87
-
-[Field 2]
-Type=Label
-Text=RTEMS Tools for Windows
-Left=75
-Right=297
-Top=0
-Bottom=12
-
-[Field 3]
-Type=Link
-Text=Source Code with patches
-State=http://www.rtems.org/ftp/pub/rtems/SOURCES
-Left=150
-Right=275
-Top=91
-Bottom=99
-
-[Field 4]
-Type=Link
-Text=RTEMS MinGW Wiki Page
-State=http://www.rtems.org/wiki/index.php/MinGW_Tools_for_Windows
-Left=6
-Right=92
-Top=101
-Bottom=109
-
-[Field 5]
-Type=Link
-Text=RTEMS Home Page
-State=http://www.rtems.org/
-Left=6
-Right=122
-Top=89
-Bottom=99
-
-[Field 6]
-Type=Link
-Text=MinGW Project Home Page
-State=http://www.mingw.org/
-Left=150
-Right=275
-Top=102
-Bottom=110
-
+; + +; $Id$ + +; Ini file generated by the HM NIS Edit IO designer. + +; + +[Settings] +NumFields=8 + +[Field 1] +Type=Label +Text=RTEMS Tools for Windows is a set of MinGW tools suitable for compiling RTEMS and RTEMS applications. You should install download and install the MinGW runtime and if you wish to build RTEMS and if you need autoconf or automake support the MSYS and MSYS DTK packages as well. You can find the MinGW and MSYS installers on the MinGW web site.\r\n\r\nFurther information and the source code with patches can be located via the Wiki. +Left=0 +Right=292 +Top=25 +Bottom=87 + +[Field 2] +Type=Label +Text=RTEMS Tools for Windows +Left=74 +Right=297 +Top=0 +Bottom=12 + +[Field 3] +Type=Link +Text=http://www.rtems.org/wiki/index.php/MinGW_Tools_for_Windows +State=http://www.rtems.org/wiki/index.php/MinGW_Tools_for_Windows +Left=71 +Right=292 +Top=100 +Bottom=108 + +[Field 4] +Type=Link +Text=http://www.rtems.org/ +State=http://www.rtems.org/ +Left=71 +Right=187 +Top=89 +Bottom=99 + +[Field 5] +Type=Link +Text=http://www.mingw.org/ +State=http://www.mingw.org/ +Left=71 +Right=196 +Top=112 +Bottom=120 + +[Field 6] +Type=Label +Text=RTEMS Website +Left=2 +Right=65 +Top=89 +Bottom=97 + +[Field 7] +Type=Label +Text=Tools Wiki +Left=2 +Right=46 +Top=101 +Bottom=109 + +[Field 8] +Type=Label +Text=MinGW Website +Left=2 +Right=57 +Top=112 +Bottom=120 + diff --git a/contrib/mingw/rtems_logo.bmp b/contrib/mingw/rtems_logo.bmp Binary files differindex ee5cd3dbda..03bb2b4e93 100644 --- a/contrib/mingw/rtems_logo.bmp +++ b/contrib/mingw/rtems_logo.bmp diff --git a/contrib/mingw/upload.sh b/contrib/mingw/upload.sh index be0cd4a4a5..56d42ab249 100755 --- a/contrib/mingw/upload.sh +++ b/contrib/mingw/upload.sh @@ -78,7 +78,7 @@ srcbase=${prefix}/${version}/packages/mingw32/SRPMS mkdir -p ${ftpbase}/${version}/build-${tool_build}/source check "creating: ${ftpbase}/${version}/build-${tool_build}/source" -exes=$(find $exebase -name \*.exe) +exes=$(find $exebase -name \*-${tool_build}.exe) for e in $exes do echo "cp $e ${ftpbase}/${version}/build-${tool_build}/." diff --git a/contrib/mingw/version b/contrib/mingw/version index 43b84096a5..4e709d38d0 100644 --- a/contrib/mingw/version +++ b/contrib/mingw/version @@ -1,2 +1,2 @@ version=4.8 -tool_build=14 +tool_build=15 |