Re: PATCH: pgAdmin4 windows installer

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: PATCH: pgAdmin4 windows installer
Дата
Msg-id CA+OCxoz8Cui4eHVSyaCqh++_xKMrcQkKB8Rc0pjqEdzg0Un79w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: pgAdmin4 windows installer  (Paresh More <paresh.more@enterprisedb.com>)
Ответы Re: PATCH: pgAdmin4 windows installer  (Paresh More <paresh.more@enterprisedb.com>)
Список pgadmin-hackers
Hi

On Fri, Apr 15, 2016 at 4:31 PM, Paresh More <paresh.more@enterprisedb.com> wrote:
Hello Dave,

I have made changes according which you mentioned.

Binary is located @ location

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@pgadmin.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@std@@YAXXZ) referenced in function "char * __cdecl std::_Allocate<char>(unsigned int,char *)" (??$_Allocate@D@std@@YAPADIPAD@Z)
qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Syserror_map(int)" (__imp_?_Syserror_map@std@@YAPBDH@Z) referenced in function "public: virtual class std::error_condition __thiscall std::_System_error_category::default_error_condition(int)const " (?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z)
qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@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@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@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.more@enterprisedb.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

NEW-EDB-logo-4c

Pune, India.



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.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

NEW-EDB-logo-4c

Pune, India.




--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Ashesh Vashi
Дата:
Сообщение: Re: [pgAdmin4] [Patch]: Foreign Table Module
Следующее
От: Dave Page
Дата:
Сообщение: Re: Patch for pgAdmin4 RPM package