X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4BB6D745.3060807@bopp.net> Date: Sat, 03 Apr 2010 00:51:01 -0500 From: Jeremy Bopp User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Making package installation default References: <4BB681CA DOT 2090208 AT bopp DOT net> <4BB6C3D4 DOT 8000003 AT cygwin DOT com> <4BB6C883 DOT 4020301 AT cygwin DOT com> <4BB6CFED DOT 4030201 AT bopp DOT net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Andrew DeFaria wrote: > On 04/02/2010 10:19 PM, Jeremy Bopp wrote: >> It gets even better once you look through the other command line options >> listed with --help because you can automate installation selections to >> the point that the users don't have to do anything more than run your >> batch file. They won't have to interact with any of setup.exe directly. >> The only thing they will see is the window showing the package >> installation progress which they can cancel if they choose. >> > A "silent" install might be cool but I can also see that it would be > useful to allow to user to browse though some of the optional packages. > For example, while maybe not everybody would want gcc and make, some > may. Or perhaps they want Perl or Apache. However I want to make sure > that ssh is installed (it'd be nice if I could automate the running > ssh-host-config, for example) so that I can ssh into their machine to > fix things. I think that if you leave off the silent install option that your other selections set by command line options are respected in the UI, so the extra packages you select will show as selected by default once the user arrives at the package selection page. Unfortunately, you have to trust your users to correctly hit the Next button on every page without changing anything until they get to the package selection page. Whether or not that trust is warranted is between you and your users. ;-) The batch file I wrote for work actually includes a bash shell at the end of it for post-install actions. After the actual batch logic, you can run the goto :eof command to jump the batch to the end of the file past the bash scripting. It looks something like this: @echo off rem This batch file installs Cygwin with extra packages. rem It then runs some post-install logic written for bash rem which is simply appended to the end of this script. setup.exe -P pkg1,pkg2,... C:\cygwin\bin\sed "0,/^BASH SCRIPT BEGINS/ d" <%0 | C:\cygwin\bin\bash goto :eof BASH SCRIPT BEGINS echo 'Starting post-install actions...' ... ... # This is the end of both the bash script and the batch file! I may be foggy on some details, but hopefully, you get the idea. :-) The only requirement is that the user drop setup.exe into some directory next to this batch file. You could even get clever and have the batch file tell them where to get setup.exe in case they run the batch file without first downloading setup.exe. I should probably do that for *my* script... -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple