diff --git a/pkg/mac/Info.plist.in b/pkg/mac/Info.plist.in index 57cf5567328..c1c002cec73 100644 --- a/pkg/mac/Info.plist.in +++ b/pkg/mac/Info.plist.in @@ -45,8 +45,6 @@ SYSTEM_VERSION_COMPAT 0 - LSFileQuarantineEnabled - LSHasLocalizedDisplayName 1 LSMinimumSystemVersion @@ -69,5 +67,7 @@ scripting.sdef SCMRevision 62f83a7521ae1f32e563795732dff0c9da1b660d-refs/heads/master@{#812354} + LSApplicationCategoryType + public.app-category.developer-tools diff --git a/pkg/mac/build-functions.sh b/pkg/mac/build-functions.sh index 005a94a240e..de94b8ba87d 100644 --- a/pkg/mac/build-functions.sh +++ b/pkg/mac/build-functions.sh @@ -67,6 +67,9 @@ _build_runtime() { } _create_python_env() { + # Force the current shell to not generate cache during build process + export PYTHONDONTWRITEBYTECODE=1 + echo "Creating the Python environment..." PATH=${PGADMIN_POSTGRES_DIR}/bin:${PATH} LD_LIBRARY_PATH=${PGADMIN_POSTGRES_DIR}/lib:${LD_LIBRARY_PATH} @@ -334,6 +337,10 @@ _codesign_binaries() { return fi + echo "Purging build-machine pollution (pycache) before signing..." + find "${BUNDLE_DIR}" -name "__pycache__" -type d -exec rm -rf {} + + find "${BUNDLE_DIR}" -name "*.pyc" -delete + if [ -z "${DEVELOPER_ID}" ] ; then echo "Developer ID Application not found in codesign.conf" >&2 exit 1 diff --git a/runtime/src/js/pgadmin.js b/runtime/src/js/pgadmin.js index f08e05dca5b..baee41ad397 100644 --- a/runtime/src/js/pgadmin.js +++ b/runtime/src/js/pgadmin.js @@ -229,6 +229,9 @@ function startDesktopMode() { process.env.PGADMIN_INT_KEY = UUID; process.env.PGADMIN_SERVER_MODE = 'OFF'; + // Prevent Python from writing .pyc files to the signed bundle + process.env.PYTHONDONTWRITEBYTECODE = '1'; + // Start Page URL baseUrl = `http://127.0.0.1:${serverPort}`; startPageUrl = `${baseUrl}/?key=${UUID}`;