diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index b364073ec8d..05782ab9a74 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -80,5 +80,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: Status-tablet - path: mobile/bin/android/qt6/Status-tablet.apk + path: mobile/bin/android/qt6/default/Status-tablet.apk diff --git a/Makefile b/Makefile index 0433953d12f..f639a09b594 100644 --- a/Makefile +++ b/Makefile @@ -908,7 +908,7 @@ mobile-run: deps-common mobile-build: | deps-common echo -e "\033[92mBuilding:\033[39m mobile app" - $(MAKE) -C mobile + $(MAKE) -C mobile V=3 mobile-clean: echo -e "\033[92mCleaning:\033[39m mobile app" diff --git a/mobile/scripts/Common.mk b/mobile/scripts/Common.mk index c274e652407..6a038dca8ca 100644 --- a/mobile/scripts/Common.mk +++ b/mobile/scripts/Common.mk @@ -47,7 +47,6 @@ STATUS_DESKTOP_UI_FILES := $(shell find $(STATUS_DESKTOP)/ui -type f \( -iname ' STATUS_Q_FILES := $(shell find $(STATUSQ) -type f \( -iname '*.cpp' -o -iname '*.h' \) -not -iname '*.qrc' -not -iname '*.qml') STATUS_Q_UI_FILES := $(shell find $(STATUSQ) -type f \( -iname '*.qml' -o -iname '*.qrc' \)) STATUS_GO_FILES := $(shell find $(STATUS_GO) -type f \( -iname '*.go' \)) -STATUS_GO_SCRIPT := $(SCRIPTS_PATH)/buildStatusGo.sh DOTHERSIDE_FILES := $(shell find $(DOTHERSIDE) -type f \( -iname '*.cpp' -o -iname '*.h' \)) OPENSSL_FILES := $(shell find $(OPENSSL) -type f \( -iname '*.c' -o -iname '*.h' \)) QRCODEGEN_FILES := $(shell find $(QRCODEGEN) -type f \( -iname '*.c' -o -iname '*.h' \)) @@ -65,6 +64,7 @@ RUN_SCRIPT := $(SCRIPTS_PATH)/$(OS)/run.sh # lib files STATUS_GO_LIB := $(LIB_PATH)/libstatus$(LIB_EXT) +SDS_LIB := $(LIB_PATH)/libsds$(LIB_EXT) STATUS_Q_LIB := $(LIB_PATH)/libStatusQ$(LIB_SUFFIX)$(LIB_EXT) OPENSSL_LIB := $(LIB_PATH)/libssl_3$(LIB_EXT) QRCODEGEN_LIB := $(LIB_PATH)/libqrcodegen.a diff --git a/mobile/scripts/EnvVariables.mk b/mobile/scripts/EnvVariables.mk index 1a25e510aa0..07d9d8d8de6 100644 --- a/mobile/scripts/EnvVariables.mk +++ b/mobile/scripts/EnvVariables.mk @@ -93,6 +93,8 @@ else export LIB_EXT := .so endif +export GOOS=$(shell go env GOHOSTOS) +export GOARCH=$(shell go env GOHOSTARCH) # Verify tools are installed QMAKE := $(shell which qmake) diff --git a/mobile/scripts/buildStatusGo.sh b/mobile/scripts/buildStatusGo.sh index 1157c2943aa..f5ecbec0be6 100755 --- a/mobile/scripts/buildStatusGo.sh +++ b/mobile/scripts/buildStatusGo.sh @@ -26,10 +26,20 @@ fi echo "Building status-go for $ARCH using compiler: $CC" cd "$STATUS_GO" + +if [[ "$OS" == "android" ]]; then + echo "Generating android SDS bindings" + export ANDROID_TARGET=28 + export ANDROID_NDK_HOME="/opt/android-sdk/ndk/27.2.12479018/" + make generate-sds-android V=3 SHELL=/bin/sh + cp $STATUS_GO/vendor/github.com/waku-org/sds-go-bindings/third_party/nim-sds/build/libsds.so "$LIB_DIR/libsds.$LIB_EXT" +fi + make generate V=3 SHELL=/bin/sh mkdir -p build/bin/statusgo-lib -go run cmd/library/main.go cmd/library/const.go > build/bin/statusgo-lib/main.go +GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \ + go run cmd/library/main.go cmd/library/const.go > build/bin/statusgo-lib/main.go GOFLAGS="" CGO_CFLAGS="-Os -flto" CGO_LDFLAGS="-Os -flto" CGO_ENABLED=1 GOOS="$OS" GOARCH="$GOARCH" \ go build \ diff --git a/mobile/wrapperApp/Status-tablet.pro b/mobile/wrapperApp/Status-tablet.pro index dd014e611d0..50bb5323c38 100644 --- a/mobile/wrapperApp/Status-tablet.pro +++ b/mobile/wrapperApp/Status-tablet.pro @@ -22,7 +22,7 @@ QMLPATHS += $$QML_IMPORT_PATH LIB_PREFIX = qt$$QT_MAJOR_VERSION/$$(APP_VARIANT) android { - message("cofiguring for android $${QT_ARCH}, $$(ANDROID_ABI)") + message("configuring for android $${QT_ARCH}, $$(ANDROID_ABI)") ANDROID_PACKAGE_SOURCE_DIR = $$PWD/../android/qt$$QT_MAJOR_VERSION @@ -33,6 +33,7 @@ android { $$PWD/../lib/android/$$LIB_PREFIX/libnim_status_client.so \ $$PWD/../lib/android/$$LIB_PREFIX/libDOtherSide$$(LIB_SUFFIX)$$(LIB_EXT) \ $$PWD/../lib/android/$$LIB_PREFIX/libstatus.so \ + $$PWD/../lib/android/$$LIB_PREFIX/libsds.so \ $$PWD/../lib/android/$$LIB_PREFIX/libStatusQ$$(LIB_SUFFIX)$$(LIB_EXT) } diff --git a/scripts/fix_app_dir.sh b/scripts/fix_app_dir.sh index 39e1d66a9ae..28fcca53374 100755 --- a/scripts/fix_app_dir.sh +++ b/scripts/fix_app_dir.sh @@ -10,7 +10,8 @@ if [[ ! -z "${IN_NIX_SHELL}" ]]; then patchelf --set-rpath '$ORIGIN' \ "${APP_DIR}/usr/lib/libcom_err.so.3" \ - "${APP_DIR}/usr/lib/libstatus.so" + "${APP_DIR}/usr/lib/libstatus.so" \ + "${APP_DIR}/usr/lib/libsds.so" patchelf --set-rpath '$ORIGIN/../' \ "${APP_DIR}"/usr/lib/gstreamer-1.0/* \ diff --git a/scripts/init_app_dir.sh b/scripts/init_app_dir.sh index 31521a735d7..cbbd753da47 100755 --- a/scripts/init_app_dir.sh +++ b/scripts/init_app_dir.sh @@ -24,6 +24,7 @@ cp -R resources.rcc "${APP_DIR}/usr/" cp bin/i18n/* "${APP_DIR}/usr/i18n" cp vendor/status-go/build/bin/libstatus.so "${APP_DIR}/usr/lib/" cp vendor/status-go/build/bin/libstatus.so.0 "${APP_DIR}/usr/lib/" +cp vendor/status-go/vendor/github.com/waku-org/sds-go-bindings/third_party/nim-sds/build/libsds.so "${APP_DIR}/usr/lib/" cp "${STATUSKEYCARDGO}" "${APP_DIR}/usr/lib/" if [ "${USE_NWAKU}" = "true" ]; then cp vendor/status-go/vendor/github.com/waku-org/waku-go-bindings/third_party/nwaku/build/libwaku.so "${APP_DIR}/usr/lib/" diff --git a/vendor/status-go b/vendor/status-go index 2c69b915ca3..18566623f2a 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 2c69b915ca3ee411c204f1cf6b12619c7b11475e +Subproject commit 18566623f2aca7eebd8ffe42cacdf5e6ff401d74