forked from meganz/MEGAsync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNC-2269. Update package dist files to new requirements
- Loading branch information
Showing
7 changed files
with
436 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OS X compilation | ||
|
||
##### Requirements: | ||
* Xcode 12.4 | ||
* Qt 5.12.11 | ||
|
||
##### Preparation: | ||
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. | ||
2. Set the env variables `MEGAQTPATH` to a valid Qt installation path and `VCPKGPATH` to a directory containing a valid vcpkg installation. | ||
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` | ||
3. Enjoy! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Linux instructions | ||
|
||
For MEGA Desktop App development we are targeting Ubuntu LTS, although we are providing | ||
packages for other Linux flavors as well; please check the main README file for a | ||
definitive list. | ||
|
||
MEGA Desktop App may run on any flavor of Linux as long as the Desktop Manager and Window | ||
Environment is supported by the Qt SDK and the required third-party dependencies are | ||
available in their package management repositories. The officially supported distros | ||
guarantee that availability and MEGAsync compatibility with their default Window Manager | ||
and Desktop environment. In this document we aim to provide instructions for Debian (APT | ||
packaging) and RedHat (RPM packaging). | ||
|
||
# Requirements | ||
|
||
Important requirements for MEGAsync are GCC above version 5 and Qt above version 5.10. The | ||
other third-party requirements will vary from distro to distro; we will aim for a | ||
base-line here and rely on you for the necessary adjustments for your specific Linux | ||
installation. If you need help, you can always reach out to us on GitHub. | ||
|
||
## Tools | ||
|
||
Some essential tools are needed to get the building process going. Here is the | ||
example Debian APT install command: | ||
|
||
``` | ||
$ sudo apt install git build-essential wget dh-autoreconf cdbs unzip libtool-bin pkg-config debhelper | ||
``` | ||
And here is the example for Fedora: | ||
``` | ||
$ sudo dnf install @"C Development Tools and Libraries" git wget unzip | ||
``` | ||
The package `build-essential` on Debian and the `C Development Tools and Libraries` on | ||
Fedora, are responsible for installing g++, autoconf, automake and some other build | ||
essential tools. Please install these packages, or their available equivalent, in your | ||
distribution's package repository. | ||
|
||
The biggest differentiating factor in getting MEGAsync to work on your distro is, whether | ||
you can install (or build) all the library dependencies we need. | ||
|
||
## APT Libraries | ||
|
||
Here is the third-party dependency list for APT based distros (e.g. Ubuntu): | ||
``` | ||
$ 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 | ||
``` | ||
|
||
## RPM Libraries | ||
|
||
Here is the dependency list for RPM based distros (e.g. Fedora): | ||
``` | ||
$ 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 | ||
``` | ||
|
||
# Get the source | ||
|
||
Open a Terminal and clone the MEGAsync repository: | ||
``` | ||
$ mkdir ~/mega | ||
$ cd ~/mega | ||
$ git clone --recursive https://github.com/meganz/MEGAsync.git desktop | ||
``` | ||
The MEGA SDK is fetched recursively from https://github.com/meganz/sdk.git | ||
|
||
# Build everything | ||
|
||
This steps, will check-out all the 3rdParty dependencies and then | ||
proceed to build those, the SDK and MEGA Desktop: | ||
``` | ||
$ cd ~/mega/desktop/src/ | ||
$ ./configure -g -q -i | ||
$ qmake MEGASync/MEGASync.pro | ||
$ lrelease MEGASync/MEGASync.pro | ||
$ make | ||
``` | ||
Note: when compiling for RPM based distros, `qmake` and `lrelease` programs might be missing. | ||
Use `qmake-qt5` and `lrelease-qt5` instead. | ||
|
||
# Development | ||
|
||
For development, you can open `desktop/src/MEGASync/MEGASync.pro` in Qt Creator | ||
IDE, which can be installed on Debian flavors like so: | ||
``` | ||
$ sudo apt install qtcreator libclang-common-8-dev | ||
``` | ||
or on Fedora running: | ||
``` | ||
$ sudo dnf install qtcreator | ||
``` | ||
|
||
When building via Qt Creator, note that the SDK is also being rebuilt, since it has its | ||
own QMake project file in the SDK sub-project at `bindings/qt/sdk.pri` included by the | ||
parent QMake. | ||
|
||
You might have to generate the initial set of language files, so they are found by the | ||
build system onwards. To do that, in Qt Creator, in the application menu, go to Tools -> | ||
External -> Linguist and click on Release Translations action. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# macOS instructions | ||
|
||
For MEGA Desktop App development we are targeting macOS Big Sur, although we are providing | ||
packages for other versions as well; please check the main README file for a definitive | ||
list. | ||
|
||
# Tools | ||
|
||
Downloading the latest stable versions of these tools should generally be Ok. | ||
|
||
## Xcode & CMake | ||
|
||
Install latest XCode via App Store using your Apple account. | ||
|
||
For MEGA Desktop development, we have a working headless build system via CMake | ||
which we are using the build the installer packages, however, for day-to-day | ||
development we are primarily using QMake as a team, due to having good Qt | ||
tooling support and a working system for all the supported platforms. That being | ||
said, we are using CMake right now to build the 3rdParty dependencies required | ||
for both SDK and MEGA Desktop and then switching over to QMake + Qt Creator for | ||
developer convenience. | ||
|
||
Please download and copy CMake.app into /Applications (or custom location) using the macOS | ||
dmg Installer from: | ||
https://cmake.org/download/ | ||
|
||
It is useful to add CMake to the system path in the installer wizard. (for current user is | ||
fine), so run the following command: | ||
``` | ||
$ sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install | ||
``` | ||
|
||
## YASM (latest version from upstream) | ||
|
||
Download and install YASM which is required to build ffmpeg dependency. | ||
Follow these steps: | ||
``` | ||
$ git clone https://github.com/yasm/yasm/ | ||
$ cd yasm | ||
$ cmake . | ||
$ cmake --build . | ||
$ sudo cmake --install | ||
``` | ||
|
||
# Third-Party dependencies | ||
|
||
## Qt SDK (5.12.11) | ||
|
||
Install Qt Open Source and Qt Creator using the Qt Online Installer from: | ||
https://www.qt.io/download-qt-installer | ||
|
||
You will have to create an account, even if you only install the Community Editions. | ||
Install Qt 5.12.11 for macOS; only macOS components are needed during installation. | ||
A good installation path is `~/Qt`. | ||
|
||
## VCPKG | ||
|
||
Along with Qt, MEGA Desktop and the MEGA SDK require another dozen or more | ||
3rdParty libraries to cover all the functionality exposed to our users. We are | ||
using Microsoft's VCPKG C++ Library Manager for managing our dependencies and we | ||
employ it automagically from our CMake scripts. You don't have to install it | ||
manually. | ||
|
||
A notable exception from this rule, is the PDFIUM library, which is used to | ||
create thumbnails for PDF documents. This library is not available in VCPKG for | ||
the moment, thus we are using a patched version from upstream Chromium Depot | ||
Tools for the moment. Download our pre-built version from: | ||
https://mega.nz/file/M1JCRCRa#Ne5sbVD2yZaCt9ijcCaKXs3m_ayfrw0ZovJMdERXRlU | ||
|
||
Start decompressing the zip archive as you proceed to the next step. | ||
|
||
# Get the source | ||
|
||
Open macOS Terminal and clone the Desktop repository: | ||
``` | ||
$ mkdir ~/mega/ | ||
$ cd ~/mega/ | ||
$ git clone --recursive https://github.com/meganz/MEGAsync.git desktop | ||
``` | ||
|
||
The MEGA SDK is fetched recursively from https://github.com/meganz/sdk.git | ||
|
||
# Build everything | ||
|
||
This step, will check-out all the 3rdParty dependencies via VCPKG and then | ||
proceed to build those, the SDK and MEGA Desktop in that order, via CMake. | ||
|
||
``` | ||
$ cd ~/mega/desktop/contrib/cmake | ||
$ cmake -DEXTRA_ARGS="-DCMAKE_PREFIX_PATH=~/Qt/5.12.11/clang_64" -DTARGET=MEGAsync -DTRIPLET=x64-osx-mega -P build_from_scratch.cmake | ||
``` | ||
|
||
In a short while, but before the build stops because of missing PDFIUM library, you should | ||
notice `~/mega/3rdparty_desktop/vcpkg` directory being created. You can start copying | ||
the extracted pdfium subdirectory to the vcpkg directory. | ||
|
||
In case the build fails anyway, just run the cmake command again, once pdfium is copied. | ||
|
||
# Development using Qt Creator | ||
|
||
Now you can open open `src/MEGASync/MEGASync.pro` to start editing and building. Set it up | ||
as any other Qt QMake based project, using the Qt 5.12.11 kit you installed and set | ||
matching target architecture. | ||
|
||
When building using the QMake project, both the application and the SDK are | ||
being rebuilt since the latter has its own QMake project files in the | ||
sub-project at bindings/qt/sdk.pri. Whereas the 3rdParty libs remain the ones | ||
being already built by CMake. | ||
|
||
You might have to generate the initial set of language files so they are found | ||
by the build system onwards. To do that, in Qt Creator, in the application menu, | ||
go to Tools -> External -> Linguist and click on Release Translations action. | ||
You can achieve the same, from the command-line: | ||
``` | ||
$ cd ~/mega/desktop/src | ||
$ ~/Qt/5.12.11/clang_64/bin/lrelease MEGASync/MEGASync.pro | ||
``` |
Oops, something went wrong.