Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8SKD-0001bz-Qc for pgadmin-hackers@arkaria.postgresql.org; Thu, 02 Jun 2016 13:06:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b8SKD-0006Tj-DU for pgadmin-hackers@arkaria.postgresql.org; Thu, 02 Jun 2016 13:06:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b8SJz-00060T-Bi for pgadmin-hackers@postgresql.org; Thu, 02 Jun 2016 13:05:59 +0000 Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b8SJv-00079v-NV for pgadmin-hackers@postgresql.org; Thu, 02 Jun 2016 13:05:57 +0000 Received: by mail-qt0-x235.google.com with SMTP id d51so3855748qte.2 for ; Thu, 02 Jun 2016 06:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=5/LNuommLOh2orxmlguQ0AeXYuNp6qxr+lbJ+OtG37E=; b=GvaMspyQAGFnELG5pqK9xHUlc1gzu/AXHGp0PMsaJT2L4xRvEeFwBuFjjaI3IA4yl3 T8RN0a69tuOiMPHbQX78ERrrWhifFZzAmebX7g11QKcdtKTEJuDUAFFmeSdqWR/55Phl Ufx6JHi7ASrQjETvVHEY0ZMphqzdhjao03Ud6aQDlNHjiELS7TnxmlMDM/QciAmvsEiB Bz2SXlKCiHUHwWHK/jH3fbkQPUMzympktRYWhYxdh9oM7xA0FLK7XP075cY8/Ax5tpXs 7Ms98gcNkExV7DvxmH/G8IkclNGSlYaft2I40c0xT05JVpXFKnGNiuk85tN9x24D+47y blcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=5/LNuommLOh2orxmlguQ0AeXYuNp6qxr+lbJ+OtG37E=; b=gYcIERjS3SGqbN0mxnRsObo6gHAS2SQLPmDOx7D1d3xyhcXVzQ+M1wm8ZATTDD7gPu r+loq3MPjYJ3+Bych65frmWbF7H9+p7buFsUYWNQFa044oeOr0wqZRamO3+6PhHMknIE b37N65J2uaz81jMVGWc8skIoKGpa1aluTvDkrwJiGpaQ7yNlUeMv/MqNXojprcyzMRA9 T3lXzW8j9zxkSQVn4Fv9T8fPQtR2TRK89gHE4zIXwJSCo0mu1YZ7ASF+sGhy+PwWCLs5 DwETld3bj/kiHu0gGkZVffILfEoeOuZJA3aAVLTiMXuj2flsYQSH1IwX8w6kATWxHZx8 3laA== X-Gm-Message-State: ALyK8tK5+nnlyjqLbd4tTPHSlDQW1kW4BQVh0yBxm0XOcr29YBMOcQTB82IkYGtR50aMKStOn9uqi4IollkXDoyR MIME-Version: 1.0 X-Received: by 10.237.51.196 with SMTP id v62mr9061033qtd.101.1464872754921; Thu, 02 Jun 2016 06:05:54 -0700 (PDT) Received: by 10.140.101.198 with HTTP; Thu, 2 Jun 2016 06:05:54 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Jun 2016 18:35:54 +0530 Message-ID: Subject: Re: Patch for pgAdmin4 package on Mac OS X From: Sandeep Thakkar To: Dave Page Cc: pgadmin-hackers , Hamid Quddus Content-Type: multipart/alternative; boundary=94eb2c0c76c832e04805344b44e6 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --94eb2c0c76c832e04805344b44e6 Content-Type: text/plain; charset=UTF-8 Thanks Dave! I saw the runtime code and observed one change (prepend -> append) . Was it not saving the location because of this? On Thu, Jun 2, 2016 at 6:27 PM, Dave Page wrote: > Thanks - applied with some tweaks to the runtime code (i.e. not saving > the location of the venv in the appbundle). > > On Tue, May 31, 2016 at 6:37 PM, Sandeep Thakkar > wrote: > > Hi Dave, > > > > > > On Tue, May 31, 2016 at 9:29 PM, Dave Page wrote: > >> > >> Hi, > >> > >> On the first run, I get: > >> > >> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin > >> 4.app > >> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory > >> Cleaning up > >> Copying data into temporary directory > >> cp: ./../mac-build/pgAdmin 4.app: No such file or directory > >> create-dmg.sh failed > >> make: *** [appbundle] Error 1 > >> > >> If I run it again, I get: > >> > >> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin > >> 4.app > >> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory > >> Directory ./pgadmin4-1.0-dev.dmg.src already exists. Please delete it > >> manually. > >> create-dmg.sh failed > >> make: *** [appbundle] Error 1 > >> > >> If I manually create $SRC/dist, it's much happier. > >> > > I have used variable for dist. It will create the directory if doesn't > > exist. The clean-appbunde will also remove the .src directory in dist > just > > in case it is present. > > > >> Other issues: > >> > >> - Your changes to the runtime don't seem to help. I've been staring at > >> the code for an hour or so now, and I can't see the issue though. We > >> may need some fresh eyes. > >> > > yeah, I also spent more time to see the code and test it. Infact, I could > > hardly reproduce it 1 or 2 times. > > > >> > >> - pkg/mac/create-dmg.sh is mixing upper and lower case variable names > >> and with/without _, e.g. $dmgname vs $DMG_NAME > >> > > not sure, why I used lower case, I prefer upper case always. I have made > the > > changes now to use upper case for all variables. > > > >> > >> - Shoudn't DMG_NAME be initialised to `grep "^APP_NAME" web/config.py > >> | cut -d"=" -f2 | sed "s/'//g"` ? > >> > > yes, I have used the couple of more variables that gives proper > > understanding. > > > > Thanks! I have attached the updated patch. (runtime changes remains > same). > >> > >> > >> On Tue, May 31, 2016 at 1:19 PM, Sandeep Thakkar > >> wrote: > >> > Somehow the patch skipped the Makefile changes. Attached is the > updated > >> > patch. > >> > > >> > On Mon, May 30, 2016 at 6:00 PM, Sandeep Thakkar > >> > wrote: > >> >> > >> >> Thanks. I have fixed all the issues. > >> >> > >> >> Regarding the app not running from within the DMG for the first > time, I > >> >> was unable to reproduce it on Zilan's machine which didn't have the > >> >> development env. On Murali's machine, it was reproducible for 1 time > >> >> after > >> >> couple of attempts. > >> >> > >> >> So, I just added the sync statement after settings the pythonpath > value > >> >> in > >> >> the settings. May be this will resolve the issue. Please confirm. > >> >> settings.sync(); > >> >> > >> >> Attached is the updated patch. Thanks. > >> >> > >> >> On Fri, May 27, 2016 at 9:28 PM, Dave Page > wrote: > >> >>> > >> >>> On Fri, May 27, 2016 at 4:48 PM, Dave Page > wrote: > >> >>> > > >> >>> > > >> >>> > On Fri, May 27, 2016 at 1:11 PM, Sandeep Thakkar > >> >>> > wrote: > >> >>> >> > >> >>> >> Sure. Thanks. > >> >>> >> > >> >>> >> There is a typo in pkg/mac/build.sh. i.e > >> >>> >> > >> >>> >> s/HTML_HELP/HELP_PATH/ > >> >>> >> > >> >>> >> > >> >>> >> On Fri, May 27, 2016 at 5:26 PM, Dave Page > >> >>> >> wrote: > >> >>> >>> > >> >>> >>> Not entirely - we definitely need to improve it. I'll review the > >> >>> >>> code > >> >>> >>> as > >> >>> >>> it is now though. > >> >>> > > >> >>> > > >> >>> > OK, review time :-) > >> >>> > > >> >>> > - The appbundle name should be created from APP_NAME.app in > >> >>> > config.py, > >> >>> > e.g. > >> >>> > 'pgAdmin 4.app' > >> >>> > > >> >>> > - The DMG name should be created from > >> >>> > to_lower(remove_spaces(APP_NAME-APP_VERSION)) in config.py, e.g. > >> >>> > pgadmin4-1.0-dev.dmg > >> >>> > > >> >>> > - Use #ifdef Q_OS_MAC in the QT code for Mac-specific code. > There's > >> >>> > no > >> >>> > need > >> >>> > to define another macro. > >> >>> > > >> >>> > - Please add "MINIFY_HTML = False" to config_local.py (and have > >> >>> > Paresh > >> >>> > do > >> >>> > the same on his packages). This works around a code issue with the > >> >>> > docs > >> >>> > that > >> >>> > I'll log a bug for. > >> >>> > > >> >>> > - In testing, I found that running the app from within the DMG > >> >>> > doesn't > >> >>> > seem > >> >>> > to work the first time - it prompts for the path, then exits. > Once I > >> >>> > save > >> >>> > the path it offers, it's fine on subsequent runs. > >> >>> > > >> >>> > - Once copied to my laptop, I saw the same issue as above. > >> >>> > > >> >>> > Once these issues are resolved, I think we're good to commit. > >> >>> > >> >>> Oh, a couple more things: > >> >>> > >> >>> - There should not be a copy of the app bundle in dist/ following > the > >> >>> build. Only the dmg should be there. > >> >>> > >> >>> - I think mac-build/ should be removed following a successful build, > >> >>> rather than waiting for make clean (please talk to Paresh - his code > >> >>> should do the same). > >> >>> > >> >>> -- > >> >>> Dave Page > >> >>> Blog: http://pgsnake.blogspot.com > >> >>> Twitter: @pgsnake > >> >>> > >> >>> EnterpriseDB UK: http://www.enterprisedb.com > >> >>> The Enterprise PostgreSQL Company > >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> Sandeep Thakkar > >> >> > >> > > >> > > >> > > >> > -- > >> > 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 --94eb2c0c76c832e04805344b44e6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Dave!

I saw the runtime code and= observed one change (prepend -> append) . Was it not saving the locatio= n because of this?

On Thu, Jun 2, 2016 at 6:27 PM, Dave Page <dpage@pgadmin.org><= /span> wrote:
Thanks - applied with some = tweaks to the runtime code (i.e. not saving
the location of the venv in the appbundle).

On Tue, May 31, 2016 at 6:37 PM, Sandeep Thakkar
<sandeep.thakkar@enterprisedb.com> wrote:
> Hi Dave,
>
>
> On Tue, May 31, 2016 at 9:29 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi,
>>
>> On the first run, I get:
>>
>> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/p= gAdmin
>> 4.app
>> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directo= ry
>> Cleaning up
>> Copying data into temporary directory
>> cp: ./../mac-build/pgAdmin 4.app: No such file or directory
>> create-dmg.sh failed
>> make: *** [appbundle] Error 1
>>
>> If I run it again, I get:
>>
>> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/p= gAdmin
>> 4.app
>> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directo= ry
>> Directory ./pgadmin4-1.0-dev.dmg.src already exists. Please delete= it
>> manually.
>> create-dmg.sh failed
>> make: *** [appbundle] Error 1
>>
>> If I manually create $SRC/dist, it's much happier.
>>
> I have used variable for dist. It will create the directory if doesn&#= 39;t
> exist. The clean-appbunde will also remove the .src directory in dist = just
> in case it is present.
>
>> Other issues:
>>
>> - Your changes to the runtime don't seem to help. I've bee= n staring at
>> the code for an hour or so now, and I can't see the issue thou= gh. We
>> may need some fresh eyes.
>>
> yeah, I also spent more time to see the code and test it. Infact, I co= uld
> hardly reproduce it 1 or 2 times.
>
>>
>> - pkg/mac/create-dmg.sh is mixing upper and lower case variable na= mes
>> and with/without _, e.g. $dmgname vs $DMG_NAME
>>
> not sure, why I used lower case, I prefer upper case always. I have ma= de the
> changes now to use upper case for all variables.
>
>>
>> - Shoudn't DMG_NAME be initialised to `grep "^APP_NAME&qu= ot; web/config.py
>> | cut -d"=3D" -f2 | sed "s/'//g"` ?
>>
> yes, I have used the couple of more variables that gives proper
> understanding.
>
> Thanks! I have attached the updated patch. (runtime changes remains sa= me).
>>
>>
>> On Tue, May 31, 2016 at 1:19 PM, Sandeep Thakkar
>> <sandeep.th= akkar@enterprisedb.com> wrote:
>> > Somehow the patch skipped the Makefile changes. Attached is t= he updated
>> > patch.
>> >
>> > On Mon, May 30, 2016 at 6:00 PM, Sandeep Thakkar
>> > <sande= ep.thakkar@enterprisedb.com> wrote:
>> >>
>> >> Thanks. I have fixed all the issues.
>> >>
>> >> Regarding the app not running from within the DMG for the= first time, I
>> >> was unable to reproduce it on Zilan's machine which d= idn't have the
>> >> development env. On Murali's machine, it was reproduc= ible for 1 time
>> >> after
>> >> couple of attempts.
>> >>
>> >> So, I just added the sync statement after settings the py= thonpath value
>> >> in
>> >> the settings. May be this will resolve the issue. Please = confirm.
>> >> settings.sync();
>> >>
>> >> Attached is the updated patch. Thanks.
>> >>
>> >> On Fri, May 27, 2016 at 9:28 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> On Fri, May 27, 2016 at 4:48 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>> >
>> >>> >
>> >>> > On Fri, May 27, 2016 at 1:11 PM, Sandeep Thakkar=
>> >>> > <sandeep.thakkar@enterprisedb.com> wrote:
>> >>> >>
>> >>> >> Sure. Thanks.
>> >>> >>
>> >>> >> There is a typo in pkg/mac/build.sh. i.e
>> >>> >>
>> >>> >> s/HTML_HELP/HELP_PATH/
>> >>> >>
>> >>> >>
>> >>> >> On Fri, May 27, 2016 at 5:26 PM, Dave Page &= lt;dpage@pgadmin.org>
>> >>> >> wrote:
>> >>> >>>
>> >>> >>> Not entirely - we definitely need to imp= rove it. I'll review the
>> >>> >>> code
>> >>> >>> as
>> >>> >>> it is now though.
>> >>> >
>> >>> >
>> >>> > OK, review time :-)
>> >>> >
>> >>> > - The appbundle name should be created from APP_= NAME.app in
>> >>> > config.py,
>> >>> > e.g.
>> >>> > 'pgAdmin 4.app'
>> >>> >
>> >>> > - The DMG name should be created from
>> >>> > to_lower(remove_spaces(APP_NAME-APP_VERSION)) in= config.py, e.g.
>> >>> > pgadmin4-1.0-dev.dmg
>> >>> >
>> >>> > - Use #ifdef Q_OS_MAC in the QT code for Mac-spe= cific code. There's
>> >>> > no
>> >>> > need
>> >>> > to define another macro.
>> >>> >
>> >>> > - Please add "MINIFY_HTML =3D False" t= o config_local.py (and have
>> >>> > Paresh
>> >>> > do
>> >>> > the same on his packages). This works around a c= ode issue with the
>> >>> > docs
>> >>> > that
>> >>> > I'll log a bug for.
>> >>> >
>> >>> > - In testing, I found that running the app from = within the DMG
>> >>> > doesn't
>> >>> > seem
>> >>> > to work the first time - it prompts for the path= , then exits. Once I
>> >>> > save
>> >>> > the path it offers, it's fine on subsequent = runs.
>> >>> >
>> >>> > - Once copied to my laptop, I saw the same issue= as above.
>> >>> >
>> >>> > Once these issues are resolved, I think we'r= e good to commit.
>> >>>
>> >>> Oh, a couple more things:
>> >>>
>> >>> - There should not be a copy of the app bundle in dis= t/ following the
>> >>> build. Only the dmg should be there.
>> >>>
>> >>> - I think mac-build/ should be removed following a su= ccessful build,
>> >>> rather than waiting for make clean (please talk to Pa= resh - his code
>> >>> should do the same).
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com >> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Sandeep Thakkar
>> >>
>> >
>> >
>> >
>> > --
>> > 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

--94eb2c0c76c832e04805344b44e6--