On 09/10/2014 23:47, Konstantin Kolinko wrote: > 2014-10-09 20:10 GMT+04:00 <ma...@apache.org>: >> Author: markt >> Date: Thu Oct 9 16:10:57 2014 >> New Revision: 1630526 >> >> URL: http://svn.apache.org/r1630526 >> Log: >> Sign the uninstaller as well as the installer >> >> Modified: >> tomcat/trunk/build.xml >> tomcat/trunk/res/tomcat.nsi >> tomcat/trunk/webapps/docs/changelog.xml >> >> Modified: tomcat/trunk/build.xml >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1630526&r1=1630525&r2=1630526&view=diff >> ============================================================================== >> --- tomcat/trunk/build.xml (original) >> +++ tomcat/trunk/build.xml Thu Oct 9 16:10:57 2014 > > 1. It shall be possible to build an (unsigned) installer when code > signing tool is not available. > > Maybe it already works - I have not tested.
I'm pretty sure it will fail. <snip/> > 2. This solutions runs > Ant -> makensis -> (makensis /DINNER); (ant ant -f ..\..\build.xml > sign-windows-uninstaller). > > I think it can be unwrapped by explicitly calling makensis twice from > Ant with the same nsi file but different /D defines. I think that will help with running this without signing. > > >> @@ -31,6 +31,7 @@ >> <property file="${user.home}/build.properties"/> >> <property file="build.properties"/> >> <property file="build.properties.default"/> >> + <property environment="env"/> > > 3. Why are you relying on shell environment variables? There is java > property that provides location of temporary directory. I was trying to avoid the unlikely issue of someone starting any with a different temp directory. > 4. Can the uninstaller be written to our own directory instead of the > system one? > > Its name is not unique. It will break if two builds are running in > parallel. (In an unlikely worst case you may end with signing someone > else's file). Fixing this fixes 3 as well. I took a quick look but couldn't get it to work. I'll take a longer look. > 5. Is the uninstaller file removed after the build? Is the > tempinstaller file removed after the build? No (couldn't get this to work). Not sure. I'll revisit this too. > 5. As I know, running the real installer triggers UAC (privileges > raise) prompt when it is run on Windows 7. > > Does such UAC prompt happen with this tempinstaller as well? I run with UAC disabled in my dev environment so I don't know. That could get messy. I'll take a look. > 6. It looks that the above assumes where build output directory is. > > This is broken if tomcat.output property is redefined in > build.properties file. (I usually redefine it to move "output" > directory outside of source tree to hide it from IDE and Subversion). > > If issue "1." is solved (skipping this step unless it is an official > release), then I do not mind for this breakage, as I do not expect the > "output" directory be moved when building official releases. > > I wonder if the path could be calculated relative to the nsi file. Fixing 2 might help with this as well. > 7. I wonder whether there is a better way to call Apache Ant. E.g. > %ANT_HOME%\bin\ant > > The prerequisite to have Ant in %PATH% is not documented in BUILDING.txt > > (I have it in %PATH% in that shell that is building Tomcat, so calling > it just as "ant" does not breaks things for me. > > On unixes the "ant" script evaluates ANT_HOME if it is not set, but > does not export it. The value is passed to Ant as > -Dant.home=\"$ANT_HOME\". ) > > A better solution would be to just call makensis twice from within Ant > build file, as I outlined in "2." above. Agreed. > 8. We already have "SetCompressor" directive a few lines later in the > file, along with "CRCCheck on". I see no real need to duplicate it. > > As there is no "/FINAL" option in the above directive, I guess the > later duplicate overwrites it. > > For reference: > http://nsis.sourceforge.net/Reference/SetCompressor > > In the sample code the first occurrence of that directive was "SetCompress > off" > http://nsis.sourceforge.net/Signing_an_Uninstaller I wanted to enable compression in all cases. I was more concerned about size than speed. Not sure how much impact it has on the uninstaller though. Possibly none. I'll investigate. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org