Hi

Attached is an updated patch in which I made some minor changes, most
significantly, to stop the build script from over-writing my
configuration file (again)!

There are a couple of important issues to be resolved:

1) It doesn't work. When testing on Karen's machine (which is new, and
doesn't have any dev environment etc), it errors out because it looks
like it cannot find the virtual environment.

2) It's *huge* - like 650MB!! I believe we're bundling much of QT
which isn't required. Please only copy what is needed.

Thanks!

On Mon, May 23, 2016 at 7:22 AM, Sandeep Thakkar
<sandeep.thak...@enterprisedb.com> wrote:
> Hi Dave
>
> I have fixed this issue. Instead of getting path from otool, script now uses
> QTDIR variable to copy the framework directory. Please find the updated
> patch attached.
>
> Thanks.
>
> On Thu, May 19, 2016 at 7:39 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>> On Thu, May 19, 2016 at 10:05 AM, Sandeep Thakkar
>> <sandeep.thak...@enterprisedb.com> wrote:
>> > Hmm.. looks like some difference in the QT installation.
>> >
>> > Can you please provide me the otool -L output for pgAdmin4 from
>> > /mac-build/pgAdmin4.app/Contents/MacOS/pgAdmin4
>>
>> (pgadmin4)snake:pgadmin4 dpage$ otool -L
>> mac-build/pgAdmin4.app/Contents/MacOS/pgAdmin4
>> mac-build/pgAdmin4.app/Contents/MacOS/pgAdmin4:
>> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
>> (compatibility version 2.7.0, current version 2.7.10)
>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 1226.10.1)
>>
>> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
>> (compatibility version 150.0.0, current version 1258.1.0)
>> @rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
>> (compatibility version 5.5.0, current version 5.5.1)
>> @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version
>> 5.5.0, current version 5.5.1)
>> @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0,
>> current version 5.5.1)
>> @rpath/QtCore.framework/Versions/5/QtCore (compatibility version
>> 5.5.0, current version 5.5.1)
>>
>> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
>> (compatibility version 1.0.0, current version 1.0.0)
>> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
>> (compatibility version 1.0.0, current version 275.0.0)
>> @rpath/QtWebKit.framework/Versions/5/QtWebKit (compatibility version
>> 5.5.0, current version 5.5.1)
>> @rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version
>> 5.5.0, current version 5.5.1)
>> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
>> (compatibility version 1.0.0, current version 1.0.0)
>> /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility
>> version 1.0.0, current version 1.0.0)
>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>> version 104.1.0)
>>
>> >
>> > and also the tree for $QTDIR/lib
>>
>> Attached.
>>
>> Also, my config database now seems to be trashed since I ran "make
>> appbundle" :-(
>>
>>
>> --
>> 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
Index: pkg/mac/.gitignore
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/.gitignore  (revision )
+++ pkg/mac/.gitignore  (revision )
@@ -0,0 +1,3 @@
+# Global excludes across all subdirectories
+debug.pgadmin.Info.plist
+pgadmin.Info.plist
Index: .gitignore
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- .gitignore  (revision 8c077bc2dfd2dda4bd3b5e1338a6d60b404ba78f)
+++ .gitignore  (revision )
@@ -24,4 +24,5 @@
 /pgadmin4.egg-info
 /MANIFEST.in
 /build
+/mac-build
 /dist
Index: pkg/mac/pgadmin.Info.plist.in
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/pgadmin.Info.plist.in       (revision )
+++ pkg/mac/pgadmin.Info.plist.in       (revision )
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>pgAdmin4</string>
+       <key>CFBundleGetInfoString</key>
+       <string>pgAdmin4 PGADMIN_LONG_VERSION</string>
+       <key>CFBundleIconFile</key>
+       <string>pgAdmin4.icns</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.postgresql.pgadmin</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>PGADMIN_SHORT_VERSION</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>PGADMIN_LONG_VERSION</string>
+       <key>CSResourcesFileMapped</key>
+       <true/>
+</dict>
+</plist>
Index: pkg/mac/PkgInfo
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/PkgInfo     (revision )
+++ pkg/mac/PkgInfo     (revision )
@@ -0,0 +1,1 @@
+APPL????
\ No newline at end of file
Index: pkg/mac/create-dmg.sh
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/create-dmg.sh       (revision )
+++ pkg/mac/create-dmg.sh       (revision )
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# move to the directory where we have the DMG Sources
+cd dist
+
+DMG_SOURCES="./pgAdmin4.app"
+DMG_LICENCE=./../pkg/mac/licence.r
+DMG_IMAGE=pgAdmin4.dmg
+DMG_NAME=pgAdmin4
+HDIUTIL=/usr/bin/hdiutil
+REZ="/usr/bin/Rez 
/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/*.r"
+
+DMG_DIR=./$DMG_IMAGE.src
+
+if test -e "$DMG_DIR"; then
+       echo "Directory $DMG_DIR already exists. Please delete it manually." >&2
+       exit 1
+fi
+
+echo "Cleaning up"
+rm -f "$DMG_IMAGE" || exit 1
+mkdir "$DMG_DIR" || exit 1
+
+echo "Copying data into temporary directory"
+for src in $DMG_SOURCES; do
+       cp -R "$src" "$DMG_DIR" || exit 1
+done
+
+echo "Creating image"
+$HDIUTIL create -quiet -srcfolder "$DMG_DIR" -format UDZO -volname "$DMG_NAME" 
-ov "$DMG_IMAGE" || exit 1
+rm -rf "$DMG_DIR" || exit 1
+
+echo "Attaching License to image"
+$HDIUTIL unflatten -quiet "$DMG_IMAGE" || exit 1
+$REZ "$DMG_LICENCE" -a -o "$DMG_IMAGE" || exit 1
+$HDIUTIL flatten -quiet "$DMG_IMAGE" || exit 1
Index: pkg/mac/build.sh
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/build.sh    (revision )
+++ pkg/mac/build.sh    (revision )
@@ -0,0 +1,146 @@
+#!/bin/bash
+
+# Build script to create Mac App Bundle and DMG for pgAdmin4 runtime
+
+export WD=$(cd `dirname $0` && pwd)
+export SOURCEDIR=$WD/../..
+export BUILDROOT=$WD/../../mac-build
+export DISTROOT=$WD/../../dist
+export VIRTUALENV=venv
+
+if [ "x$PYTHON_HOME" == "x" ]; then
+    echo "PYTHON_HOME not set. Setting it to default"
+    export PYTHON_HOME=/System/Library/Frameworks/Python.framework/Versions/2.7
+    export PYTHON_VERSION=27
+fi
+
+# Check if Python is working and calculate PYTHON_VERSION
+if $PYTHON_HOME/bin/python2 -V > /dev/null 2>&1; then
+    export PYTHON_VERSION=`$PYTHON_HOME/bin/python2 -V 2>&1 | awk '{print $2}' 
| cut -d"." -f1-2 | sed 's/\.//'`
+elif $PYTHON_HOME/bin/python3 -V > /dev/null 2>&1; then
+    export PYTHON_VERSION=`$PYTHON_HOME/bin/python3 -V 2>&1 | awk '{print $2}' 
| cut -d"." -f1-2 | sed 's/\.//'`
+else
+    echo "Error: Python installation missing!"
+    exit 1
+fi
+
+if [ "$PYTHON_VERSION" -gt "34" -a "$PYTHON_VERSION" -lt "26" ]; then
+    echo "Python version not supported"
+    exit 1
+fi
+
+if [ "$PYTHON_VERSION" -ge "30" ]; then
+    export PYTHON=$PYTHON_HOME/bin/python3
+    export PIP=pip3
+    export REQUIREMENTS=requirements_py3.txt
+else
+    export PYTHON=$PYTHON_HOME/bin/python2
+    export PIP=pip
+    export REQUIREMENTS=requirements_py2.txt
+fi
+
+if [ "x$QTDIR" == "x" ]; then
+    echo "QTDIR not set. Setting it to default (~/Qt/5.5/clang_64)"
+    export QTDIR=~/Qt/5.5/clang_64
+fi
+export QMAKE=$QTDIR/bin/qmake
+if ! $QMAKE --version > /dev/null 2>&1; then
+    echo "Error: qmake not found. QT installation is not present or 
incomplete."
+    exit 1
+fi
+
+if [ "x$PGDIR" == "x" ]; then
+    echo "PGDIR not set. Setting it to default (/usr/local/pgsql)"
+    export PGDIR=/usr/local/pgsql
+fi
+export PATH=$PGDIR/bin:$PATH
+
+_get_version() {
+    export pgadmin4_release=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 
| sed 's/ //g'`
+    export pgadmin4_revision=`grep "^APP_REVISION" web/config.py | cut -d"=" 
-f2 | sed 's/ //g'`
+    export LONG_VER=$pgadmin4_release.$pgadmin4_revision
+    export SHORT_VER=`echo $LONG_VER | cut -d . -f1,2`
+    export pgadmin4_suffix=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | 
sed 's/ //g' | sed "s/'//g"`
+    if [ ! -z $pgadmin4_suffix ]; then
+        export LONG_VER=$LONG_VER-$pgadmin4_suffix
+    fi
+}
+
+_cleanup() {
+    echo "Cleaning up the old environment and app bundle"
+    rm -rf $SOURCEDIR/runtime/pgAdmin4.app
+    rm -rf $BUILDROOT
+    rm -rf $DISTROOT/pgAdmin4.app
+    rm -f $DISTROOT/pgAdmin4.dmg
+}
+
+_create_python_virtualenv() {
+    test -d $BUILDROOT || mkdir $BUILDROOT || exit 1
+    cd $BUILDROOT
+    test -d $VIRTUALENV || virtualenv -p $PYTHON $VIRTUALENV || exit 1
+    source $VIRTUALENV/bin/activate
+    $PIP install -r $SOURCEDIR/$REQUIREMENTS || { echo PIP install failed. 
Please resolve the issue and rerun the script; exit 1; }
+}
+
+_build_runtime() {
+    _create_python_virtualenv || exit 1
+    cd $SOURCEDIR/runtime
+    $QMAKE || { echo qmake failed; exit 1; }
+    make || { echo make failed; exit 1; }
+    cp -r pgAdmin4.app $BUILDROOT
+}
+
+_build_doc() {
+    cd $SOURCEDIR/docs/en_US
+    test -d $BUILDROOT/pgAdmin4.app/Contents/Resources || mkdir -p 
$BUILDROOT/pgAdmin4.app/Contents/Resources
+    test -d $BUILDROOT/pgAdmin4.app/Contents/Resources/docs/en_US || mkdir -p 
$BUILDROOT/pgAdmin4.app/Contents/Resources/docs/en_US
+    cp -r _build/html $BUILDROOT/pgAdmin4.app/Contents/Resources/docs/en_US/ 
|| exit 1
+}
+
+_complete_bundle() {
+    cd $SOURCEDIR/pkg/mac
+    
+    # Replace the place holders with the current version
+    sed -e "s/PGADMIN_LONG_VERSION/$LONG_VER/g" -e 
"s/PGADMIN_SHORT_VERSION/$SHORT_VER/g" pgadmin.Info.plist.in > 
pgadmin.Info.plist
+
+    # copy Python private environment to app bundle
+    cp -PR $BUILDROOT/$VIRTUALENV $BUILDROOT/pgAdmin4.app/Contents/Resources/ 
|| exit 1
+
+    # remove the python bin and include from app bundle as it is not needed
+    rm -rf $BUILDROOT/pgAdmin4.app/Contents/Resources/$VIRTUALENV/bin 
$BUILDROOT/pgAdmin4.app/Contents/Resources/$VIRTUALENV/include
+    rm -rf $BUILDROOT/pgAdmin4.app/Contents/Resources/$VIRTUALENV/.Python
+
+    # run complete-bundle to copy the dependent libraries and frameworks and 
fix the rpaths
+    ./complete-bundle.sh $BUILDROOT/pgAdmin4.app || { echo complete-bundle.sh 
failed; exit 1; }
+
+    # Remove the unwanted Python versions from the bundle
+    PYTHON_DIR_TO_KEEP=`$BUILDROOT/$VIRTUALENV/bin/python -V 2>&1 | awk 
'{print $2}' | cut -d"." -f1-2`
+    if [ ! -z $PYTHON_DIR_TO_KEEP ]; then
+        find 
$BUILDROOT/pgAdmin4.app/Contents/Frameworks/Python.framework/Versions/ 
-maxdepth 1 -mindepth 1 ! -name $PYTHON_DIR_TO_KEEP | grep -v Current | xargs 
rm -rf
+    fi
+ 
+    # copy the web directory to the bundle as it is required by runtime
+    cp -r $SOURCEDIR/web $BUILDROOT/pgAdmin4.app/Contents/Resources/ || exit 1
+
+    # create the config file
+    cd $SOURCEDIR/web
+    sed -e 's;SERVER_MODE = True;SERVER_MODE = False;' -e "s;HELP_PATH = 
.*;HELP_PATH = \'..\/..\/..\/docs\/en_US\/html\/\';" \
+        $SOURCEDIR/web/config.py > 
$BUILDROOT/pgAdmin4.app/Contents/Resources/web/config.py
+
+    # copy the resulting app bundle to the dist
+    test -d $DISTROOT || mkdir $DISTROOT || exit 1
+    cp -pR $BUILDROOT/pgAdmin4.app $DISTROOT/ || exit 1
+
+}
+
+_create_dmg() {
+    cd $SOURCEDIR
+    ./pkg/mac/create-dmg.sh || { echo create-dmg.sh failed; exit 1; }
+}
+
+_get_version || { echo Could not get versioning; exit 1; }
+_cleanup
+_build_runtime || { echo Runtime build failed; exit 1; }
+_build_doc
+_complete_bundle
+_create_dmg
Index: pkg/mac/complete-bundle.sh
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/complete-bundle.sh  (revision )
+++ pkg/mac/complete-bundle.sh  (revision )
@@ -0,0 +1,136 @@
+#!/bin/sh
+
+bundle="$1"
+
+if ! test -d "$bundle" ; then
+       echo "$bundle is no bundle!" >&2
+       exit 1
+fi
+
+if test -z $QTDIR ; then
+       echo "QTDIR environment variable not set"
+       exit 1
+else
+       echo "QTDIR=$QTDIR"
+fi
+
+test -d "$bundle/Contents/Resources" || mkdir -p "$bundle/Contents/Resources" 
|| exit 1
+# Create qt.conf so that app knows where the Plugins are present
+cat >> "$bundle/Contents/Resources/qt.conf" << EOF
+[Paths]
+Plugins = PlugIns
+EOF
+
+test -d "$bundle/Contents/Frameworks" || mkdir -p 
"$bundle/Contents/Frameworks" || exit 1
+test -d "$bundle/Contents/PlugIns/platforms" || mkdir -p 
"$bundle/Contents/PlugIns/platforms" || exit 1
+cp -f $QTDIR/plugins/platforms/libqcocoa.dylib 
"$bundle/Contents/PlugIns/platforms" || { echo libqcocoa.dylib not found in 
$QTDIR/plugins/platforms; exit 1; }
+cp -f $PGDIR/lib/libpq.5.dylib "$bundle/Contents/Frameworks" || { echo 
libpq.5.dylib not found in $PGDIR; exit 1; }
+
+function CompleteSingleApp() {
+       local bundle=$1 tag=$(basename "$1") todo todo_old fw_relpath lib 
lib_bn nested_app na_relpath
+
+       echo "Completing app: $bundle"
+       pushd "$bundle" > /dev/null
+
+       #We skip nested apps here - those are treated specially
+       todo=$(file `find ./ -perm +0111 ! -type d ! -path "*.app/*" ! -name 
"*.app"` | grep -E "Mach-O 64-bit" | awk -F ':| ' '{ORS=" "; print $1}' | uniq)
+
+       echo "App: $tag: Found executables: $todo"
+       while test "$todo" != ""; do
+               todo_old=$todo ;
+               todo="" ;
+               for todo_obj in $todo_old; do
+                       echo "App: $tag: Post-processing: $todo_obj"
+
+                       #Figure out the relative path from todo_obj to 
Contents/Frameworks
+                       fw_relpath=$(echo "$todo_obj" |\
+                               sed -n 
's|^\(\.//*\)\(\([^/][^/]*/\)*\)[^/][^/]*$|\2|gp' | \
+                               sed -n 's|[^/][^/]*/|../|gp' \
+                       )"Contents/Frameworks"
+                       fw_relpath_old=$fw_relpath
+
+                       fw_loc="Contents/Frameworks"
+
+                       #Find all libraries $todo_obj depends on, but skip 
system libraries
+                       for lib in $(
+                               otool -L $todo_obj | \
+                               grep "Qt\|dylib\|Frameworks\|PlugIns" | grep -v 
":" | sed 's/(.*//' | egrep -v '(/usr/lib)|(/System)|@executable_path@' \
+                       ) $(otool -L $todo_obj | grep "Python" | grep -v ":" | 
sed 's/(.*//' \
+                       ); do
+                               if echo $lib | grep "PlugIns\|libqcocoa"  > 
/dev/null; then
+                                       lib_loc="Contents/PlugIns/platforms"
+                               elif echo $lib | grep "Qt" > /dev/null; then
+                                       qtfw_path="$(dirname $lib | sed 
's|.*\(Qt.*framework\)|\1|')"
+                                       lib_loc="Contents/Frameworks/$qtfw_path"
+                                       if [ "$(basename $todo_obj)" = "$lib" 
]; then
+                                               lib_loc="$(dirname $todo_obj)"
+                                               qtfw_path=$(echo $lib_loc | sed 
's/Contents\/Frameworks\///')
+                                       fi
+                               elif echo $lib | grep "Python" > /dev/null; then
+                                       pyfw_path="$(dirname $lib | sed 
's|.*\(Python.*framework\)|\1|')"
+                                       lib_loc="Contents/Frameworks/$pyfw_path"
+                                       if [ "$(basename $todo_obj)" = "$lib" 
]; then
+                                               lib_loc="$(dirname $todo_obj)"
+                                               pyfw_path=$(echo $lib_loc | sed 
's/Contents\/Frameworks\///')
+                                       fi
+                               else
+                                       lib_loc="Contents/Frameworks"
+                               fi
+                               lib_bn="$(basename "$lib")" ;
+                               if ! test -f "$lib_loc/$lib_bn"; then
+                                        target_file=""
+                                       target_path=""
+                                       echo "App: $tag: Adding symlink: 
$lib_bn (because of: $todo_obj)"
+                                       # Copy the QT and Python framework
+                                       if echo $lib | grep Qt > /dev/null ; 
then
+                                               cp -R 
$QTDIR/lib/$lib_bn.framework "$fw_loc/"
+                                       elif echo $lib | grep Python > 
/dev/null ; then
+                                               cp -R $(dirname 
$lib)/../../../$lib_bn.framework "$fw_loc/"
+                                       else
+                                               cp -R "$lib" "$lib_loc/$lib_bn"
+                                       fi
+                                       if ! test -L "$lib_loc/$lib_bn"; then
+                                               chmod 755 "$lib_loc/$lib_bn"
+                                       else
+                                               target_file=$(readlink "$lib")
+                                               target_path=$(dirname 
"$lib")/$target_file
+                                               echo "App: $tag: Adding symlink 
target: $target_path"
+                                               cp "$target_path" 
"$lib_loc/$target_file"
+                                               chmod 755 
"$lib_loc/$target_file"
+                                       fi
+                                       echo "Rewriting ID in $lib_loc/$lib_bn 
to $lib_bn"
+                                        install_name_tool \
+                                                -id "$lib_bn" \
+                                                "$lib_loc/$lib_bn" || exit 1
+                                       todo="$todo ./$lib_loc/$lib_bn"
+                               fi
+                               if echo $lib | grep Qt > /dev/null ; then
+                                       fw_relpath="$fw_relpath/$qtfw_path"
+                               fi
+                               if echo $lib | grep Python > /dev/null ; then
+                                       fw_relpath="$fw_relpath/$pyfw_path"
+                               fi
+                               echo "Rewriting library $lib to 
@loader_path/$fw_relpath/$lib_bn in $todo_obj"
+                               install_name_tool -change \
+                                       "$lib" \
+                                       "@loader_path/$fw_relpath/$lib_bn" \
+                                       "$todo_obj" || exit 1
+                                install_name_tool -change \
+                                        "$target_path" \
+                                        
"@loader_path/$fw_relpath/$target_file" \
+                                        "$todo_obj" || exit 1
+                               fw_relpath="$fw_relpath_old"
+                       done
+               done
+       done
+
+       # Fix the rpaths for psycopg module
+       find $bundle/Contents/Resources/venv/ -name _psycopg.so | xargs 
install_name_tool -change libpq.5.dylib 
@loader_path/../../../../../../Frameworks/libpq.5.dylib
+       find $bundle/Contents/Resources/venv/ -name _psycopg.so | xargs 
install_name_tool -change libssl.1.0.0.dylib 
@loader_path/../../../../../../Frameworks/libssl.1.0.0.dylib
+       find $bundle/Contents/Resources/venv/ -name _psycopg.so | xargs 
install_name_tool -change libcrypto.1.0.0.dylib 
@loader_path/../../../../../../Frameworks/libcrypto.1.0.0.dylib
+
+       echo "App completed: $bundle"
+       popd > /dev/null
+}
+
+CompleteSingleApp "$bundle"
Index: pkg/mac/README.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/README.txt  (revision )
+++ pkg/mac/README.txt  (revision )
@@ -0,0 +1,32 @@
+Building pgAdmin4.dmg on Mac OS X
+=================================
+
+Required Packages (Either build the sources or get them from macports or 
similar):
+
+1. Python installation
+  - Python 2.6 or above from https://www.python.org/
+
+2. QT installation
+  - Qt 4 or 5 from http://www.qt.io/
+
+3. PostgreSQL installation
+  - PostgreSQL 9.1 or above from http://www.postgresql.org/
+
+Building:
+
+1. Set the PYTHON_HOME environment variable to the Python root installation 
directory, e.g.
+
+   export PYTHON_HOME=/System/Library/Frameworks/Python.framework/Versions/2.7
+
+2. Set the QTDIR environment variable to the QT root installation directory, 
e.g.
+
+   export QTDIR=~/Qt/5.5/clang_64
+
+3. Set the PGDIR environment variable to the PostgreSQL installation 
directory, e.g.
+
+   export PGDIR=/usr/local/pgsql
+
+4. To build, go to pgAdmin4 source root directory and execute "make 
appbundle". This will
+   create the python virtual environment and install all the required python 
modules mentioned in the
+   requirements file using pip, build the runtime code and finally create the 
app bundle and the DMG 
+   in ./dist directory
Index: Makefile
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Makefile    (revision 8c077bc2dfd2dda4bd3b5e1338a6d60b404ba78f)
+++ Makefile    (revision )
@@ -13,9 +13,9 @@
 # High-level targets
 #########################################################################
 
-all: install-pip-requirements pip
+all: docs install-pip-requirements pip appbundle
 
-clean: clean-pip
+clean: clean-pip clean-docs clean-appbundle
 
 #########################################################################
 # Python PIP package
@@ -34,6 +34,7 @@
 PGADMIN_SRC_DIR = pgadmin4
 PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
 PGADMIN_BUILD = build
+PGADMIN_MACBUILD = mac-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
 PGADMIN_INSTALL_CMD = pip install --use-wheel --find-links=${PGADMIN_DIST} 
${PGADMIN_SRC_DIR}
@@ -83,9 +84,25 @@
 install-pip:
        ${PGADMIN_INSTALL_CMD}
 
+appbundle: docs
+       ./pkg/mac/build.sh
+
+docs:
+       LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f 
Makefile.sphinx html
+
+clean-docs:
+       LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f 
Makefile.sphinx clean
+
 clean-pip:
        rm -rf ${PGADMIN_SRC_DIR}
        rm -rf ${PGADMIN_EGG}
        rm -rf ${PGADMIN_BUILD}
        rm -rf ${PGADMIN_DIST}
        rm -f ${PGADMIN_MANIFEST}
+
+clean-appbundle:
+       rm -rf ${PGADMIN_MACBUILD}
+       rm -rf ${PGADMIN_DIST}/pgAdmin4.app
+       rm -f ${PGADMIN_DIST}/pgAdmin4.dmg
+
+.PHONY: docs
Index: pkg/mac/licence.r
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/mac/licence.r   (revision )
+++ pkg/mac/licence.r   (revision )
@@ -0,0 +1,42 @@
+data 'LPic' (5000) {
+       $"0000 0001 0000 0000 0000"
+};
+
+resource 'STR#' (5000, "English buttons") {
+    {   /* array StringArray: 9 elements */
+        /* [1] */
+        "English",
+        /* [2] */
+        "Agree",
+        /* [3] */
+        "Disagree",
+        /* [4] */
+        "Print",
+        /* [5] */
+        "Save...",
+        /* [6] */
+        "IMPORTANT - Read this License Agreement carefully before clicking on "
+        "the \"Agree\" button.  By clicking on the \"Agree\" button, you agree 
"
+        "to be bound by the terms of the License Agreement.",
+        /* [7] */
+        "Software License Agreement",
+        /* [8] */
+        "This text cannot be saved. This disk may be full or locked, or the 
file "
+        "may be locked.",
+        /* [9] */
+        "Unable to print. Make sure you've selected a printer."
+    }
+};
+
+data 'TEXT' (5000, "English") {
+    "pgAdmin 4\n"
+    "\n"
+    "Copyright (C) 2013 - 2016, The pgAdmin Development Team\n"
+    "\n"
+    "Permission to use, copy, modify, and distribute this software and its 
documentation for any purpose, without fee, and without a written agreement is 
hereby granted, provided that the above copyright notice and this paragraph and 
the following two paragraphs appear in all copies.\n"
+    "\n"
+    "IN NO EVENT SHALL THE PGADMIN DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR 
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST 
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 
THE PGADMIN DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 
DAMAGE.\n"
+    "\n"
+    "THE PGADMIN DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN \"AS 
IS\" BASIS, AND THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE 
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n"
+};
+
Index: web/config_local.py.default
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/config_local.py.default (revision )
+++ web/config_local.py.default (revision )
@@ -0,0 +1,28 @@
+from config import *
+
+# Debug mode
+DEBUG = True
+
+# App mode
+SERVER_MODE = False
+
+# Enable the test module
+MODULE_BLACKLIST.remove('test')
+
+# Log file name
+LOG_FILE = '/Users/dpage/pgadmin4.log'
+CONSOLE_LOG_LEVEL = DEBUG
+FILE_LOG_LEVEL = DEBUG
+
+# Mail server settings
+MAIL_SERVER = 'smtp.gmail.com'
+MAIL_PORT = 465
+MAIL_USE_SSL = True
+MAIL_USERNAME = 'dave.p...@enterprisedb.com'
+MAIL_PASSWORD = 'P0werConnect'
+
+TEST_USERNAME = 'guybrush'
+TEST_PASSWORD = 'password'
+TEST_NEW_PASSWORD = 'newpassword'
+
+UPGRADE_CHECK_ENABLED = False
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to