mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-10 09:26:47 +00:00
Merge branch 'stable' into stable-android
This commit is contained in:
@@ -23,5 +23,8 @@ unzip -o "$tmp/libsimplex.zip" -d "$tmp/simplex-chat/apps/multiplatform/common/s
|
||||
curl -sSf "$libsup" -o "$tmp/libsupport.zip"
|
||||
unzip -o "$tmp/libsupport.zip" -d "$tmp/simplex-chat/apps/multiplatform/common/src/commonMain/cpp/android/libs/arm64-v8a"
|
||||
|
||||
gradle -p "$tmp/simplex-chat/apps/multiplatform/" -Psimplex.assets.dir=../../assets clean build
|
||||
cp "$tmp/simplex-chat/apps/multiplatform/android/build/outputs/apk/release/android-release-unsigned.apk" "$PWD/simplex-chat.apk"
|
||||
# Build only the arch the libs were downloaded for
|
||||
sed -i.bak 's/include(.*/include("arm64-v8a")/' "$tmp/simplex-chat/apps/multiplatform/android/build.gradle.kts"
|
||||
|
||||
gradle -p "$tmp/simplex-chat/apps/multiplatform/" -Psimplex.assets.dir=../../assets clean :android:assembleFossRelease
|
||||
cp "$tmp/simplex-chat/apps/multiplatform/android/build/outputs/apk/foss/release/android-foss-arm64-v8a-release-unsigned.apk" "$PWD/simplex-chat.apk"
|
||||
|
||||
@@ -101,7 +101,7 @@ build() {
|
||||
sed -i.bak 's/${extract_native_libs}/true/' "$folder/apps/multiplatform/android/src/main/AndroidManifest.xml"
|
||||
sed -i.bak 's/jniLibs.useLegacyPackaging =.*/jniLibs.useLegacyPackaging = true/' "$folder/apps/multiplatform/android/build.gradle.kts"
|
||||
sed -i.bak '/android {/a lint {abortOnError = false}' "$folder/apps/multiplatform/android/build.gradle.kts"
|
||||
sed -i.bak '/tasks/Q' "$folder/apps/multiplatform/android/build.gradle.kts"
|
||||
sed -i.bak '/^tasks {/Q' "$folder/apps/multiplatform/android/build.gradle.kts"
|
||||
sed -i.bak "s/android.version_code=.*/android.version_code=${vercode}/" "$folder/apps/multiplatform/gradle.properties"
|
||||
|
||||
for arch in $arches; do
|
||||
@@ -119,7 +119,7 @@ build() {
|
||||
arch_map "$arch"
|
||||
|
||||
android_tmp_folder="${tmp}/android-${arch}"
|
||||
android_apk_output="${folder}/apps/multiplatform/android/build/outputs/apk/release/android-${android_arch}-release-unsigned.apk"
|
||||
android_apk_output="${folder}/apps/multiplatform/android/build/outputs/apk/foss/release/android-foss-${android_arch}-release-unsigned.apk"
|
||||
android_apk_output_final="simplex-chat-${android_arch}.apk"
|
||||
libs_folder="${folder}/apps/multiplatform/common/src/commonMain/cpp/android/libs"
|
||||
|
||||
@@ -134,7 +134,7 @@ build() {
|
||||
|
||||
# Build only one arch
|
||||
sed -i.bak "s/include(.*/include(\"${android_arch}\")/" "$folder/apps/multiplatform/android/build.gradle.kts"
|
||||
gradle -p "$folder/apps/multiplatform/" -Psimplex.assets.dir=../../assets clean :android:assembleRelease
|
||||
gradle -p "$folder/apps/multiplatform/" -Psimplex.assets.dir=../../assets clean :android:assembleFossRelease
|
||||
|
||||
mkdir -p "$android_tmp_folder"
|
||||
unzip -oqd "$android_tmp_folder" "$android_apk_output"
|
||||
|
||||
@@ -38,6 +38,23 @@
|
||||
</description>
|
||||
|
||||
<releases>
|
||||
<release version="7.0.0" date="2026-07-28">
|
||||
<url type="details">https://simplex.chat/blog/20260722-simplex-public-names.html</url>
|
||||
<description>
|
||||
<p>New in v7.0.</p>
|
||||
<p>SimpleX public names for channels and businesses (BETA).</p>
|
||||
<p>Better channels:</p>
|
||||
<ul>
|
||||
<li>Promote subscribers to contributors.</li>
|
||||
<li>Publish your channel on your website.</li>
|
||||
<li>Verify security code with contributors.</li>
|
||||
<li>Wider messages, easier to read.</li>
|
||||
<li>Host your own chat relays.</li>
|
||||
</ul>
|
||||
<p>Add a longer description to your profile.</p>
|
||||
<p>Simplified app settings.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="6.5.6" date="2026-06-22">
|
||||
<url type="details">https://simplex.chat/blog/20260430-simplex-channels-v6-5-consortium-crowdfunding-freedom-of-speech.html</url>
|
||||
<description>
|
||||
|
||||
Executable
+88
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Updates libHSsimplex-chat-*.a references in project.pbxproj to match the
|
||||
# libraries currently in apps/ios/Libraries/ios (populated by prepare.sh).
|
||||
# Handles both the plain .a and the -ghc*.a variant.
|
||||
|
||||
set -e
|
||||
|
||||
PBXPROJ=./apps/ios/SimpleX.xcodeproj/project.pbxproj
|
||||
LIB_DIR=./apps/ios/Libraries/ios
|
||||
|
||||
if [ ! -f "$PBXPROJ" ]; then
|
||||
echo "Error: $PBXPROJ not found. Run from repo root." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$LIB_DIR" ]; then
|
||||
echo "Error: $LIB_DIR not found. Run prepare.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# New filenames from the prepared Libraries directory.
|
||||
NEW_PLAIN=
|
||||
NEW_GHC=
|
||||
for f in "$LIB_DIR"/libHSsimplex-chat-*.a; do
|
||||
[ -f "$f" ] || continue
|
||||
base=$(basename "$f")
|
||||
case "$base" in
|
||||
*-ghc*) NEW_GHC=$base ;;
|
||||
*) NEW_PLAIN=$base ;;
|
||||
esac
|
||||
done
|
||||
if [ -z "$NEW_PLAIN" ] || [ -z "$NEW_GHC" ]; then
|
||||
echo "Error: expected libHSsimplex-chat-*.a and -ghc*.a in $LIB_DIR." >&2
|
||||
echo "Run prepare.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Current filenames referenced in project.pbxproj.
|
||||
OLD_PLAIN=
|
||||
OLD_GHC=
|
||||
for ref in $(grep -hoE 'libHSsimplex-chat-[^ "/]+\.a' "$PBXPROJ" | sort -u); do
|
||||
case "$ref" in
|
||||
*-ghc*) OLD_GHC=$ref ;;
|
||||
*) OLD_PLAIN=$ref ;;
|
||||
esac
|
||||
done
|
||||
if [ -z "$OLD_PLAIN" ] || [ -z "$OLD_GHC" ]; then
|
||||
echo "Error: no libHSsimplex-chat references found in $PBXPROJ." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$OLD_PLAIN" = "$NEW_PLAIN" ] && [ "$OLD_GHC" = "$NEW_GHC" ]; then
|
||||
echo "Already up to date: $NEW_PLAIN"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Sanity check before mutating: pbxproj must have exactly 4 lines per variant.
|
||||
OLD_PLAIN_LINES=$(grep -cF "$OLD_PLAIN" "$PBXPROJ" || true)
|
||||
OLD_GHC_LINES=$(grep -cF "$OLD_GHC" "$PBXPROJ" || true)
|
||||
if [ "$OLD_PLAIN_LINES" -ne 4 ] || [ "$OLD_GHC_LINES" -ne 4 ]; then
|
||||
echo "Error: expected 4 + 4 lines, found $OLD_PLAIN_LINES plain and $OLD_GHC_LINES ghc." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Replacing in $PBXPROJ:"
|
||||
echo " $OLD_PLAIN -> $NEW_PLAIN"
|
||||
echo " $OLD_GHC -> $NEW_GHC"
|
||||
|
||||
# Escape regex metachar '.' so versions match literally (no other metachars present).
|
||||
escape_dots() { printf '%s' "$1" | sed 's/\./\\./g'; }
|
||||
OLD_PLAIN_RE=$(escape_dots "$OLD_PLAIN")
|
||||
OLD_GHC_RE=$(escape_dots "$OLD_GHC")
|
||||
|
||||
# Put TMP next to PBXPROJ so the final mv is an atomic rename (same filesystem).
|
||||
TMP=$(mktemp "$PBXPROJ.XXXXXX")
|
||||
trap 'rm -f "$TMP"' EXIT
|
||||
# Replace ghc variant first (longer, more specific), then plain.
|
||||
sed -e "s|$OLD_GHC_RE|$NEW_GHC|g" -e "s|$OLD_PLAIN_RE|$NEW_PLAIN|g" "$PBXPROJ" > "$TMP"
|
||||
mv "$TMP" "$PBXPROJ"
|
||||
|
||||
# Verify result: exactly 4 plain lines and 4 ghc lines.
|
||||
NEW_PLAIN_LINES=$(grep -cF "$NEW_PLAIN" "$PBXPROJ" || true)
|
||||
NEW_GHC_LINES=$(grep -cF "$NEW_GHC" "$PBXPROJ" || true)
|
||||
if [ "$NEW_PLAIN_LINES" -ne 4 ] || [ "$NEW_GHC_LINES" -ne 4 ]; then
|
||||
echo "Error: post-replacement: $NEW_PLAIN_LINES plain + $NEW_GHC_LINES ghc (expected 4+4)." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Updated 8 lines (4 plain + 4 ghc)."
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Bumps CURRENT_PROJECT_VERSION (build number) and MARKETING_VERSION in
|
||||
# apps/ios/SimpleX.xcodeproj/project.pbxproj. Each appears in 10 places.
|
||||
#
|
||||
# Usage: ./scripts/ios/update-version.sh <build_number> <marketing_version>
|
||||
# Example: ./scripts/ios/update-version.sh 333 6.5.3
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 <build_number> <marketing_version>" >&2
|
||||
echo "Example: $0 333 6.5.3" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NEW_BUILD=$1
|
||||
NEW_MARKETING=$2
|
||||
|
||||
if ! echo "$NEW_BUILD" | grep -qE '^[0-9]+$'; then
|
||||
echo "Error: build_number must be a positive integer (got: $NEW_BUILD)." >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! echo "$NEW_MARKETING" | grep -qE '^[0-9]+(\.[0-9]+)+$'; then
|
||||
echo "Error: marketing_version must be like 6.5.3 (got: $NEW_MARKETING)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PBXPROJ=./apps/ios/SimpleX.xcodeproj/project.pbxproj
|
||||
if [ ! -f "$PBXPROJ" ]; then
|
||||
echo "Error: $PBXPROJ not found. Run from repo root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Detect current values; head -1 covers the (unexpected) mixed-values case,
|
||||
# which the 10-line sanity check below will reject.
|
||||
OLD_BUILD=$(grep -hoE 'CURRENT_PROJECT_VERSION = [^;]+;' "$PBXPROJ" \
|
||||
| sed -E 's/^.*= ([^;]+);$/\1/' | sort -u | head -1)
|
||||
OLD_MARKETING=$(grep -hoE 'MARKETING_VERSION = [^;]+;' "$PBXPROJ" \
|
||||
| sed -E 's/^.*= ([^;]+);$/\1/' | sort -u | head -1)
|
||||
if [ -z "$OLD_BUILD" ] || [ -z "$OLD_MARKETING" ]; then
|
||||
echo "Error: CURRENT_PROJECT_VERSION or MARKETING_VERSION not found in $PBXPROJ." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$OLD_BUILD" = "$NEW_BUILD" ] && [ "$OLD_MARKETING" = "$NEW_MARKETING" ]; then
|
||||
echo "Already up to date: build $NEW_BUILD, version $NEW_MARKETING"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Each field must appear in exactly 10 lines with a single uniform value.
|
||||
OLD_BUILD_LINES=$(grep -cF "CURRENT_PROJECT_VERSION = $OLD_BUILD;" "$PBXPROJ" || true)
|
||||
OLD_MARKETING_LINES=$(grep -cF "MARKETING_VERSION = $OLD_MARKETING;" "$PBXPROJ" || true)
|
||||
if [ "$OLD_BUILD_LINES" -ne 10 ] || [ "$OLD_MARKETING_LINES" -ne 10 ]; then
|
||||
echo "Error: expected 10 + 10 lines, found $OLD_BUILD_LINES CURRENT_PROJECT_VERSION and $OLD_MARKETING_LINES MARKETING_VERSION (mixed values?)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Bumping in $PBXPROJ:"
|
||||
if [ "$OLD_BUILD" != "$NEW_BUILD" ]; then
|
||||
echo " CURRENT_PROJECT_VERSION: $OLD_BUILD -> $NEW_BUILD"
|
||||
fi
|
||||
if [ "$OLD_MARKETING" != "$NEW_MARKETING" ]; then
|
||||
echo " MARKETING_VERSION: $OLD_MARKETING -> $NEW_MARKETING"
|
||||
fi
|
||||
|
||||
# Escape '.' in OLD_MARKETING so version dots match literally.
|
||||
OLD_MARKETING_RE=$(printf '%s' "$OLD_MARKETING" | sed 's/\./\\./g')
|
||||
|
||||
TMP=$(mktemp "$PBXPROJ.XXXXXX")
|
||||
trap 'rm -f "$TMP"' EXIT
|
||||
sed \
|
||||
-e "s|CURRENT_PROJECT_VERSION = $OLD_BUILD;|CURRENT_PROJECT_VERSION = $NEW_BUILD;|g" \
|
||||
-e "s|MARKETING_VERSION = $OLD_MARKETING_RE;|MARKETING_VERSION = $NEW_MARKETING;|g" \
|
||||
"$PBXPROJ" > "$TMP"
|
||||
mv "$TMP" "$PBXPROJ"
|
||||
|
||||
NEW_BUILD_LINES=$(grep -cF "CURRENT_PROJECT_VERSION = $NEW_BUILD;" "$PBXPROJ" || true)
|
||||
NEW_MARKETING_LINES=$(grep -cF "MARKETING_VERSION = $NEW_MARKETING;" "$PBXPROJ" || true)
|
||||
if [ "$NEW_BUILD_LINES" -ne 10 ] || [ "$NEW_MARKETING_LINES" -ne 10 ]; then
|
||||
echo "Error: post-replacement: $NEW_BUILD_LINES CURRENT_PROJECT_VERSION + $NEW_MARKETING_LINES MARKETING_VERSION (expected 10+10)." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Updated 20 lines (10 + 10)."
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"https://github.com/simplex-chat/simplexmq.git"."92598c2ddb06cfc2c19797a2c900cffcb8af4d5c" = "0x98w50vcb2qwdxgkgfvygn1vzclb12zg1k6kcs9rrw54rhmvfmp";
|
||||
"https://github.com/simplex-chat/simplexmq.git"."efaad8e73436d60f5052f07dda6b71151ad5039b" = "1jczm6baqz34sn13jgp5srqjk3gnx90brsfrsqw29al769ssrvkv";
|
||||
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
|
||||
"https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d";
|
||||
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";
|
||||
|
||||
@@ -118,9 +118,14 @@ check_apk() {
|
||||
verify_apk() {
|
||||
apk_name="$1"
|
||||
|
||||
# Release APKs are packaged by AGP (gradle :android:assembleFossRelease; AGP version is
|
||||
# gradle.plugin.version in apps/multiplatform/gradle.properties), which zero-pads ZIP
|
||||
# alignment. Do NOT add --pad-like-apksigner (standalone apksigner >= 35.0.0-rc1 uses
|
||||
# the 0xd935 extra-field padding) unless AGP is bumped to a packager that uses it —
|
||||
# otherwise apksigcopier aborts with "APK Signing Block offset < central directory offset".
|
||||
# https://github.com/obfusk/apksigcopier?tab=readme-ov-file#what-about-signatures-made-by-apksigner-from-build-tools--3500-rc1
|
||||
docker exec "${CONTAINER_NAME}" repro-apk zipalign --page-size 16 --pad-like-apksigner --replace "${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.aligned"
|
||||
docker exec "${CONTAINER_NAME}" repro-apk zipalign --page-size 16 --replace "${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.aligned"
|
||||
docker exec "${CONTAINER_NAME}" mv "${DOCKER_PATH_VERIFY}/${apk_name}.aligned" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user