public inbox for [email protected]
help / color / mirror / Atom feedFrom: Paresh More <[email protected]>
To: Dave Page <[email protected]>
To: Devrim Gunduz <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Sandeep Thakkar <[email protected]>
Cc: Hamid Quddus <[email protected]>
Subject: Re: PATCH: pgAdmin4 debian installer
Date: Thu, 2 Jun 2016 21:46:54 +0530
Message-ID: <CAAgiCNGwYY9NAF5H0CmSn-2=_CsAaP4ivVPsTR-zQjE_-uwypw@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxowoNX9x7KLV7qUe2UeQMHFS8UodX-2erCejBXROqvOWnA@mail.gmail.com>
References: <CAAgiCNGZe7EXGsFBsLFg1Mu0QcUSJNHB3dz3CJZEzP2iE15n0Q@mail.gmail.com>
<CA+OCxowoNX9x7KLV7qUe2UeQMHFS8UodX-2erCejBXROqvOWnA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hello Dave and Devrim,
Changes are done as per discussed with Sandeep.
There are some python modules which are not available on ubuntu (through
apt-get) which is mentioned in the sheet here , We could find some packages
on web and the URLs of same have been updated in the sheet. For the
packages that are not available, we have to build them on our own.
https://docs.google.com/spreadsheets/d/13CIYR82twj0LIUteFSZR7RE8ZbtUfvCqykXw1wy3gzE/edit#gid=1213443...
Attached is the patch for pgadmin4 debian package. I have also attached
runtime server patch separately (This is already included in the rpm patch
sent by Sandeep)
On Mon, May 9, 2016 at 6:45 PM, Dave Page <[email protected]>
wrote:
> Hi
>
> Please see my earlier comments regarding the RPM packages - many of them
> apply to this patch as well:
> http://www.postgresql.org/message-id/[email protected]....
>
> By way of additional comment, why does pkg/deb/README include a bunch of
> boiler-plate text that I wrote long ago for the top-level README? It's out
> of date now, and shouldn't be in a packaging README anyway.
>
> Thanks.
>
> On Tue, Apr 26, 2016 at 4:20 PM, Paresh More <[email protected]
> > wrote:
>
>> Hi Team, Dave,
>>
>> debian package is located @ location
>>
>> pgadmin4-web
>>
>> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>>
>> pgadmin4-runtime
>>
>> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>>
>> Attached herewith are two patches.
>>
>> pgadmin4_debian.patch - This is the main patch that includes
>> Makefile,README,debian scripts
>>
>> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
>> The pgadmin4-runtime depends on web and the web debian depends on the
>> python packages.
>> I have listed some packages which are not available on some systems so
>> that Devrim can build them.
>>
>> The installation path for pgadmin4 is "/usr/pgadmin4/<major>.<minor>" and
>> pgadmin4-web is the site-packages/pgadmin4-web
>>
>> As per rpm patch (*sandeep mentioned*) below is the comment which
>> applies same for debian.
>>
>> *pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp.
>> As said pgadmin4-web and runtime installation directories are different and
>> that means web does not exists in parallel to runtime like in sources.
>>
>> *Sandeep comments*
>>
>> *“I observed that the location of application settings was not defined in*
>> *Server.cpp. As per QSettings doc, the default location on Unix is the*
>> *$HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the
>> user*
>> *that runs the application. So, I thought why not to define the
>> application*
>> *settings in application directory itself. RPM then knows where to define*
>> *the ApplicationPath. I tested it and it worked fine with me. I haven't
>> done*
>> *this change for platform dependent*
>>
>> *Another change that I did in this file is that, I observed that
>> canonicalPath()*
>> *was not giving the absolute path (by removing the sym link and the*
>> *redundant ".." as per doc). Hence, I used absolutePath() for the
>> paths[i]*
>> *that are relative (../web, etc) and not for the already absolute path
>> (ex.*
>> *ApplicationPath like /usr/lib/python2.7/site-packages/pgadmin4-web)”*
>>
>> What the patch will create ?
>> - It would create deb folder in pkg
>> - It would create Makefile, README and debian scripts
>>
>>
>> --
>>
>> Thanks & Regards
>>
>> *Paresh More*
>>
>> [image: NEW-EDB-logo-4c]
>>
>> Pune, India.
>> Cell : +919922000564 | www.enterprisedb.com
>>
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
--
Thanks & Regards
*Paresh More*
[image: NEW-EDB-logo-4c]
Pune, India.
Cell : +919922000564 | www.enterprisedb.com
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] pgadmin4_debian_1_June_16.patch (13.0K, 3-pgadmin4_debian_1_June_16.patch)
download | inline diff:
diff --git a/.gitignore b/.gitignore
index 562fee6..31245c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@ pgadmin4.log
/build
/mac-build
/dist
+/deb-build
diff --git a/Makefile b/Makefile
index 3f4e5fc..5e8eac6 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ PIP_CHECK_CMD = which pip &> /dev/null && pip show pip | grep Metadata-Version 2
PGADMIN_SRC_DIR = pgadmin4
PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
PGADMIN_BUILD = build
+PGADMIN_DEBBUILD = deb-build
PGADMIN_MACBUILD = mac-build
PGADMIN_DIST = dist
PGADMIN_MANIFEST = MANIFEST.in
@@ -104,4 +105,11 @@ clean-appbundle:
rm -rf ${PGADMIN_MACBUILD}
rm -rf ${PGADMIN_DIST}/pgadmin4*.dmg*
+deb:
+ ./pkg/deb/build.sh
+
+clean-deb:
+ rm -rf ${PGADMIN_DEBBUILD}
+ rm -rf ${PGADMIN_DIST}/pgadmin4*.deb*
+
.PHONY: docs
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
new file mode 100644
index 0000000..c3319ac
--- /dev/null
+++ b/pkg/deb/Makefile
@@ -0,0 +1,53 @@
+prep:
+ # Update spec file, patches, etc, before running spectool:
+ # git pull
+
+allclean:
+ git clean -df
+
+build-docs: prep
+ $(MAKE) -C $(TOPDIR)/docs/en_US -f Makefile.sphinx html
+
+build-runtime: prep
+ (cd $(TOPDIR)/runtime && $(QMAKE) pgAdmin4.pro)
+ # -lpython2.7 flag creates issue for ubuntu so moved to LIBS section
+ (cd $(TOPDIR)/runtime && sed --in-place '/LFLAGS / s/-lpython2.7//g' Makefile)
+ (cd $(TOPDIR)/runtime && sed --in-place '/^LIBS /s/.*/& -lpython2.7/' Makefile)
+ $(MAKE) -C $(TOPDIR)/runtime
+
+build-gen-common:
+ (cd $(DEBBUILDROOT) && dpkg-buildpackage -us -uc -b )
+
+ #Copy docs to stagging
+ cp -r $(TOPDIR)/docs/en_US/_build/html $(DEBBUILDROOT)/debian/$(DOCS_PACKAGE_NAME)/usr/share/doc/$(DOCS_PACKAGE_NAME)
+
+ #Copy web to stagging
+ mkdir -p $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)
+ cp -r $(DEBBUILDROOT)/web/* $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)
+ @echo "SERVER_MODE = False" > $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+ @echo "HELP_PATH = '/usr/share/doc/$(DOCS_PACKAGE_NAME)/html/'" >> $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+ @echo "MINIFY_HTML = False" >> $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+
+ #Copy runtime to stagging
+ mkdir -p $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME)/usr/$(RUNTIME_PACKAGE_NAME)
+ cp $(TOPDIR)/runtime/pgAdmin4 $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME)/usr/$(RUNTIME_PACKAGE_NAME)
+
+ (cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(DOCS_PACKAGE_NAME))
+ mv $(DEBBUILDROOT)/debian/$(DOCS_PACKAGE_NAME).deb $(TOPDIR)/dist/$(DOCS_PACKAGE_INSTALLER_NAME).deb
+
+ (cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(WEB_PACKAGE_NAME))
+ mv $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME).deb $(TOPDIR)/dist/$(WEB_PACKAGE_INSTALLER_NAME).deb
+
+ (cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(RUNTIME_PACKAGE_NAME))
+ mv $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME).deb $(TOPDIR)/dist/$(RUNTIME_PACKAGE_INSTALLER_NAME).deb
+
+ echo "***************************************"
+ echo " Installer location - $(TOPDIR)/dist"
+ echo "***************************************"
+ echo "$(RUNTIME_PACKAGE_NAME).deb (Runtime) File is generated"
+ echo "$(WEB_PACKAGE_NAME).deb (Web) File is generated"
+ echo "$(DOCS_PACKAGE_NAME).deb (Docs) File is generated"
+
+
+deb: build-docs build-runtime build-gen-common
+
diff --git a/pkg/deb/build.sh b/pkg/deb/build.sh
new file mode 100755
index 0000000..68a71ed
--- /dev/null
+++ b/pkg/deb/build.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+
+if ! [ -e "$QMAKE" ]; then
+ echo "ERROR: QMAKE - $QMAKE does not exits";
+ exit 1;
+fi
+
+#Script to create the pgAdmin4 .deb
+export WD=$(cd `dirname $0` && pwd)
+export TOPDIR=$WD/../..
+export DEBBUILDROOT=$TOPDIR/deb-build
+
+# Find the pgAdmin4 app name and version from config.py
+export APP_RELEASE=`grep "^APP_RELEASE" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_REVISION=`grep "^APP_REVISION" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+APP_NAME=`grep "^APP_NAME" $TOPDIR/web/config.py | cut -d"=" -f2 | sed "s/'//g"`
+# We want app name in lower case with no spaces
+export APP_NAME=`echo $APP_NAME | sed 's/ //g' | awk '{print tolower($0)}'`
+export APP_LONG_VERSION=$APP_RELEASE.$APP_REVISION
+export APP_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+export APP_SUFFIX=`grep "^APP_SUFFIX" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+export APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+
+#Runtime, web and docs there modules would be created under debian packages
+export RUNTIME_PACKAGE_NAME=$APP_NAME-runtime-v$APP_RELEASE
+export RUNTIME_PACKAGE_INSTALLER_NAME=$APP_NAME-runtime-v$APP_LONG_VERSION
+export WEB_PACKAGE_NAME=$APP_NAME-web-v$APP_RELEASE
+export WEB_PACKAGE_INSTALLER_NAME=$APP_NAME-web-v$APP_LONG_VERSION
+export DOCS_PACKAGE_NAME=$APP_NAME-docs-v$APP_RELEASE
+export DOCS_PACKAGE_INSTALLER_NAME=$APP_NAME-docs-v$APP_LONG_VERSION
+
+export PYTHON_SITE_PACKAGE=`python -c "import site; print site.getsitepackages()[1]"`
+
+# Create the directories if not exist
+mkdir -p $DEBBUILDROOT/debian || exit 1
+mkdir -p $TOPDIR/dist
+
+cd ./pkg/deb
+
+#Creating on the fly control file for debian
+cp changelog $DEBBUILDROOT/debian/
+cp rules $DEBBUILDROOT/debian/
+cp control $DEBBUILDROOT/debian/
+
+# Create control file, updates runtime,web,doc,appname and version
+sed -i "s/RUNTIME_PACKAGE_NAME/$RUNTIME_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/WEB_PACKAGE_NAME/$WEB_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/DOCS_PACKAGE_NAME/$DOCS_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/APP_NAME/$APP_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/APP_VERSION/$APP_VERSION/g" $DEBBUILDROOT/debian/control
+
+# Create changelog file
+sed -i "s/DATETIME/`date +"%a, %d %b %Y %H:%M:%S +0200"`/g" $DEBBUILDROOT/debian/changelog
+sed -i "s/APPNAME/$APP_NAME/g" $DEBBUILDROOT/debian/changelog
+sed -i "s/APPVERSION/$APP_LONG_VERSION/g" $DEBBUILDROOT/debian/changelog
+
+# Create web folder config_local file
+cp -r $TOPDIR/web $DEBBUILDROOT/web
+find $DEBBUILDROOT/web -name "*.pyc" -exec rm -rf {} \; 2> /dev/null
+find $DEBBUILDROOT/web -name "pgAdmin4.db" rm -rf {} \; 2> /dev/null
+find $DEBBUILDROOT/web -name "config_local.py" rm -rf {} \; 2> /dev/null
+
+echo "SERVER_MODE = False" > $DEBBUILDROOT/web/config_local.py
+echo "HELP_PATH = '/usr/share/doc/$WEB_PACKAGE_NAME/html'" >> $DEBBUILDROOT/web/config_local.py
+echo "MINIFY_HTML = False" >> $DEBBUILDROOT/web/config_local.py
+
+
+# Build debian
+make deb || exit 1
+
+echo "Cleaning up..."
+rm -rf $TOPDIR/pgadmin4*.deb $TOPDIR/pgadmin4*.changes
+rm -rf $DEBBUILDROOT
+# Clean up buildroot after successful build
+
diff --git a/pkg/deb/changelog b/pkg/deb/changelog
new file mode 100644
index 0000000..2102b41
--- /dev/null
+++ b/pkg/deb/changelog
@@ -0,0 +1,2 @@
+APPNAME (APPVERSION) experiemental; urgency=low
+ -- pgamin4 hackers <[email protected]> DATETIME
diff --git a/pkg/deb/control b/pkg/deb/control
new file mode 100644
index 0000000..b81b490
--- /dev/null
+++ b/pkg/deb/control
@@ -0,0 +1,73 @@
+Source: APP_NAME
+Section: misc
+Priority: optional
+Maintainer: pgamin4 hackers <[email protected]>
+Build-Depends: debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev
+Standards-Version: APP_VERSION
+
+Package: APP_NAME
+Architecture: all
+Description: graphical administration tool for PostgreSQL
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: WEB_PACKAGE_NAME
+Architecture: all
+#Depends: python-sphinx-theme-alabaster, python-pycrypto, python-beautifulsoup4, python-django-htmlmin, python-flask-gravatar, python-flask-mail, python-linecache2, python-pygments, python-pytz, python-simplejson, python-snowballstemmer, python-sphinx-rtd-theme, python-traceback2
+Depends: DOCS_PACKAGE_NAME, python-blinker, python-extras, python-fixtures, python-flask,python-babel,python-flask-login,python-flask-principal,python-flask-sqlalchemy,python-wtforms,python-html5lib, python-importlib, python-itsdangerous, python-jinja2, python-markupsafe, python-passlib, python-pbr, python-psycopg2, python-dateutil, python-mimeparse, python-six, python-speaklater, python-sphinx, python-sqlalchemy, python-testscenarios, python-testtools, python-unittest2, python-werkzeug, python-sqlparse, python-docutils
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: RUNTIME_PACKAGE_NAME
+#Depends: WEB_PACKAGE_NAME (= ${Source-Version}), ${shlibs:Depends}
+Depends: WEB_PACKAGE_NAME
+Architecture: all
+#Enhances: pgadmin4(= ${Source-Version})
+#Conflicts: pgadmin4 (<< 1.0.2-1)
+#Replaces: pgadmin4 (<< 1.0.2-1)
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin III is a database design and management application for use with
+ PostgreSQL.
+ .
+ This package contains the documentation for pgAdmin III in English language.
+ This package is mandatory to get the pgAdmin III help system to run smoothly.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: DOCS_PACKAGE_NAME
+Architecture: all
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin III is a database design and management application for use with
+ PostgreSQL.
+ .
+ This package contains the documentation for pgAdmin III in English language.
+ This package is mandatory to get the pgAdmin III help system to run smoothly.
+ .
+ Homepage: http://www.pgadmin.org/
diff --git a/pkg/deb/rules b/pkg/deb/rules
new file mode 100755
index 0000000..9b1ba78
--- /dev/null
+++ b/pkg/deb/rules
@@ -0,0 +1,97 @@
+#!/usr/bin/make -f
+
+PACKAGE_NAME_RUNTIME=pgadmin4-runtime
+PACKAGE_NAME_WEB=pgadmin4-web
+BINARY_NAME_RUNTIME=pgAdmin4
+SRC_DIR=$(CURDIR)/../../runtime
+
+configure:
+ #qmake ~pareshmore/svn/pgadmin4/runtime/pgAdmin4.pro
+
+build:
+ #$(MAKE) -C $(SRC_DIR)
+
+
+clean:
+ #dh_testdir
+ #dh_testroot
+ #dh_clean
+ #rm -rf $(CURDIR)/$(BINARY_NAME)
+ #$(MAKE) -C $(SRC_DIR) clean
+ #rm *.deb
+
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-indep:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-arch:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installmenu
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+ #make -f debian/rules $(doPgA3Wx)-clean
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+ $(MAKE) -f debian/rules DH_OPTIONS=-i spec-binary-indep
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+ $(MAKE) -f debian/rules DH_OPTIONS=-a spec-binary-arch
+
+binary: binary-indep binary-arch
+.PHONY: build clean orig binary-indep binary-arch binary install
+
[application/octet-stream] pgadmin_server_debian_1_June_16.patch (1.6K, 4-pgadmin_server_debian_1_June_16.patch)
download | inline diff:
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index fd930f6..921752e 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -103,6 +103,17 @@ bool Server::Init()
{
QSettings settings;
+#ifdef Q_OS_LINUX
+ // In case we are running in a release RPM, the web app will be present in
+ // the default python lib on the system. Hence, find that path run time.
+ QProcess process;
+ process.start("python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\"");
+ process.waitForFinished(-1);
+ QString pymodules_path = process.readAllStandardOutput();
+ pymodules_path = pymodules_path.trimmed();
+ webapp_path = pymodules_path + "/pgadmin4-web-v1";
+#endif
+
// Find the webapp
QStringList paths;
paths.append("../web/"); // Linux source tree
@@ -111,13 +122,22 @@ bool Server::Init()
#ifdef Q_OS_MAC
paths.append("../Resources/web/"); // Mac source tree (in a release app bundle)
#endif
+#ifdef Q_OS_LINUX
+ paths.append(webapp_path); // Linux (in a release RPM)
+#endif
paths.append(settings.value("ApplicationPath").toString()); // System configured value
paths.append(""); // Should be last!
for (int i = 0; i < paths.size(); ++i)
{
QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
- m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
+ QFileInfo info(paths[i]);
+ if (info.isRelative()) {
+ m_appfile = dir.absolutePath() + "/pgAdmin4.py";
+ }
+ else {
+ m_appfile = paths[i] + "/pgAdmin4.py";
+ }
if (QFile::exists(m_appfile))
{
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: PATCH: pgAdmin4 debian installer
In-Reply-To: <CAAgiCNGwYY9NAF5H0CmSn-2=_CsAaP4ivVPsTR-zQjE_-uwypw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox