Skip to content

Commit 73bf3dc

Browse files
committed
Upgraded gradle and gradle plugin to latest, and removed dependence on symlinks.
Updated build documentation with instructions for various new ways of building the project.
1 parent 5762596 commit 73bf3dc

File tree

23 files changed

+94
-58
lines changed

23 files changed

+94
-58
lines changed

.idea/gradle.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jan 27 17:01:43 EST 2019
1+
#Sun Apr 04 15:13:19 EDT 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jan 27 17:01:43 EST 2019
1+
#Sun Apr 04 15:13:19 EDT 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,24 @@ Please see the LICENSE file for information on how the source is licensed.
77

88
# Building
99

10-
There are two ways to build the applications. With pre-built libraries, or from
11-
scratch.
10+
There are different ways to build the applications depending on OS and whether you are using
11+
pre-built libraries, or building them from scratch.
1212

13-
The build automation of requires Linux at the moment, due to the use of symlinks.
13+
## On Linux and WSL2
14+
15+
These instructions should work on Ubuntu 18.04, 20.04, and Windows Subsystem for Linux 2.
16+
Builds are likely to also work on MacOS, feedback is welcome.
1417

1518
Pick one of I-a, I-b, or I-c below, then move onto II.
1619

17-
## I-a With Prebuilt Libraries
20+
### I-a With Prebuilt Libraries
1821

1922
Building the projects with pre-built dependencies.
2023

2124
./download-prebuilt-dependencies.sh
2225
./bVNC/prepare_project.sh --skip-build libs nopath
2326

24-
## I-b From Scratch with Docker
27+
### I-b From Scratch with Docker
2528

2629
Make sure you're running the commands below from the root of the project.
2730
Ensure ANDROID_SDK is set to the path to your SDK.
@@ -35,7 +38,7 @@ echo "CURRENT_WORKING_DIR=$(pwd)" >> docker/.env
3538
docker-compose -f docker/docker-compose.yml up
3639
```
3740

38-
## I-c From Scratch
41+
### I-c From Scratch
3942

4043
Building from scratch and working in Android Studio.
4144

@@ -51,7 +54,7 @@ Building from scratch and working in Android Studio.
5154

5255
- If building a non-custom client, set PROJECT to libs. For a custom VNC client, set PROJECT to a string
5356
that stars with Custom and contains Vnc, i.e. `CustomYourVncClient` (see III below for details).
54-
57+
5558
- Set the environment variables ANDROID_SDK to your SDK installation. The scripts will install the NDK automatically.
5659

5760
- Example:
@@ -73,6 +76,22 @@ Building from scratch and working in Android Studio.
7376

7477
- If using an emulator, choose x86_64 as the architecture to avoid "has text relocations" errors loading gstreamer on Android.
7578

79+
## On Windows with Git Bash
80+
81+
These instructions are for Windows without WSL2 installed. For now, only pre-build dependencies are
82+
supported in this configuration.
83+
84+
- First [download and install install git from here](https://git-scm.com/downloads)
85+
- Then, start Git Bash, clone this project, cd into the project root directory and run:
86+
./download-prebuilt-dependencies.sh
87+
- Start Android Studio and open the project directory.
88+
- Click File->Sync Project with Gradle Files
89+
- If Android Studio reports any missing android versions (such as `android-28`, for instance),
90+
find and start SDK Manager and ensure any missing Android versions are installed. As of today
91+
the required versions are `android-28`, `android-29`, and `android-30`, but in future other versions
92+
will need to be installed if Android Studio shows an error.
93+
94+
7695
## II Importing projects into Android Studio
7796

7897
This should be as simple as selecting "Open an existing Android Studio project" on the
@@ -140,4 +159,4 @@ https://github.com/iiordanov/remote-desktop-clients/issues
140159

141160
Questions and general discussion should be posted at the following forum:
142161

143-
https://groups.google.com/forum/#!forum/bvnc-ardp-aspice-opaque-remote-desktop-clients
162+
https://groups.google.com/forum/#!forum/bvnc-ardp-aspice-opaque-remote-desktop-clients
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jan 27 17:01:43 EST 2019
1+
#Sun Apr 04 15:13:19 EDT 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jan 27 17:01:43 EST 2019
1+
#Sun Apr 04 15:13:19 EDT 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jan 27 17:01:43 EST 2019
1+
#Sun Apr 04 15:13:19 EDT 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

bVNC/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535

3636
dependencies {
3737
implementation project(':pubkeyGenerator')
38-
implementation project(':freeRDPCore')
38+
implementation project(':remoteClientLib:jni:libs:deps:FreeRDP:client:Android:Studio:freeRDPCore')
3939
implementation project(':remoteClientLib')
4040
implementation 'com.android.support:appcompat-v7:28.0.0'
4141
implementation 'com.android.support:support-v4:28.0.0'

bVNC/prepare_project.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ then
112112
if echo $PRJ | grep -qi "SPICE\|Opaque\|libs\|remoteClientLib"
113113
then
114114
pushd ../remoteClientLib
115+
export NDK_LIBS_OUT=./src/main/jniLibs
115116
${ANDROID_NDK}/ndk-build -j 2
116117

117118
echo "Adding any custom certificate authority files in $(pwd)/certificate_authorities/ to certificate bundle from gstreamer."
@@ -132,18 +133,20 @@ then
132133
echo "Done building libraries"
133134
fi
134135

135-
freerdp_libs_dir=../freeRDPCore/src/main/jniLibs
136-
freerdp_libs_link=../freeRDPCore/src/main/libs
136+
freerdp_libs_dir=../remoteClientLib/jni/libs/deps/FreeRDP/client/Android/Studio/freeRDPCore/src/main/jniLibs
137+
freerdp_libs_link=../remoteClientLib/jni/libs/deps/FreeRDP/client/Android/Studio/freeRDPCore/src/main/libs
137138
if echo $PRJ | grep -iq "VNC"
138139
then
139140
clean_libs "sqlcipher" libs/
140141
clean_libs "sqlcipher" ../remoteClientLib/libs/
142+
clean_libs "sqlcipher" ../remoteClientLib/src/main/jniLibs/
141143
[ -d ${freerdp_libs_dir} ] && rm -rf ${freerdp_libs_dir}.DISABLED && mv ${freerdp_libs_dir} ${freerdp_libs_dir}.DISABLED
142144
rm -rf ${freerdp_libs_link}
143145
elif echo $PRJ | grep -iq "RDP"
144146
then
145147
clean_libs "sqlcipher" libs/
146148
clean_libs "sqlcipher" ../remoteClientLib/libs/
149+
clean_libs "sqlcipher" ../remoteClientLib/src/main/jniLibs/
147150
[ -d ${freerdp_libs_dir}.DISABLED ] && rm -rf ${freerdp_libs_dir} && mv ${freerdp_libs_dir}.DISABLED ${freerdp_libs_dir}
148151
rm -rf ${freerdp_libs_link}
149152
ln -s jniLibs ${freerdp_libs_link}

bVNC/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
<activity android:name="com.iiordanov.bVNC.GlobalPreferencesActivity"></activity>
2222
</application>
2323

24-
<uses-sdk android:minSdkVersion="14" tools:overrideLibrary="com.github.luben.zstd"/>
24+
<uses-sdk tools:overrideLibrary="com.github.luben.zstd"/>
2525
</manifest>

0 commit comments

Comments
 (0)