From cba254cf9a9f3ce7f42b61f1227d2054f77cfecf Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 23 Jul 2000 15:24:03 +0000 Subject: [PATCH] Added scripts to update .dsp files when version changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/expdwild.bat | 15 +++++++++++++++ distrib/msw/filerepl.bat | 27 +++++++++++++++++++++++++++ distrib/msw/vcupdate.bat | 9 +++++++++ 3 files changed, 51 insertions(+) create mode 100755 distrib/msw/expdwild.bat create mode 100755 distrib/msw/filerepl.bat create mode 100755 distrib/msw/vcupdate.bat diff --git a/distrib/msw/expdwild.bat b/distrib/msw/expdwild.bat new file mode 100755 index 0000000000..34974a61d7 --- /dev/null +++ b/distrib/msw/expdwild.bat @@ -0,0 +1,15 @@ +@echo off +rem Expands wildcards in response file (arg 1) into output file (arg 2) +rem Note: requires ls.exe from GNU-WIN32 distribution, renamed to ls2.exe. +rem Correction: this is too slow, so we're using the built in 'dir'. + +set newname=%temp\temp.tmp +sed -e "s/\//\\/g" %1 > %newname + +set len=%@LINES[%newname] +rem set len=%@DEC[%len] +do i = 0 to %len by 1 + set line=%@LINE[%newname,%i] + if NOT "%line" == "" dir /FB %line >> %2 +enddo + diff --git a/distrib/msw/filerepl.bat b/distrib/msw/filerepl.bat new file mode 100755 index 0000000000..815fc0b19b --- /dev/null +++ b/distrib/msw/filerepl.bat @@ -0,0 +1,27 @@ +@echo off +Rem Replace a string with another string in the given files. +Rem The first argument is the string to be replaced. +Rem The second argument is the replacement string. +Rem The third argument is a file listing the files to be processed. + +set keyword=%1 +set repl=%2 +set files=%3 +echo s/%keyword/%repl/g > script.tmp + +call %wxwin\distrib\msw\expdwild.bat %3 list.tmp + +set len=%@LINES[%files] +do i = 0 to %len by 1 + set line=%@LINE[list.tmp,%i] + if "%line" == "**EOF**" enddo +rem echo Cmd: grep %keyword %line + grep %keyword %line > size.tmp + if "%@FILESIZE[size.tmp]" == "0" enddo + sed -f script.tmp %line > file.tmp + move file.tmp %line +enddo +erase script.tmp +erase list.tmp +erase size.tmp +:end diff --git a/distrib/msw/vcupdate.bat b/distrib/msw/vcupdate.bat new file mode 100755 index 0000000000..399a6d73ee --- /dev/null +++ b/distrib/msw/vcupdate.bat @@ -0,0 +1,9 @@ +@echo off +Rem Replace the DLL version number in the VC++ project files + +input Enter the old version name (e.g. wx22_0): %%oldName +input Enter the new version name (e.g. wx22_1): %%newName + +call %wxwin\distrib\msw\filerepl.bat %oldName %newName %wxwin\distrib\msw\vc.rsp +echo Done. +