• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision4154 (tree)
Zeit2005-08-15 03:52:30
Autorstefankueng

Log Message

reorganize the build scripts
- Use sed to insert the version information in all files which need them
- Have the version information in one single place

Ändern Zusammenfassung

Diff

--- trunk/Languages/LanguagePack.in (nonexistent)
+++ trunk/Languages/LanguagePack.in (revision 4154)
@@ -0,0 +1,74 @@
1+; Script generated by the HM NIS Edit Script Wizard.
2+; HM NIS Edit Wizard helper defines
3+!define PRODUCT_PUBLISHER "TortoiseSVN"
4+!define PRODUCT_VERSION "$MajorVersion$.$MinorVersion$.$MicroVersion$"
5+!define PRODUCT_WEB_SITE "http://tortoisesvn.tigris.org/"
6+!define MUI_WELCOMEPAGE_TITLE_3LINES true
7+
8+!include "PRODUCT.nsh"
9+
10+;Makro to upgrade existing language dlls without registering them
11+!define UPGRADEDLL_NOREGISTER
12+!include "UpgradeDLL.nsh"
13+
14+SetCompressor lzma
15+
16+; MUI 1.67 compatible ------
17+!include "MUI.nsh"
18+
19+; MUI Settings
20+!define MUI_ABORTWARNING
21+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
22+
23+; Welcome page
24+!insertmacro MUI_PAGE_WELCOME
25+; Instfiles page
26+!insertmacro MUI_PAGE_INSTFILES
27+; Finish page
28+!insertmacro MUI_PAGE_FINISH
29+
30+; Language files
31+!insertmacro MUI_LANGUAGE ${InstLang}
32+
33+; Reserve files
34+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
35+
36+; MUI end ------
37+
38+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
39+OutFile "..\bin\LanguagePack_${PRODUCT_VERSION}_${CountryCode}.exe"
40+ShowInstDetails show
41+
42+Section "Hauptgruppe" SEC01
43+ ReadRegStr $0 HKLM "software\TortoiseSVN" "Directory"
44+ StrCmp $0 "" NotInstalled Installed
45+Installed:
46+ Goto Proceed
47+NotInstalled:
48+ MessageBox MB_OK "TortoiseSVN not installed!"
49+ Abort
50+Proceed:
51+!ifdef LangHelp
52+ StrCpy $INSTDIR "$0\bin"
53+ SetOutPath "$INSTDIR"
54+ File "..\doc\output\TortoiseSVN_${CountryCode}.chm"
55+!endif
56+ StrCpy $INSTDIR "$0\Languages"
57+ SetOutPath "$INSTDIR"
58+ File /nonfatal "..\..\Common\Spell_Thes\${CountryCode}*.*"
59+ File /nonfatal "..\..\Common\Spell_Thes\th_${CountryCode}*.*"
60+ !insertmacro UpgradeDLL "..\bin\TortoiseProc${CountryID}.dll" "$INSTDIR\TortoiseProc${CountryID}.dll" "$INSTDIR"
61+ !insertmacro UpgradeDLL "..\bin\TortoiseMerge${CountryID}.dll" "$INSTDIR\TortoiseMerge${CountryID}.dll" "$INSTDIR"
62+!ifdef MoFile
63+ StrCpy $INSTDIR "$0\Languages\${CountryCode}\LC_MESSAGES"
64+ SetOutPath "$INSTDIR"
65+ File "subversion.mo"
66+!endif
67+SectionEnd
68+
69+Section -Post
70+SectionEnd
71+
72+; Section descriptions
73+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
74+!insertmacro MUI_FUNCTION_DESCRIPTION_END
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- trunk/Languages/Make_Installer.bat (revision 4153)
+++ trunk/Languages/Make_Installer.bat (revision 4154)
@@ -44,6 +44,7 @@
4444 if EXIST subversion.mo echo ^^!define MoFile "subversion.mo" >> %OFile%
4545 )
4646
47+ if NOT EXIST LanguagePack.nsi (copy LanguagePack.in LanguagePack.nsi)
4748 MakeNSIS /V1 LanguagePack.nsi
4849 del ..\bin\TortoiseProc%%j.dll
4950 del ..\bin\TortoiseMerge%%j.dll
--- trunk/Release_procedure.txt (revision 4153)
+++ trunk/Release_procedure.txt (revision 4154)
@@ -14,10 +14,7 @@
1414
1515 - Check the latest versions of Apache, openssl, zlib, neon and of course
1616 download any newer versions available.
17-- increment the version number in the installer script
18-- increment the version number in the version.in file
19-- increment the version number in LanguagePack.nsi
20-- increment the version number in doc\source\en\Version.xml
17+- increment the version number in version.in file
2118 - finish the changelog.txt file, i.e. add the version title
2219 - run the build.bat script
2320
--- trunk/build.bat (revision 4153)
+++ trunk/build.bat (revision 4154)
@@ -135,7 +135,11 @@
135135 rem Build SubWCRev twice to include its own version info
136136 copy /y version.none version.h
137137 if NOT EXIST ..\bin\release\bin\SubWCRev.exe devenv TortoiseSVN.sln /rebuild release /project SubWCRev
138-..\bin\release\bin\SubWCRev.exe .. version.in version.h
138+
139+:: now we can create all files with version numbers in them
140+cd ..
141+call version.bat
142+cd src
139143 devenv TortoiseSVN.sln /rebuild release /project SubWCRev
140144 if DEFINED _RELEASE (
141145 devenv TortoiseSVN.sln /rebuild release
--- trunk/doc/GenDoc.bat (revision 4153)
+++ trunk/doc/GenDoc.bat (revision 4154)
@@ -14,6 +14,10 @@
1414 rmdir /s /q output > NUL
1515 mkdir output > NUL
1616
17+rem check if the version.bat script has been run (i.e. if the version.xml file
18+rem is present). If not, just copy version.in to version.xml
19+if NOT EXIST source\en\Version.xml (copy source\en\Version.in source\en\Version.xml)
20+
1721 rem Determine available languages for documentation by looking for the .po files
1822
1923 if "%1"=="" (
--- trunk/doc/source/en/Version.xml (revision 4153)
+++ trunk/doc/source/en/Version.xml (nonexistent)
@@ -1,2 +0,0 @@
1-<?xml version="1.0" encoding="UTF-8"?>
2-<subtitle>Version 1.2.1</subtitle>
\ No newline at end of file
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/xml
\ No newline at end of property
--- trunk/doc/source/en/Version.in (nonexistent)
+++ trunk/doc/source/en/Version.in (revision 4154)
@@ -0,0 +1,2 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<subtitle>Version $MajorVersion$.$MinorVersion$.$MicroVersion$</subtitle>
\ No newline at end of file
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/xml
\ No newline at end of property
--- trunk/src/TortoiseSVNSetup/MakeMsi.bat (revision 4153)
+++ trunk/src/TortoiseSVNSetup/MakeMsi.bat (revision 4154)
@@ -30,10 +30,15 @@
3030
3131
3232 rem Do the SubWCRev substitution for revision numbers in the two necessary files.
33-ECHO MakeMsi.bat: Calling SubWCRev
34-..\..\bin\release\bin\SubWCRev.exe ..\.. VersionNumberInclude.in.wxi VersionNumberInclude.wxi
33+ECHO MakeMsi.bat: checking version information
34+if NOT EXIST VersionNumberInclude.wxi (
35+cd ..\..\
36+call version.bat
37+cd src\TortoiseSVNSetup
38+)
39+echo checking files
3540 if NOT EXIST VersionNumberInclude.wxi (copy VersionNumberInclude.in.wxi VersionNumberInclude.wxi)
36-..\..\bin\release\bin\SubWCRev.exe ..\.. MakeMsiSub.in.bat MakeMsiSub.bat
41+if NOT EXIST MakeMsiSub.bat (SubWCRev.exe ..\.. MakeMsiSub.in.bat MakeMsiSub.bat)
3742 if NOT EXIST MakeMsiSub.bat (copy MakeMsiSub.in.bat MakeMsiSub.bat)
3843
3944
--- trunk/src/version.in (revision 4153)
+++ trunk/src/version.in (revision 4154)
@@ -1,11 +1,11 @@
1-#define FILEVER 1,2,1,$WCREV$
2-#define PRODUCTVER 1,2,1,$WCREV$
3-#define STRFILEVER "1, 2, 1, $WCREV$\0"
4-#define STRPRODUCTVER "1, 2, 1, $WCREV$\0"
1+#define FILEVER $MajorVersion$,$MinorVersion$,$MicroVersion$,$WCREV$
2+#define PRODUCTVER $MajorVersion$,$MinorVersion$,$MicroVersion$,$WCREV$
3+#define STRFILEVER "$MajorVersion$, $MinorVersion$, $MicroVersion$, $WCREV$\0"
4+#define STRPRODUCTVER "$MajorVersion$, $MinorVersion$, $MicroVersion$, $WCREV$\0"
55
6-#define TSVN_VERMAJOR 1
7-#define TSVN_VERMINOR 2
8-#define TSVN_VERMICRO 1
6+#define TSVN_VERMAJOR $MajorVersion$
7+#define TSVN_VERMINOR $MinorVersion$
8+#define TSVN_VERMICRO $MicroVersion$
99 #define TSVN_VERBUILD $WCREV$
1010
1111
--- trunk/version.bat (nonexistent)
+++ trunk/version.bat (revision 4154)
@@ -0,0 +1,45 @@
1+@echo off
2+SETLOCAL ENABLEDELAYEDEXPANSION
3+
4+::
5+:: sets the version numbers in all files using a version number
6+::
7+
8+@if "%VSINSTALLDIR%"=="" call "%VS71COMNTOOLS%\vsvars32.bat"
9+if "%TortoiseVars%"=="" call TortoiseVars.bat
10+
11+bin\Release\bin\SubWCRev . version.in temp.bat || goto :error
12+
13+call temp.bat
14+del temp.bat
15+
16+call :replaceVersionStrings src\TortoiseSVNSetup\VersionNumberInclude.in.wxi src\TortoiseSVNSetup\VersionNumberInclude.wxi
17+call :replaceVersionStrings src\TortoiseSVNSetup\MakeMsiSub.in.bat src\TortoiseSVNSetup\MakeMsiSub.bat
18+call :replaceVersionStrings src\version.in src\version.h
19+call :replaceVersionStrings Languages\LanguagePack.in Languages\LanguagePack.nsi
20+call :replaceVersionStrings doc\source\en\Version.in doc\source\en\Version.xml
21+
22+goto :eof
23+
24+:: replace version values in a file, using sed
25+:replaceVersionStrings
26+setlocal
27+ set "file=%~1"
28+ set "outfile=%~2"
29+ if not exist "%file%" goto :error
30+
31+ copy "%file%" "%file%.orig" || goto :error
32+ sed "s/\$MajorVersion\$/%MajorVersion%/g" "%file%.orig" > "%file%.orig2" || goto :error
33+ sed "s/\$MinorVersion\$/%MinorVersion%/g" "%file%.orig2" > "%file%.orig" || goto :error
34+ sed "s/\$MicroVersion\$/%MicroVersion%/g" "%file%.orig" > "%file%.orig2" || goto :error
35+ sed "s/\$WCREV\$/%WCREV%/g" "%file%.orig2" > "%outfile%" || goto :error
36+
37+ del "%file%.orig"
38+ del "%file%.orig2"
39+
40+endlocal
41+goto :eof
42+:error
43+ echo Error in :replaceVersionStrings "%file%"!
44+endlocal
45+goto :eof
\ No newline at end of file
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- trunk/version.in (nonexistent)
+++ trunk/version.in (revision 4154)
@@ -0,0 +1,4 @@
1+Set MajorVersion=1
2+Set MinorVersion=2
3+Set MicroVersion=1
4+Set WCREV=$WCREV$
\ No newline at end of file
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Show on old repository browser