Compare commits

..

5 Commits

Author SHA1 Message Date
ee0aac8877 Add some images for F-Droid.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 6m14s
2024-08-02 20:31:22 -04:00
641c699720 Put android:versionCode and such back in the static AndroidManifest.xml. I forgot that F-Droid needs to see it. 2024-08-02 20:07:21 -04:00
aa1ad0a080 The beginnings of "What would it look like if I used a DHT for peer discovery?"
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 4m7s
2024-07-31 20:50:41 -04:00
1bc492aef1 Update libbacktrace to latest. 2024-07-31 20:21:50 -04:00
928ff690d2 Start work on v0.0.22. 2024-07-31 20:21:38 -04:00
9 changed files with 65 additions and 27 deletions

4
.gitmodules vendored
View File

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

View File

@ -4,8 +4,8 @@ MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
VERSION_CODE := 25
VERSION_NUMBER := 0.0.21.1
VERSION_NAME := What are we even doing here?
VERSION_NUMBER := 0.0.22-wip
VERSION_NAME := This looks like a good place.
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,9 +21,6 @@ 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)
@ -70,7 +67,11 @@ 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)
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/26.3.11579264
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_ARMV7A_TARGETS := \
out/androiddebug-armv7a/tildefriends \
@ -249,6 +250,7 @@ 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 \
@ -586,6 +588,9 @@ $(MINIUNZIP_OBJS): CFLAGS += \
-Ideps/zlib \
-Wno-maybe-uninitialized
DHT_SOURCES := deps/dht/dht.c
DHT_OBJS := $(call get_objs,DHT_SOURCES)
LDFLAGS += \
-pthread \
-lm
@ -632,6 +637,7 @@ all: $(BUILD_TYPES)
ALL_APP_OBJS := \
$(APP_OBJS) \
$(BLOWFISH_OBJS) \
$(DHT_OBJS) \
$(LIBBACKTRACE_OBJS) \
$(MINIUNZIP_OBJS) \
$(PICOHTTPPARSER_OBJS) \
@ -734,7 +740,7 @@ PACKAGE_DIRS := \
deps/prettier/ \
deps/lit/
RAW_FILES := $(sort $(filter-out apps/blog% apps/issues% apps/welcome% apps/journal% %.map, $(shell find $(PACKAGE_DIRS) -type f)))
RAW_FILES := $(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
@ -827,7 +833,6 @@ 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
@ -840,12 +845,8 @@ 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
@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 ../../
@cd out/apk-fdroid-$(BUILD_TYPE) && zip -u ../../$@.zip -q -9 -r . && cd ../../
@zip -u $@.zip -q -9 $(RAW_FILES)
@$(ANDROID_BUILD_TOOLS)/zipalign -f 4 $@.zip $@
out/%.apk: out/apk/%.unsigned.apk
@ -966,7 +967,7 @@ clean:
rm -rf $(BUILD_DIR)
.PHONY: clean
dist: release-apk iosrelease-ipa aab $(if $(HAVE_WIN), out/winrelease/tildefriends.standalone.exe) out/TildeFriends-release.fdroid.apk
dist: release-apk iosrelease-ipa aab $(if $(HAVE_WIN), out/winrelease/tildefriends.standalone.exe)
@echo [archive] dist/tildefriends-$(VERSION_NUMBER).tar.xz
@rm -rf out/tildefriends-$(VERSION_NUMBER)
@mkdir -p dist/ out/tildefriends-$(VERSION_NUMBER)
@ -998,7 +999,6 @@ 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

Submodule deps/dht added at 1112308944

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

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

34
src/dht.c Normal file
View File

@ -0,0 +1,34 @@
#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.21.1"
#define VERSION_NAME "What are we even doing here?"
#define VERSION_NUMBER "0.0.22-wip"
#define VERSION_NAME "This looks like a good place."

View File

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