Re: [PATCH] Add pg_dump/pg_restore to appbundle
От | Florian G. Pflug |
---|---|
Тема | Re: [PATCH] Add pg_dump/pg_restore to appbundle |
Дата | |
Msg-id | 43864814.3010403@phlo.org обсуждение исходный текст |
Ответ на | [PATCH] Add pg_dump/pg_restore to appbundle + some cleanups. ("Florian G. Pflug" <fgp@phlo.org>) |
Ответы |
Re: [PATCH] Add pg_dump/pg_restore to appbundle
|
Список | pgadmin-hackers |
Florian G. Pflug wrote: > [snipped my own mail] Aaarg.. Missed a bug. With the previous patch, pg_dump wouldn't start, because it can't find libpq. Fixed now - here is a replacement for pgadmin3.addhelper.patch, calles pgadmin3.addhelper.fixed.patch. The other patches are ok. 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) @@ -10,8 +10,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 \ @@ -22,6 +21,13 @@ todo_old=$todo ; todo="" ; for todo_obj in $todo_old; do + #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" + + #Find all libraries $todo_obj depends on, but skip system libraries for lib in $( otool -L $todo_obj | \ sed -n 's|^.*[[:space:]]\([^[:space:]]*\.dylib\).*$|\1|p' | \ @@ -30,22 +36,16 @@ lib_bn="$(basename "$lib")" ; if ! test -f "Contents/Frameworks/$lib_bn"; then echo "Adding library: $lib_bn (because of: $todo_obj)" - case "$lib" in - /*) - cp "$lib" "Contents/Frameworks/$lib_bn" - ;; - *) - cp "$fw_basepath/$lib" "Contents/Frameworks/$lib_bn" - ;; - esac + cp "$lib" "Contents/Frameworks/$lib_bn" + chmod 755 "Contents/Frameworks/$lib_bn" install_name_tool \ - -id "@executable_path/../Frameworks/$lib_bn" \ + -id "$lib_bn" \ "Contents/Frameworks/$lib_bn" || exit 1 todo="$todo Contents/Frameworks/$lib_bn" fi install_name_tool -change \ "$lib" \ - "@executable_path/../Frameworks/$lib_bn" \ + "@executable_path/$fw_relpath/$lib_bn" \ "$todo_obj" || exit 1 done done
Вложения
В списке pgadmin-hackers по дате отправления: