From 332ea81e936e8858544321939679377113237297 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:36:44 +0800 Subject: [PATCH] feat(package): ad-hoc sign macOS bundles (#1656) * feat(package): ad-hoc sign macOS bundles * fix(package.sh): syntax error * docs(readme): add instructions for self-signed builds * docs(readme): grammar Co-authored-by: Guldoman --------- Co-authored-by: Guldoman --- README.md | 12 +++++++++++- scripts/package.sh | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bd00e48..05949e80 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,17 @@ Lite XL will load and store all your configurations and plugins in the folder. We provide DMG files for macOS. Simply drag the program into your Applications folder. > **Important** -> Since Lite XL is not signed, you **must** run this command before starting Lite XL: +> Newer versions of Lite XL are signed with a self-signed certificate, +> so you'll have to follow these steps when running Lite XL for the first time. +> +> 1. Find Lite XL in Finder (do not open it in Launchpad). +> 2. Control-click Lite XL, then choose `Open` from the shortcut menu. +> 3. Click `Open` in the popup menu. +> +> The correct steps may vary between macOS versions, so you should refer to +> the [macOS User Guide](https://support.apple.com/en-my/guide/mac-help/mh40616/mac). +> +> On an older version of Lite XL, you will need to run these commands instead: > > ```sh > # clears attributes from the directory diff --git a/scripts/package.sh b/scripts/package.sh index d2346b76..1faba509 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -264,6 +264,11 @@ main() { $stripcmd "${exe_file}" fi + if [[ $bundle == true ]]; then + # https://eclecticlight.co/2019/01/17/code-signing-for-the-concerned-3-signing-an-app/ + codesign --force --deep -s - "${dest_dir}" + fi + echo "Creating a compressed archive ${package_name}" if [[ $binary == true ]]; then rm -f "${package_name}".tar.gz