Skip to content

Commit

Permalink
Xcode: fixes to translations compilation
Browse files Browse the repository at this point in the history
Add dependencies so that gettext tools are available at MO compilation step.
Make the scripts fail on errors.
  • Loading branch information
vslavik committed May 21, 2024
1 parent a3fab6a commit 390ef97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions Poedit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@
"$(DERIVED_FILE_DIR)/copy-translations.done",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellPath = "/bin/sh -e";
shellScript = "export PATH=\"${DEPS_BUILD_DIR}/gettext/bin:$PATH\"\necho \"${DERIVED_FILES_DIR}/copy-translations.done : \" \"${SRCROOT}\"/locales/*.po* \"${SRCROOT}/macos/copy-translations.sh\" >${DERIVED_FILES_DIR}/copy-translations.d\nmacos/copy-translations.sh quicklook \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\ntouch \"${DERIVED_FILE_DIR}/copy-translations.done\"\n";
};
B2C129D921C6CBAF004364B2 /* Ninja Build */ = {
Expand Down Expand Up @@ -1466,7 +1466,7 @@
"$(DERIVED_FILE_DIR)/copy-translations.done",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellPath = "/bin/sh -e";
shellScript = "export PATH=\"${DEPS_BUILD_DIR}/gettext/bin:$PATH\"\necho \"${DERIVED_FILES_DIR}/copy-translations.done : \" \"${SRCROOT}\"/locales/*.po* \"${SRCROOT}\"/deps/wx/locale/*.po \"${SRCROOT}/macos/copy-translations.sh\" >${DERIVED_FILES_DIR}/copy-translations.d\nmacos/copy-translations.sh app \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\ntouch \"${DERIVED_FILE_DIR}/copy-translations.done\"\n";
};
B2F287C6170DCF06004C1F41 /* Copy Gettext binaries, data files & translations */ = {
Expand Down Expand Up @@ -1607,6 +1607,16 @@
target = B2CE6D191ACFCD95007E6863 /* PoeditQuicklook */;
targetProxy = B2CE6D271AD00897007E6863 /* PBXContainerItemProxy */;
};
B2D0B1122BFD08DD00527A5A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B27115F8170830A800B936D5 /* deps.gettext */;
targetProxy = B2D0B1112BFD08DD00527A5A /* PBXContainerItemProxy */;
};
B2D0B1142BFD08EC00527A5A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B27115F8170830A800B936D5 /* deps.gettext */;
targetProxy = B2D0B1132BFD08EC00527A5A /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down
2 changes: 1 addition & 1 deletion macos/copy-translations.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -Eeuo pipefail
set -Eeo pipefail

SCOPE="$1"
DESTDIR="$2"
Expand Down

0 comments on commit 390ef97

Please sign in to comment.