Compare commits

..

16 Commits

Author SHA1 Message Date
e6f5399d53 Clear out timestamp and file modes on classes.dex, too. 2024-08-05 12:43:22 -04:00
0e5806cadd Re-add classes.dex to the F-Droid APK. (!) 2024-08-05 12:26:10 -04:00
68c9d4afa7 Found some docs that say the icon.png max size is 512x512. 2024-08-04 21:54:42 -04:00
f0ea38fe49 Just set SOURCE_DATE_EPOCH=1. Using the last commit time is complicated (have to rebuild OpenSSL every commit/release). This only affects a debug string that we don't expose. 2024-08-04 12:54:02 -04:00
b0332f923e Debugging a SOURCE_DATE_EPOCH thing. 2024-08-04 12:16:46 -04:00
8a76c25394 Silence some OpenSSL build output so I can see what else is going on. Also install the signed fdroid APK in dist. 2024-08-04 12:10:52 -04:00
fd96126e3e Ooh, can I just exclude OpenSSL submodules? I don't want to see those. 2024-08-04 11:49:04 -04:00
ff3fbedc18 Fix inconsistent file modes in zip. 2024-08-04 11:25:06 -04:00
8791419f8e Sort better, and actually use ndk r26d. 2024-08-04 10:21:04 -04:00
5447b247a0 Back to r26d, and pin the timezome to get SOURCE_DATE_EPOCH to work correctly. 2024-08-04 09:54:33 -04:00
aabbb10564 for fdroid: Use android ndk r27, set SOURCE_DATE_EPOCH for the android ssl build, and remove a non-determinism in AndroidManifest.xml. 2024-08-04 09:36:46 -04:00
3ccd6c9a3e I missed. 2024-08-02 22:26:01 -04:00
c290240de7 Make a release to make sure F-Droid can pick it up. 2024-08-02 22:20:18 -04:00
8e799b174b Address some fdroid zip non-determinism. 2024-08-02 21:55:00 -04:00
a9c3a93989 Add some images for F-Droid. 2024-08-02 20:37:27 -04:00
3ef8698f42 Put android:versionCode and such back in the static AndroidManifest.xml. I forgot that F-Droid needs to see it. 2024-08-02 20:37:05 -04:00
9 changed files with 27 additions and 65 deletions

4
.gitmodules vendored
View File

@ -22,6 +22,4 @@
[submodule "deps/openssl_src"]
path = deps/openssl_src
url = https://github.com/openssl/openssl.git
[submodule "deps/dht"]
path = deps/dht
url = https://github.com/jech/dht.git
shallow = true

View File

@ -4,8 +4,8 @@ MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
VERSION_CODE := 25
VERSION_NUMBER := 0.0.22-wip
VERSION_NAME := This looks like a good place.
VERSION_NUMBER := 0.0.21.1
VERSION_NAME := What are we even doing here?
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3460000.zip
LIBUV_URL := https://dist.libuv.org/dist/v1.48.0/libuv-v1.48.0.tar.gz
@ -21,6 +21,9 @@ BUNDLETOOL = out/bundletool.jar
HAVE_WIN := 0
export SOURCE_DATE_EPOCH=1
export TZ=UTC
ifeq ($(UNAME_S),Darwin)
BUILD_TYPES := macosdebug macosrelease iosdebug iosrelease iossimdebug iossimrelease
else ifeq ($(UNAME_S),Linux)
@ -67,11 +70,7 @@ ANDROID_MIN_SDK_VERSION := 24
ANDROID_TARGET_SDK_VERSION := 34
ANDROID_BUILD_TOOLS := $(ANDROID_SDK)/build-tools/34.0.0
ANDROID_PLATFORM := $(ANDROID_SDK)/platforms/android-$(ANDROID_TARGET_SDK_VERSION)
ifneq "$(wildcard $(ANDROID_SDK)/ndk/27.0.12077973/.)" ""
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/27.0.12077973
else
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/26.2.11394342
endif
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/26.3.11579264
ANDROID_ARMV7A_TARGETS := \
out/androiddebug-armv7a/tildefriends \
@ -250,7 +249,6 @@ APP_OBJS := $(call get_objs,APP_SOURCES)
$(APP_OBJS): CFLAGS += \
-Ideps/base64c/include \
-Ideps/crypt_blowfish \
-Ideps/dht \
-Ideps/libbacktrace \
-Ideps/libsodium \
-Ideps/libsodium/src/libsodium/include \
@ -588,9 +586,6 @@ $(MINIUNZIP_OBJS): CFLAGS += \
-Ideps/zlib \
-Wno-maybe-uninitialized
DHT_SOURCES := deps/dht/dht.c
DHT_OBJS := $(call get_objs,DHT_SOURCES)
LDFLAGS += \
-pthread \
-lm
@ -637,7 +632,6 @@ all: $(BUILD_TYPES)
ALL_APP_OBJS := \
$(APP_OBJS) \
$(BLOWFISH_OBJS) \
$(DHT_OBJS) \
$(LIBBACKTRACE_OBJS) \
$(MINIUNZIP_OBJS) \
$(PICOHTTPPARSER_OBJS) \
@ -740,7 +734,7 @@ PACKAGE_DIRS := \
deps/prettier/ \
deps/lit/
RAW_FILES := $(filter-out apps/blog% apps/issues% apps/welcome% apps/journal% %.map, $(shell find $(PACKAGE_DIRS) -type f))
RAW_FILES := $(sort $(filter-out apps/blog% apps/issues% apps/welcome% apps/journal% %.map, $(shell find $(PACKAGE_DIRS) -type f)))
out/apk/TildeFriends-arm-debug.unsigned.apk: BUILD_TYPE := debug
out/apk/TildeFriends-arm-release.unsigned.apk: BUILD_TYPE := release
@ -833,6 +827,7 @@ out/apk/TildeFriends-x86-%.unsigned.apk:
@$(ANDROID_BUILD_TOOLS)/zipalign -f 4 $@.zip $@
out/apk/TildeFriends-%.fdroid.unsigned.apk:
@rm -rf out/apk-fdroid-$(BUILD_TYPE) out/apk-fdroid-$(BUILD_TYPE)-raw
@mkdir -p $(dir $@) out/apk-fdroid-$(BUILD_TYPE)/lib/x86_64/ out/apk-fdroid-$(BUILD_TYPE)/lib/x86/ out/apk-fdroid-$(BUILD_TYPE)/lib/arm64-v8a/ out/apk-fdroid-$(BUILD_TYPE)/lib/armeabi-v7a/
@echo "[aapt] $@"
@cp out/android$(BUILD_TYPE)-x86_64/tildefriends out/apk-fdroid-$(BUILD_TYPE)/lib/x86_64/libtildefriends.so
@ -845,8 +840,12 @@ out/apk/TildeFriends-%.fdroid.unsigned.apk:
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk-fdroid-$(BUILD_TYPE)/lib/armeabi-v7a/libtildefriends.so
@cp out/apk/res.fdroid.apk $@.zip
@cp out/apk/classes.dex out/apk-fdroid-$(BUILD_TYPE)/classes.dex
@cd out/apk-fdroid-$(BUILD_TYPE) && zip -u ../../$@.zip -q -9 -r . && cd ../../
@zip -u $@.zip -q -9 $(RAW_FILES)
@touch -d @0 out/apk-fdroid-$(BUILD_TYPE)/classes.dex out/apk-fdroid-$(BUILD_TYPE)/lib/*/libtildefriends.so
@chmod 755 out/apk-fdroid-$(BUILD_TYPE)/classes.dex out/apk-fdroid-$(BUILD_TYPE)/lib/*/libtildefriends.so
@cd out/apk-fdroid-$(BUILD_TYPE) && zip -X -u ../../$@.zip -q classes.dex lib/*/libtildefriends.so && cd ../../
@mkdir out/apk-fdroid-$(BUILD_TYPE)-raw
@for i in $(RAW_FILES); do mkdir -p $$(dirname out/apk-fdroid-$(BUILD_TYPE)-raw/$$i) && cp $$i out/apk-fdroid-$(BUILD_TYPE)-raw/$$i && touch -d @0 out/apk-fdroid-$(BUILD_TYPE)-raw/$$i && chmod 644 out/apk-fdroid-$(BUILD_TYPE)-raw/$$i; done
@cd out/apk-fdroid-$(BUILD_TYPE)-raw && zip -X -u ../../$@.zip -q $(RAW_FILES) && cd ../../
@$(ANDROID_BUILD_TOOLS)/zipalign -f 4 $@.zip $@
out/%.apk: out/apk/%.unsigned.apk
@ -967,7 +966,7 @@ clean:
rm -rf $(BUILD_DIR)
.PHONY: clean
dist: release-apk iosrelease-ipa aab $(if $(HAVE_WIN), out/winrelease/tildefriends.standalone.exe)
dist: release-apk iosrelease-ipa aab $(if $(HAVE_WIN), out/winrelease/tildefriends.standalone.exe) out/TildeFriends-release.fdroid.apk
@echo [archive] dist/tildefriends-$(VERSION_NUMBER).tar.xz
@rm -rf out/tildefriends-$(VERSION_NUMBER)
@mkdir -p dist/ out/tildefriends-$(VERSION_NUMBER)
@ -999,6 +998,7 @@ dist: release-apk iosrelease-ipa aab $(if $(HAVE_WIN), out/winrelease/tildefrien
@test $(HAVE_WIN) && echo "[cp] tildefriends-$(VERSION_NUMBER).exe"
@test $(HAVE_WIN) && cp out/winrelease/tildefriends.standalone.exe dist/tildefriends-$(VERSION_NUMBER).exe
@cp out/TildeFriends.aab dist/TildeFriends-$(VERSION_NUMBER).aab
@cp out/TildeFriends-release.fdroid.apk dist/TildeFriends-$(VERSION_NUMBER).fdroid.apk
.PHONY: dist
dist-test: dist

1
deps/dht vendored

Submodule deps/dht deleted from 1112308944

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unprompted.tildefriends">
package="com.unprompted.tildefriends"
android:versionCode="25"
android:versionName="0.0.21.1">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="Tilde Friends"
android:versionCode="25"
android:versionName="0.0.22-wip"
android:usesCleartextTraffic="true"
android:debuggable="false">
android:usesCleartextTraffic="true">
<meta-data android:name="android.max_aspect" android:value="2.1"/>
<activity
android:name=".TildeFriendsActivity"

View File

@ -1,34 +0,0 @@
#include <stddef.h>
#include <stdio.h>
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#include <winsock.h>
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#include "dht.h"
int dht_sendto(int sockfd, const void *buf, int len, int flags, const struct sockaddr *to, int tolen)
{
return -1;
}
int dht_blacklisted(const struct sockaddr *sa, int salen)
{
return 0;
}
void dht_hash(void *hash_return, int hash_size, const void *v1, int len1, const void *v2, int len2, const void *v3, int len3)
{
}
int dht_random_bytes(void *buf, size_t size)
{
return 0;
}

View File

@ -1,2 +1,2 @@
#define VERSION_NUMBER "0.0.22-wip"
#define VERSION_NAME "This looks like a good place."
#define VERSION_NUMBER "0.0.21.1"
#define VERSION_NAME "What are we even doing here?"

View File

@ -80,9 +80,9 @@ build_the_thing() {
pwd
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS" && \
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS && \
make clean && \
make build_generated && \
make libcrypto.a libssl.a || exit 128
make -s clean && \
make -s build_generated && \
make -s libcrypto.a libssl.a || exit 128
}
for build_target in $BUILD_TARGETS