Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kebekus committed Nov 24, 2023
1 parent af23ec0 commit e1f6f66
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 62 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Basic information about our project
project(addhoursandminutes VERSION 1.3.5)
project(addhoursandminutes VERSION 1.4.0)
set(APP_ID de.akaflieg_freiburg.cavok.add_hours_and_minutes)
set(DISPLAY_NAME "Add Times")
set(PROJECT_DATE 2023-3-28)
set(PROJECT_DATE 2023-11-24)
math(EXPR PROJECT_VERSION_CODE 100000*${PROJECT_VERSION_MAJOR}+1000*${PROJECT_VERSION_MINOR}+${PROJECT_VERSION_PATCH})
add_definitions( -DPROJECT_VERSION="${PROJECT_VERSION}" )

Expand All @@ -25,6 +25,7 @@ endif()
find_package(Qt6 6.5 REQUIRED COMPONENTS Core LinguistTools Quick QuickControls2 Svg)
qt_standard_project_setup()
qt_policy(SET QTP0001 NEW)
qt_policy(SET QTP0002 NEW)

# Subdirectories
add_subdirectory(generatedSources)
Expand Down
21 changes: 5 additions & 16 deletions buildscript-android-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,22 @@ set -e

rm -rf build-android-debug
mkdir -p build-android-debug
cd build-android-debug


#
# Configure
#

export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/23.1.7779620
export JAVA_HOME=/usr/lib/jvm/java-19-openjdk

$Qt6_DIR_ANDROID\_x86_64/bin/qt-cmake .. \
$Qt6_DIR_ANDROID\_x86_64/bin/qt-cmake \
-DCMAKE_BUILD_TYPE:STRING="Debug" \
-DQT_ANDROID_ABIS="arm64-v8a" \
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING=Debug
-S . \
-B build-android-debug

# Work around a bug in CMake Script…
sed -i s/zipalign/31/ src/android-addhoursandminutes-deployment-settings.json

#
# Compile
#

ninja


#
# cd out
#

cd ..
cmake --build build-android-debug
56 changes: 12 additions & 44 deletions buildscript-android-release.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
#!/bin/bash

#
# This script builds "Add Times" for Android in release mode.
#
# See https://github.com/Akaflieg-Freiburg/addhoursandminutes/wiki/Build-scripts
#

#
# Copyright © 2020-2021 Stefan Kebekus <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA.
#


#
# Fail on first error
Expand All @@ -37,39 +13,31 @@ set -e

rm -rf build-android-release
mkdir -p build-android-release
cd build-android-release


#
# Configure
#

export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/23.1.7779620
export JAVA_HOME=/usr/lib/jvm/java-19-openjdk

$Qt6_DIR_ANDROID\_x86/bin/qt-cmake .. \
$Qt6_DIR_ANDROID\_x86/bin/qt-cmake \
-G Ninja\
-DCMAKE_BUILD_TYPE:STRING=Release \
-DQT_ANDROID_BUILD_ALL_ABIS=ON

-DQT_ANDROID_BUILD_ALL_ABIS=ON \
-S . \
-B build-android-release


#
# Compile
#

ninja aab

mv ./src/android-build/build/outputs/bundle/release/android-build-release.aab ./addhoursandminutes.aab
cmake --build build-android-release --target aab
mv build-android-release/src/android-build/build/outputs/bundle/release/android-build-release.aab build-android-release/addhoursandminutes.aab

jarsigner -keystore $ANDROID_KEYSTORE_FILE \
-storepass $ANDROID_KEYSTORE_PASS \
./addhoursandminutes.aab \
build-android-release/addhoursandminutes.aab \
"Stefan Kebekus"

echo "Signed AAB file is available at $PWD/addhoursandminutes.aab"
nautilus $PWD &

#
# cd out
#

cd ..

echo "Signed AAB file is available at $PWD/build-android-release/addhoursandminutes.aab"

0 comments on commit e1f6f66

Please sign in to comment.