Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions mobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ $(NIM_STATUS_CLIENT_LIB): $(STATUS_DESKTOP_NIM_FILES) $(NIM_STATUS_CLIENT_SCRIPT
$(TARGET): $(APP_SCRIPT) $(STATUS_GO_LIB) $(STATUS_Q_LIB) $(DOTHERSIDE_LIB) $(OPENSSL_LIB) $(QRCODEGEN_LIB) $(NIM_STATUS_CLIENT_LIB) $(STATUS_DESKTOP_RCC) $(WRAPPER_APP_FILES)
@echo "Building app"
ifeq ($(OS),android)
@BUILD_TYPE=$(PACKAGE_TYPE) BIN_DIR=$(BIN_PATH) BUILD_DIR=$(BUILD_PATH) QT_MAJOR=$(QT_MAJOR) $(APP_SCRIPT) $(HANDLE_OUTPUT)
@STATUS_DESKTOP=$(STATUS_DESKTOP) BUILD_TYPE=$(PACKAGE_TYPE) BIN_DIR=$(BIN_PATH) BUILD_DIR=$(BUILD_PATH) QT_MAJOR=$(QT_MAJOR) $(APP_SCRIPT) $(HANDLE_OUTPUT)
else
@BIN_DIR=$(BIN_PATH) BUILD_DIR=$(BUILD_PATH) QT_MAJOR=$(QT_MAJOR) $(APP_SCRIPT) $(HANDLE_OUTPUT)
@STATUS_DESKTOP=$(STATUS_DESKTOP) BIN_DIR=$(BIN_PATH) BUILD_DIR=$(BUILD_PATH) QT_MAJOR=$(QT_MAJOR) $(APP_SCRIPT) $(HANDLE_OUTPUT)
endif
@echo "Built $(TARGET)"

Expand Down
4 changes: 2 additions & 2 deletions mobile/android/qt6/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.status.mobile"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0">
android:versionCode="-- %%INSERT_VERSION_CODE%% --"
android:versionName="-- %%INSERT_VERSION_NAME%% --">
<!-- non-dangerous permissions -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.NFC"/>
Expand Down
4 changes: 2 additions & 2 deletions mobile/ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<string>APPL</string>

<key>CFBundleShortVersionString</key>
<string>${QMAKE_SHORT_VERSION}</string>
<string>${QMAKE_FULL_VERSION}</string>

<key>CFBundleVersion</key>
<string>${QMAKE_FULL_VERSION}</string>
<string>${CURRENT_PROJECT_VERSION}</string>

<key>LSRequiresIPhoneOS</key>
<true/>
Expand Down
37 changes: 19 additions & 18 deletions mobile/scripts/buildApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,26 @@ ANDROID_ABI=${ANDROID_ABI:-"arm64-v8a"}
BUILD_TYPE=${BUILD_TYPE:-"apk"}
SIGN_IOS=${SIGN_IOS:-"false"}

QMAKE_BIN="${QMAKE:-qmake}"
QMAKE_CONFIG="CONFIG+=device CONFIG+=release"

echo "Building wrapperApp for ${OS}, ${ANDROID_ABI}"

mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"

echo "Building wrapperApp"
STATUS_DESKTOP=${STATUS_DESKTOP:-"../vendors/status-desktop"}
DESKTOP_VERSION=$(eval cd "$STATUS_DESKTOP" && git describe --tags --dirty="-dirty" --always | cut -d- -f1 | cut -d. -f1-3 | sed 's/^v//')

TIMESTAMP=$(($(date +%s) * 1000 / 60000))

if [[ -n "${CHANGE_ID:-}" ]]; then
BUILD_VERSION="${CHANGE_ID}.${TIMESTAMP}"
else
BUILD_VERSION="${TIMESTAMP}"
fi

echo "Using version: $DESKTOP_VERSION; build version: $BUILD_VERSION"

if [[ "${OS}" == "android" ]]; then
if [[ -z "${JAVA_HOME}" ]]; then
Expand All @@ -28,9 +42,7 @@ if [[ "${OS}" == "android" ]]; then
echo "Building for Android 35"
ANDROID_PLATFORM=android-35

QMAKE_CONFIG="CONFIG+=device CONFIG+=release"
QMAKE_BIN="${QMAKE:-qmake}"
"$QMAKE_BIN" "$CWD/../wrapperApp/Status.pro" "$QMAKE_CONFIG" -spec android-clang ANDROID_ABIS="$ANDROID_ABI" APP_VARIANT="${APP_VARIANT}" -after
"$QMAKE_BIN" "$CWD/../wrapperApp/Status.pro" "$QMAKE_CONFIG" -spec android-clang ANDROID_ABIS="$ANDROID_ABI" APP_VARIANT="${APP_VARIANT}" VERSION="$DESKTOP_VERSION" -after

# Build the app
make -j"$(nproc)" apk_install_target
Expand Down Expand Up @@ -110,23 +122,12 @@ if [[ "${OS}" == "android" ]]; then
fi
fi
else
BUILD_VERSION=$(($(date +%s) * 1000 / 60000))

if [[ -n "${CHANGE_ID:-}" ]]; then
VERSION_STRING="${CHANGE_ID}.${BUILD_VERSION}"
else
VERSION_STRING="${BUILD_VERSION}"
fi

echo "Using version: $VERSION_STRING"

QMAKE_BIN="${QMAKE:-qmake}"
"$QMAKE_BIN" "$CWD/../wrapperApp/Status.pro" -spec macx-ios-clang CONFIG+=release CONFIG+="$SDK" CONFIG+=device VERSION="$VERSION_STRING" -after
"$QMAKE_BIN" "$CWD/../wrapperApp/Status.pro" "$QMAKE_CONFIG" -spec macx-ios-clang CONFIG+="$SDK" VERSION="$DESKTOP_VERSION" -after

# Compile resources
xcodebuild -configuration Release -target "Qt Preprocess" -sdk "$SDK" -arch "$ARCH" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcbeautify
xcodebuild -configuration Release -target "Qt Preprocess" -sdk "$SDK" -arch "$ARCH" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO CURRENT_PROJECT_VERSION=$BUILD_VERSION | xcbeautify
# Compile the app
xcodebuild -configuration Release -target Status install -sdk "$SDK" -arch "$ARCH" DSTROOT="$BIN_DIR" INSTALL_PATH="/" TARGET_BUILD_DIR="$BIN_DIR" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcbeautify
xcodebuild -configuration Release -target Status install -sdk "$SDK" -arch "$ARCH" DSTROOT="$BIN_DIR" INSTALL_PATH="/" TARGET_BUILD_DIR="$BIN_DIR" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO CURRENT_PROJECT_VERSION=$BUILD_VERSION | xcbeautify

if [[ ! -e "$BIN_DIR/Status.app/Info.plist" ]]; then
echo "Build failed"
Expand Down
2 changes: 2 additions & 0 deletions mobile/wrapperApp/Status.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ LIB_PREFIX = $$(APP_VARIANT)
android {
message("Configuring for android $${QT_ARCH}, $$(ANDROID_ABI)")

ANDROID_VERSION_NAME = $$VERSION

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/../android/qt$$QT_MAJOR_VERSION

LIBS += -L$$PWD/../lib/$$LIB_PREFIX -lnim_status_client
Expand Down