Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0SfX-0003vH-IL for pgadmin-hackers@arkaria.postgresql.org; Mon, 26 Mar 2018 14:00:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0SfW-0003fz-Ci for pgadmin-hackers@arkaria.postgresql.org; Mon, 26 Mar 2018 14:00:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0SfW-0003fg-2G for pgadmin-hackers@lists.postgresql.org; Mon, 26 Mar 2018 14:00:14 +0000 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f0SfP-0006f8-Cv for pgadmin-hackers@postgresql.org; Mon, 26 Mar 2018 14:00:13 +0000 Received: by mail-it0-x22b.google.com with SMTP id y20-v6so10874571itc.5 for ; Mon, 26 Mar 2018 07:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uW0y/iwCTcE4cVfg8doj5k0s5TKNtsgjSoEffN7WNCY=; b=DZ6sg9Bk3H2dwoGaHTOJD0P5JEkvJ/pSU1e5s7RLgvIPhskjMpGvos/aY28jLIBqnY +4N7BUk/Pf4VKPtX8vdaaNdzG9TzuhueBaQMNQdEp5XKsdM1EXwsvJ9uafpXB+y7dqhv DIi0YEnGEiFweSvIHLP/PAL5u9DGTXAWMa0cls/UlVp3m21afo2E2bFgLhhxy6Xk3Wqp gC8CtcgfkzYE60p5WeFz+N6RtDw/GFQj7Eh+8QV1XLZiKXzeRWjhBKGnj8D+JYjNEWa3 5cQ/Y3j5Br+zxLcBqb1t3/fcFqvnmwoI2bUDIEUtHFVHxbRc27t039H7nI9CUS3xKl0q oq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uW0y/iwCTcE4cVfg8doj5k0s5TKNtsgjSoEffN7WNCY=; b=ReDq0IKheR5nrpdhUXbzhDV83ZL/hyfsyHJqAgGuHjz4Ioyfz3V98xRJkMPDvX1g+3 Wsd7f2l+D560BXTg7HC/cjn4l+7AmMwxMMq8MpLkZQLOcvF3Zlrp+jXIQTYHcWihgBiB NhtGHL0OceNjpbBn1Dz/o1YnFaRg0zhJ0NhRHpsWfcTaYS2PbJ+Z8ai7TdTb1HMZGXYg Yi0SFpgIwcvPFgZGTJK6/TdkCa+jLicjRCijrZ5wBIV28WNTU0SqIzrso33aO6XtAcoe 6cNx5hxQ5F8Q3xrCWCIyN7bjYjpzP8/61Olgg8tIrFAJylpjN131oHwtUQQibsp+VRbU BwkQ== X-Gm-Message-State: AElRT7HujEknAd8TAcayXDApMhqUIZd+F5KoDHrwO/38U4+lDQ5MCyWx 0lDctIJQtBNoSwp7mpIWKkKw/cv+a093TlQBoyX0wg== X-Google-Smtp-Source: AG47ELuIRGXsL5NshhmTPt/W9LNg5sV8aXTuVFPsk/dD0IfDTKU6nK2YXMwJ6NrRKkmeCXHCpCCum/v/r/vpaXghpS8= X-Received: by 2002:a24:c281:: with SMTP id i123-v6mr20858160itg.146.1522072804339; Mon, 26 Mar 2018 07:00:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Mon, 26 Mar 2018 13:59:53 +0000 Message-ID: Subject: Re: v3.0 release on hold To: Akshay Joshi Cc: Dave Page , pgadmin-hackers , Murtuza Zabuawala , Khushboo Vashi , Syed Fahar Abbas , =?UTF-8?B?RGV2cmltIEfDnE5Ew5xa?= Content-Type: multipart/alternative; boundary="000000000000d3507205685130b0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d3507205685130b0 Content-Type: text/plain; charset="UTF-8" Hi Hackers, Did we had any progress on the things that are holding the release back? Thanks Joao On Fri, Mar 23, 2018 at 9:26 AM Akshay Joshi wrote: > Hi Dave > > On Fri, Mar 23, 2018 at 11:06 AM, Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> >> >> On Thu, Mar 22, 2018 at 10:24 PM, Dave Page wrote: >> >>> Hi >>> >>> On Thu, Mar 22, 2018 at 1:13 PM, Dave Page wrote: >>> >>>> >>>>>>>> 2) Starting a second instance of the app bundle on Mac doesn't >>>>>>>> always open a new pgAdmin window as it should. It works fine in the >>>>>>>> debugger, or if you start the app with a command like: >>>>>>>> "/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". It doesn't work if >>>>>>>> you double-click the appbundle or use a command like "open >>>>>>>> /Applications/pgAdmin\ 4.app" >>>>>>>> >>>>>>> >>>>>>> Still working on this, not found any solution yet. >>>>>>> >>>>>> >>>>> Not able to figure out the solution yet. I have tried to >>>>> debug the code, but every time it will create a new instance(tray icon). Do >>>>> I need to look into the code or something related to app bundle may be some >>>>> settings in info.plist or any other pointer? >>>>> >>>> >>>> Have a look at the code around line 85 an onwards of pgAdmin4.cpp. It >>>> creates the shared memory interlock (and log/address files) based on the >>>> current username and a hash of the executable name/path. My suspicion is >>>> that the path hash (which is calculated from argv[0] on line 72) is for >>>> some reason getting a different value each time when launched via the >>>> Finder or "open", thus the interlock is failing. >>>> >>> >>> So I took a look at this, and it seems the code is just fine. What is >>> happening is that macOS only allows a single instance of an app to run at >>> once. Whilst that is what we want of course, macOS is causing the new >>> instance to exit before it has a change to open a new pgAdmin window. Using >>> "open -n ..." or calling the embedded executable directly resolves that >>> issue. >>> >>> So, there's another challenge to figure out... :-( >>> >> >> OK. Will try to figure that out. >> > > After googled I have tried following solution: > > 1. Create a shell script "launch.sh" and kept it in "/Applications/pgAdmin\ > 4.app/Contents/MacOS" folder. That shell script will contain the command > "open -n /Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". Change > the "CFBundleExecutable" parameter of Info.plist from "pgAdmin4" to > "launch.sh". It didn't work, shall script didn't launch. > 2. Create one apple script with command like "do shell execute "/Applications/pgAdmin\ > 4.app", compile it and save it as Application. It create the app bundle, > copy contents of pgAdmin4 app to this newly created application. But the > problem is it opens and having icon in the dock and no response on double > click (second time). > > Will continue to figure out some other solutions tomorrow. > >> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >> >> >> >> -- >> *Akshay Joshi* >> >> *Sr. Software Architect * >> >> >> >> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246 >> <+91%2097678%2088246>* >> > > > > -- > *Akshay Joshi* > > *Sr. Software Architect * > > > > *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246 > <+91%2097678%2088246>* > --000000000000d3507205685130b0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

Did we had any progress on = the things that are holding the release back?

Than= ks
Joao

On Fri, Mar 23, 2018 at 9:26 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Dave

On Fri, Mar 23, 201= 8 at 11:06 AM, Akshay Joshi <akshay.joshi@enterprisedb.com= > wrote:

<= div class=3D"gmail_extra">
On Thu, Mar = 22, 2018 at 10:24 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Mar 22, 2018 at 1:13 P= M, Dave Page <dpage@pgadmin.org> wrote:

2) Starting a second instance of the app = bundle on Mac doesn't always open a new pgAdmin window as it should. It= works fine in the debugger, or if you start the app with a command like: &= quot;/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". It doesn&#= 39;t work if you double-click the appbundle or use a command like "ope= n /Applications/pgAdmin\ 4.app"

=C2=A0 Still working on this, not found any solution yet.
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Not able to figure = out the solution yet. I have tried to debug the code, but every time it wil= l create a new instance(tray icon). Do I need to look into the code or some= thing related to app bundle may be some settings in info.plist or any other= pointer?=C2=A0

<= div>Have a look at the code around line 85 an onwards of pgAdmin4.cpp. It c= reates the shared memory interlock (and log/address files) based on the cur= rent username and a hash of the executable name/path. My suspicion is that = the path hash (which is calculated from argv[0] on line 72) is for some rea= son getting a different value each time when launched via the Finder or &qu= ot;open", thus the interlock is failing.

So I took a look at this, and it seems th= e code is just fine. What is happening is that macOS only allows a single i= nstance of an app to run at once. Whilst that is what we want of course, ma= cOS is causing the new instance to exit before it has a change to open a ne= w pgAdmin window. Using "open -n ..." or calling the embedded exe= cutable directly resolves that issue.

So, there= 9;s another challenge to figure out... :-(=C2=A0

=C2=A0 =C2=A0 OK. Will try to figure t= hat out.=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 After googled I have tried follow= ing solution:=C2=A0
  1. Create a shell script "launch.sh= " and kept it in=C2=A0 "/Applications/p= gAdmin\ 4.app/Contents/MacOS" folder. That shell script will contain t= he command "open -n=C2=A0/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". C= hange the "CFBundleExecutable" parameter of Info.plist from "= ;pgAdmin4" to "launch.sh".=C2=A0 It didn't work, shall s= cript didn't launch.
  2. Create one apple script with command like "do = shell execute "/Applications/pgAdmin\ 4.app&= quot;, compile it and save it as Application. It create the app bundle, cop= y contents of pgAdmin4 app to this newly created application. But the probl= em is it opens and having icon in the dock and no response on double click = (second time).
=C2=A0 =C2=A0 =C2=A0 =C2=A0Wil= l continue to figure out some other solutions tomorrow.=C2=A0 =C2=A0 =C2=A0= =C2=A0=C2=A0
<= span>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
=
Akshay Joshi
Sr. Software Architect


=


--
<= div>
Akshay Joshi
Sr. Software Architect

=

=
--000000000000d3507205685130b0--