Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGcqh-003lZh-7U for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Nov 2024 11:38:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tGcqf-004fH9-Kl for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Nov 2024 11:38:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGcqf-004fH1-9v for pgadmin-hackers@lists.postgresql.org; Thu, 28 Nov 2024 11:38:17 +0000 Received: from mail-oo1-xc2a.google.com ([2607:f8b0:4864:20::c2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGcqX-004UJJ-KK for pgadmin-hackers@postgresql.org; Thu, 28 Nov 2024 11:38:15 +0000 Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-5f1e573f35bso291213eaf.2 for ; Thu, 28 Nov 2024 03:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1732793887; x=1733398687; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=p7fK7px7o0n6vDe/3PI/PZvze5aTQ5V12ifnKREKUio=; b=YIaqAE1+LjGRzIAifewIAsgxjI1756MEcPlNL1uRAfVDNGzLnNd9onVP2pjYixQZOX hYIfxg6gesfo6xyUSo7EqSbNuCZ5wUdWGlTIO+dcEujKCEg2c7e4ErixI4U0Kc0Yu+76 VDuMpymV0ZeOW3o1P9s3bo+FYPy35NAU9V4d2Eqk08G99lAGrBADt5aUnY/u2NZ4/YSS VICJyxpur7zSTNhU3+GtHL18W67MAPOca2cjdiZf81xT4xBprjWCxcSxehhC9gdgb1g1 D/c3Zq5OG68PedHpwdZqG8C1kb5Pr2zx/ugv1Alxq+PPoXlgvjUf73r/CM8xDHKLf8EF M5gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732793887; x=1733398687; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p7fK7px7o0n6vDe/3PI/PZvze5aTQ5V12ifnKREKUio=; b=ICEMYEWkyhgxDLp80g5xImWWhsP2ffULGnYV6CATECd6JFJ2lLe08f3qoexrH4Mg+U QzjLeMp8bgUbQh2AvsrnQRZVHPdR4LD836mR3O4rBLqasQ1T7ZZeeXscthmXt6RbTjjL q272t93d+sF87xNpwz0aQhJ9H2loGulcwNM9X814FXlczccjsZwHKHbt7DyE9sIM0Bv5 8PdLTJ2BlHrNABfrCCEB1RFvC4mNUW6a3WwE/K5u88dPEM2RhK767LKQ83KPs86X6QX4 jd5BEeGOCs8fwyPGhb39fds/3yImkDbmD0rCmN1oTct61pBDFk8QWgbH9oosZ3g7mgJI p6lg== X-Gm-Message-State: AOJu0Yzh7NRC0H/+wyt1OKgOuLOdKhcHCr9vBA2BwXcDOH8XIku/tH8K +qxY8XuMdqjnGT06hSEimbMZugN4pDl3tMH0w2OsODc4DeY0pf0z/0q/VmmnU9WNftmDYaCzdM3 NrWMyXarVW1I7BUsVngM2rJabX6HRgFCou28PD8fpAR4BhUc= X-Gm-Gg: ASbGncv+3eUO0dddde0m9UFjaQM9HblxnVPIeHtjI7iTdC3BM0mzruoLg3CfwYNYT60 zyGYTVQOMXF7SjtRJx86H3E7Puj5V4pgUKN5lKV1nqLGfA5xEAUezXhLmsP9JTS4= X-Google-Smtp-Source: AGHT+IEhLFZBwaMMg38uf+5RxRHom0kuDgASB9qj7dj8r1tgdJMyswieEOmtkLchEeZiRMS2hU9i4ROZA1BfYIvvduM= X-Received: by 2002:a4a:ee0f:0:b0:5eb:d1ac:21e5 with SMTP id 006d021491bc7-5f209fc7947mr5342484eaf.0.1732793886880; Thu, 28 Nov 2024 03:38:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Anil Sahoo Date: Thu, 28 Nov 2024 17:07:30 +0530 Message-ID: Subject: Re: Require suggestions on feature #5766 To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000018cd160627f78431" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000018cd160627f78431 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, I have mentioned the requirements for the deployment server to add auto-update in macOs systems. The frontend will request deployment server with Accept: application/json and the current version of pgAdmin and the architecture of macOs system and server will check if any update is available or not, if update available then server responds with status code 200 OK and sends the below format JSON response in the body. Example of deployment url: https://your-deployment-url.com/update/darwin/8.12 Example of response: { "url": "https://your-deployment-url.com/your-app-8.13-darwin.zip", "name": "8.13", "notes": "Theses are some release notes innit", "pub_date": "2024-09-18T12:29:53+01:00" } Here url is mandatory and others are optional. Squirrel will request "url" with Accept: application/zip and only supports installing ZIP updates. "pub_date" if present must be formatted according to ISO 8601. If no update is required, the server must respond with a status code of 204 No Content. And for Windows systems, Electron recommended to use electron-winstaller or electron forge as using these packages will use Squirrel.Windows for creating windows installer and that will help in triggering custom launch events and that can be handled by our application for proper setup. But what I think is, as we are using Inno setup for creating our Windows installer, we can try updating our application with existing way only, if something does not work then we have the option to change our installer creation process. Thanks, Anil On Wed, Nov 27, 2024 at 10:34=E2=80=AFPM Dave Page wrot= e: > Hi! > > On Wed, 27 Nov 2024 at 07:58, Anil Sahoo > wrote: > >> Hi Dave/Team, >> >> I am currently working on the auto-update feature of pgAdmin 4 desktop >> application, #5766 = . >> >> >> As we are using Electron for shipping our desktop application, I have >> gone through some possible ways we can implement the auto update of the >> app. >> >> I found 2 most popular ways, that are >> >> 1. *Use builtin electron=E2=80=99s autoUpdater* (Uses the Squirrel fr= amework >> & Available for Mac, Windows) >> 2. *Use electron-builder and electron-updater packages *(Available >> for Mac, Windows and Linux systems) >> >> *Linux systems:* >> >> >> - Builtin Electron=E2=80=99s autoUpdater support is not available. >> - electron-builder and electron-updater can be used, but need to >> change the whole build process. Also most apps like VS code, Chrome, = etc >> does not support auto-update of apps on linux systems. >> >> We should not try to auto-update on Linux, because we're using the > platform native packaging and auto-updating will cause nasty problems wit= h > that. > > >> *Mac systems:* >> >> - We can use the builtin Electron=E2=80=99s autoUpdater to add auto-u= pdate >> feature to macOs systems, It is simple and easy to configure. We need= a >> minor modification in our build process i.e. as we are supporting Int= el and >> Apple silicon chips, deployment url will have 2 zip files and each zi= p file >> will hold the build for arm64 and x86_64. >> - electron-builder and electron-updater can be used. With this, we >> have to change the whole build process. >> >> *Windows systems:* >> >> - We can use the builtin Electron=E2=80=99s autoUpdater to add auto-u= pdate >> feature to windows systems, Here also we need to change our build pro= cess. >> Electron=E2=80=99s docs recommend using electron-winstaller or electr= on forge to >> create the installer and some extra changes are needed in the deploym= ent >> server. >> - electron-builder and electron-updater can be used. With this, we >> have to change the whole build process. >> >> As Electron's builtin autoUpdater is easy to use so for now we can move >> with the auto-update of the pgAdmin app on macOs systems as it requires >> minimal changes. >> > > That certainly sounds like the better option. A couple of questions: > > - What changes are required in the deployment server? We are very limited > here, as we deploy through the postgresql.org infrastructure. > > - Whilst the docs (for Windows) recommend using electron-winstaller or > electron forge, can you confirm one of them *must* be used? Our current > installer is pretty standard in the way it works, so I'm curious to know = if > we would actually need to change technology for a specific reason. > > Thanks! > > -- > Dave Page > pgAdmin: https://www.pgadmin.org > PostgreSQL: https://www.postgresql.org > pgEdge: https://www.pgedge.com > > --=20 *Anil Sahoo* Software Development Engineer II LinkedIn || Blog || *GitHub * enterprisedb.com --00000000000018cd160627f78431 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dave,

I have mentioned the req= uirements for the deployment server to add auto-update in macOs systems.


The frontend will reques= t deployment server with Accept: application/json and the current version o= f pgAdmin and the architecture=C2=A0of macOs system and server will check i= f any update is available or not, if update available then server responds = with status code 200 OK=C2=A0 and sends the below format JSON = response in the body.


Example of depl= oyment url: = https://your-deployment-url.com/update/darwin/8.12


=

Example = of response:

{
=C2=A0 =C2=A0 "= ;url": "https://your-deployment-url.com/your-app-8.13-darwin.zip&qu= ot;,
=C2=A0 =C2=A0 "name": "8.13",
=C2=A0 =C2=A0 = "notes": "Theses are some release notes innit",
=C2= =A0 =C2=A0 "pub_date": "2024-09-18T12:29:53+01:00"
}=


Here url is mandatory an= d others are optional.

Squirrel will request &q= uot;url" with=C2=A0Accept: application/zip=C2=A0and only supports inst= alling ZIP updates.

"pub_date" if = present must be formatted according to ISO 8601.


If no update is required= , the server must respond with a status code of=C2=A0204 No Content.



And for Windows systems,= Electron recommended to use electron-winstaller or electron forge as using= these packages will use Squirrel.Windows for creating windows installer an= d that will help in triggering custom launch events and that can be handled= by our application for proper setup. But what I think is, as we are using = Inno setup for creating our Windows installer, we can try updating our appl= ication with existing way only, if something does not work then we have the= option to change our installer creation process.


Thanks,

= Anil


On Wed, Nov 27, 2024 at 10:34=E2=80=AFPM Dave Page <dpage@pgadmin.org>= ; wrote:
Hi!

On Wed, 27 Nov 2024 at 07:58, Anil Sahoo <anil.sahoo@enterprised= b.com> wrote:

Hi Dave/Team,

I am currently working on the auto-up= date feature of pgAdmin 4 desktop application, #5766.


As we are using Electron= for shipping our desktop application, I have gone through some possible wa= ys we can implement the auto update of the app.

I found 2 most popular ways, that are

  1. Use builtin electron= =E2=80=99s autoUpdater (Uses the Squirrel framework & Available for= Mac, Windows)
  2. Use electron-builder= and electron-updater packages=C2=A0(Available for Mac, Windows and Lin= ux systems)

Linux systems:

  • Builtin Elec= tron=E2=80=99s autoUpdater support is not available.
  • electron-build= er and electron-updater can be used, but need to change the whole build pro= cess. Also most apps like VS code, Chrome, etc does not support auto-update= of apps on linux systems.=C2=A0
We should not try to auto-update on Linux, because we'r= e using the platform native packaging and auto-updating will cause nasty pr= oblems with that.
=C2=A0

Mac systems:

<= ul>
  • We can use the builtin Electron=E2=80=99s autoUpdater to add auto-update= feature to macOs systems, It is simple and easy to configure. We need a mi= nor modification in our build process i.e. as we are supporting Intel and A= pple silicon chips, deployment url will have 2 zip files and each zip file = will hold the build for arm64 and x86_64.
  • electron-builder a= nd electron-updater can be used. With this, we have to change the whole bui= ld process.=C2=A0
  • Windows systems:<= /p>

    • We can use the builtin Electron=E2=80=99s autoUpdater to add auto-up= date feature to windows systems, Here also we need to change our build proc= ess. Electron=E2=80=99s docs recommend using electron-winstaller or electro= n forge to create the installer and some extra changes are needed in the de= ployment server.
    • electron-builder and electron-updater can b= e used. With this, we have to change the whole build process.=C2=A0

    As Electron's builti= n autoUpdater is easy to use so for now we can move with the auto-update of= the pgAdmin app on macOs systems as it requires minimal changes.

    =

    That certainly sounds like the= better option. A couple of questions:

    - What chan= ges are required in the deployment server? We are very limited here, as we = deploy through the post= gresql.org infrastructure.

    - Whilst the docs (= for Windows) recommend using electron-winstaller or electron forge, can you= confirm one of them *must* be used? Our current installer is pretty standa= rd in the way it works, so I'm curious to know if we would actually nee= d to change technology for a specific reason.

    Than= ks!
    =C2=A0
    -- <= /span>


    --


    =

    Anil Sahoo

    = Software Developmen= t Engineer II

    LinkedIn=C2=A0|| Blog=C2= =A0|| GitHub


    enterprisedb.com

    --00000000000018cd160627f78431--