Changeset f6cd0db in rtems


Ignore:
Timestamp:
Jul 28, 2007, 8:31:57 AM (13 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
f29163ab
Parents:
e4a22331
Message:

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.
Location:
contrib/mingw
Files:
9 added
6 edited

Legend:

Unmodified
Added
Removed
  • contrib/mingw/ChangeLog

    re4a22331 rf6cd0db  
     12007-07-28      Chris Johns <chisj@rtems.org>
     2        * README, build-rpms.sh, rtems.ini, build-exes.sh,
     3        rtems-tools.nsi: Updated to the new 4.8 build plus a new
     4        installer.
     5
     6        * autoconf.def, automake.def, ba-wrap.sh, build-autotools.sh,
     7        msys-path.nsi, rtems-autotools.nsi, target-section-text,
     8        upload.sh, version: New to version 4.8. Autotools is built when
     9        installing.
     10
    1112007-05-21      Joel Sherrill <joel.sherrill@oarcorp.com>
    212
  • contrib/mingw/README

    re4a22331 rf6cd0db  
    11
    2     Copyright (C) 2006  Chris Johns, Sydney, Australia <chrisj@rtems.org>
     2    Copyright (C) 2006-2007 Chris Johns, Sydney, Australia <chrisj@rtems.org>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    1717
    1818
     19To build mingw32 tools on a Fedora Core 7 box:
     20
     211. Add makensis to your path.
     22
     23   $ export PATH=/opt/nsis/2.29/bin:$PATH
     24
     252. Set up the RPM packages:
     26
     27   $ cat ~/.rpmrc
     28   os_canon: mingw32: mingw32 23
     29   arch_canon: mingw32: i686 1
     30   arch_compat: mingw32: i686 noarch
     31   buildarch_compat: mingw32: i686 noarch
     32   optflags: mingw32 -O2 -g
     33   optflags: i686 -O2 -pipe
     34   $ cat ~/.rpmmacros
     35   %_topdir /home2/work/chris/rtems/4.8/packages
     36   %_tmppath /home2/work/chris/tmp/rtems
     37   %_rpmdir        %_topdir/%_target_os/RPMS
     38   %_srcrpmdir     %_topdir/%_target_os/SRPMS
     39   %_signature gpg
     40   # %_gpg_path ~/.gnupg
     41   # %_gpg_name "RTEMS Packager"
     42   %_gpg_name rtems
     43   %vendor: RTEMS Project
     44   %packager chrisj@rtems.org
     45   %distribution RTEMS Project http://www.rtems.org/
     46   $ mkdir -p /home2/work/chris/rtems/4.8/packages
     47   $ mkdir /home2/work/chris/rtems/4.8/packages/SOURCES
     48   $ mkdir /home2/work/chris/rtems/4.8/packages/BUILD
     49   $ mkdir -p /home2/work/chris/rtems/4.8/packages/linux/SRPMS
     50   $ mkdir -p /home2/work/chris/rtems/4.8/packages/linux/RPMS
     51   $ mkdir -p /home2/work/chris/rtems/4.8/packages/mingw32/SRPMS
     52   $ mkdir -p /home2/work/chris/rtems/4.8/packages/mingw32/RPMS
     53   $ cp /home2/work/chris/rtems/4.8/head/contrib/crossrpms/patches/* \
     54        /home2/work/chris/rtems/4.8/packages/SOURCES/.
     55
     56   Download the required sources to:
     57
     58     /home2/work/chris/rtems/4.8/packages/SOURCES
     59
     60   The list you need depends on what version you build. A tool exists
     61   that atempts to determine the package. Ask on the list for it.
     62
     632. Run the build.sh script where:
     64
     65    -d            : debug output from the script and nested scripts
     66    -h host       : the host to buidl for
     67    -p prefix     : the prefix (not that important for mingw)
     68    -s crossrpms  : the path to the crossrpms source tree
     69    -r relocation : the path for the NSIS installer executables
     70
     71   $ export PATH=/opt/rtems-4.8/bin:$PATH
     72   $ cd /home2/work/chris/rtems/4.8/head/contrib/crossrpms
     73   $ ./bootstrap
     74   $ cd /home2/work/chris/rtems/4.8/head/contrib/mingw
     75   $ ./build.sh -d -h mingw32 \
     76         -p /home2/work/chris/rtems/4.8/build/rpms \
     77         -s /home2/work/chris/rtems/4.8/head/contrib/crossrpms \
     78         -r /home2/work/chris/rtems/4.8/build/mingw
     79
     80   Sit back and wait. The build take a long time on a fast machine.
  • contrib/mingw/build-exes.sh

    re4a22331 rf6cd0db  
    55# RTEMS Build Executable Installers script.
    66#
    7 # This script takes the RPM files built using the crossrpms/build-rpms.sh
     7# This script takes the RPM files built using the mingw/build-rpms.sh
    88# script.
    99#
     10
     11echo $*
    1012
    1113source=$(dirname $0)
     
    2426}
    2527
    26 version=4.7
    27 tool_build=3
     28. $source/version
    2829
    2930target_list=$(cat $source/targets)
    3031
     32. $source/target-section-text
     33
    3134mingw32_cpu_list="i686"
    3235
    3336rpm_topdir=$(rpm --eval "%{_topdir}")
     37
     38rtems_url="http://www.rtems.org/ftp/pub/rtems/windows/${version}/build-${tool_build}"
    3439
    3540common_label="common"
     
    3843run_prefix=
    3944relocation=
     45rpm_install=yes
     46
     47package_source=$(cat $HOME/.rpmmacros | grep "^%_topdir" | sed -e "s/^.* //g")/SOURCES
    4048
    4149if [ "$source" = "." ]; then
     
    4856  -d)
    4957   set -x
     58   ;;
     59  -i)
     60   rpm_install=no
    5061   ;;
    5162  -l)
     
    106117fi
    107118
     119#
     120# Get the RPM list given the architecture and the package.
     121#
     122# $1 - architecture
     123# $2 - package
     124#
    108125get_rpm_list()
    109126{
     
    114131
    115132#
    116 # Handle each type of host processor.
    117 #
    118 for p in $mingw32_cpu_list
    119 do
    120  common_rpms="$(get_rpm_list noarch auto) $(get_rpm_list $p $common_label)"
    121  check "getting the autotools and common RPM list"
    122 
    123  rpm_options="--ignoreos --force --nodeps --noorder "
    124 
    125  for t in $targets
    126  do
     133# Create the installer given the architecture and package.
     134#
     135# $1 - architecture/processor
     136# $2 - package
     137# $3 - package name
     138create_installer()
     139{
     140  local p=$1
     141  local t=$2
     142  local n=$3
     143
     144  rpm_options="--ignoreos --force --nodeps --noorder "
     145
    127146  rpms=$(get_rpm_list $p $t)
    128   check "getting the RPM list"
     147  check "getting the $n RPM list"
     148
    129149  if [ -n "$rpms" ]; then
    130    echo "Clean the relocation directory"
    131    $rm -rf $relocation
    132    check "removing the relocation directory: $relocation"
    133 
    134    for r in $common_rpms $rpms
    135    do
    136     echo "rpm $rpm_database --relocate $prefix=$relocation $rpm_options -i $r"
    137     $rpm $rpm_database --relocate $prefix=$relocation $rpm_options -i $r
    138     check "installing rpm: $r"
    139    done
    140 
    141    files=$(find $relocation -type f | sed -e "s/^$(echo ${relocation} | sed 's/\//\\\//g')//" -e "s/^\///" | sort)
    142 
    143    echo "$files" > $relocation/files.txt
    144 
     150   treloc=$relocation/$n
     151   echo "Relocation path: $treloc"
     152
     153   if [ $rpm_install = yes ]; then
     154    echo "Clean the relocation directory: $treloc"
     155    $rm -rf $treloc
     156    check "removing the relocation directory: $treloc"
     157
     158    for r in $rpms
     159    do
     160     echo "rpm $rpm_database --relocate $prefix=$treloc $rpm_options -i $r"
     161     $rpm $rpm_database --relocate $prefix=$treloc $rpm_options -i $r
     162     check "installing rpm: $r"
     163    done
     164   fi
     165
     166   files=$(find $treloc -type f -a -not \( -name \*.gch \
     167                                        -o -name rtems.nsi \
     168                                        -o -name rtems-files.nsi \
     169                                        -o -name rtems.ini \
     170                                        -o -name files.txt \) | \
     171           sed -e "s/^$(echo ${treloc} | sed 's/\//\\\//g')//" -e "s/^\///" | sort)
    145172   check "find the file list"
    146173
    147    of=$relocation/rtems-files.nsi
     174   echo "$files" > $treloc/files.txt
     175   check "write the file list"
     176
     177   of=$treloc/rtems-files.nsi
    148178
    149179   echo "!macro RTEMS_INSTALL_FILES" > $of
     
    160190     install_dir=$d
    161191    fi
    162     echo "  File \"$relocation/$f\"" >> $of
     192    echo "  File \"$treloc/$f\"" >> $of
    163193   done
    164194
     
    169199   echo " !ifndef EMPTY_INSTALLER" >> $of
    170200
     201   #
     202   # Get a list of directories so we can delete them once all
     203   # the files have been deleted. We need to be selective as
     204   # the directory maybe used by another installer.
     205   #
     206   # Once we get a list we need to also add the path down
     207   # to that node and then sort them so we work from bottom up.
     208   #
     209
    171210   remove_dirs=
    172    remove_dir=
    173211
    174212   for f in $files
    175213   do
    176214    d=$(dirname $f)
    177     if [ "$remove_dir" != "$d" ]; then
     215    found=no
     216    for rd in $remove_dirs
     217    do
     218     if [ "$d" = "$rd" ]; then
     219      found=yes
     220      break;
     221     fi
     222    done
     223    if [ $found = no ]; then
    178224     remove_dirs="$remove_dirs $d"
    179      remove_dir=$d
    180225    fi
    181226    rf=$(echo $f | sed -e 's/\//\\/g' -e 's/\/$//')
    182227    echo "  Delete \"\$INSTDIR\\$rf\"" >> $of
     228   done
     229
     230   for d in $remove_dirs
     231   do
     232    while [ $d != . ]
     233    do
     234     found=no
     235     for rd in $remove_dirs
     236     do
     237      if [ "$d" = "$rd" ]; then
     238       found=yes
     239       break
     240      fi
     241     done
     242     if [ $found = no ]; then
     243      remove_dirs="$remove_dirs $d"
     244     fi
     245     d=$(dirname $d)
     246    done
    183247   done
    184248
     
    202266   check "make the RTEMS binary install point: $rtems_binary"
    203267
    204    of=$relocation/rtems.nsi
    205    echo "!define RTEMS_TARGET \"$t\"" > $of
     268   outfile=rtems$version-tools-$n-$tool_build.exe
     269
     270   of=$treloc/rtems.nsi
     271   echo "!define RTEMS_TARGET \"$n\"" > $of
    206272   echo "!define RTEMS_VERSION \"$version\"" >> $of
    207273   echo "!define RTEMS_BUILD_VERSION \"$tool_build\"" >> $of
    208274   echo "!define RTEMS_PREFIX \"rtems-tools\"" >> $of
    209275   echo "!define RTEMS_SOURCE \"$source\"" >> $of
    210    echo "!define RTEMS_RELOCATION \"$relocation\"" >> $of
     276   echo "!define RTEMS_RELOCATION \"$treloc\"" >> $of
    211277   echo "!define RTEMS_LOGO \"$source/rtems_logo.bmp\"" >> $of
    212278   echo "!define RTEMS_BINARY \"$rtems_binary\"" >> $of
    213279   echo "!define RTEMS_LICENSE_FILE \"$source/rtems-license.rtf\"" >> $of
     280   echo "!define RTEMS_OUTFILE \"$outfile\"" >> $of
    214281   echo "!define TOOL_PREFIX \"$prefix\"" >> $of
    215    echo "!include \"$relocation/rtems-files.nsi\"" >> $of
     282
     283   if [ $n = $common_label ]; then
     284     echo "!define COMMON_FILES" >> $of
     285   fi
     286
     287   echo "!include \"$treloc/rtems-files.nsi\"" >> $of
    216288   echo "!include \"$source/rtems-tools.nsi\"" >> $of
    217289
    218    echo "cp $source/rtems.ini $relocation/rtems.ini"
    219    $cp $source/rtems.ini $relocation/rtems.ini
    220    check "coping the dialog definition file: $relocation/rtems.ini"
     290   if [ $n = $common_label ]; then
     291     echo "!include \"$relocation/rtems-sections.nsi\"" >> $of
     292   fi
     293
     294   echo "cp $source/rtems.ini $treloc/rtems.ini"
     295   $cp $source/rtems.ini $treloc/rtems.ini
     296   check "coping the dialog definition file: $treloc/rtems.ini"
    221297
    222298   echo "makensis $of"
     
    224300   check "making the installer: $of"
    225301
     302   if [ $n != $common_label ]; then
     303     of=$relocation/rtems-sections.nsi
     304     tst=${t}_section_text
     305     echo "" >> $of
     306     echo "; Target: $t" >> $of
     307     echo "Section \"${!tst}\" Section_$t" >> $of
     308     echo " StrCpy \$1 \$EXEDIR\\$outfile" >> $of
     309     echo " DetailPrint \"Checking for \$1\"" >> $of
     310     echo " IfFileExists \$1 ${t}_found" >> $of
     311     echo " StrCpy \$1 \$INSTDIR\\Packages\\$outfile" >> $of
     312     echo " DetailPrint \"Checking for \$1\"" >> $of
     313     echo " IfFileExists \$1 ${t}_found" >> $of
     314     echo "  SetOutPath \"\$INSTDIR\\Packages\"" >> $of
     315     echo "  DetailPrint \"Downloading $rtems_url/$outfile\"" >> $of
     316     echo "  NSISdl::download $rtems_url/$outfile $outfile" >> $of
     317     echo "  Pop \$R0" >> $of
     318     echo "  StrCmp \$R0 \"success\" ${t}_found_2 ${t}_not_found_2" >> $of
     319     echo " ${t}_not_found_2:" >> $of
     320     echo "   SetDetailsView show" >> $of
     321     echo "   DetailPrint \"Download failed: \$R0\"" >> $of
     322     echo "   MessageBox MB_OK \"Download failed: \$R0\"" >> $of
     323     echo "   Goto ${t}_done" >> $of
     324     echo " ${t}_found_2:" >> $of
     325     echo "   Strcpy \$1 \"\$INSTDIR\\Packages\\$outfile\"" >> $of
     326     echo " ${t}_found:" >> $of
     327     echo "  DetailPrint \"Installing: \$1\"" >> $of
     328     echo "  ExecWait '\"\$1\" /S'" >> $of
     329     echo "  BringToFront" >> $of
     330     echo " ${t}_done:" >> $of
     331     echo "SectionEnd" >> $of
     332   else
     333     echo "Section -SecCommon" >> $of
     334     echo " SetOutPath \"\$INSTDIR"\" >> $of
     335     echo " File \"\${RTEMS_SOURCE}/AUTHORS"\" >> $of
     336     echo " File \"\${RTEMS_SOURCE}/COPYING\"" >> $of
     337     echo " File \"\${RTEMS_SOURCE}/README\"" >> $of
     338     echo "SectionEnd" >> $of
     339   fi
    226340  fi
     341}
     342
     343create_autotools_installer()
     344{
     345  local p=$1
     346  local t=$2
     347  local n=$3
     348
     349  treloc=$relocation/$n
     350  echo "Relocation path: $treloc"
     351
     352  echo "Clean the relocation directory: $treloc"
     353  $rm -rf $treloc
     354  check "removing the relocation directory: $treloc"
     355  mkdir -p $treloc
     356  check "creating relocation directory: $treloc"
     357
     358  rtems_binary=$rpm_topdir/mingw32/exe/$p
     359  echo "mkdir -p $rtems_binary"
     360  $mkdir -p $rtems_binary
     361  check "make the RTEMS binary install point: $rtems_binary"
     362
     363  outfile=rtems$version-tools-$n-$tool_build.exe
     364
     365  of=$treloc/rtems.nsi
     366  echo "!define RTEMS_TARGET \"$n\"" > $of
     367  echo "!define RTEMS_VERSION \"$version\"" >> $of
     368  echo "!define RTEMS_BUILD_VERSION \"$tool_build\"" >> $of
     369  echo "!define RTEMS_PREFIX \"rtems-tools\"" >> $of
     370  echo "!define RTEMS_SOURCE \"$source\"" >> $of
     371  echo "!define RTEMS_PACKAGE_SOURCE \"$package_source\"" >> $of
     372  echo "!define RTEMS_LOGO \"$source/rtems_logo.bmp\"" >> $of
     373  echo "!define RTEMS_BINARY \"$rtems_binary\"" >> $of
     374  echo "!define RTEMS_LICENSE_FILE \"$source/rtems-license.rtf\"" >> $of
     375  echo "!define RTEMS_OUTFILE \"$outfile\"" >> $of
     376  echo "!define TOOL_PREFIX \"$prefix\"" >> $of
     377
     378  . $source/autoconf.def
     379
     380  echo "!define RTEMS_AUTOCONF \"$package_name\"" >> $of
     381  echo "!define RTEMS_AUTOCONF_SOURCE \"$package_source\"" >> $of
     382  echo "!macro RTEMS_AUTOCONF_PATCHES" >> $of
     383  for p in $package_patches
     384  do
     385    echo " File \"\${RTEMS_PACKAGE_SOURCE}/$p\"" >> $of
     386  done
     387  echo "!macroend" >> $of
     388
     389  echo "!macro RTEMS_DELETE_AUTOCONF_PATCHES" >> $of
     390  for p in $package_patches
     391  do
     392    echo " Delete \"\$INSTDIR\\Packages\\Source\\$p\"" >> $of
     393  done
     394  echo "!macroend" >> $of
     395
     396  . $source/automake.def
     397
     398  echo "!define RTEMS_AUTOMAKE \"$package_name\"" >> $of
     399  echo "!define RTEMS_AUTOMAKE_SOURCE \"$package_source\"" >> $of
     400  echo "!macro RTEMS_AUTOMAKE_PATCHES" >> $of
     401  for p in $package_patches
     402  do
     403    echo " File \"\${RTEMS_PACKAGE_SOURCE}/$p\"" >> $of
     404  done
     405  echo "!macroend" >> $of
     406
     407  echo "!macro RTEMS_DELETE_AUTOMAKE_PATCHES" >> $of
     408  for p in $package_patches
     409  do
     410    echo " Delete \"\$INSTDIR\\Packages\\Source\\$p\"" >> $of
     411  done
     412  echo "!macroend" >> $of
     413
     414  echo "!include \"$source/rtems-autotools.nsi\"" >> $of
     415
     416  echo "cp $source/rtems.ini $treloc/rtems.ini"
     417  $cp $source/rtems.ini $treloc/rtems.ini
     418  check "coping the dialog definition file: $treloc/rtems.ini"
     419
     420  echo "makensis $of"
     421  $makensis $of
     422  check "making the installer: $of"
     423
     424  of=$relocation/rtems-sections.nsi
     425  tst=${t}_section_text
     426  echo "" >> $of
     427  echo "; Target: $t" >> $of
     428  echo "Section \"${!tst}\" Section_$t" >> $of
     429  echo " StrCpy \$1 \$EXEDIR\\$outfile" >> $of
     430  echo " IfFileExists \$1 ${t}_found" >> $of
     431  echo "  SetOutPath \"\$INSTDIR\Packages\"" >> $of
     432  echo "  DetailPrint \"Downloading $rtems_url/$outfile\"" >> $of
     433  echo "  NSISdl::download $rtems_url/$outfile $outfile" >> $of
     434  echo "  Pop \$R0" >> $of
     435  echo "  StrCmp \$R0 \"success\" ${t}_found_2 ${t}_not_found_2" >> $of
     436  echo " ${t}_not_found_2:" >> $of
     437  echo "   SetDetailsView show" >> $of
     438  echo "   DetailPrint \"Download failed: \$R0\"" >> $of
     439  echo "   MessageBox MB_OK \"Download failed: \$R0\"" >> $of
     440  echo "   Goto ${t}_done" >> $of
     441  echo " ${t}_found_2:" >> $of
     442  echo "   Strcpy \$1 \"\$INSTDIR\\Packages\\$outfile\"" >> $of
     443  echo " ${t}_found:" >> $of
     444  echo "  DetailPrint \"Installing: \$1\"" >> $of
     445  echo "  ExecWait '\"\$1\" /S'" >> $of
     446  echo "  BringToFront" >> $of
     447  echo " ${t}_done:" >> $of
     448  echo "SectionEnd" >> $of
     449}
     450
     451#
     452# Handle each type of host processor.
     453#
     454for p in $mingw32_cpu_list
     455do
     456 echo "; Components based on each target." > $relocation/rtems-sections.nsi
     457 create_autotools_installer noarch auto autotools
     458 for t in $targets
     459 do
     460  create_installer $p $t $t
    227461 done
     462 # Must be done last
     463 create_installer $p $common_label $common_label
    228464done
  • contrib/mingw/build-rpms.sh

    re4a22331 rf6cd0db  
    3131processor=$(uname -p)
    3232
    33 version=4.7
     33. $source/version
    3434
    3535base_tool_list="binutils gcc"
     
    3838host_list="cygwin freebsd5.2 freebsd6.0 freebsd6.1 mingw32"
    3939
    40 rtems_tool_list="autoconf automake $base_tool_list"
     40rtems_tool_list="autoconf automake $base_tool_list gdb"
    4141linux_tool_list="autoconf automake $base_tool_list"
    4242cygwin_tool_list="w32api libs autoconf automake $base_tool_list"
     
    324324     autoconf|automake)
    325325      # Hack around the prefix in the spec files for autotools.
    326       ba="-ba $prefix/autotools/$rpm_prefix$s-rtems.spec"
     326      ba="-ba $prefix/autotools/$rpm_prefix$s.spec"
    327327      ;;
    328328     *)
     
    351351    autoconf|automake)
    352352     # Hack around the prefix in the spec files for autotools.
    353      ba="-ba $prefix/autotools/$rpm_prefix$s-rtems.spec"
     353     ba="-ba $prefix/autotools/$rpm_prefix$s.spec"
    354354     ;;
    355355    *)
  • contrib/mingw/rtems-tools.nsi

    re4a22331 rf6cd0db  
    1111!define PRODUCT_NAME      "RTEMS Tools"
    1212!define PRODUCT_VERSION   ${RTEMS_VERSION}
    13 !define PRODUCT_PUBLISHER "RTEM Project Team"
     13!define PRODUCT_PUBLISHER "RTEMS Project Team"
    1414!define PRODUCT_WEB_SITE  "http://www.rtems.org/"
    1515
     
    5858
    5959Name "${PRODUCT_NAME} ${PRODUCT_VERSION} (${RTEMS_TARGET})"
    60 OutFile "${RTEMS_BINARY}/rtems${PRODUCT_VERSION}-${RTEMS_TARGET}-${RTEMS_BUILD_VERSION}.exe"
    61 InstallDir "C:\rtems\${RTEMS_TARGET}"
     60!ifdef COMMON_FILES
     61OutFile "${RTEMS_BINARY}/rtems${PRODUCT_VERSION}-tools-${RTEMS_BUILD_VERSION}.exe"
     62!else
     63OutFile "${RTEMS_BINARY}/${RTEMS_OUTFILE}"
     64!endif
     65InstallDir "C:\opt\rtems-${PRODUCT_VERSION}"
    6266ShowInstDetails show
    6367ShowUnInstDetails show
     
    6771CRCCheck force
    6872
    69 Section "RTEMS ${RTEMS_TARGET} Tools" SecTools
     73!include "${RTEMS_SOURCE}/msys-path.nsi"
     74
     75Section -SecFiles
     76 !insertmacro RTEMS_INSTALL_FILES
     77SectionEnd
     78
     79!ifdef COMMON_FILES
     80Section -SecCommon
    7081 SetOutPath "$INSTDIR"
    7182 File "${RTEMS_SOURCE}/AUTHORS"
    7283 File "${RTEMS_SOURCE}/COPYING"
    7384 File "${RTEMS_SOURCE}/README"
    74  !insertmacro RTEMS_INSTALL_FILES
    75 SectionEnd
     85SectionEnd
     86!endif
    7687
    7788!macro FILE_WRITE_LINE Handle Text
     
    160171  StrCpy $R2 $R0 1 $R1
    161172  StrCmp $R2 "" done
    162  StrCmp $R2 "\" 0 loop
     173 StrCmp $R2 "\" 0 loop  ; "
    163174  StrCpy $R2 $R0 $R1
    164175   Push $R1
     
    175186FunctionEnd
    176187
     188!ifdef COMMON_FILES
    177189Section -BatchFiles
    178190 FileOpen $9 $INSTDIR\rtems.bat w
    179191 !insertmacro FILE_WRITE_LINE $9 "@echo off"
    180  !insertmacro FILE_WRITE_LINE $9 "rem RTEMS batch file: ${RTEMS_TARGET} (${RTEMS_VERSION})"
     192 !insertmacro FILE_WRITE_LINE $9 "rem RTEMS batch file: ${RTEMS_VERSION}-${RTEMS_BUILD_VERSION}"
    181193 !insertmacro FILE_WRITE_LINE $9 "set PATH=$INSTDIR\bin;c:\mingw\bin;c:\msys\1.0\bin;%PATH%"
    182  !insertmacro FILE_WRITE_LINE $9 "set PROMPT=RTEMS(${RTEMS_TARGET}) $$P$$G"
     194 !insertmacro FILE_WRITE_LINE $9 "set PROMPT=RTEMS $$P$$G"
    183195 !insertmacro FILE_WRITE_LINE $9 "If $\"x%OS%x$\" == $\"xWindows_NTx$\" Goto WinNT_Title"
    184196 !insertmacro FILE_WRITE_LINE $9 "doskey > Nul"
    185197 !insertmacro FILE_WRITE_LINE $9 "goto Finished"
    186198 !insertmacro FILE_WRITE_LINE $9 ":WinNT_Title"
    187  !insertmacro FILE_WRITE_LINE $9 "Title RTEMS(${RTEMS_TARGET})"
     199 !insertmacro FILE_WRITE_LINE $9 "Title RTEMS ${RTEMS_VERSION}-${RTEMS_BUILD_VERSION}"
    188200 !insertmacro FILE_WRITE_LINE $9 ":Finished"
    189201 FileClose $9
     
    191203 FileOpen $9 $INSTDIR\rtems-cmd.bat w
    192204 !insertmacro FILE_WRITE_LINE $9 "@echo off"
    193  !insertmacro FILE_WRITE_LINE $9 "rem RTEMS batch file: ${RTEMS_TARGET} (${RTEMS_VERSION})"
     205 !insertmacro FILE_WRITE_LINE $9 "rem RTEMS batch file: ${RTEMS_VERSION}-${RTEMS_BUILD_VERSION}"
    194206 !insertmacro FILE_WRITE_LINE $9 "If $\"x%OS%x$\" == $\"xWindows_NTx$\" Goto WinNT"
    195207 !insertmacro FILE_WRITE_LINE $9 "start command.com /e:4096 /k $INSTDIR\rtems.bat %1 %2 %3 %4"
     
    202214 FileOpen $9 $INSTDIR\sh-run.bat w
    203215 !insertmacro FILE_WRITE_LINE $9 "@echo off"
     216 !insertmacro FILE_WRITE_LINE $9 "rem RTEMS batch file: ${RTEMS_VERSION}-${RTEMS_BUILD_VERSION}"
    204217 !insertmacro FILE_WRITE_LINE $9 "rem We can only handle 9 parameters. More is too hard."
    205218 !insertmacro FILE_WRITE_LINE $9 "call $INSTDIR\rtems.bat"
     
    209222 FileOpen $9 $INSTDIR\vs-make.sh w
    210223 !insertmacro FILE_WRITE_LINE $9 "#! /bin/sh"
     224 !insertmacro FILE_WRITE_LINE $9 "# RTEMS script: ${RTEMS_VERSION}-${RTEMS_BUILD_VERSION}"
    211225 !insertmacro FILE_WRITE_LINE $9 "if [ ! -d $$1 ]; then"
    212226 !insertmacro FILE_WRITE_LINE $9 " echo $\"error: no build directory found$\""
     
    223237
    224238Section -MSYSLinks
    225  FindFirst $8 $1 c:\msys\1.0\etc\fstab
    226  StrCmp $1 "" MSYSLinksdone
     239 Call MSYSDetectSilent
     240 Pop $R0
     241 ifFileExists "$R0\etc\fstab" 0 Done
     242  Push $R0
    227243  Push $INSTDIR
     244  Push '\\'
     245  Pop $R0
    228246  Call StrSlash
     247  Pop $R1
    229248  Pop $R0
    230   DetailPrint "Setting MSYS fstab: $R0 -> ${TOOL_PREFIX}"
    231   FileOpen $9 "c:\msys\1.0\etc\fstab" a
     249  DetailPrint "Setting MSYS fstab: $R1 -> /opt/rtems-${PRODUCT_VERSION}"
     250  StrCpy $R1 "$R1 /opt/rtems-${PRODUCT_VERSION}$\n"
     251  FileOpen $9 "$R0\etc\fstab" a
     252  ifErrors 0 +3
     253    MessageBox MB_OK "Cannot open $R0\etc\fstab. MSYS mount point no added."
     254    Goto Close
     255  FileSeek $9 0 SET
     256 ReadLoop:
     257  FileRead $9 $R2
     258  ifErrors Append
     259  StrCmp $R1 $R2 Close ReadLoop
     260 Append:
    232261  FileSeek $9 0 END
    233   FileWrite $9 $R0
    234   FileWriteByte $9 "32"
    235   FileWrite $9 ${TOOL_PREFIX}
    236   FileWriteByte $9 "10"
     262  FileWrite $9 $R1
     263 Close:
    237264  FileClose $9
    238  MSYSLinksdone:
    239  FindClose $8
    240 SectionEnd
     265 Done:
     266  ClearErrors
     267SectionEnd
     268!endif
    241269
    242270Section -Post
    243  WriteUninstaller "$INSTDIR\rtems-${RTEMS_TARGET}-uninst.exe"
     271!ifdef COMMON_FILES
     272 WriteUninstaller "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-uninst.exe"
     273!else
     274 WriteUninstaller "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe"
     275!endif
    244276 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
    245277                  "DisplayName" "$(^Name)"
     
    256288Function un.onInit
    257289 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \
    258             "Are you sure you want to uninstall RTEMS Tools?" IDYES +2
     290            "Are you sure you want to uninstall RTEMS Tools (${RTEMS_TARGET})?" IDYES +2
    259291 Abort
    260292FunctionEnd
    261293
    262294Section Uninstall
    263  Delete $INSTDIR\rtems-${RTEMS_TARGET}-uninst.exe
     295 SetDetailsView show
    264296 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
    265  DetailPrint "Delete the install directory"
     297 DetailPrint "Delete the installed files"
     298 !insertmacro RTEMS_DELETE_FILES
     299!ifdef COMMON_FILES
     300 FindFirst $0 $1 "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-*-uninst.exe"
     301 Uninstall_Targets:
     302  StrCmp $1 "" Uninstall_Targets_Done
     303  DetailPrint "Uninstalling $1"
     304  ExecWait '"$INSTDIR\$1" /S'
     305  Delete $1
     306  BringToFront
     307  FindNext $0 $1
     308  Goto Uninstall_Targets
     309 Uninstall_Targets_Done:
     310 FindClose $0
    266311 Delete "$INSTDIR\AUTHORS"
    267312 Delete "$INSTDIR\COPYING"
     
    271316 Delete "$INSTDIR\sh-run.bat"
    272317 Delete "$INSTDIR\vs-make.sh"
    273  !insertmacro RTEMS_DELETE_FILES
     318 Delete "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-uninst.exe"
     319!else
     320 Delete "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-${RTEMS_TARGET}-uninst.exe"
     321 Delete "$INSTDIR\Packages"
     322!endif
     323 RMDir "$INSTDIR"
    274324 DetailPrint "All done."
    275  SetAutoClose true
    276 SectionEnd
     325 SetAutoClose false
     326SectionEnd
  • contrib/mingw/rtems.ini

    re4a22331 rf6cd0db  
    88[Field 1]
    99Type=Label
    10 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 or need autoconf or automake support the MSYS 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.
     10Text=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.
    1111Left=0
    1212Right=292
     
    2525Type=Link
    2626Text=Source Code with patches
    27 State=ftp://www.rtems.org/pub/rtems/SOURCES
     27State=http://www.rtems.org/ftp/pub/rtems/SOURCES
    2828Left=150
    2929Right=275
Note: See TracChangeset for help on using the changeset viewer.