Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d60e62c
chore: enforce USE_SYSTEM_NIM=1 when building statusgo-shared-library
Ivansete-status Nov 26, 2025
edddc41
chore: revert previous commit
Ivansete-status Nov 26, 2025
20c5e83
chore: add sds folders into STATUSGO_MAKE_PARAMS
Ivansete-status Nov 26, 2025
6882d12
chore: adjust LIBSDS_LIBDIR in Makefile
Ivansete-status Nov 26, 2025
f7c8930
chore: add NIM_SDS_SOURCE_DIR in Jenkinsfiles
Ivansete-status Nov 26, 2025
cb72d51
ci: ios build NIM_SDS_SOURCE_DIR
igor-sirotin Nov 26, 2025
831ec23
chore: more explicit nim-sds folder set in mobile Makefile
Ivansete-status Nov 27, 2025
d9f252e
chore: make sure sds cache is cleaned before pkg-macos in Makefile
Ivansete-status Nov 27, 2025
e731397
chore: from previous commit properly make use of tab in Makefile
Ivansete-status Nov 27, 2025
db9cdcb
chore: adjust lib path cp in mobile Makefile
Ivansete-status Nov 27, 2025
8156c85
chore: mobile/Makefile hard code cp command libsds
Ivansete-status Nov 28, 2025
743cd9f
chore: for some unkown reason android and ios need different cp command
Ivansete-status Nov 29, 2025
c7ee660
chore: tackling previous Igor's comments
Ivansete-status Dec 1, 2025
16bc8d1
chore: export NIM_SDS_SOURCE_DIR env var from Makefile
Ivansete-status Dec 1, 2025
a5abae2
chore: fix default NIM_SDS_SOURCE_DIR and set it ok to STATUSGO_MAKE_…
Ivansete-status Dec 1, 2025
206253c
chore: add NIM_SDS_SOURCE_DIR def in Jenkinsfile.tests-nim
Ivansete-status Dec 1, 2025
e9617b4
chore: update status-go
Ivansete-status Dec 2, 2025
2100ca1
fix; copy nimsds library on windows
igor-sirotin Dec 3, 2025
cf2f8ed
chore: update status-go to latest develop
Ivansete-status Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ ifeq ($(USE_NWAKU), true)
NIM_EXTRA_PARAMS += --passL:"-L$(LIBWAKU_LIBDIR)" --passL:"-lwaku"
endif

NIM_SDS_SOURCE_DIR ?= $(GIT_ROOT)/../nim-sds
export NIM_SDS_SOURCE_DIR
NIMSDS_LIBDIR := $(NIM_SDS_SOURCE_DIR)/build
NIMSDS_LIBFILE := $(NIMSDS_LIBDIR)/libsds.$(LIB_EXT)
NIM_EXTRA_PARAMS += --passL:"-L$(NIMSDS_LIBDIR)" --passL:"-lsds"
STATUSGO_MAKE_PARAMS += NIM_SDS_SOURCE_DIR="$(NIM_SDS_SOURCE_DIR)"

INCLUDE_DEBUG_SYMBOLS ?= false
ifeq ($(INCLUDE_DEBUG_SYMBOLS),true)
# We need `-d:debug` to get Nim's default stack traces
Expand Down Expand Up @@ -790,7 +797,7 @@ $(STATUS_CLIENT_EXE): compile_windows_resources nim_status_client nim_windows_la
cp bin/nim_windows_launcher.exe $(OUTPUT)/Status.exe
rcedit $(OUTPUT)/bin/Status.exe --set-icon $(OUTPUT)/resources/status.ico
rcedit $(OUTPUT)/Status.exe --set-icon $(OUTPUT)/resources/status.ico
cp $(DOTHERSIDE_LIBFILE) $(STATUSGO) $(STATUSKEYCARDGO) $(STATUSQ_INSTALL_PATH)/StatusQ/* $(OUTPUT)/bin/
cp $(DOTHERSIDE_LIBFILE) $(STATUSGO) $(STATUSKEYCARDGO) $(NIMSDS_LIBFILE) $(STATUSQ_INSTALL_PATH)/StatusQ/* $(OUTPUT)/bin/
cp "$(shell which libgcc_s_seh-1.dll)" $(OUTPUT)/bin/
cp "$(shell which libwinpthread-1.dll)" $(OUTPUT)/bin/
cp "$(shell which libcrypto-3-x64.dll)" $(OUTPUT)/bin/
Expand Down Expand Up @@ -831,7 +838,10 @@ pkg-linux: check-pkg-target-linux $(STATUS_CLIENT_APPIMAGE)

tgz-linux: $(STATUS_CLIENT_TARBALL)

pkg-macos: check-pkg-target-macos $(STATUS_CLIENT_DMG)
clean-libsds-cache:
@echo "Cleaning libsds_d from cache..."
rm -rf ~/.cache/nim/libsds_d
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seem to be very specific. What's this about? Will it work on Windows?

Copy link
Contributor

@Ivansete-status Ivansete-status Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid compilation issues between macos and iOS. i.e., error such as:

    ld: building for 'macOS', but linking in object file
    (/Users/ivan/.cache/nim/libsds_d/@m..@svendor@snimbus-build-system@svendor@sNim@slib@ssystem@sexceptions.nim.c.o)
    built for 'iOS-simulator'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then shouldn't this be done in status-go?

pkg-macos: clean-libsds-cache check-pkg-target-macos $(STATUS_CLIENT_DMG)

pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_EXE)

Expand All @@ -858,12 +868,12 @@ run: $(RUN_TARGET)

run-linux: nim_status_client
echo -e "\033[92mRunning:\033[39m bin/nim_status_client"
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(STATUSQ_INSTALL_PATH)/StatusQ":"$(LD_LIBRARY_PATH)" \
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(NIMSDS_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(STATUSQ_INSTALL_PATH)/StatusQ":"$(LD_LIBRARY_PATH)" \
./bin/nim_status_client $(ARGS)

run-linux-gdb: nim_status_client
echo -e "\033[92mRunning:\033[39m bin/nim_status_client"
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(STATUSQ_INSTALL_PATH)/StatusQ":"$(LD_LIBRARY_PATH)" \
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(NIMSDS_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(STATUSQ_INSTALL_PATH)/StatusQ":"$(LD_LIBRARY_PATH)" \
gdb -ex=r ./bin/nim_status_client $(ARGS)

run-macos: nim_status_client
Expand All @@ -886,7 +896,7 @@ NIM_TEST_FILES := $(wildcard test/nim/*.nim)
NIM_TESTS := $(foreach test_file,$(NIM_TEST_FILES),nim-test-run/$(test_file))

nim-test-run/%: | dotherside $(STATUSGO) $(QRCODEGEN)
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(LD_LIBRARY_PATH)" $(ENV_SCRIPT) \
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(LIBWAKU_LIBDIR)":"$(NIMSDS_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(LD_LIBRARY_PATH)" $(ENV_SCRIPT) \
nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) --mm:refc --passL:"-L$(STATUSGO_LIBDIR)" --passL:"-lstatus" --passL:"$(QRCODEGEN)" -r $(subst nim-test-run/,,$@)

tests-nim-linux: $(NIM_TESTS)
Expand Down
1 change: 1 addition & 0 deletions ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pipeline {
PACKAGE_TYPE = "${params.PACKAGE_TYPE != 'auto' ? params.PACKAGE_TYPE : (isReleaseBranch ? 'aab' : 'apk')}"
STATUS_ARTIFACT = "pkg/${utils.pkgFilename(ext: env.PACKAGE_TYPE, arch: 'arm64', version: env.VERSION, type: env.APP_TYPE)}"
STATUS_BINARY = "${WORKSPACE}/mobile/bin/android/qt6/Status.${env.PACKAGE_TYPE}"
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
}

stages {
Expand Down
4 changes: 4 additions & 0 deletions ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ pipeline {
STATUS_IOS_IPA = "${WORKSPACE}/mobile/bin/ios/qt6/Status.ipa"
TESTFLIGHT_POLL_TIMEOUT = "${params.TESTFLIGHT_POLL_TIMEOUT}"
TESTFLIGHT_POLL_INTERVAL = "${params.TESTFLIGHT_POLL_INTERVAL}"
/* nwaku source directory */
NWAKU_SOURCE_DIR = "${env.WORKSPACE_TMP}/nwaku"
/* nim-sds source directory */
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
}

stages {
Expand Down
2 changes: 2 additions & 0 deletions ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ pipeline {
USE_NWAKU = "${params.USE_NWAKU}"
/* nwaku source directory */
NWAKU_SOURCE_DIR = "${env.WORKSPACE_TMP}/nwaku"
/* nim-sds source directory */
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
/* sets App Version in Settings */
VERSION = sh(script: "./scripts/version.sh", returnStdout: true).trim()
/* Control output the filename */
Expand Down
2 changes: 2 additions & 0 deletions ci/Jenkinsfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ pipeline {
USE_NWAKU = "${params.USE_NWAKU}"
/* nwaku source directory */
NWAKU_SOURCE_DIR = "${env.WORKSPACE_TMP}/nwaku"
/* nim-sds source directory */
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
/* Controls the App version in Settings */
VERSION = sh(script: "./scripts/version.sh", returnStdout: true).trim()
/* Control output the filename */
Expand Down
2 changes: 2 additions & 0 deletions ci/Jenkinsfile.tests-nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ pipeline {
VERBOSE = "${params.USE_NWAKU}"
/* FIXME: figure out why NIMFLAGS are not respected */
XDG_CACHE_HOME = "${env.WORKSPACE_TMP}/.cache"
/* nim-sds source directory */
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
}

stages {
Expand Down
1 change: 1 addition & 0 deletions ci/Jenkinsfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pipeline {
USE_MOCKED_KEYCARD_LIB = "${params.USE_MOCKED_KEYCARD_LIB}"
/* FIXME: figure out why NIMFLAGS are not respected */
XDG_CACHE_HOME = "${env.WORKSPACE_TMP}/.cache"
NIM_SDS_SOURCE_DIR = "${env.WORKSPACE_TMP}/nim-sds"
}

stages {
Expand Down
3 changes: 2 additions & 1 deletion mobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ status-desktop-rcc: clean-status-desktop-rcc $(STATUS_DESKTOP_RCC)

$(STATUS_GO_LIB):
@echo "Building status-go mobile library"
@mkdir -p $(LIB_PATH)
ifeq ($(OS),android)
CC="$(CC)" $(MAKE) -C ../vendor/status-go statusgo-android-library \
ARCH=$(ARCH) \
Expand All @@ -37,7 +38,7 @@ else ifeq ($(OS),ios)
SHELL=/bin/sh
endif
@echo "Copying library to mobile lib directory"
@mkdir -p $(LIB_PATH)
@cp $(NIM_SDS_SOURCE_DIR)/build/libsds$(LIB_EXT) $(LIB_PATH)/libsds$(LIB_EXT)
@cp ../vendor/status-go/build/bin/libstatus$(LIB_EXT) $(LIB_PATH)/libstatus$(LIB_EXT)

$(STATUS_Q_LIB): $(STATUS_Q_FILES) $(STATUS_Q_SCRIPT) $(STATUS_Q_UI_FILES)
Expand Down
1 change: 1 addition & 0 deletions scripts/init_app_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cp "${STATUSKEYCARDGO}" "${APP_DIR}/usr/lib/"
if [ "${USE_NWAKU}" = "true" ]; then
cp ${NWAKU_SOURCE_DIR}/build/libwaku.so "${APP_DIR}/usr/lib/"
fi
cp ${NIM_SDS_SOURCE_DIR}/build/libsds.so "${APP_DIR}/usr/lib/"
cp "${FCITX5_QT}" "${APP_DIR}/usr/plugins/platforminputcontexts/"

# Copy dependencies, which linuxdeployqt can't manage from nix store or system (FHS)
Expand Down