Re: PATCH: pgAdmin4 windows installer

From: Paresh More <paresh(dot)more(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Hamid Quddus <hamid(dot)quddus(at)enterprisedb(dot)com>
Subject: Re: PATCH: pgAdmin4 windows installer
Date: 2016-04-15 15:31:39
Message-ID: CAAgiCNHuAaJRSeVg39R3LfJ8eu5=X2Ljn1DjPoB=XmXwwCMqRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hello Dave,

I have made changes according which you mentioned.

Binary is located @ location
https://uploads.enterprisedb.com/download.php?file=1f92c5abbaf7014d9aa8fb0711d53f6d

Patch is attached in the Email.

- Please move Make.bat to the root directory of the source tree.
*DONE* - Make.bat is moved to root directory

- The built installer should be created in dist/ in the root directory of
the source tree (as the PIP package is)
*DONE - *dist would be created in the root directory of the source tree.

- The version number should be extracted from config.py, and used to create
the installer filename, i.e. pgadmin4-APP_VERSION.exe, which would
currently make "pgadmin4-1.0.0-dev.exe"
*DONE* - Now it reads from config.py and accordingly create installer
filename.

- Please add a README.rst file to pkg/win32 that describes the required
packages to setup a build environment, and (where non-obvious, e.g. setting
up the compiler for PIP) including instructions on how to setup everything.
*DONE*

- The user should never need to edit Make.bat, so any paths that might
change should come from the environment (with instructions telling the user
what to set where required). e.g. use vars like PYTHON_VERSION,
PYTHON_PATH, QTDIR. These should override any hard-coded defaults in the
script. Of course, where possible we should use variables standard to, or
set by the other products.
*DONE* - It would check environment variables and override if it is set,
else default values would be used and a check is put which would ensure all
the prerequisite requirement is installed or abort.

- Any script errors should cause an exit. For example, my QT is a different
version than you used, but the build script just ignored the fact that
qmake couldn't be found and built an installer anyway.
*DONE* - Pre check is put which would ensure prerequisite requirement is
installed

- Side-by-side installations of major versions of pgAdmin should be
allowed, so an installation directory of "C:\Program Files (x86)\pgAdmin
4\" should actually install into C:\Program Files (x86)\pgAdmin
4\<major>.<minor>, e.g. "C:\Program Files (x86)\pgAdmin 4\1.0\"
*DONE-*Side-by-side installation depending on Major and minor number is
handled.
Ex: All 1.0.0, 1.0.1,1.0.2,etc..... would go in C:\Program Files
(x86)\pgAdmin 4\1.0
All 1.1.0, 1.1.1,1.1.2,etc..... would go in C:\Program Files (x86)\pgAdmin
4\1.1
and so on

- Revision version updates should update the installed version, not install
side-by-side. Care should be taken to ensure the Add/Remove Programs
entries support both side-by-side installations and upgrades (e.g. 1.0.0 ->
1.0.1)
*DONE* - Revision version update would update the installed version
A extra check is also put which insure older version would not be allowed
to install if higher version is already installed.

- The first screen of the installer shows the version of pgAdmin as 1.0. It
should be APP_VERSION from config.py.
*DONE*- Screen shows APP_Version from config.py

- To aid with error handling, the script should check to ensure it can find
required executables (e.g. qmake.exe, ISCC.exe) as a pre-flight check.
*DONE*- Pre check is set, which will ensure all prerequisite is already set
and installed.

- We need a simple way to create a 64bit build.
*DONE*

On Fri, Apr 8, 2016 at 2:17 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> First round feedback (finally - sorry for the delay!):
>
> - Please move Make.bat to the root directory of the source tree.
>
> - The built installer should be created in dist/ in the root directory of
> the source tree (as the PIP package is)
>
> - The version number should be extracted from config.py, and used to
> create the installer filename, i.e. pgadmin4-APP_VERSION.exe, which would
> currently make "pgadmin4-1.0.0-dev.exe"
>
> - Please add a README.rst file to pkg/win32 that describes the required
> packages to setup a build environment, and (where non-obvious, e.g. setting
> up the compiler for PIP) including instructions on how to setup everything.
>
> - The user should never need to edit Make.bat, so any paths that might
> change should come from the environment (with instructions telling the user
> what to set where required). e.g. use vars like PYTHON_VERSION,
> PYTHON_PATH, QTDIR. These should override any hard-coded defaults in the
> script. Of course, where possible we should use variables standard to, or
> set by the other products.
>
> - Any script errors should cause an exit. For example, my QT is a
> different version than you used, but the build script just ignored the fact
> that qmake couldn't be found and built an installer anyway.
>
> - Side-by-side installations of major versions of pgAdmin should be
> allowed, so an installation directory of "C:\Program Files (x86)\pgAdmin
> 4\" should actually install into C:\Program Files (x86)\pgAdmin
> 4\<major>.<minor>, e.g. "C:\Program Files (x86)\pgAdmin 4\1.0\"
>
> - Revision version updates should update the installed version, not
> install side-by-side. Care should be taken to ensure the Add/Remove
> Programs entries support both side-by-side installations and upgrades (e.g.
> 1.0.0 -> 1.0.1)
>
> - The first screen of the installer shows the version of pgAdmin as 1.0.
> It should be APP_VERSION from config.py.
>
> - To aid with error handling, the script should check to ensure it can
> find required executables (e.g. qmake.exe, ISCC.exe) as a pre-flight check.
>
> - We need a simple way to create a 64bit build.
>
> - I'm not sure we should try to use any part of VC++ (NMAKE, VCVARS etc.).
> The script failed to build the runtime for me - I think because VCVARS was
> conflicting with QMAKE settings. I was getting errors like:
>
> Generating Code...
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO
> /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32'
> name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
> publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'"
> /MANIFEST /MANIFESTFILE:release\pgAdmin4.exe.embed.manifest
> /OUT:release\pgAdmin4.exe @C:\Users\dpage\AppData\Local\Temp\nm196C.tmp
> qtmain.lib(qtmain_win.obj) : error LNK2038: mismatch detected for
> '_MSC_VER': value '1700' doesn't match value '1600' in pgAdmin4.obj
> qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) void __cdecl std::_Xbad_alloc(void)"
> (__imp_?_Xbad_alloc(at)std@@YAXXZ) referenced in function "char * __cdecl
> std::_Allocate<char>(unsigned int,char *)" (??$_Allocate(at)D@std@
> @YAPADIPAD(at)Z)
> qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) char const * __cdecl std::_Syserror_map(int)"
> (__imp_?_Syserror_map(at)std@@YAPBDH(at)Z) referenced in function "public:
> virtual class std::error_condition __thiscall
> std::_System_error_category::default_error_condition(int)const "
> (?default_error_condition(at)_System_error_category@std
> @@UBE?AVerror_condition(at)2@H(at)Z)
> qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)"
> (__imp_?_Winerror_map(at)std@@YAPBDH(at)Z) referenced in function "public:
> virtual class std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > __thiscall
> std::_System_error_category::message(int)const " (?message@
> _System_error_category(at)std@@UBE?AV?$basic_string(at)DU?$char_traits@D(at)std@
> @V?$allocator(at)D@2@@2(at)H@Z)
> release\pgAdmin4.exe : fatal error LNK1120: 3 unresolved externals
> NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual
> Studio 10.0\VC\BIN\link.EXE"' : return code '0x460'
>
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 12.0\VC\bin\nmake.exe"' : return code '0x2'
> Stop.
>
> Aborting build!
>
> Thanks!
>
> On Fri, Mar 25, 2016 at 11:40 AM, Paresh More <
> paresh(dot)more(at)enterprisedb(dot)com> wrote:
>
>> Hello Team,
>>
>> Attached is the patch which will create windows 32 installer for pgAdmin4
>> (runtime mode) for python 2.7 version.
>>
>> This installer code has problem with psycopg2(2.5.2 version) for windows
>>
>> As discussed with Ashesh Vashi, I have changed to point to 2.6.1 version
>> and now the installer is working fine.
>>
>> So it would now generate windows 32 bit installer using psycopg2 (2.6.1
>> version)
>>
>> Kindly please review and let me know if any changes required.
>>
>> Please also suggest whether we should go with 2.5.2(psycopg2) or with the
>> latest version.
>>
>> --
>>
>> Thanks & Regards
>>
>> *Paresh More*
>>
>> [image: NEW-EDB-logo-4c]
>>
>> Pune, India.
>> Cell : +919922000564 | www.enterprisedb.com
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

--

Thanks & Regards

*Paresh More*

[image: NEW-EDB-logo-4c]

Pune, India.
Cell : +919922000564 | www.enterprisedb.com

Attachment Content-Type Size
pgadmin4_runtime.patch application/octet-stream 190.0 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Surinder Kumar 2016-04-15 16:03:50 Re: [pgAdmin4] [Patch]: Grant Wizard
Previous Message Dave Page 2016-04-15 14:49:02 pgAdmin 4 commit: Revert "Fix the properties toolbar at the top of the