Skip to content

Commit 4af7e37

Browse files
committed
SNC-2269. Update package dist files to new requirements
1 parent b1d7674 commit 4af7e37

File tree

7 files changed

+436
-220
lines changed

7 files changed

+436
-220
lines changed

CREDITS.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
## CREDITS
1+
# CREDITS
22

3-
Here is the list of the external libraries used by MEGAsync.
4-
We thank them all for their contributions:
3+
Here is the list of the third party libraries used by MEGA Desktop Application.
4+
We are grateful and thankful for their efforts and the opportunity to rely and
5+
extend on their existing body of work.
56

6-
#### QT
7-
http://www.qt.io/
7+
## Qt SDK
8+
http://www.qt.io/ © 2016 The Qt Company Ltd.
89

9-
© 2016 The Qt Company Ltd.
10+
### Description
11+
Qt is the cross-platform framework for C++ GUI development.
1012

11-
###### Description:
12-
QT is framework for cross-platform develppment
13-
14-
###### Usage:
15-
QT is the framework used by MEGAsync to get cross platform compatibility
13+
### Usage
14+
Qt is used by MEGA Desktop to get cross-platform compatibility and GUI
15+
functionality across the supported desktop operating systems.
1616

17-
###### License:
18-
Dual license: LGPL 3
17+
### Licence
18+
Dual licence: LGPL 3
1919

2020
https://www.gnu.org/licenses/lgpl-3.0.html
2121

22-
https://www.gnu.org/licenses/licenses.html
23-
2422
http://www.qt.io/licensing/
2523

2624
--------------------------------------------------------------------

INSTALL.mac.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OS X compilation
2+
3+
##### Requirements:
4+
* Xcode 12.4
5+
* Qt 5.12.11
6+
7+
##### Preparation:
8+
1. Follow the instructions collected in the [macOS](README.mac.md) to build the required tools / third-party dependencies and get the source code of Desktop repository.
9+
2. Set the env variables `MEGAQTPATH` to a valid Qt installation path and `VCPKGPATH` to a directory containing a valid vcpkg installation.
10+
2. Run the script `installer_mac.sh` to build the project and generate the application bundle for Desktop application. You can generate full packages using either cmake or qmake. Check script options with `--help` flag. Build directory is `Release_x64`
11+
3. Enjoy!
12+

LICENCE.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
MEGA LIMITED CODE REVIEW LICENCE
2-
================================
1+
# Mega Limited Code Review Licence
32

43
This licence grants you the rights, and only the rights, set out
54
below, to access and review Mega's code. If you take advantage of
@@ -12,8 +11,7 @@ there is any inconsistency between this licence and those Terms of
1211
Service, these terms prevail.
1312

1413

15-
Section 1 -- Definitions
16-
------------------------
14+
## Section 1: Definitions
1715

1816
- "code" means the Mega code made available from time, in our sole
1917
discretion, for access under this licence at [https://github.com/].
@@ -30,8 +28,7 @@ Section 1 -- Definitions
3028
- "you" means the licensee of rights set out in this licence.
3129

3230

33-
Section 2 -- Grant of Rights
34-
----------------------------
31+
## Section 2: Grant of rights
3532

3633
1. Subject to the terms of this licence, we grant you a
3734
non-transferable, non-exclusive, worldwide, royalty-free licence to
@@ -56,8 +53,7 @@ Section 2 -- Grant of Rights
5653
and Takedown Guidance Policy [https://mega.nz/takedown].
5754

5855

59-
Section 3 -- Limitations
60-
------------------------
56+
## Section 3: Limitations
6157

6258
1. This licence does not grant you any rights to use Mega's name,
6359
logo, or trademarks and you must not in any way indicate you are
@@ -71,7 +67,7 @@ Section 3 -- Limitations
7167
3. THE CODE IS MADE AVAILABLE "AS-IS" AND WITHOUT ANY EXPRESS OF
7268
IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-INFRINGEMENT
7369
OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON A VOLUNTARY
74-
BASIS ON OUR PART AND YOURS AND IS NOT MADE AVAILABE FOR CONSUMER
70+
BASIS ON OUR PART AND YOURS AND IS NOT MADE AVAILABLE FOR CONSUMER
7571
USE OR ANY OTHER USE OUTSIDE THE TERMS OF THIS LICENCE. ANYONE
7672
ACCESSING THE CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE
7773
THEIR OWN SYSTEM AND DEVICES AND TO ACCESS AND USE THE CODE FOR
@@ -81,17 +77,15 @@ Section 3 -- Limitations
8177
ACCESSING AND USING THE CODE.
8278

8379

84-
Section 4 -- Termination, suspension and variation
85-
--------------------------------------------------
80+
## Section 4: Termination, suspension and variation
8681

8782
1. We may suspend, terminate or vary the terms of this licence and any
8883
access to the code at any time, without notice, for any reason or
8984
no reason, in respect of any licensee, group of licensees or all
9085
licensees.
9186

9287

93-
Section 5 -- General
94-
--------------------
88+
## Section 5: General
9589

9690
1. This licence and its interpretation and operation are governed
9791
solely by New Zealand law. We and each you submit to the exclusive

README.linux.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Linux instructions
2+
3+
For MEGA Desktop App development we are targeting Ubuntu LTS, although we are providing
4+
packages for other Linux flavors as well; please check the main README file for a
5+
definitive list.
6+
7+
MEGA Desktop App may run on any flavor of Linux as long as the Desktop Manager and Window
8+
Environment is supported by the Qt SDK and the required third-party dependencies are
9+
available in their package management repositories. The officially supported distros
10+
guarantee that availability and MEGAsync compatibility with their default Window Manager
11+
and Desktop environment. In this document we aim to provide instructions for Debian (APT
12+
packaging) and RedHat (RPM packaging).
13+
14+
# Requirements
15+
16+
Important requirements for MEGAsync are GCC above version 5 and Qt above version 5.10. The
17+
other third-party requirements will vary from distro to distro; we will aim for a
18+
base-line here and rely on you for the necessary adjustments for your specific Linux
19+
installation. If you need help, you can always reach out to us on GitHub.
20+
21+
## Tools
22+
23+
Some essential tools are needed to get the building process going. Here is the
24+
example Debian APT install command:
25+
26+
```
27+
$ sudo apt install git build-essential wget dh-autoreconf cdbs unzip libtool-bin pkg-config debhelper
28+
```
29+
And here is the example for Fedora:
30+
```
31+
$ sudo dnf install @"C Development Tools and Libraries" git wget unzip
32+
```
33+
The package `build-essential` on Debian and the `C Development Tools and Libraries` on
34+
Fedora, are responsible for installing g++, autoconf, automake and some other build
35+
essential tools. Please install these packages, or their available equivalent, in your
36+
distribution's package repository.
37+
38+
The biggest differentiating factor in getting MEGAsync to work on your distro is, whether
39+
you can install (or build) all the library dependencies we need.
40+
41+
## APT Libraries
42+
43+
Here is the third-party dependency list for APT based distros (e.g. Ubuntu):
44+
```
45+
$ sudo apt install qt5-default qttools5-dev-tools qtbase5-dev qt5-qmake libqt5x11extras5-dev libqt5dbus5 libqt5svg5-dev libcrypto++-dev libraw-dev libc-ares-dev libssl-dev libsqlite3-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libmediainfo-dev libfreeimage-dev libreadline-dev libsodium-dev libuv1-dev libudev-dev libzen-dev
46+
```
47+
48+
## RPM Libraries
49+
50+
Here is the dependency list for RPM based distros (e.g. Fedora):
51+
```
52+
$ sudo dnf install qt5-qtbase-devel qt5-qttools-devel qt5-qtsvg-devel qt5-qtx11extras-devel c-ares-devel cryptopp-devel openssl-devel sqlite-devel zlib-devel LibRaw-devel libudev-devel libzen-devel libmediainfo-devel
53+
```
54+
55+
# Get the source
56+
57+
Open a Terminal and clone the MEGAsync repository:
58+
```
59+
$ mkdir ~/mega
60+
$ cd ~/mega
61+
$ git clone --recursive https://github.com/meganz/MEGAsync.git desktop
62+
```
63+
The MEGA SDK is fetched recursively from https://github.com/meganz/sdk.git
64+
65+
# Build everything
66+
67+
This steps, will check-out all the 3rdParty dependencies and then
68+
proceed to build those, the SDK and MEGA Desktop:
69+
```
70+
$ cd ~/mega/desktop/src/
71+
$ ./configure -g -q -i
72+
$ qmake MEGASync/MEGASync.pro
73+
$ lrelease MEGASync/MEGASync.pro
74+
$ make
75+
```
76+
Note: when compiling for RPM based distros, `qmake` and `lrelease` programs might be missing.
77+
Use `qmake-qt5` and `lrelease-qt5` instead.
78+
79+
# Development
80+
81+
For development, you can open `desktop/src/MEGASync/MEGASync.pro` in Qt Creator
82+
IDE, which can be installed on Debian flavors like so:
83+
```
84+
$ sudo apt install qtcreator libclang-common-8-dev
85+
```
86+
or on Fedora running:
87+
```
88+
$ sudo dnf install qtcreator
89+
```
90+
91+
When building via Qt Creator, note that the SDK is also being rebuilt, since it has its
92+
own QMake project file in the SDK sub-project at `bindings/qt/sdk.pri` included by the
93+
parent QMake.
94+
95+
You might have to generate the initial set of language files, so they are found by the
96+
build system onwards. To do that, in Qt Creator, in the application menu, go to Tools ->
97+
External -> Linguist and click on Release Translations action.
98+

README.mac.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# macOS instructions
2+
3+
For MEGA Desktop App development we are targeting macOS Big Sur, although we are providing
4+
packages for other versions as well; please check the main README file for a definitive
5+
list.
6+
7+
# Tools
8+
9+
Downloading the latest stable versions of these tools should generally be Ok.
10+
11+
## Xcode & CMake
12+
13+
Install latest XCode via App Store using your Apple account.
14+
15+
For MEGA Desktop development, we have a working headless build system via CMake
16+
which we are using the build the installer packages, however, for day-to-day
17+
development we are primarily using QMake as a team, due to having good Qt
18+
tooling support and a working system for all the supported platforms. That being
19+
said, we are using CMake right now to build the 3rdParty dependencies required
20+
for both SDK and MEGA Desktop and then switching over to QMake + Qt Creator for
21+
developer convenience.
22+
23+
Please download and copy CMake.app into /Applications (or custom location) using the macOS
24+
dmg Installer from:
25+
https://cmake.org/download/
26+
27+
It is useful to add CMake to the system path in the installer wizard. (for current user is
28+
fine), so run the following command:
29+
```
30+
$ sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
31+
```
32+
33+
## YASM (latest version from upstream)
34+
35+
Download and install YASM which is required to build ffmpeg dependency.
36+
Follow these steps:
37+
```
38+
$ git clone https://github.com/yasm/yasm/
39+
$ cd yasm
40+
$ cmake .
41+
$ cmake --build . 
42+
$ sudo cmake --install
43+
```
44+
45+
# Third-Party dependencies
46+
47+
## Qt SDK (5.12.11)
48+
49+
Install Qt Open Source and Qt Creator using the Qt Online Installer from:
50+
https://www.qt.io/download-qt-installer
51+
52+
You will have to create an account, even if you only install the Community Editions.
53+
Install Qt 5.12.11 for macOS; only macOS components are needed during installation.
54+
A good installation path is `~/Qt`.
55+
56+
## VCPKG
57+
58+
Along with Qt, MEGA Desktop and the MEGA SDK require another dozen or more
59+
3rdParty libraries to cover all the functionality exposed to our users. We are
60+
using Microsoft's VCPKG C++ Library Manager for managing our dependencies and we
61+
employ it automagically from our CMake scripts. You don't have to install it
62+
manually.
63+
64+
A notable exception from this rule, is the PDFIUM library, which is used to
65+
create thumbnails for PDF documents. This library is not available in VCPKG for
66+
the moment, thus we are using a patched version from upstream Chromium Depot
67+
Tools for the moment. Download our pre-built version from:
68+
https://mega.nz/file/M1JCRCRa#Ne5sbVD2yZaCt9ijcCaKXs3m_ayfrw0ZovJMdERXRlU
69+
70+
Start decompressing the zip archive as you proceed to the next step.
71+
72+
# Get the source
73+
74+
Open macOS Terminal and clone the Desktop repository:
75+
```
76+
$ mkdir ~/mega/
77+
$ cd ~/mega/
78+
$ git clone --recursive https://github.com/meganz/MEGAsync.git desktop
79+
```
80+
81+
The MEGA SDK is fetched recursively from https://github.com/meganz/sdk.git
82+
83+
# Build everything
84+
85+
This step, will check-out all the 3rdParty dependencies via VCPKG and then
86+
proceed to build those, the SDK and MEGA Desktop in that order, via CMake.
87+
88+
```
89+
$ cd ~/mega/desktop/contrib/cmake
90+
$ cmake -DEXTRA_ARGS="-DCMAKE_PREFIX_PATH=~/Qt/5.12.11/clang_64" -DTARGET=MEGAsync -DTRIPLET=x64-osx-mega -P build_from_scratch.cmake
91+
```
92+
93+
In a short while, but before the build stops because of missing PDFIUM library, you should
94+
notice `~/mega/3rdparty_desktop/vcpkg` directory being created. You can start copying
95+
the extracted pdfium subdirectory to the vcpkg directory.
96+
97+
In case the build fails anyway, just run the cmake command again, once pdfium is copied.
98+
99+
# Development using Qt Creator
100+
101+
Now you can open open `src/MEGASync/MEGASync.pro` to start editing and building. Set it up
102+
as any other Qt QMake based project, using the Qt 5.12.11 kit you installed and set
103+
matching target architecture.
104+
105+
When building using the QMake project, both the application and the SDK are
106+
being rebuilt since the latter has its own QMake project files in the
107+
sub-project at bindings/qt/sdk.pri. Whereas the 3rdParty libs remain the ones
108+
being already built by CMake.
109+
110+
You might have to generate the initial set of language files so they are found
111+
by the build system onwards. To do that, in Qt Creator, in the application menu,
112+
go to Tools -> External -> Linguist and click on Release Translations action.
113+
You can achieve the same, from the command-line:
114+
```
115+
$ cd ~/mega/desktop/src
116+
$ ~/Qt/5.12.11/clang_64/bin/lrelease MEGASync/MEGASync.pro
117+
```

0 commit comments

Comments
 (0)