Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fT3jf-0006g9-Dn for pgadmin-hackers@arkaria.postgresql.org; Wed, 13 Jun 2018 11:14:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fT3je-0000LK-5i for pgadmin-hackers@arkaria.postgresql.org; Wed, 13 Jun 2018 11:14:42 +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 1fT3jd-0000L9-Px for pgadmin-hackers@lists.postgresql.org; Wed, 13 Jun 2018 11:14:42 +0000 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fT3jU-0003at-8R for pgadmin-hackers@postgresql.org; Wed, 13 Jun 2018 11:14:40 +0000 Received: by mail-wr0-x22f.google.com with SMTP id d2-v6so2299381wrm.10 for ; Wed, 13 Jun 2018 04:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=isi3uT0fZyZIExMwJhX5i9PAqIQfEvNrv4/pNaXepmw=; b=yMheiUDNslwjrs8C1lUG60mgk71FwC58RRtjsZan+EsoHX2ASVB+B2fq1hLS8fM2u8 Dn1cUrLL7bn1zuTA1vjIuwcrEIWDQfKz4wqrKmhj8kCHeQjrJn6W9VKTg1Xd0itAyM5+ 5hKg/hHms1l0Maj0X4MwhiOxLnFczAZ+RzbdsppeCKFnn6v17WQnIpqC4fJ4ZOlAmqpC wFi0/1gjAEHlqb3cKbXmUcmEFoaK7PszkwDMfgBhDhk/ivceSlDyScbl0LJlWb67qA8u hgEGZYLhVEyUPVsj0NyOTNWyNMtuk9ug/n14t/wI3jOEHzPPQsoPzJou6s1Zdqy7xCal d1yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=isi3uT0fZyZIExMwJhX5i9PAqIQfEvNrv4/pNaXepmw=; b=cNdueaCszKp+PLaIlhh6np4k5Lu2pvp7BV4NgXMHMtmBMpdC0M6SPsIWX9xrXZEquZ 5/wUUZvvjUvtPwRif1n4H4f3Tms/oowEZR1NM6vGyx5vAokVC6WVT+Ig0ODDoq4Wz+0e FnjzBzkEOn1mBSLOmwGlUBdylLr85WJwXz85aChg6YJHTXJd4AJeGp9sfh8kpXU0Spb9 8WW51dIp2Z17p9ou4DpJqpynTTt9+qyZhj+lqJ1V1YqRntJJKf2O7D9kwlDgqYHtxxhr RBzAreATzEZjnhlhtAKK/qiKjGS/AV7ZFez7hvSif2eAQjZdz7Lg/ady39YjxZiwbkSS YP/g== X-Gm-Message-State: APt69E0HcWgn7DJINucdnF3CVbECWDoYouW/qAlsMA5fJPEFdq54z8NN +g4xPDI8rrRjm0GDy3usjBuxwe/bgqOe8FECaL6qhQ== X-Google-Smtp-Source: ADUXVKKzv5inyMrnRp+6JFjDG0lqMtn6UyXMAJgvw9otiIejLZJoYwEBex/aOK9fP7VvjGevW6/IMJ6O4Z5qwDwiKPs= X-Received: by 2002:adf:f090:: with SMTP id n16-v6mr4046827wro.49.1528888470662; Wed, 13 Jun 2018 04:14:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:2907:0:0:0:0:0 with HTTP; Wed, 13 Jun 2018 04:14:29 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 13 Jun 2018 12:14:29 +0100 Message-ID: Subject: Re: [pgadmin][patch] Electron version 4.X To: Victoria Henry Cc: Joao De Almeida Pereira , pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000003201df056e84166d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000003201df056e84166d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Tue, Jun 12, 2018 at 8:04 PM, Victoria Henry wrote: > Hi Hackers, > > Attached is a revised patch with the following changes: > > - updated the README > - moved the build scripts to the pkg folder > - storing the out files in dist/arch/ > - fix the mac build so it no longer stalls on loading > > =E2=80=8B > > Here is a link to the updated mac binary: > https://storage.googleapis.com/pgadmin-binaries/pgAdmin- > 4.0.5-dev.darwin.zip > Looks good! I've pushed your most recent patch along with some minor tweaks to a new "electron" branch. The changes were: - Use "pgAdmin" on menus - Update the .gitignore file - Remove the existing runtime - add "macos-alias" to the package.json file I've also created a rough TODO list at https://redmine.postgresql.org/projects/pgadmin4/wiki/Electron_TODO_list to keep an eye on outstanding items. Please add anything you have. I intend to spend time on this as and when I can. Thanks! > > > Let us know what you think. > > Sincerely, > > Victoria && Joao > > On Mon, Jun 11, 2018 at 11:35 AM Dave Page wrote: > >> Hi >> >> On Fri, Jun 8, 2018 at 3:49 PM, Victoria Henry wrote= : >> >>> >>> >>> On Tue, Jun 5, 2018 at 12:28 PM Dave Page wrote: >>> >>>> Hi >>>> >>>> On Mon, Jun 4, 2018 at 10:27 PM, Joao De Almeida Pereira < >>>> jdealmeidapereira@pivotal.io> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Attached you can find the patch that introduces electron to our code >>>>> base. >>>>> >>>> Cool. FYI, I'd like to get this into rough shape and then push it to a >>>> dev branch for fine-tuning. I think it'll be easier to work that way. >>>> >>> Sure, you can create a dev branch and push this patch to it. >>> >>> Great. So here's my initial feedback: >>>> >>>> - The Mac build you provided doesn't work for me. It hangs on the >>>> loading screen. >>>> >>> Could we get some more information about the machine? Using the python >>> from the venv directory, are you able to run the app directly? >>> >>> cd /Applications/pgAdmin.app/Contents/Resources/app/ >>> venv/bin/python web/pgAdmin4.py >>> >>> =E2=80=8B >>> Do you get and error? >>> We are setting PGADMIN_PORT, PGADMIN_KEY and SERVER_MODE environment >>> variables prior to starting it. >>> >> >> Yes, I get: >> >> piranha:app dpage$ venv/bin/python web/pgAdmin4.py >> >> Could not find platform independent libraries >> >> Could not find platform dependent libraries >> >> Consider setting $PYTHONHOME to [:] >> >> Fatal Python error: Py_Initialize: unable to load the file system codec >> >> ModuleNotFoundError: No module named 'encodings' >> >> >> Current thread 0x00007fffe86993c0 (most recent call first): >> >> Abort trap: 6 >> >> >> >> >>> >>> >>>> >>>> >>> - A number of the changes are related to the naming of requirejs. I'd b= e >>>> inclined to pull that out into a separate patch and get it committed t= o >>>> master ASAP. >>>> >>> This change only makes sense in the Electron context. Neverthless fell >>> free to add it to master if you think it is relevant. >>> >>> >>>> - I think the build instructions need to be more generic (particularly >>>> on macOS). For example, I do not use HomeBrew (largely due to some nas= ty >>>> security issues they had in the past). I was able to mostly port the >>>> instructions and build script over to work using MacPorts (without PyE= nv) >>>> which actually turned out to be somewhat more simple than what's there= now. >>>> >>> Since we don't use MacPorts, we cannot provide installation instruction= s. >>> >> >> I wasn't asking you to provide MacPort instructions; I can do that. I wa= s >> saying that the basic outline of the instructions should be agnostic to = the >> package tools the user might choose; e.g. >> >> - Install python >> - Create a virtual environment using the --copies option called venv >> - Move the virtual environment to ... >> >> We can then include examples of how to do that with brew, macports etc. >> >> >>> >>> >>>> - I'm not sure what this is intended to do: "git checkout electron". >>>> Clearly that isn't correct. >>>> >>> That was the name of our development branch. It can be removed. >>> >> >> OK. >> >> >>> >>> >>>> >>>> - All new builds should be using Python 3.6. We need to deprecate 2.7 >>>> as there are some Unicode related issues that cannot be fixed in it. >>>> >>> For Windows, we are using 2.7 because of external library compilation >>> issues. Let us know if you are able to get around this or how to make >>> this work. >>> >> >> There are a couple of tricks if you're using Python 3.6. First, to >> compile Pycrypto you need to do something like: >> >> >> - set VCINSTALLDIR=3DC:\Program Files (x86)\Microsoft Visual Studio >> 14.0\VC >> - set CL=3D-FI"%VCINSTALLDIR%\INCLUDE\stdint.h" >> - (https://stackoverflow.com/questions/41843266/microsoft- >> windows-python-3-6-pycrypto-installation-error >> >> ) >> >> Beforehand. Then, edit Lib\site-packages\Crypto\Random\OSRNG\nt.py" and >> modify " *import winrandom*" to "*from . import winrandom*". >> >> As a sidenote, I use the VC++ 2015 Build Tools compiler from Microsoft, >> without installing any SDKs or Visual Studio. >> >> >>> >>> >>>> - I would like to see the new build code adapted to follow the existin= g >>>> conventions as much as reasonable, to avoid having to change build sys= tems >>>> or other processes/procedures that folks use. For example, build scrip= ts >>>> should be under pkg/, completed packages left in dist/, build staging = done >>>> in xxx-build directories rather than elsewhere. >>>> >>> That sounds reasonable. >>> >>> >>>> - It may be a result of my use of MacPorts, but I'm getting the >>>> following failure building: >>>> >>> >>>> yarn run v1.3.2 >>>> $ electron-forge make --platfrom=3Ddarwin --arch=3Dx64 --targets=3Ddmg >>>> =E2=9C=94 Checking your system >>>> =E2=9C=94 Resolving Forge Config >>>> We need to package your application before we can make it >>>> =E2=9C=94 Preparing to Package Application for arch: x64 >>>> =E2=A0=BC Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/venv/lib/ >>>> python3.6/site-packages/setuptools/command/launcher manifest.xml >>>> Compiling /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/venv/lib/python3.6/site-packages/s= etuptools/command/launcher >>>> manifest.xml resulted in a MIME type of application/xml, which we don'= t >>>> know how to handle >>>> =E2=A0=8B Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> browser/server_groups/servers/templates/servers/supported_servers.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/server_groups/servers/templates/servers/supported_servers.js: >>>> Unexpected token (6:7) >>>> =E2=A0=A6 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> browser/templates/browser/js/endpoints.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/templates/browser/js/endpoints.js: Unexpected token (5:6) >>>> Failed to compile file: /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/templates/browser/js/messages.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/templates/browser/js/messages.js: Unexpected token (37:1) >>>> Failed to compile file: /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/templates/browser/js/utils.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> browser/templates/browser/js/utils.js: Unexpected token (28:23) >>>> =E2=A0=8B Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> misc/file_manager/templates/file_manager/js/languages/en.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> misc/file_manager/templates/file_manager/js/languages/en.js: >>>> Unexpected token, expected ; (2:29) >>>> =E2=A0=8B Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> static/scss/_alert.scss >>>> Error: Undefined variable: "$color-green-3". >>>> on line 29 of /stdin >>>> >> background: $color-green-3; >>>> >>>> --------------^ >>>> >>>> =E2=A0=99 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> static/scss/_alertify.overrides.scss >>>> Error: ".ajs-message.ajs-error.ajs-visible" failed to @extend >>>> ".bg-red-1". >>>> The selector ".bg-red-1" was not found. >>>> Use "@extend .bg-red-1 !optional" if the extend should be able >>>> to fail. >>>> on line 164 of /stdin >>>> >> @extend .bg-red-1; >>>> >>>> ----------^ >>>> >>>> =E2=A0=B4 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> static/scss/sqleditor/_history.scss >>>> Error: Undefined variable: "$color-gray-3". >>>> on line 4 of /stdin >>>> >> border-bottom: 1px solid $color-gray-3; >>>> >>>> -----------------------------^ >>>> >>> We were also seeing these errors but they don't have any impact on the >>> compilation and should be addressed in the future (not in this patch) >>> >>> >>>> >>>> =E2=A0=87 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> templates/base.html >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/ >>>> templates/base.html:inline_1.js: Unexpected token (2:13) >>>> =E2=A0=B4 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> tools/templates/js/translations.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/tools/templates/js/tra= nslations.js: >>>> Unexpected token (2:10) >>>> =E2=A0=A6 Compiling ApplicationFailed to compile file: /var/folders/c6= / >>>> pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin- >>>> x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin= / >>>> tools/user_management/templates/user_management/js/current_user.js >>>> /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn >>>> /T/electron-packager/darwin-x64/pgAdmin-darwin-x64/ >>>> Electron.app/Contents/Resources/app/web/pgadmin/tools/user_management/ >>>> templates/user_management/js/current_user.js: Unexpected token (3:15) >>>> =E2=9C=94 Compiling Application >>>> =E2=9C=94 Preparing native dependencies >>>> =E2=9C=94 Packaging Application >>>> Making for the following targets: >>>> =E2=A0=8B Making for target: dmg - On platform: darwin - For arch: x64 >>>> An unhandled exception has occurred inside Forge: >>>> Cannot find module 'macos-alias' >>>> Error: Cannot find module 'macos-alias' >>>> >>> This may be related to using MacPorts or the way you installed the >>> dependencies. There was a bug with Electron and Node 10 so we had to u= se >>> to Node 8 with Yarn. >>> >> >> I'm using Node 8 as well. Let's figure out your build first and ensure w= e >> can get that working everywhere, then I'll try to figure out how to >> reproduce it. >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --0000000000003201df056e84166d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi


Looks good!<= /div>

I've pushed your most recent patch along with = some minor tweaks to a new "electron" branch. The changes were:

- Use "pgAdmin" on menus
- Upda= te the .gitignore file
- Remove the existing runtime
- = add "macos-alias" to the package.json file

I've also created a rough TODO list at=C2=A0https://redmin= e.postgresql.org/projects/pgadmin4/wiki/Electron_TODO_list to keep an e= ye on outstanding items. Please add anything you have.

=
I intend to spend time on this as and when I can.

=
Thanks!
=C2=A0


Let us know = what you think.

Sincerely,

Victoria && Joao

On Mon, Jun = 11, 2018 at 11:35 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, Jun 8, 2018 at 3:49 PM, Vict= oria Henry <vhenry@pivotal.io> wrote:


On Tue, Jun 5, 2018 at 12:28 PM Dave Page = <dpage@pgadmin.or= g> wrote:
Hi

On Mon, Jun 4, 2018 at 10:27 PM, Joao De Almeida Pereira <jd= ealmeidapereira@pivotal.io> wrote:

Hi Hackers,

Attached you can find the patch that intr= oduces electron to our code base.

Cool. FY= I, I'd like to get this into rough shape and then push it to a dev bran= ch for fine-tuning. I think it'll be easier to work that way.
Sure, you can create a dev branch an= d push this patch to it.

Great. So here's my initial feedback:
<= div>
- The Mac build you provided doesn't work for me. It= hangs on the loading screen.
Could we get some more information about the machine?=C2=A0 Using the py= thon from the venv directory, are you able to run the app directly?=C2=A0
cd /Applica=
tions/pgAdmin.app/Contents/Resources/app/=20
venv/bin/python web/pgAdmin4.py
=E2=80=8B
Do you get and error?
W= e are setting PGADMIN_PORT, PGADMIN_KEY and SERVER_MODE environment variabl= es prior to starting it.

= Yes, I get:

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">pi= ranha:app dpage$ venv/bin/python web/pgAdmin4.py

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Co= uld not find platform independent libraries <prefix>

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Co= uld not find platform dependent libraries <exec_prefix>

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Co= nsider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Fa= tal Python error: Py_Initialize: unable to load the file system codec

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Mo= duleNotFoundError: No module named 'encodings'


<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Cu= rrent thread 0x00007fffe86993c0 (most recent call first):

<= span class=3D"gmail-m_-2692400475197335223m_-7180074536367255040m_808580248= 8646687910gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">Ab= ort trap: 6



=C2=A0
=C2= =A0
=C2=A0
<= div>
- A number of the changes are related to the naming of requi= rejs. I'd be inclined to pull that out into a separate patch and get it= committed to master ASAP.
= This change only makes sense in the Electron context. Neverthless fell free= to add it to master if you think it is relevant.


- I thin= k the build instructions need to be more generic (particularly on macOS). F= or example, I do not use HomeBrew (largely due to some nasty security issue= s they had in the past). I was able to mostly port the instructions and bui= ld script over to work using MacPorts (without PyEnv) which actually turned= out to be somewhat more simple than what's there now.
<= /div>
Since we don't use MacPorts, we can= not provide installation instructions.
<= br>
I wasn't asking you to provide MacPort instructions; I ca= n do that. I was saying that the basic outline of the instructions should b= e agnostic to the package tools the user might choose; e.g.

<= /div>
- Install python
- Create a virtual environment using t= he --copies option called venv
- Move the virtual environment to = ...

We can then include examples of how to do that= with brew, macports etc.
=C2=A0

=
- I'm not sure what this is intended to do: "git ch= eckout electron". Clearly that isn't correct.
That was the name of our development branch.=C2= =A0 It can be removed.

OK= .
=C2=A0
<= div dir=3D"ltr">
=C2=A0

- All new builds s= hould be using Python 3.6. We need to deprecate 2.7 as there are some Unico= de related issues that cannot be fixed in it.
For Windows, we are using 2.7 because of external librar= y compilation issues.=C2=A0 =C2=A0Let us know if you are able to get around= this or how to make this work.

There are a couple of tricks if you're using Python 3.6. First, = to compile Pycrypto you need to do something like:

    <= li style=3D"margin-left:15px;font-weight:400">set VCINSTALLDIR=3DC:\Program= Files (x86)\Microsoft Visual Studio 14.0\VC
  • set CL=3D-FI"%VCINSTALL= DIR%\INCLUDE\stdint.h"
  • (https://stackoverflow.com/questions/41843266/microsoft-windows-python-3-6-pycrypto-installation-error)
Beforehand. Then, edit=C2=A0Lib\site-packages\Crypto\Random\OSRNG\nt.py"=C2=A0and m= odify "=C2=A0import=C2=A0winrandom" to "from . import<= span>=C2=A0winrandom".

As a sidenote, I use the VC++ 2015 Build Tools compiler from= Microsoft, without installing any SDKs or Visual Studio.
= =C2=A0
=C2=A0
- I would like to see the new build code = adapted to follow the existing conventions as much as reasonable, to avoid = having to change build systems or other processes/procedures that folks use= . For example, build scripts should be under pkg/, completed packages left = in dist/, build staging done in xxx-build directories rather than elsewhere= .
That sounds reasonable.
=C2=A0
- It may be= a result of my use of MacPorts, but I'm getting the following failure = building:=C2=A0

<= /div>
yarn run v1.3.2
$ electron-forge make --platfrom= =3Ddarwin --arch=3Dx64 --targets=3Ddmg
=E2=9C=94 Checking your sy= stem
=E2=9C=94 Resolving Forge Config
We need to packag= e your application before we can make it
=E2=9C=94 Preparing to P= ackage Application for arch: x64
=E2=A0=BC Compiling ApplicationF= ailed to compile file: /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn<= wbr>/T/electron-packager/darwin-x64/pgAdmin-darwin-x64/Electron.a= pp/Contents/Resources/app/venv/lib/python3.6/site-packages/s= etuptools/command/launcher manifest.xml
Compiling /var/folders/c6= /pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x= 64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/venv/li= b/python3.6/site-packages/setuptools/command/launcher manifest.xm= l resulted in a MIME type of application/xml, which we don't know how t= o handle
=E2=A0=8B Compiling ApplicationFailed to compile file: /= var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager= /darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resourc= es/app/web/pgadmin/browser/server_groups/servers/templates/server= s/supported_servers.js
/var/folders/c6/pwf0k2d509s2xx6v= h0h633vm0000gn/T/electron-packager/darwin-x64/pgAdmin-darwin-x64/= Electron.app/Contents/Resources/app/web/pgadmin/browser/serv= er_groups/servers/templates/servers/supported_servers.js: Unexpec= ted token (6:7)
=E2=A0=A6 Compiling ApplicationFailed to compile = file: /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-p= ackager/darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/= Resources/app/web/pgadmin/browser/templates/browser/js/endpoints.= js
/var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/ele= ctron-packager/darwin-x64/pgAdmin-darwin-x64/Electron.app/Content= s/Resources/app/web/pgadmin/browser/templates/browser/js/end= points.js: Unexpected token (5:6)
Failed to compile file: /var/fo= lders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwi= n-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app= /web/pgadmin/browser/templates/browser/js/messages.js
/= var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager= /darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resourc= es/app/web/pgadmin/browser/templates/browser/js/messages.js: Unex= pected token (37:1)
Failed to compile file: /var/folders/c6/= pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x64/pgA= dmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin/<= wbr>browser/templates/browser/js/utils.js
/var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x64/= pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmi= n/browser/templates/browser/js/utils.js: Unexpected token (28:23)=
=E2=A0=8B Compiling ApplicationFailed to compile file: /var/fold= ers/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-= x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/w= eb/pgadmin/misc/file_manager/templates/file_manager/js/languages/= en.js
/var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x64/pgAdmin-darwin-x64/Electron.app= /Contents/Resources/app/web/pgadmin/misc/file_manager/templates/<= wbr>file_manager/js/languages/en.js: Unexpected token, expected ; (2:2= 9)
=E2=A0=8B Compiling ApplicationFailed to compile file: /var/fo= lders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwi= n-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app= /web/pgadmin/static/scss/_alert.scss
Error: Undefined variab= le: "$color-green-3".
=C2=A0 =C2=A0 =C2=A0 =C2=A0 on li= ne 29 of /stdin
>>=C2=A0 =C2=A0background: $color-green-3;<= /div>

=C2=A0 =C2=A0--------------^

<= div>=E2=A0=99 Compiling ApplicationFailed to compile file: /var/folders/c6/= pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x6= 4/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgad= min/static/scss/_alertify.overrides.scss
Error: ".= ajs-message.ajs-error.ajs-visible" failed to @extend ".bg-re= d-1".
=C2=A0 =C2=A0 =C2=A0 =C2=A0The selector ".bg-red-= 1" was not found.
=C2=A0 =C2=A0 =C2=A0 =C2=A0Use "@exte= nd .bg-red-1 !optional" if the extend should be able to fail.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 on line 164 of /stdin
>>=C2= =A0 =C2=A0@extend .bg-red-1;

=C2=A0 =C2=A0--------= --^

=E2=A0=B4 Compiling ApplicationFailed to compi= le file: /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electro= n-packager/darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmin/static/scss/sqleditor/_history.scss<= /div>
Error: Undefined variable: "$color-gray-3".
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 on line 4 of /stdin
>>=C2=A0 = =C2=A0 =C2=A0border-bottom: 1px solid $color-gray-3;

=C2=A0 =C2=A0-----------------------------^
=
We were also seeing these errors but they don= 't have any impact on the compilation and should be addressed in the fu= ture (not in this patch)
=C2=A0

=E2=A0=87 Compiling ApplicationFailed to compile file= : /var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packa= ger/darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/Reso= urces/app/web/pgadmin/templates/base.html
/var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x64/= pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgadmi= n/templates/base.html:inline_1.js: Unexpected token (2:13)
<= div>=E2=A0=B4 Compiling ApplicationFailed to compile file: /var/folders/c6/= pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x6= 4/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgad= min/tools/templates/js/translations.js
/var/folders/c6/= pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x6= 4/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web/pgad= min/tools/templates/js/translations.js: Unexpected token (2:10)
=E2=A0=A6 Compiling ApplicationFailed to compile file: /var/folder= s/c6/pwf0k2d509s2xx6vh0h633vm0000gn/T/electron-packager/darwin-x64/pgAdmin-darwin-x64/Electron.app/Contents/Resources/app/web= /pgadmin/tools/user_management/templates/user_management/js/= current_user.js
/var/folders/c6/pwf0k2d509s2xx6vh0h633vm0000= gn/T/electron-packager/darwin-x64/pgAdmin-darwin-x64/Electro= n.app/Contents/Resources/app/web/pgadmin/tools/user_management/templates/user_management/js/current_user.js: Unexpected token (3:1= 5)
=E2=9C=94 Compiling Application
=E2=9C=94 Preparing = native dependencies
=E2=9C=94 Packaging Application
Mak= ing for the following targets:
=E2=A0=8B Making for target: dmg -= On platform: darwin - For arch: x64
An unhandled exception has o= ccurred inside Forge:
Cannot find module 'macos-alias'
Error: Cannot find module 'macos-alias'
This may be related to using MacPorts or the w= ay you installed the dependencies.=C2=A0 There was a bug with Electron and = Node 10 so we had to use to Node 8 with Yarn.

I'm using Node 8 as well. Let's figure out you= r build first and ensure we can get that working everywhere, then I'll = try to figure out how to reproduce it.=C2=A0=C2=A0

--
Dave Page
Blog: http://pgsnake.blogspot.com
Tw= itter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Po= stgreSQL Company



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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgre= SQL Company
--0000000000003201df056e84166d--