Skip to content

Commit

Permalink
Windows related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
strseb committed Oct 31, 2022
1 parent 967339e commit 5c2f285
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
3 changes: 2 additions & 1 deletion android/buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ object Config {
const val buildToolsVersion = "30.0.3"
const val minSdkVersion = 24
const val targetSdkVersion = 30
const val ndkVersion = "24.0.8215888"
const val ndkVersion = "23.1.7779620"
const val cmakeVersion = "3.18.1"
}
13 changes: 9 additions & 4 deletions android/buildSrc/src/main/kotlin/QtConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,15 @@ open class QTConfigurationExtension
if (abi.isEmpty()) {
return JSONArray()
}
val importScanner = File("$host/libexec/qmlimportscanner")
if (!importScanner.exists()) {
error("Did not found qmlimportscanner in $host/libexec/qmlimportscanner")
}
val importScannerList = arrayOf(
File("$host/libexec/qmlimportscanner"),
File("$host/bin/qmlimportscanner"),
File("$host/bin/qmlimportscanner.exe"),
)
val importScanner = importScannerList.firstOrNull{it.exists()}
?: {
error("Did not found qmlimportscanner in ${importScannerList}")
}
val repo_path = project.rootProject.projectDir.parent
val qmlPath = File("$repo_path/src/ui")
val qtQMLPath = File("$abi/qml")
Expand Down
15 changes: 3 additions & 12 deletions android/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {


android {
ndkVersion '24.0.8215888'
ndkVersion "23.1.7779620"
compileSdkVersion Config.compileSdkVersion
defaultConfig {
minSdkVersion Config.minSdkVersion
Expand All @@ -40,7 +40,7 @@ android {

externalNativeBuild {
cmake {
version "3.18.1"
version Config.cmakeVersion
path '../../CMakeLists.txt'
}
}
Expand All @@ -51,6 +51,7 @@ android {
// Passes optional arguments to CMake.
arguments "-DANDROID_QT_DIR=${QtConfiguration.qtAndroidRootDir}",
"-DQT_HOST_PATH=${QtConfiguration.host}",
"-DQT_NO_WARN_BUILD_TREE_APK_DEPS=ON",
"-DQT_HOST_PATH_CMAKE_DIR=${QtConfiguration.host}/lib/cmake",
"-DANDROID_STL=c++_shared",
"--target mozillavpn"
Expand Down Expand Up @@ -105,13 +106,3 @@ task importOpenSSL(type: Copy) {
into("build/ssl")
}
preBuild.dependsOn importOpenSSL

tasks.whenTaskAdded {
theTask ->
if (theTask.name.contains('externalNativeBuild')) {
theTask.doLast{
println "[*] begin to copy file."
}
}
println theTask.name
}
2 changes: 1 addition & 1 deletion android/daemon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ android {

externalNativeBuild {
cmake {
version "3.10.2"
version Config.cmakeVersion
path 'tunnel/CMakeLists.txt'
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
target_link_libraries(mozillavpn PRIVATE crashreporter)
endif()

qt_finalize_target(mozillavpn)

if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
qt_finalize_target(mozillavpn)
endif()

0 comments on commit 5c2f285

Please sign in to comment.