[PATCH] Add pg_dump/pg_restore to appbundle + some cleanups. - Mailing list pgadmin-hackers
From | Florian G. Pflug |
---|---|
Subject | [PATCH] Add pg_dump/pg_restore to appbundle + some cleanups. |
Date | |
Msg-id | 4386355D.2040702@phlo.org Whole thread Raw |
Responses |
Re: [PATCH] Add pg_dump/pg_restore to appbundle
|
List | pgadmin-hackers |
Hi Here is a patch to copy pg_dump and pg_restore into $bundledir/Contents/SharedSupport/helper/. pgAdmin3.app should find it there, but I didn't test this yet (I just have access to my build-machine over ssh ATM - I'll need my powerbook to test this). The other patches are mostly cleanups pgadmin3.addhelper.patch: Mentions above. pgadmin3.debug.patch: pg_debug_build seems to have gotten renamed to BUILD_DEBUG. Changed that in src/Makefile.am pgadmin3.nopgagent.patch: Don't install pgadmin into the bundle - it's useless there, since it needs to be running on the server, not on the client. pgadmin3.versions.patch: Use PGADMIN_LONG_VERSION instead of PGADMIN3_SHORT_VERSION at some places in Info.plist greetings, Florian Pflug Index: src/base/appbase.cpp =================================================================== --- src/base/appbase.cpp (revision 4751) +++ src/base/appbase.cpp (working copy) @@ -36,7 +36,6 @@ #define UI_DIR wxT("/ui") #define I18N_DIR wxT("/i18n") -#define SCRIPT_DIR wxT("/scripts") #define HELPER_DIR wxT("/helper") @@ -104,8 +103,6 @@ if (wxDir::Exists(dataDir + HELPER_DIR)) path.Add(dataDir + HELPER_DIR) ; - if (wxDir::Exists(dataDir + SCRIPT_DIR)) - path.Add(dataDir + SCRIPT_DIR) ; #else // other *ixes Index: pkg/mac/complete-bundle.sh =================================================================== --- pkg/mac/complete-bundle.sh (revision 4751) +++ pkg/mac/complete-bundle.sh (working copy) @@ -11,7 +11,7 @@ echo "Completing bundle: $bundle" cd "$bundle" fw_basepath=$(dirname $(pwd)) -todo=$(find ./ | \ +todo=$(find ./ -perm +0111 ! -type d | \ xargs --replace=line file 'line' | \ sed -n 's/^\([^:][^:]*\):[[:space:]]*Mach-O executable ppc$/\1/p' | \ xargs echo -n \ Index: pkg/mac/Makefile.am =================================================================== --- pkg/mac/Makefile.am (revision 4751) +++ pkg/mac/Makefile.am (working copy) @@ -24,5 +24,7 @@ $(install_sh_DATA) "sql.icns" "$(bundledir)/Contents/Resources/sql.icns" $$($(WX_CONFIG) --rezflags | sed 's/-t[[:space:]]*APPL//') \ "$(bundledir)/Contents/Resources/pgAdmin3.rsrc" -useDF + $(install_sh_PROGRAM) "$$($(PG_CONFIG) --bindir)/pg_dump" "$(bundledir)/Contents/SharedSupport/helper/pg_dump" + $(install_sh_PROGRAM) "$$($(PG_CONFIG) --bindir)/pg_restore" "$(bundledir)/Contents/SharedSupport/helper/pg_restore" ./complete-bundle.sh "$(bundledir)" endif Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 4751) +++ src/Makefile.am (working copy) @@ -171,7 +171,7 @@ cd $(bindir) ;\ mv pgadmin3 tmp ;\ mv tmp pgAdmin3 ;\ - if test "$(pg_debug_build)" = "no"; then \ + if test "$(BUILD_DEBUG)" = "no"; then \ strip pgAdmin3 ;\ fi Index: xtra/pgagent/Makefile.am =================================================================== --- xtra/pgagent/Makefile.am (revision 4751) +++ xtra/pgagent/Makefile.am (working copy) @@ -37,24 +37,11 @@ AM_CPPFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -Wall -Wno-non-virtual-dtor -I$(srcdir)/include AM_CFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -Wall -I$(srcdir)/include -# Automake trys to execute install-exec-hook if it appears anywhere in the file, so we need a dummy -# for non-APPBUNDLE cases. -install-exec-hook: +install-data-local: + $(install_sh) -c -m 644 pgagent.sql $(DESTDIR)/$(pkgdatadir)/pgagent.sql else -AM_CXXFLAGS = -Wall -Wno-non-virtual-dtor -I$(srcdir)/include -AM_CPPFLAGS = -Wall -Wno-non-virtual-dtor -I$(srcdir)/include -AM_CFLAGS = -Wall -I$(srcdir)/include -install-exec-hook: - cd $(bindir) ;\ - mv pgagent tmp ;\ - mv tmp pgagent ;\ - if test "$(pg_debug_build)" = "no"; then \ - strip pgagent ;\ - fi +install-data-local: endif - -install-data-local: - $(install_sh) -c -m 644 pgagent.sql $(DESTDIR)/$(pkgdatadir)/pgagent.sql Index: xtra/Makefile.am =================================================================== --- xtra/Makefile.am (revision 4751) +++ xtra/Makefile.am (working copy) @@ -7,8 +7,12 @@ # Makefile - Makefile for *nix systems ############################################################################## +if !APPBUNDLE + SUBDIRS = pgagent +endif + # Note: We cannot add a Makefile to the admin directory as it already # contains one to be used as part of the PostreSQL contrib build # system. Instead, we'll add the files in that directory here. Index: pkg/mac/Info.plist.in =================================================================== --- pkg/mac/Info.plist.in (revision 4751) +++ pkg/mac/Info.plist.in (working copy) @@ -26,7 +26,7 @@ <key>CFBundleExecutable</key> <string>pgAdmin3</string> <key>CFBundleGetInfoString</key> - <string>pgAdmin3 PGADMIN_SHORT_VERSION</string> + <string>pgAdmin3 PGADMIN_LONG_VERSION</string> <key>CFBundleIconFile</key> <string>pgAdmin3.icns</string> <key>CFBundleIdentifier</key> @@ -40,7 +40,7 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>PGADMIN_SHORT_VERSION</string> + <string>PGADMIN_LONG_VERSION</string> <key>CSResourcesFileMapped</key> <true/> <key>UTExportedTypeDeclarations</key>
Attachment
pgadmin-hackers by date: