Re: Patch for pgAdmin4 package on Mac OS X

From: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>, Paresh More <paresh(dot)more(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Hamid Quddus <hamid(dot)quddus(at)enterprisedb(dot)com>
Subject: Re: Patch for pgAdmin4 package on Mac OS X
Date: 2016-05-18 11:42:35
Message-ID: CANFyU94uUtBO+5ujeeu_p9xojuquemDDdzD7zzFYjMyLbqjmBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

So, this means, the installer name would be pgadmin4-1.0-dev.exe on Windows
and so on for other platforms?

Also, the installation would go in $installdir/pgadmin4/1/ ? and the
Revision change would update the installation? and the Release change will
stay side-by-side?

On Wed, May 18, 2016 at 4:20 PM, Sandeep Thakkar <
sandeep(dot)thakkar(at)enterprisedb(dot)com> wrote:

> Okay, so the patch needs a little change because of the change in the
> versioning for pgAdmin. Will update it.
>
> Paresh, please take a note of it.
>
> On Tue, May 17, 2016 at 4:24 PM, Sandeep Thakkar <
> sandeep(dot)thakkar(at)enterprisedb(dot)com> wrote:
>
>> Hi Dave
>>
>> I have fixed the issues. Attached is the updated patch.
>>
>> The docs are built as part of 'appbundle' target, there is no separate
>> target in Makefile for this. I observed that it requires the python modules
>> to get this built. We create virtual environment as a part of 'appbundle'
>> target because we do everything in a single script "build.sh". Hence,
>> right now I added doc build in the same build script.
>>
>> BTW, the online help returns me the following error now:
>> "The server encountered an internal error and was unable to complete your
>> request. Either the server is overloaded or there is an error in the
>> application." Since this is not 404, it means that it atleast got
>> index.html, right? May be this should be handled in the source code.
>>
>> Paresh is working on updating pgAdmin4.py to autocreate database
>> configuration if does not exist. He will share the patch.
>>
>> On Fri, May 13, 2016 at 6:41 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> On Fri, May 13, 2016 at 2:01 PM, Sandeep Thakkar
>>> <sandeep(dot)thakkar(at)enterprisedb(dot)com> wrote:
>>> > Thanks Dave.
>>> >
>>> > Please see inline.
>>> >
>>> > On Fri, May 6, 2016 at 9:03 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> Thanks. I've applied the path fix patch. The second one needs a little
>>> >> work - I've attached an updated version to work from:
>>> >>
>>> >> - I've updated the README, and some of the default values.
>>> >
>>> > OK. The default values of PGDIR and QTDIR set by you is different than
>>> mine.
>>> > I installed them through macports.
>>>
>>> Right. I went with the default directories from the original projects.
>>>
>>> >>
>>> >> - I've removed the file type registration for .sql files.
>>> >
>>> >
>>> > OK.
>>> >>
>>> >>
>>> >> - Should we note that the user may need to run in a virtualenv?
>>> >
>>> >
>>> > No, we bundle private environment, right?
>>>
>>> I meant "the user building the package", not the end user.
>>>
>>> >> - Please move build-mac.sh to pkg/build.sh, and create a target in
>>> >> /Makefile to
>>> >> execute it, e.g. "make appbundle"
>>> >
>>> >
>>> > Sure. You mean move to pkg/mac/build.sh, right?
>>>
>>> Yes :-)
>>>
>>> >> - Extend the Makefile to add a "clean-appbundle" target, which should
>>> also
>>> >> be
>>> >> called by the "clean" target.
>>> >>
>>> > OK.
>>> >>
>>> >> - At present, it is bundling my pre-existing configuration database.
>>> It
>>> >> *must*
>>> >> create a new one and bundle that, without touching the existing one
>>> (I
>>> >> guess
>>> >> that may require a new command line option for setup.py).
>>> >
>>> >
>>> > No, it's not bundling the pgadmin4.db at all, I skipped it :). Paresh
>>> is
>>> > working on this.
>>>
>>> Oh - in that case it used my existing one. Which of course, it should
>>> not overwrite if already present (which reminds me - adding a todo
>>> item to auto-upgrade the database if needed on first run).
>>>
>>> >> - The online help is broken (are you building it)? I suggest adding a
>>> >> top-level
>>> >> Makefile target to do so.
>>> >>
>>> > Sorry, which online help?
>>>
>>> That which can be found in $SRC/doc - currently only for en_US. At
>>> present it's built with "cd doc/en_US && make -f Makefile.sphinx
>>> html", but I think we should have a top-level target to call that for
>>> us.
>>>
>>> The help can then be accessed from Help -> Online Help within pgAdmin.
>>> Obviously the files need to be put in the right place in the app
>>> bundle.
>>>
>>> >> - Working directories should be added to /.gitignore. Please ensure
>>> they
>>> >> don't
>>> >> clash with those used by pip (and ideally are in one place, e.g.
>>> >> mac-build/).
>>> >>
>>> > OK.
>>> >
>>> >>
>>> >> - I saw various errors in the build output, though the resulting DMG
>>> >> seemed to
>>> >> work fine;
>>> >>
>>> > Yeah, because I had libpq.dylib present in $PGDIR/ and may be yours
>>> present
>>> > in $PGDIR/lib/. I will be using the default values suggested by you
>>> and fix
>>> > this. Thanks!
>>>
>>> Right - please make sure the build fails in cases like this too.
>>>
>>> Thanks.
>>>
>>> >> ...
>>> >> cp: /usr/local/pgsql/libpq.5.dylib: No such file or directory
>>> >> libpq.5.dylib not found in /usr/local/pgsql
>>> >> Completing app: /Users/dpage/git/pgadmin4/pgAdmin4.app
>>> >> ...
>>> >>
>>> >> ...
>>> >> App: pgAdmin4.app: Post-processing: .//Contents/MacOS/pgAdmin4
>>> >> App: pgAdmin4.app: Adding symlink: QtWebKitWidgets (because of:
>>> >> .//Contents/MacOS/pgAdmin4)
>>> >> cp:
>>> >>
>>> @rpath/QtWebKitWidgets.framework/Versions/5/../../../QtWebKitWidgets.framework:
>>> >> No such file or directory
>>> >> chmod:
>>> >>
>>> Contents/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets:
>>> >> No such file or directory
>>> >> Rewriting ID in
>>> >>
>>> Contents/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
>>> >> to QtWebKitWidgets
>>> >> error:
>>> >>
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>>> >> can't open file:
>>> >>
>>> Contents/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
>>> >> (No such file or directory)
>>> >> Cleaning up
>>> >> ...
>>> >>
>>> >>
>>> >> On Mon, Apr 18, 2016 at 1:25 PM, Sandeep Thakkar
>>> >> <sandeep(dot)thakkar(at)enterprisedb(dot)com> wrote:
>>> >> > Hi Team, Dave,
>>> >> >
>>> >> > Attached herewith are two patches.
>>> >> >
>>> >> > pgadmin4-mac-bundle.patch - This includes scripts to build Mac app
>>> >> > bundle
>>> >> > and DMG for pgAdmin4. This is the tree of the generated app bundle:
>>> >> >
>>> >> > ----
>>> >> > $ find pgAdmin4.app/ -maxdepth 3 -type d
>>> >> > pgAdmin4.app/
>>> >> > pgAdmin4.app//ContentspgAdmin4.app//Contents/Frameworks
>>> >> > pgAdmin4.app//Contents/Frameworks/Python.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtCore.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtDBus.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtGui.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtMultimedia.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtMultimediaWidgets.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtNetwork.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtOpenGL.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtPositioning.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtPrintSupport.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtQml.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtQuick.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtSensors.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtSql.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtWebChannel.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtWebKit.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtWebKitWidgets.framework
>>> >> > pgAdmin4.app//Contents/Frameworks/QtWidgets.framework
>>> >> > pgAdmin4.app//Contents/MacOS
>>> >> > pgAdmin4.app//Contents/PlugIns
>>> >> > pgAdmin4.app//Contents/PlugIns/platforms
>>> >> > pgAdmin4.app//Contents/Resources
>>> >> > pgAdmin4.app//Contents/Resources/venv
>>> >> > pgAdmin4.app//Contents/Resources/web
>>> >> > ---
>>> >> >
>>> >> > pgadmin4-fixpath-mac.patch - This is for runtime/Server.cpp to fix
>>> the
>>> >> > path
>>> >> > where the runtime looks for web application path in app bundle.
>>> >> >
>>> >> >
>>> >> > Kindly review and suggest the changes required. Thanks.
>>> >> >
>>> >> > --
>>> >> > Sandeep Thakkar
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Dave Page
>>> >> Blog: http://pgsnake.blogspot.com
>>> >> Twitter: @pgsnake
>>> >>
>>> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >> The Enterprise PostgreSQL Company
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Sandeep Thakkar
>>> >
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Sandeep Thakkar
>
>

--
Sandeep Thakkar

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-05-18 14:11:26 pgAdmin 4 commit: Updated index page.
Previous Message Murtuza Zabuawala 2016-05-18 11:13:06 Re: [PATCH] Tables node (pgAdmin4)