Re: Fix broken Install.bat when target directory contains a space

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix broken Install.bat when target directory contains a space
Date: 2015-04-17 05:36:30
Message-ID: CAB7nPqQusHDoy1nRGHbRZsqQj=9yJazhigZMWcrx8CeLBanfdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 16, 2015 at 5:40 PM, Asif Naeem wrote:
> Along with fixing the space in installation path, it is also changing the
> behavior of install script, why not just "if NOT [%1]==[] GOTO RUN_INSTALL",
> checking for "/?" seems good for help message but it seem not well handled
> in the script, it is still saying "Invalid command line options.", along
> with this, option "/?" seems not handled by any other .bat build script.
> Other than this, with the patch applied, is it an acceptable behavior that
> (2) shows usage message as 'Usage: install.pl <targetdir> [installtype]' but
> (3) shows usage message as 'Usage: "install.bat <path>"'. Thanks.

Thanks for your review!

OK, let's remove the use of /? then, consistency with the other
scripts is a good argument for its removal.Attached is an updated
patch that does the following regarding missing arguments:
>install
Invalid command line options.
Usage: "install.bat <targetdir> [installtype]"
installtype: client
>install
Installing version 9.5 for release in /?
Copying build output files...Could not copy release\postgres\postgres.exe to /?\
bin\postgres.exe
at Install.pm line 40.
Install::lcopy("release\\postgres\\postgres.exe", "/?\\bin\\postgres.exe
") called at Install.pm line 324
Install::CopySolutionOutput("release", "/?") called at Install.pm line 9
3
Install::Install("/?", undef) called at install.pl line 13

This patch fixes of course the issue with spaces included in the
target path. I updated as well the Usage in install.bat to be
consistent with install.pl.
Regards,
--
Michael

Attachment Content-Type Size
20150417_fix_msvc_install_v2.patch text/x-diff 782 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-04-17 06:04:07 Re: pg_upgrade in 9.5 broken for adminpack
Previous Message Shigeru HANADA 2015-04-17 04:43:46 Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)