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-05-20 08:33:40
Message-ID: CAAgiCNEF4_=Q=58tC78eXozoBRHiWsRdU=W_BY3ubhrKwyG1-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hello Dave.

Attached are two patch for pgAdmin4-windows

pgAdmin4_createDB.patch
- patch for pgAdmin4.py to autocreate database configuration if does not
exist.
- Now pgadmin.db would be not be bundled with installer, it would be
created if pgAdmin4.py is executed for the first time.

*pgAdmin4_windows.patch*
- Environment variables once set will over ride the existing script
variables.
- Issue related to path with quotes are removed.
- New Readme.txt is added.
- Modified Error reporting.
- Python check was missing related to which requirement file it should pick
for creating private environment based on python version is also fixed.

Windows pgAdmin4 Installer Download Link is @ location
https://uploads.enterprisedb.com/download.php?file=cc348a6d233400fa80fb2a4fd53336a3

On Mon, May 9, 2016 at 6:13 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Fri, Apr 15, 2016 at 4:31 PM, Paresh More <paresh(dot)more(at)enterprisedb(dot)com
> > wrote:
>
>> 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
>>
>
> OK.
>
>
>>
>> - 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.
>>
>
> OK
>
>
>>
>> - 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.
>>
>
> OK
>
>
>>
>>
>> - 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*
>>
>
> I've edited (and renamed for consistency) this file. Please find the
> update attached.
>
> I notice that it does not mention anything about setting up a compiler for
> PIP etc. Is that needed?
>
>
>>
>> - 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.
>>
>
> This doesn't appear to work at all. I set QTDIR in my environment, but the
> script complains that the default paths don't exist. I removed the default
> for QTDIR, and then get output like the following:
>
> C:\Users\dpage\Documents\pgadmin4>make
> 'Files' is not recognized as an internal or external command,
> operable program or batch file.
> 'Files' is not recognized as an internal or external command,
> operable program or batch file.
> 'Files' is not recognized as an internal or external command,
> operable program or batch file.
> 'Files' is not recognized as an internal or external command,
> operable program or batch file.
> C:\Qt\5.5\msvc2013_64 does not exist.
> "C:\Qt\5.5\msvc2013_64\bin\qmake.exe"s does not exist.
> Please Install QT SDK and set the QTDIR enviroment Variable.
>
> Clearly there are quoting issues here.
>
>
>>
>> - 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
>>
>
> OK
>
>
>>
>>
>> - 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
>>
>
> OK.
>
>
>>
>> - 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.
>>
>
> OK.
>
>
>>
>> - 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
>>
>
> OK.
>
>
>>
>> - 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.
>>
>
> OK. Please adjust the error reporting, e.g.
>
> :setInnoDetails
> echo %INNOTOOL% does not exist
> echo Please Install Innotool and set the INNOTOOL enviroment variable.
> goto EXIT
>
> :setVCDetails
> echo %VCDIR% does not exist.
> echo %VCVAR% does not exist.
> echo %VCNMAKE% does not exist.
> echo Please Install Microsoft Visual Studio and set the VCDIR environment
> variable.
> goto EXIT
>
> :setPythonDetails
> echo %PYTHON_HOME% does not exist.
> echo %PYTHON_VERSION% not set.
> echo %PYTHON_DLL% does not exist.
> echo Please Install Python and set the PYTHON_HOME enviroment Variable.
> goto EXIT
>
> :setQtDetails
> echo %QTDIR% does not exist.
> echo %QMAKE% does not exist.
> echo Please Install the QT SDK and set the QTDIR enviroment variable.
> goto EXIT
>
>
>>
>> - We need a simple way to create a 64bit build.
>> *DONE*
>>
>
> How is that done? It's not mentioned in the README.
>
>
>>
>> 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
>>
>
>
>
> --
> 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_createDB.patch application/octet-stream 808 bytes
pgAdmin4_windows.patch application/octet-stream 188.8 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Murtuza Zabuawala 2016-05-20 10:39:13 PATCH: Trigger function node (pgAdmin4)
Previous Message Akshay Joshi 2016-05-20 05:18:45 pgAdmin 4 commit: Added support for FTS configuration node