2
0
mirror of https://github.com/meganz/MEGAcmd synced 2025-08-22 01:47:24 +00:00

Compare commits

...

660 Commits

Author SHA1 Message Date
Nishan Nepali
45549ee970
Merge 587c6611ec105069a6951e0fa2e1ce4224ebf7e2 into d0a1e8e2c7d70fd951ef47d2d92243a65f0bb6eb 2024-12-22 22:53:56 +07:00
Pablo M
d0a1e8e2c7 Merge branch 'task/CMD-512_update-master-userguide' into 'master'
CMD-512. Update master user guide

See merge request apps/MEGAcmd!772
2024-07-25 03:45:22 +12:00
Pablo Martin
2946460db3
removed yet unavailable --show-all-options for help 2024-07-24 17:42:03 +02:00
Pablo Martin
7afb81496f
update UserGuide consistent with 1.7.0 2024-07-18 16:04:25 +02:00
Pablo M
bc0e4016ee Merge branch 'release/v1.7.0' into 'master'
Release 1.7.0 for Arch Linux [to master]

See merge request apps/MEGAcmd!758
2024-06-18 02:01:38 +12:00
Pablo Martin
c75506966f
update SDK submodule to v4.31.0c 2024-06-17 13:59:03 +02:00
Pablo M
2d3526ab31 Merge branch 'task/CMD-478_fix_building_freeimage_in_arch_linux_with_gcc14' into 'release/v1.7.0'
CMD-478. Changes to fix freeimage build with gcc14 (arch linux) and other compilation fixes for Fedora40 [to release 1.7.0]

See merge request apps/MEGAcmd!755
2024-06-17 23:58:21 +12:00
Pablo Martin
0114e09bfe
remove gcc13 from make depenency in Arch Linux 2024-06-17 11:46:26 +02:00
Pablo Martin
7c78fe6188
changes to fix freeimage build with gcc14 (arch linux) and other compilation adjustments for Fedora 40 2024-06-14 14:08:33 +02:00
Diego Ximenez
ab2f569172
Set correct version number in windows files 2024-06-03 12:06:32 +02:00
Pablo M
030dfa3e64 Merge branch 'task/CMD-478_fix_building_freeimage_in_arch_linux-on_top_of_170_alternative' into 'release/v1.7.0'
CMD-478. Fix bulding in up-to-date Arch Linux [to release 1.7.0]

See merge request apps/MEGAcmd!745
2024-06-01 00:25:36 +12:00
Diego Ximenez
f32d660049
Update Windows files for 1.7.0 2024-05-31 12:30:55 +02:00
Diego Ximenez
8f368b725f
Update macOS files for 1.7.0 2024-05-31 12:07:25 +02:00
Pablo Martin
814f420ffa
tix typo 2024-05-31 11:37:54 +02:00
Pablo Martin
7884eeba0d
Use gcc13 as compiler in Arch Linux 2024-05-31 11:27:00 +02:00
Pablo M
89b56543d5 Merge branch 'release/v1.7.0' into 'master'
Release v1.7.0 [master]

See merge request apps/MEGAcmd!701
2024-05-23 00:30:16 +12:00
Diego Ximenez
48f96edadb
Update SDK's commit and changelog 2024-05-20 14:29:43 +02:00
Pablo M
f341848a52 Merge branch 'task/fix-win7-execution' into 'release/v1.7.0'
CMD-470. Have windows use a libuv compatible with win 7

See merge request apps/MEGAcmd!740
2024-05-17 20:41:08 +12:00
Pablo Martin
bfe9f8ab13
have triplets looked for in both vcpkg_extra_triplets and vcpkg_overlay_triplets 2024-05-16 17:13:41 +02:00
Pablo Martin
6f36ec0040
have windows use a libuv compatible with win 7 2024-05-15 17:56:40 +02:00
Pablo M
5d3d5fbd21 Merge branch 'task/CMD-411_fix-arch-linux-build-after-sqlite-adjustment' into 'release/v1.7.0'
CMD-411 Fix arch linux build after sqlite adjustment [to 1.7.0]

See merge request apps/MEGAcmd!737
2024-05-15 03:24:32 +12:00
Xavier Rins Lozano
c25d2cfe2b Merge branch 'cherry-pick-c31653d2' into 'release/v1.7.0'
CMD-467-fix api pdb issue

See merge request apps/MEGAcmd!739
2024-05-15 01:56:54 +12:00
Xavier Rins Lozano
ce7aac0959 fix api pdb issue
(cherry picked from commit c31653d28adbcee410c6680f5401f8dfe8b36972)
2024-05-15 00:56:45 +12:00
Pablo Martin
c7419a2a33
fix wrong : in PKGBUILD when no -L option is available 2024-05-14 10:55:21 +02:00
Pablo M
05456c2803 Merge branch 'task/CMD-464_make_win-kit-ver-configurable' into 'release/v1.7.0'
CMD-464 make win kit ver configurable [to 1.7.0]

See merge request apps/MEGAcmd!734
2024-05-10 23:33:39 +12:00
Pablo M
15cfe40b6d Merge branch 'task/CMD-464_make_win-kit-ver-configurable' into 'develop'
CMD-464. Have Windows SDK kit version configurable

Closes CMD-464

See merge request apps/MEGAcmd!733
2024-05-10 23:33:39 +12:00
Pablo Martin
1f9914a0d1
have kit adjusted in jenkins windows packaging 2024-05-10 13:21:58 +02:00
Raphaël Lizé
fcf7036881
Make windows kit version an env var 2024-05-10 13:21:11 +02:00
Pablo M
9f6272ed86 Merge branch 'adjust/rel170-with-develop' into 'release/v1.7.0'
Update release branch with last changes from develop

See merge request apps/MEGAcmd!732
2024-05-10 04:31:40 +12:00
Pablo Martin
6d489a4c98
Merge remote-tracking branch 'origin/develop' into adjust/rel170-with-develop
Conflicts:
	tests/unit/PlatformDirectoriesTest.cpp <- gathered develop
version
2024-05-09 17:41:56 +02:00
Pablo M
574790cd78 Merge branch 'fix/CMD-460_simplify_platform_logic' into 'develop'
CMD-460. Simplify platforms dirs logic [to develop]

Closes CMD-460

See merge request apps/MEGAcmd!727
2024-05-10 03:35:31 +12:00
Roddy Benjamín González Garcés
0af327d201 Merge branch 'CMD-451-fix-default-sdk-in-package-pipelines' into 'develop'
Fix `defaultValue` for SDK branch in package pipelines

Closes CMD-451

See merge request apps/MEGAcmd!729
2024-05-09 04:30:15 +12:00
Pablo Martin
3c8838c615
have unlockExecution assert path not empty instead of check 2024-05-08 17:34:40 +02:00
Pablo Martin
ff4cdf57aa
missing creations in lengthy path use case for macos 2024-05-08 11:43:38 +02:00
Roddy González
5382026f86
Fix defaultValue for SDK branch in package pipelines 2024-05-08 11:33:34 +02:00
Pablo Martin
cdc7b048e4
fix compilatio macos 2024-05-07 19:20:25 +02:00
Pablo Martin
65cdc51ac5
fixes and improvements for macos
- have macOS runtimeDirPath check for home/Library/Caches existence,
fallback to /tmp otherwise
2024-05-07 18:52:28 +02:00
Pablo Martin
5656c2f912
further simplifications in platform directories
- Remove XDG class
- keep only config vs runtime paths
- refactors and tests adjustments
- throw in case of runtime/config dirs empty when created
- remove further .empty checks
2024-05-07 18:04:28 +02:00
Roddy Benjamín González Garcés
69fb1f8dab Merge branch 'CMD-451-package-jenkinsfiles' into 'develop'
Add pipeline to build linux packages

Closes CMD-451

See merge request apps/MEGAcmd!716
2024-05-08 01:53:54 +12:00
Roddy González
24038ac7aa
Add proposed changes from reviewers.
Support for 32bit windows packages
Use universal arch in MacOS
2024-05-06 17:46:17 +02:00
Pablo Martin
18c4cd2eca
add missing -DMEGACMD_TESTING_CODE in autotools 2024-05-06 17:24:12 +02:00
Pablo Martin
6a026d9281
alllow exceeding socket path in specific unit test 2024-05-06 13:26:15 +02:00
Pablo Martin
89cdb1b43b
prevent socket path to get too large due to runtime path location: fallback to /tmp
- shorten socket name in macos tests, so as to use runtime path in tests
2024-05-06 13:05:44 +02:00
Roddy González
3ad09cb24d
Add pipeline to build linux packages 2024-05-06 12:37:12 +02:00
Pablo Martin
be464835db
have linux lockExecution not rely on defined XDG_RUNTIME_DIR
and fix NE => EQ
2024-05-06 11:16:42 +02:00
Pablo Martin
2cfd5ba2de
fix wrong appending and ensure -DMEGACMD_TESTING_CODE=1 is added in autotool builds
reverted repeated MEGACMD_TESTING_CODE definition in cmake
2024-05-06 10:54:00 +02:00
Pablo Martin
b658b18509
add missing definition 2024-05-03 19:58:49 +02:00
Pablo Martin
acc49f0795
compilation & execution fixes
- readded explicit MEGACMD_TESTING_CODE for Server & Client targets
(seem to be failing for c++17 targets)
- add missins static for windows
- have unit tests use a new home in macos (and remove creation of not
required folders
2024-05-03 19:40:27 +02:00
Pablo Martin
e136a032cf
Merge remote-tracking branch 'origin/develop' into fix/CMD-460_simplify_platform_logic
Conflicts:
	tests/unit/PlatformDirectoriesTest.cpp
2024-05-03 19:11:18 +02:00
Pablo Martin
bd1f7882e7
Have windowds close lock handle upon unlock call
to be able to unlink it
- Also added some missing close fd in ! Windows
2024-05-03 19:07:08 +02:00
Pablo Martin
90981e2491
have temporary HOME random, and create subdirs expected in macOS 2024-05-03 18:50:12 +02:00
Vibhav Pant
7ef7b43c99 Merge branch 'CMD-433-runtimedirpath-test-update' into 'develop'
CMD-433: runtimeDirPath: Add additional tests for when $HOME is non-existent.

See merge request apps/MEGAcmd!728
2024-05-04 04:32:57 +12:00
Pablo Martin
bdac676670
have unit tests log messages 2024-05-03 18:28:56 +02:00
Pablo Martin
690e086657
Merge remote-tracking branch 'origin/develop' into fix/CMD-460_simplify_platform_logic 2024-05-03 17:27:24 +02:00
Vibhav Pant
9ce411df04
runtimeDirPath: Add additional tests for when $HOME is non-existent. 2024-05-03 17:25:43 +05:30
Pablo Martin
e69a8f5d6a
compilation fixes 2024-05-03 13:52:02 +02:00
Pablo Martin
bdfa8fc8b2
Simplify platform logic
- keep on using ~/.megaCmd for everything except runtime (or state or
cache) paths, that will use $XDG_RUNTIME_DIR/megacmd in linux and
$HOME/Library/Caches/megacmd.mac in macOS)
- make lock check for legacy ~/.megaCmd in case config and state dirs
differ
- add unit tests for lock/unlock execution
2024-05-03 13:31:18 +02:00
Diego Ximenez
8e317b5191 Merge branch 'fix/CMD-459_fix_launchctl_usage_in_macos_update_daemon' into 'develop'
CMD-459. Fix launchctl usage in macOS update daemon registration [develop]

Closes CMD-459

See merge request apps/MEGAcmd!720
2024-05-03 19:36:46 +12:00
Diego Ximenez
8ae66630d5 Merge branch 'fix/CMD-459_fix_launchctl_usage_in_macos_update_daemon' into 'release/v1.7.0'
CMD-459. Fix launchctl usage in macOS update daemon registration [to release 1.7.0]

See merge request apps/MEGAcmd!719
2024-05-03 19:36:36 +12:00
Pablo Martin
6f5687b68c
add missing mkdir in jenkins file for macos 2024-05-02 18:52:04 +02:00
Pablo Martin
dabb3f81e5
have UpdateTask use PlatformDirectories data dir
- minor adjustment in unused code writting old path in std::cout
2024-05-02 18:48:58 +02:00
Pablo M
763cff0967 Merge branch 'task/CMD-451_fix_RPM_arch_builds_for_170' into 'release/v1.7.0'
CMD-451. have -L passed to build_sdk.sh only if available for spec & PKGBUILD files [to 1.7.0]

See merge request apps/MEGAcmd!725
2024-05-03 04:17:22 +12:00
Pablo M
b724278874 Merge branch 'task/CMD-451_fix_RPM_arch_builds_for_170' into 'develop'
CMD-451. Have -L passed to build_sdk.sh only if available for spec & PKGBUILD files

Closes CMD-451

See merge request apps/MEGAcmd!724
2024-05-03 04:17:20 +12:00
Pablo Martin
a9443e4c2c
have -L passed to build_sdk.sh only if available for spec & PKGBUILD files
- fix arch linux complilation by no longer explicitly require gcc-libs
version (not compatible with gcc package installation)
- have build() done with bash verbose mode
2024-05-02 18:02:26 +02:00
Pablo Martin
adbb9517dc
fix unit tests qt build 2024-05-02 15:09:51 +02:00
Pablo Martin
d9b0368f92
have NEW config folder be ~/.megacmd to ensure legacy path is not created and easily differentiate new folders being in place 2024-05-02 15:09:42 +02:00
Pablo Martin
c7b440d56f
fix creation of legacy folder in new installations in mac
- By using polimorphism in non overrided Posix method
- Adjusted platformDirectory code to improve legibility and adjust use
cases
- do not use stateDirPath for logs, use data instead: we will want
persistence of those even after reboots
- have state dir path check for legacy path in posix: we want to check
for LOCK file.
2024-05-02 15:09:24 +02:00
Diego Ximenez
68081e27de
Load the macOS updater even if unload fails
Currently, the exit code of `unload` is 0 when the updater is not
registered (even though there's an error message). With this commit,
even if the exit code were to be changed to 1 in this case, `load` would
still be called and the updater would be registered correctly.

Also, we added the `-w` option to the loading as this seems to fix an
existing issue.
2024-05-02 13:34:17 +02:00
Diego Ximenez
b7d1f0a402
Update macOS files for 1.7.0 2024-04-29 17:47:06 +02:00
Roddy Benjamín González Garcés
434040804e Merge branch 'task/CMD-443-add-support-for-ubuntu24.04-fedora40-suse15.6-in-v1.7.0' into 'release/v1.7.0'
Add support for Ubuntu 24.04, Fedora 40 and OpenSUSE Leap 15.6

See merge request apps/MEGAcmd!715
2024-04-19 03:22:10 +12:00
Roddy Benjamín González Garcés
5cff214e57 Merge branch 'task/CMD-443-add-support-for-ubuntu24.04-fedora40-suse15.6' into 'develop'
CMD-443-Add support for Ubuntu 24.04, Fedora 40 and OpenSUSE Leap 15.6

Closes CMD-443

See merge request apps/MEGAcmd!714
2024-04-19 01:13:45 +12:00
Roddy González
3c71f5f79d
Add support for Ubunut 24.04, Fedora 40 and OpenSUSE Leap 15.6 2024-04-18 13:58:53 +02:00
Roddy González
abb5e5eeec
Add support for Ubunut 24.04, Fedora 40 and OpenSUSE Leap 15.6 2024-04-18 12:31:17 +02:00
Pablo M
3f9ed15c00 Merge branch 'fix/CMD-441_fix-wrong-ls-human-readable' into 'develop'
CMD-441. Fix/ fix wrong ls human readable [develop]

Closes CMD-441

See merge request apps/MEGAcmd!713
2024-04-18 03:54:04 +12:00
Pablo M
e6b1335a86 Merge branch 'fix/CMD-441_fix-wrong-ls-human-readable' into 'release/v1.7.0'
CMD-441. Fix/ fix wrong ls human readable [to release 1.7.0]

See merge request apps/MEGAcmd!712
2024-04-18 03:53:00 +12:00
Pablo Martin
df5abb49df
fix casting error in windows build 2024-04-17 17:32:40 +02:00
Pablo Martin
2d27ec9ab7
remove constexpr 2024-04-17 17:17:49 +02:00
Pablo Martin
941135b86b
fix ls -lh width 2024-04-17 17:04:30 +02:00
Diego Ximenez
e62cfe15fe Merge branch 'fix/CMD-422_fix_failures_on_dir_structure_integration_test' into 'release/v1.7.0'
CMD-422. Fix random failures on export integration tests

See merge request apps/MEGAcmd!711
2024-04-18 01:17:26 +12:00
Vibhav Pant
6956ca30ea Merge branch 'CMD-435-configurationmanager-use-pathisexistingdir' into 'release/v1.7.0'
CMD-435 - Use new function pathIsExistingDir to check if platform dirs exist in ConfigurationManager

See merge request apps/MEGAcmd!709
2024-04-18 01:11:43 +12:00
Vibhav Pant
438492a890 Merge branch 'CMD-435-configurationmanager-use-pathisexistingdir' into 'develop'
CMD-435 - Use new function pathIsExistingDir to check if platform dirs exist in ConfigurationManager

See merge request apps/MEGAcmd!708
2024-04-18 01:11:25 +12:00
Diego Ximenez
500569a068 Merge branch 'fix/CMD-422_fix_failures_on_dir_structure_integration_test' into 'develop'
CMD-422. Fix random failures on export integration tests

Closes CMD-422

See merge request apps/MEGAcmd!710
2024-04-18 01:06:19 +12:00
Vibhav Pant
54f4fc6318
Avoid an unnecessary heap allocation for MegaFileSystemAccess. 2024-04-17 16:54:35 +05:30
Diego Ximenez
d11ca6c2dd
Sleep after each export disable in integration tests 2024-04-16 18:28:38 +02:00
Diego Ximenez
f5b39fd0a3
Ensure library directories are created before integration tests 2024-04-16 18:17:40 +02:00
Diego Ximenez
7fc22bb199
Ensure a clean state after we're logged in in the export tests 2024-04-16 17:32:13 +02:00
Diego Ximenez
2445d23801
Sleep a bit after disabling an export in the export integration tests
Otherwise, the immediate call to check if the export exists or not would
fail.
2024-04-15 11:57:41 +02:00
Diego Ximenez
39d01af02e
Ensure a clean state in the export tests setup 2024-04-15 10:57:46 +02:00
Vibhav Pant
8fd93dd6ea
Expect false for passing file paths to pathIsExistingDir. 2024-04-12 20:23:16 +05:30
Vibhav Pant
a33991ebca
Fix PATH for unit tests. 2024-04-12 20:19:12 +05:30
Vibhav Pant
856783fa6a
Use free to manage buf, as it is allocated by malloc. 2024-04-12 19:17:20 +05:30
Vibhav Pant
2b72846074
Fix Windows build errors. 2024-04-12 18:59:09 +05:30
Vibhav Pant
8972afc64f
Merge remote-tracking branch 'origin/develop' into CMD-435-configurationmanager-use-pathisexistingdir 2024-04-12 18:49:41 +05:30
Vibhav Pant
b695794045
Use pathIsExistingDir instead of is_file_exists for dirs. 2024-04-12 18:44:23 +05:30
Vibhav Pant
b71573f982
Add a new function, pathIsExistingDir. 2024-04-12 18:44:13 +05:30
Pablo M
ff7a4359e7 Merge branch 'fix/CMD-434_have_sdk_build_working_with_non_L_supportive_sdk_versions' into 'release/v1.7.0'
CMD-434. Have -L only passed to sdk_build.sh if available [develop]

See merge request apps/MEGAcmd!707
2024-04-11 23:06:19 +12:00
Pablo M
373e8e375e Merge branch 'fix/CMD-434_have_sdk_build_working_with_non_L_supportive_sdk_versions' into 'develop'
CMD-434. Have -L only passed to sdk_build.sh if available [hotfix for 1.7.0]

Closes CMD-434

See merge request apps/MEGAcmd!706
2024-04-11 23:06:17 +12:00
Pablo Martin
73bf953784
Have -L only passed to sdk_build.sh if available 2024-04-11 12:54:08 +02:00
Vibhav Pant
db60ef033d Merge branch 'CMD-433-dev-runtimedirpath-posix-fix' into 'develop'
CMD-433 - Fix PosixDirectory::runtimeDirPath prematurely returning a /tmp/ based path.

See merge request apps/MEGAcmd!705
2024-04-11 03:11:31 +12:00
Vibhav Pant
6c37e3912d
Fix POSIX tests to expect /tmp based path when $HOME does not exist. 2024-04-10 19:48:26 +05:30
Vibhav Pant
804b7e61a9
loadConfiguration: If mConfigFolder is empty, call loadConfigDir. 2024-04-10 19:48:26 +05:30
Vibhav Pant
6643560ce0
Return /tmp based path only for the home directory on POSIX.
Additionally, only return it when either the home directory cannot be
found, or it does not exist.
2024-04-10 19:48:25 +05:30
Vibhav Pant
5e47ef8925 Merge branch 'CMD-433-platformdirectories-runtimedirpath-dont-check-if-exists' into 'release/v1.7.0'
CMD-433 - Fix PosixDirectory::runtimeDirPath prematurely returning a /tmp/ based path.

See merge request apps/MEGAcmd!704
2024-04-11 02:13:12 +12:00
Vibhav Pant
9db30498e8
runtimeDirPath: Add additional tests for different values for $HOME 2024-04-10 18:01:33 +05:30
Vibhav Pant
b0347cc1c9
Fix POSIX tests to expect /tmp based path when $HOME does not exist. 2024-04-10 17:54:09 +05:30
Vibhav Pant
77e4e5854c
loadConfiguration: If mConfigFolder is empty, call loadConfigDir. 2024-04-10 17:21:37 +05:30
Vibhav Pant
8084f74ca1
Return /tmp based path only for the home directory on POSIX.
Additionally, only return it when either the home directory cannot be
found, or it does not exist.
2024-04-10 17:19:50 +05:30
Diego Ximenez
6caf3837b5
Improve changelogs 2024-04-08 14:15:47 +02:00
Diego Ximenez
a342b86b64
Update changelogs to 1.7.0 2024-04-08 13:10:24 +02:00
Diego Ximenez
41b3c04df0
Update SDK's commit to HEAD of release/v4.31.0 2024-04-05 13:51:21 +02:00
Diego Ximenez
4dc7d1654d Merge branch 'master' into 'release/v1.7.0'
# Conflicts:
#   .github/ISSUE_TEMPLATE/bug_report.yml
2024-04-05 21:31:33 +13:00
Diego Ximenez
4e5ef4cd4f
Update version to 1.7.0 2024-04-03 17:16:34 +02:00
Vibhav Pant
58a489ea58 Merge branch 'CMD-357-run-integration-tests-jenkins-windows' into 'develop'
CMD-357: Run integration tests on Windows as well.

See merge request apps/MEGAcmd!696
2024-04-04 01:43:32 +13:00
Vibhav Pant
0f84c62d40
loadConfiguration: Move sessionfile declaration. 2024-04-03 02:12:03 +05:30
Vibhav Pant
610728cee3
Merge remote-tracking branch 'origin/develop' into CMD-357-run-integration-tests-jenkins-windows 2024-04-03 02:08:05 +05:30
Vibhav Pant
a17b1bcadd
Rename member configFolder to mConfigFolder. 2024-04-03 02:07:33 +05:30
Vibhav Pant
86baa024cf
Remove unneeded header. 2024-04-03 02:04:00 +05:30
Vibhav Pant
c380b1fba5
Clarify comment for not creating folder on Windows. 2024-04-03 02:03:46 +05:30
Vibhav Pant
3e07e494e3
stateDirPath: If the legacy config dir exists, return it. 2024-04-03 02:02:11 +05:30
Vibhav Pant
43bdf420ec Merge branch 'CMD-357-run-integration-tests-macos' into 'develop'
CMD-357: Run integration tests for the macOS pipeline.

See merge request apps/MEGAcmd!692
2024-04-03 09:23:41 +13:00
Diego Ximenez
7dc57a34a0 Merge branch 'fix/CMD-251_hammering_on_update_events' into 'develop'
CMD-251. Fix hammering on update events

Closes CMD-251

See merge request apps/MEGAcmd!686
2024-04-03 05:25:15 +13:00
Vibhav Pant
61f0e8006d
Allow empty tests results for integration tests. 2024-04-01 20:35:23 +05:30
Vibhav Pant
189bf2a141
Allow integration tests for fail (for now). 2024-04-01 20:29:15 +05:30
Vibhav Pant
2745b1d14b
Use globbing for the parent directory as well. 2024-04-01 20:22:54 +05:30
Vibhav Pant
c17a551751
Try using globing syntax to get junit to find the XML report. 2024-04-01 20:16:13 +05:30
Vibhav Pant
a425e6758e
List the contents of the workspace directory. 2024-04-01 20:07:19 +05:30
Vibhav Pant
3be8b0530a
Try removing extra backslashes from gtest-output arg. 2024-04-01 20:05:16 +05:30
Vibhav Pant
68c0ba7135
Specify the absolute path for gtest_output. 2024-04-01 20:00:09 +05:30
Vibhav Pant
6aa68698a0
Specify output format to gtest_output. 2024-04-01 19:52:56 +05:30
Vibhav Pant
f7f38084dc
Generate tests reports for both integration and unit tests. 2024-04-01 19:48:54 +05:30
Vibhav Pant
23d9cedda4
Run integration tests with higher verbosity. 2024-04-01 19:01:38 +05:30
Vibhav Pant
2951ee809f
Define ColoredPrintf as no-op on Windows. 2024-03-28 04:31:09 +05:30
Vibhav Pant
aba499f777
Use the correct path for vcpkg. 2024-03-28 03:32:57 +05:30
Vibhav Pant
1785e15c0c
Run parallel block in a stage. 2024-03-28 03:27:21 +05:30
Vibhav Pant
60f210dab8
List contents of vcpkg install directory. 2024-03-28 03:24:51 +05:30
Vibhav Pant
26b200bf37
Merge remote-tracking branch 'origin/CMD-380-use-platformdirectories' into CMD-357-run-integration-tests-jenkins-windows 2024-03-27 20:59:29 +05:30
Vibhav Pant
bb52f0ccba
Merge remote-tracking branch 'origin/develop' into CMD-380-use-platformdirectories 2024-03-27 20:53:04 +05:30
Callan Christophersen
0ec216fbfa Merge branch 'fix/CMD-111_fix-shown-name-in-the-exported-list-if-a-wildcard-is-used' into 'develop'
CMD-111. fix shown name in the exported list if a wildcard is used

Closes CMD-111

See merge request apps/MEGAcmd!693
2024-03-26 10:07:58 +13:00
Diego Ximenez
74d8ec995f Merge branch 'fix/CMD-417_allowed_regex_for_writable_folder_tests' into 'develop'
CMD-417. Fix allowed regex pattern in writable folder tests

Closes CMD-417

See merge request apps/MEGAcmd!694
2024-03-25 23:41:18 +13:00
Vibhav Pant
d0a8803965
Delete working directory in post stage. 2024-03-22 18:55:08 +05:30
Vibhav Pant
f3c194dafa
Temporarily print the config directory for Windows. 2024-03-22 18:50:44 +05:30
Vibhav Pant
17770743d6
Add initial support for running integration tests on Windows. 2024-03-22 18:41:41 +05:30
Diego Ximenez
51ab89abdd
Use raw string literals for regular expressions in export tests 2024-03-22 11:19:07 +01:00
Diego Ximenez
238b087b71
Fix auth-key in auth token regex only being alphanumeric 2024-03-22 11:14:49 +01:00
Callan
d1df1af477
For export command with regex expressions, use n->getName() instead of words[i]. 2024-03-22 17:14:23 +13:00
Diego Ximenez
98dbb4cb5a
Merge branch 'develop' into fix/CMD-251_hammering_on_update_events 2024-03-21 17:33:38 +01:00
Vibhav Pant
c09ee64ec6
Don't compare dirs->configDirPath() against wide strings. 2024-03-21 19:33:42 +05:30
Vibhav Pant
3b5017cfe8
Use the correct function name. 2024-03-21 19:29:31 +05:30
Vibhav Pant
f689d9cd10
Provide a regular string to _getenv as well. 2024-03-21 19:26:12 +05:30
Vibhav Pant
c67ff78aa0
Use regular strings for the config dir suffix. 2024-03-21 18:44:17 +05:30
Vibhav Pant
6860354b14
WindowsDirectories: Allow adding a suffix to the config dir path. 2024-03-21 18:38:07 +05:30
Vibhav Pant
c7d25eea5f
Merge remote-tracking branch 'origin/develop' into CMD-380-use-platformdirectories 2024-03-21 18:27:58 +05:30
Diego Ximenez
3419cbc581
Ensure windows scheduled task runs properly the first time 2024-03-21 13:27:10 +01:00
Diego Ximenez
fbd202573e
Improve MEGAcmdUpdater argument conversion for windows 2024-03-21 13:25:48 +01:00
Vibhav Pant
faa0a9c95d
Merge remote-tracking branch 'origin/develop' into CMD-357-run-integration-tests-macos 2024-03-21 17:55:31 +05:30
Vibhav Pant
496fc4cbb2 Merge branch 'CMD-336-cmake-testing-flags' into 'develop'
CMD-336 Add CMake flag ENABLE_MEGACMD_TESTS

Closes CMD-336

See merge request apps/MEGAcmd!681
2024-03-22 01:24:46 +13:00
Vibhav Pant
398d3814cb
Provide our own custom regex matchers based on std::regex. 2024-03-21 17:37:34 +05:30
Vibhav Pant
94a9fc3511
Test different escape syntax for macOS. 2024-03-20 23:27:03 +05:30
Vibhav Pant
92003a73f9
Test a simple regex match. 2024-03-20 23:04:21 +05:30
Vibhav Pant
a543e39f21
Expose user credentials for integration tests. 2024-03-20 22:46:36 +05:30
Vibhav Pant
cd170e6033
Use absolute paths to test binaries. 2024-03-20 22:33:50 +05:30
Vibhav Pant
654f0b2477
Clone SDK and MEGAcmd in parallel, fix indentation. 2024-03-20 22:33:38 +05:30
Vibhav Pant
a0bdb763b5
Name arguments to junit. 2024-03-20 22:25:26 +05:30
Vibhav Pant
3a7af02b7c
Fix syntax error. 2024-03-20 22:24:00 +05:30
Vibhav Pant
6b2591ace8
Run integration tests for the macOS pipeline. 2024-03-20 22:18:25 +05:30
Diego Ximenez
0db6ff334b
Merge branch 'develop' into fix/CMD-251_hammering_on_update_events 2024-03-20 13:45:54 +01:00
Diego Ximenez
834f9f8c0f
Add leftover changes that weren't properly added in previous commit 2024-03-20 13:42:45 +01:00
Diego Ximenez
95f483bfc7
Read the current version via environment variable or console arg
With this commit, the mega updater checks the current version in this
order:
	1) The `MEGACMD_VERSION_OVERRIDE` environment variable.
	2) The `--version [...]` console argument.
	3) The `MEGACMD_CODE_VERSION` macro.
If one is not provided, it'll fall back to the next one; the default one
being `MEGACMD_CODE_VERSION`, which is hardcoded into the build.

The MEGAcmd server uses (2), whereas the emergency updater (i.e.,
windows/macos scheduled task) uses (3). In any case, (1) can be used to
force an update.
2024-03-20 12:58:44 +01:00
Diego Ximenez
380083ba51 Merge branch 'task/CMD-387_add_getListOfWords_unit_tests' into 'develop'
CMD-387. Add unit tests for `getlistOfWords`

Closes CMD-387

See merge request apps/MEGAcmd!675
2024-03-19 22:25:57 +13:00
Vibhav Pant
67a3dbb6ad
Fix indentation. 2024-03-18 23:54:53 +05:30
Vibhav Pant
9ee7447777 Merge branch 'CMD-418-create-dir-tree-in-test-fixture' into 'develop'
CMD-418: Create directory structure for integration tests in test fixtures.

Closes CMD-418

See merge request apps/MEGAcmd!688
2024-03-19 07:19:02 +13:00
Vibhav Pant
bbdb1eafac
Use links from the +exported integration tests account. 2024-03-18 18:56:14 +05:30
Vibhav Pant
d82e4c7e80
Revert "Remove calls to setAccountAuth to fix SDK assert failure."
This reverts commit 71cc33130d81178cf3b7ca8c92cfcb0aabab81d4.
2024-03-18 18:47:04 +05:30
Diego Ximenez
00bac5336b
Merge branch 'develop' into task/CMD-387_add_getListOfWords_unit_tests 2024-03-18 12:56:03 +01:00
Vibhav Pant
3f71e15098
Merge remote-tracking branch 'origin/develop' into CMD-418-create-dir-tree-in-test-fixture 2024-03-15 18:05:23 +05:30
Vibhav Pant
22cb5dbfa9
Fix URL for file01, call ok() on ClientResponse for GTest assertion. 2024-03-15 17:09:02 +05:30
Vibhav Pant
d70d944c7d
Add a SetUp and TearDown method to ExportTest fixture. 2024-03-15 17:02:32 +05:30
Vibhav Pant
71cc33130d
Remove calls to setAccountAuth to fix SDK assert failure. 2024-03-15 17:00:52 +05:30
Diego Ximenez
052cde3ea1 Merge branch 'task/CMD-411_update_for_sqlite3_sdk_linking_changes' into 'develop'
CMD-411. Update linux build for latest SDK changes to sqlite3 linking

Closes CMD-411

See merge request apps/MEGAcmd!677
2024-03-15 23:28:22 +13:00
Diego Ximenez
0e8cdb209f Merge branch 'update_preferred_ports_to_sdk_latest' into 'develop'
Update preferred-ports to the latest versions in the SDK

See merge request apps/MEGAcmd!687
2024-03-15 07:02:35 +13:00
Diego Ximenez
6795cff0e6
Update common tools due to upgrade to meson 1.3.2 in vcpkg repo 2024-03-14 13:26:00 +01:00
Diego Ximenez
28aaa42770
Update preferred-ports to the latest versions in the SDK 2024-03-12 20:04:19 +01:00
Vibhav Pant
275610f8e0
Build with ENABLE_MEGACMD_TESTS=1. 2024-03-12 20:51:57 +05:30
Vibhav Pant
0a348ddea3
Remove redundant make target names. 2024-03-11 19:14:04 +05:30
Vibhav Pant
f2ea5b2efe
Merge remote-tracking branch 'origin/develop' into CMD-336-cmake-testing-flags 2024-03-11 19:08:51 +05:30
Diego Ximenez
61c7c1c14f
Merge branch 'develop' into fix/CMD-251_hammering_on_update_events 2024-03-05 14:11:08 +01:00
Diego Ximenez
b536c86d87
Display an error message if megacmd.version could not be written to 2024-03-05 14:01:11 +01:00
Diego Ximenez
33b7b72870
Use std::stoi instead of atoi to convert the version string to an int
This has the advantage of also catching the out-of-range errors, apart
from the "invalid argument" errors.
2024-03-05 13:56:27 +01:00
Diego Ximenez
b359b8ae38
Read current version from MEGACMD_CODE_VERSION instead of file
Since the MegaUpdater executable is also updated with the rest, it
contains the latest MEGAcmd version in the code itself. So we can use
the define to get it, instead of having to access a file (that, as we
saw, might not have been properly written to for whatever reason).

Thus, the `megacmd.version` file is only used to check against the
previous version to broadcast the "MEGAcmd has been updated" message at
the start. This is just an info message (i.e., non-critical) so, if the
file was not written to, there won't be any hammering or other errors.
2024-03-05 13:45:10 +01:00
Diego Ximenez
212a89d43c
Make stopCheckingForUpdaters an atomic bool
Since it's read and written to by different threads
2024-03-05 13:02:31 +01:00
Xavier Rins Lozano
fae43035bc Merge branch 'CMD-414-Deprecate-EOL-Distributions' into 'develop'
CMD-414-Add warning to Ub2304 Suse154 Fed37

Closes CMD-414

See merge request apps/MEGAcmd!685
2024-02-23 01:07:58 +13:00
Xavier Rins Lozano
22c25c5b5c
Add warning to Ub2304 Suse154 Fed37 2024-02-22 12:39:33 +01:00
Vibhav Pant
e4257ebf23
Install libtinyxml2-dev instead of libtinyxml-dev. 2024-02-16 20:05:45 +05:30
Vibhav Pant
21f9ae2821
Print contents of link.txt for debugging. 2024-02-16 19:54:47 +05:30
Vibhav Pant
6dcde72736
Revert to using 12-slim, only build MEGAcmd related components. 2024-02-16 19:33:47 +05:30
Vibhav Pant
408191a41d
Create a new layer for installing CMake, use debian:12.5-slim. 2024-02-16 19:22:02 +05:30
Vibhav Pant
a972e0ef83
Build the CMake container image for Linux pipelines as well. 2024-02-16 18:54:52 +05:30
Vibhav Pant
05be33425a
Checkout SDK and MEGAcmd in parallel, and with shallow clone. 2024-02-16 18:38:58 +05:30
Vibhav Pant
a04840930a
Build with ENABLE_MEGACMD_TESTS=1. 2024-02-16 18:34:22 +05:30
Vibhav Pant
bc55bf863e
Add ENABLE_MEGACMD_TESTS build arg. 2024-02-16 18:17:44 +05:30
Vibhav Pant
5b8c400fe7
Add ENABLE_MEGACMD_TESTS flag. 2024-02-16 18:17:08 +05:30
Diego Ximenez
a7e709c5c8 Merge branch 'task/CMD-359_improve_mac_update_daemon' into 'develop'
CMD-359. Improve MacOS update daemon

Closes CMD-359

See merge request apps/MEGAcmd!676
2024-02-06 01:24:05 +13:00
Vibhav Pant
2242161d43 Merge branch 'CMD-209-async-node-file-folder-count' into 'develop'
CMD-209. Use MegaAccountDetails for file and folder counts

Closes CMD-209

See merge request apps/MEGAcmd!628
2024-02-03 03:05:26 +13:00
Vibhav Pant
00c27e7930
Use the correct path for megacmdcommonutils.h 2024-01-30 22:58:39 +05:30
Vibhav Pant
1ac5536f29
Use PlatformDirectories to get paths to user data folders.
* src/configurationmanager.cpp:
 - Add new methods ConfigurationManager::{getDataDir, getStateDir}.
 - Replace ConfigurationManager::getConfFolderSubdir with
 getDataFolderSubdir, as it is only used for creating SDK directories,
 which should be in the data directory.
 - ConfigurationManager::loadConfigDir: Use PlatformDirectories to get
 config folder.
 - ConfigurationManager::{lockExecutor/unlockExecution}: Store the
 lock file in the state folder.

* src/megacmd.cpp:
 - executeServer: Use data dir and subfolders in it for SDK storage.

* src/megacmdlogger.cpp:
 - Store logs in the state directory.
2024-01-30 22:03:15 +05:30
Vibhav Pant
1055634075 Merge branch 'CMD-307-allow-changing-named-pipe-location' into 'develop'
CMD-307. Add function getNamedPipeName() for creating Win32 pipe path, add env variable MEGACMD_PIPE_SUFFIX.

Closes CMD-307

See merge request apps/MEGAcmd!662
2024-01-29 21:49:05 +13:00
Vibhav Pant
9935e6ade3 Merge branch 'CMD-280-github-issue-template' into 'master'
CMD-280 Add an issue template for GitHub

See merge request apps/MEGAcmd!665
2024-01-29 21:48:36 +13:00
Vibhav Pant
a2ad726ce4 Merge branch 'CMD-280-github-issue-template-megacmd-branding' into 'develop'
CMD-280: Use the correct style for MEGAcmd for GitHub issue templates.

Closes CMD-280

See merge request apps/MEGAcmd!666
2024-01-29 21:47:41 +13:00
Diego Ximenez
faeead57e2
Set default sqlite3 flag to -L and make it null on CentOS 7 2024-01-25 19:52:48 +01:00
Diego Ximenez
dc9336d208
Update build steps to account for SDK changes to sqlite3 linking 2024-01-25 15:23:52 +01:00
Diego Ximenez
5b2046604d
Ensure Agents directory is present before writing to plist file 2024-01-23 12:07:03 +01:00
Diego Ximenez
90b0d0a1c7 Merge branch 'task/CMD-409_improve_export_help' into 'develop'
CMD-409. Update and improve `export --help`

Closes CMD-409

See merge request apps/MEGAcmd!673
2024-01-16 05:58:40 +13:00
Diego Ximenez
3361abf9a4
Add basic getlistOfWords unit tests 2024-01-15 15:00:02 +01:00
Diego Ximenez
ba87b185bb Merge branch 'task/update_sdk_triplets_folder_name' into 'develop'
Update SDK vcpkg triplets folder name

See merge request apps/MEGAcmd!674
2024-01-16 01:18:39 +13:00
Diego Ximenez
a165a45184
Update SDK triplets folder name in build_from_scratch.cmake 2024-01-15 13:07:24 +01:00
Diego Ximenez
958e12910e Merge branch 'task/CMD-385_add_export_integration_tests' into 'develop'
CMD-385. Add integration tests for the export command

Closes CMD-385

See merge request apps/MEGAcmd!670
2024-01-16 00:19:01 +13:00
Callan Christophersen
36892fad7a Merge branch 'task/CMD-377_Have-mega-tree-allow-for--show-handles' into 'develop'
CMD-377_Have-mega-tree-allow-for--show-handles

See merge request apps/MEGAcmd!643
2024-01-15 10:38:30 +13:00
Diego Ximenez
28d84ca947
Minor improvements to export help output 2024-01-12 18:37:51 +01:00
Diego Ximenez
c0cf314ea0 Merge branch 'task/CMD-367_rename_api_logger_level_to_sdk' into 'develop'
CMD-367. Rename `MEGACmdLogger::setApiLoggerLevel` to refer to the SDK

Closes CMD-367

See merge request apps/MEGAcmd!671
2024-01-13 00:18:56 +13:00
Diego Ximenez
db56bbe3e0
Update the export command in UserGuide.md 2024-01-11 18:02:24 +01:00
Diego Ximenez
f7032228a8
Improve the export --help command 2024-01-11 18:02:10 +01:00
Diego Ximenez
bc2f8229c9
Rename apiLoggerLevel to sdkLoggerLevel 2024-01-11 13:25:28 +01:00
Diego Ximenez
d5792d127d
Fix bad merge 2024-01-10 13:45:41 +01:00
Diego Ximenez
c7892b8fbd
Add nested directory structure export test 2024-01-10 12:51:40 +01:00
Diego Ximenez
35495f31b0
Add password-protected export test 2024-01-09 19:26:10 +01:00
Diego Ximenez
12cc3facff
Merge branch 'develop' into task/CMD-385_add_export_integration_tests 2024-01-09 17:53:00 +01:00
Diego Ximenez
1090ac5595
Fix AuthToken format in output of export command
- Add writable export test
- Use regex to verify links are well-formed in other export tests as
well
2024-01-09 17:50:42 +01:00
Diego Ximenez
5b053bbd47
Use testing substr instead of regex unless necessary 2024-01-09 14:42:32 +01:00
Diego Ximenez
6e0cf00c66
Add failed recreation export test 2024-01-09 13:39:47 +01:00
Diego Ximenez
78e6840603
Small improvements to some integration tests 2024-01-09 12:49:23 +01:00
Diego Ximenez
1deb1adb48
Add basic export integration test 2024-01-09 12:41:15 +01:00
Pablo M
c05e6510aa Merge branch 'task/CMD-399_macos_update_dmg_creation_with_CMD289' into 'develop'
CMD-399. Fixes and automation scripts for producing installers (and CMD-289)

Closes CMD-399

See merge request apps/MEGAcmd!659
2024-01-06 01:52:45 +13:00
Pablo M
7f3712016e Merge branch 'task/CMD-950_fix-and-automate-windows-installers-generation' into 'develop'
CMD-289. Fixes and automation scripts for producing installers

Closes CMD-950

See merge request apps/MEGAcmd!651
2024-01-05 21:42:42 +13:00
Pablo M
7652591c37 Merge branch 'fix/not-owned-unique-ptr-comming-from-refactor' into 'develop'
fix not owned unique_ptr

See merge request apps/MEGAcmd!669
2024-01-05 06:03:11 +13:00
Pablo Martin
678d94af40
fix not owned unique_ptr 2024-01-04 17:52:35 +01:00
Pablo M
509a87f21b Merge branch 'task/fix-windows-qt-build' into 'develop'
link with gmock in qt builds

See merge request apps/MEGAcmd!668
2024-01-05 04:47:18 +13:00
Pablo Martin
bf31559ef1
fix constness in links prefixes 2024-01-04 14:27:24 +01:00
Pablo Martin
14d87ed8f1
no longer use lcrypto-static in updater in qt 2024-01-04 14:25:40 +01:00
Pablo Martin
1ef3eb43a4
link with gmock in qt builds 2024-01-04 14:20:31 +01:00
Vibhav Pant
db3df0ad75
Use the correct style for MEGAcmd. 2024-01-03 15:54:04 +05:30
Vibhav Pant
f4bd2b1c8f
Use the correct style for MEGAcmd. 2024-01-03 15:51:11 +05:30
Vibhav Pant
6e77780f16
Add a GitHub issue template. 2024-01-03 13:42:04 +05:30
Vibhav Pant
f890223a5c
Use wide strings for windows tests. 2024-01-02 16:45:30 +05:30
Vibhav Pant
f14f948051
Add getNamedPipeName unit test for Windows. 2024-01-02 16:40:40 +05:30
Vibhav Pant
106c1775da
Use the correct path for megacmdcommonutils.h. 2024-01-02 16:16:48 +05:30
Vibhav Pant
9f969eaf3c
Add relevant headers for GetUserName. 2024-01-02 16:08:56 +05:30
Vibhav Pant
c7d4652082
Add function getNamedPipeName() for creating Win32 pipe path. 2024-01-02 15:09:39 +05:30
Pablo Martin
bc9bbb3218
fix gathering signed products 2023-12-28 14:45:22 +01:00
Pablo Martin
84030bdf35
remove last qt vestiges in installer_mac.sh 2023-12-28 12:47:30 +01:00
Pablo Martin
1edda80028
remove qt references in installer_mac 2023-12-28 12:40:44 +01:00
Pablo Martin
80635cffa3
Merge remote-tracking branch 'origin/develop' into task/CMD-950_fix-and-automate-windows-installers-generation 2023-12-28 12:23:03 +01:00
Pablo Martin
2defb9e881
Merge remote-tracking branch 'origin/develop' into task/CMD-399_macos_update_dmg_creation_with_CMD289 2023-12-28 12:22:43 +01:00
Pablo M
3e2ecaf6e0 Merge branch 'task/code-compatible-with-develop-and-431' into 'develop'
Adjustment to have code compatible with SDKs develop and 4.31.0

See merge request apps/MEGAcmd!661
2023-12-29 00:21:31 +13:00
Pablo Martin
8f28bd9f11
workaround to have code compatible with SDKs develop and 4.31.0 2023-12-28 12:06:43 +01:00
Pablo Martin
d2201896ee
Merge remote-tracking branch 'origin/develop' into task/CMD-950_fix-and-automate-windows-installers-generation 2023-12-28 10:52:19 +01:00
Pablo Martin
0b9ae6e4d9
support building universal version and other adjustments
- ensure all dylibs references use path relative to the executable
- have cmake set min target version to 10.13 (x86_64) and 11 (arm64)
2023-12-28 10:46:55 +01:00
Pablo Martin
89f4b8cf52
update volume name and resources zip with newer resources 2023-12-27 13:33:38 +01:00
Vibhav Pant
8690f0ddd8
Remove getNumFolderFiles, as it is an unused function. 2023-12-27 16:26:31 +05:30
Vibhav Pant
c028359e73
megacmd: Use getMegaFolderInfo instead of getNumFolderFiles. 2023-12-27 16:24:13 +05:30
Pablo Martin
4f32bb1696
Merge remote-tracking branch 'origin/task/CMD-950_fix-and-automate-windows-installers-generation' into task/CMD-399_macos_update_dmg_creation_with_CMD289 2023-12-27 10:24:40 +01:00
Vibhav Pant
b7a99501c8
Update nFolders in one go. 2023-12-27 13:20:10 +05:30
Vibhav Pant
132e945eff
Merge remote-tracking branch 'origin/develop' into CMD-209-async-node-file-folder-count 2023-12-27 12:50:33 +05:30
Pablo Martin
ada1acced6
more adjustments in dmg creation and loader removal
- moved Info.plist and added CFBundleShortVersionString and
LSMinimumSystemVersion (10.13) entries
- have installer_mac.sh fully support cmake and not rely on macdeployqt:
   -> create .app bundle structure from scratch
   -> have dylibs use relative paths using install_name_tool
   -> no longer install MEGAcmdLoader (not produced)
-> unified spaces, refactored some pieces and improve code
readability
- adjust forked executable (forking the server directly instead of the
loader)
2023-12-26 15:03:44 +01:00
Pablo Martin
5810743a8c
update installer script
- measure time
- prepare for cross arch and do not use x64 when building in arm
- prepare for non qt build (WIP)
- have volume name differ from app name
- allow for SKIP_REMOVAL (to not recompile when env variable set)
- extract version from megacmdversion.h to be place in Info.plist
- use noratytool for notarizing, simplifying the notarization bits
2023-12-26 10:26:31 +01:00
Vibhav Pant
8e3b15f239 Merge branch 'CMD-396-use-gmock-matchers' into 'develop'
CMD-396. Use gmock matchers for more idiomatic assertions/expectations.

Closes CMD-396

See merge request apps/MEGAcmd!653
2023-12-23 03:06:00 +13:00
Vibhav Pant
9ded2ea371
Use ASSERT_STRNE for C string comparisons. 2023-12-21 21:15:48 +05:30
Vibhav Pant
3a85aaadb8
Use gmock matchers for more idiomatic assertions/expectations. 2023-12-21 21:02:36 +05:30
Vibhav Pant
6cdc7fb599 Merge branch 'CMD-357-create-container-image-for-tests_catcherror_attempt' into 'develop'
CMD-357. Integration tests containerized  tsan failure allowance and improvements/fixes

Closes CMD-357

See merge request apps/MEGAcmd!650
2023-12-21 05:26:48 +13:00
Vibhav Pant
6d98ffceed
Randomize order in which unit and integration tests are run. 2023-12-20 19:06:23 +05:30
Vibhav Pant
aecb2ed118
Ensure that sanitizer/debug builds always generate full stacks. 2023-12-20 18:54:03 +05:30
Vibhav Pant
482b9a103e
Ensure that the base class' SetUp() method is called in all test fixtures. 2023-12-20 17:48:39 +05:30
Vibhav Pant
9fc7f5cc9d
Add -lgmock flag for integration and unit tests. 2023-12-20 17:24:08 +05:30
Vibhav Pant
05c9011c2a
Add libgmock-dev as a build dependency. 2023-12-20 16:55:00 +05:30
Vibhav Pant
64bb15b5da
Merge remote-tracking branch 'origin/develop' into CMD-357-create-container-image-for-tests_catcherror_attempt 2023-12-20 16:53:36 +05:30
Pablo M
0525ccbe88 Merge branch 'task/CMD-392_arch_linux_enforce_pacman_signing_key_initialization' into 'develop'
CMD-392. Ensure pacman-key sigining key is initialized

Closes CMD-392

See merge request apps/MEGAcmd!652
2023-12-21 00:03:42 +13:00
Pablo Martin
d5f38588c3
ensure pacman-key sigining key is initialized 2023-12-20 11:14:59 +01:00
Vibhav Pant
8285ebd019
Merge remote-tracking branch 'origin/develop' into CMD-209-async-node-file-folder-count 2023-12-19 18:05:10 +05:30
Vibhav Pant
01a03182e2 Merge branch 'CMD-357-create-container-image-for-tests' into 'develop'
CMD-357 Create container image for tests

See merge request apps/MEGAcmd!635
2023-12-20 01:31:07 +13:00
Vibhav Pant
b4d97e1f66 Merge branch 'CMD-283-use-account-details-whoami' into 'develop'
CMD-283. whoami: Use two MegaAccountDetail objects for storage/other details

Closes CMD-283

See merge request apps/MEGAcmd!637
2023-12-20 01:27:46 +13:00
Pablo Martin
5965eea395
more fixes and improvements in automatic full build for windows
- have not signed installed named _unsigned
- allow for skipping rebuild
- fix ONLY_BUILD_THIRD_PARTIES
- fix gathering
- nsi adjustments: refactors, and disable expected warning 6020
- make deletion of ssl/crypto cross-arch
2023-12-19 13:18:58 +01:00
Pablo Martin
9d1663bdcc
fixes and improvements in full automated build system
- have production_build.cmd working
- integrate the 3rd party building within full_build_process.cmd (single
point of entrance)
- fix exit conditions to have an early exit in case of failure in
several places
- removed some remaining qt references
- renamed signed gatherer script and have pause called when not using
MINGW bash
2023-12-19 11:50:51 +01:00
Pablo Martin
ff755a99ab
Fixes and automation scripts for producing installers
- updated ports
- fixed libzen build in build_from_scratch (removed nopkgconfig)
- make build_from_scratch use 12 cores by default
- create and adjust .cmd scripts to automate all the processes (pending
signinig) in order to produce executables
- fix .nsi to work with new dependencies and automated runs
- adjusted .gitignore with new build products
2023-12-18 19:21:39 +01:00
Diego Ximenez
4a81373e45 Merge branch 'fix/CMD-288_fix_python_tests_failing' into 'develop'
CMD-288. Fix Python tests failing in Jenkins

Closes CMD-288

See merge request apps/MEGAcmd!644
2023-12-19 00:13:35 +13:00
Diego Ximenez
7a1c653b01
Rename wait_for return value for clarity
Plus other very small changes suggested in the MR.
2023-12-18 11:33:08 +01:00
Diego Ximenez
21518b5c13
Fix string sxception when authKey is empty 2023-12-15 14:15:42 +01:00
Diego Ximenez
7f3dda1063
Fix memory leak when getting the node versions 2023-12-15 14:04:51 +01:00
Diego Ximenez
13a217e7f2
Fix export -a usage in Python tests 2023-12-15 13:58:47 +01:00
Pablo Martin
a576d7f9e4
fix tsan failure allowance code 2023-12-15 12:48:34 +01:00
Diego Ximenez
733c90a910
Check if trigger is destroyed before spawning a new thread
This fixes a race condition if the `triggerDeferredSingleShot` lock was
waiting on the destructor's lock, which ensures no threads are spawned
if they can't be joined in the destructor.
2023-12-15 11:59:50 +01:00
Diego Ximenez
b9104f6efa
Fix bad merge in previous commit 2023-12-15 11:30:07 +01:00
Diego Ximenez
97d389734c
Merge branch 'develop' into fix/CMD-288_fix_python_tests_failing 2023-12-15 11:16:54 +01:00
Pablo Martin
1f1b16576b
fix indents 2023-12-15 10:50:05 +01:00
Pablo Martin
cc9ef463c5
allow tsan failure for now in MR builds 2023-12-15 10:49:40 +01:00
Pablo M
0da6f87600 Merge branch 'task/CMD-379_support-rpi12' into 'develop'
CMD-379. Revert raspbian 11 repository folder name

Closes CMD-379

See merge request apps/MEGAcmd!649
2023-12-15 22:27:50 +13:00
Pablo Martin
92d6df1cb0
revert raspbian 11 repository folder name 2023-12-15 10:24:29 +01:00
Pablo M
eb69bc905c Merge branch 'task/CMD-379_support-rpi12' into 'develop'
CMD-379. Fix compilation for Raspbian 12

Closes CMD-379

See merge request apps/MEGAcmd!648
2023-12-15 22:22:42 +13:00
Pablo Martin
5b4113b66a
support raspbian12
have explicit -mfpu seet to fix compilation in raspbian 12
2023-12-15 09:47:18 +01:00
Diego Ximenez
a0df6a37fb
Use a DeferredSingleTrigger class to fix race condition 2023-12-14 18:45:54 +01:00
Diego Ximenez
5c3c2992a9 Merge branch 'task/CMD-200_report-errors-over-existing-exports' into 'develop'
CMD-200. Report errors over existing exports when using the -a argument and other export improvements

Closes CMD-200

See merge request apps/MEGAcmd!623
2023-12-15 04:37:54 +13:00
Diego Ximenez
b8695be086
Fix race conditions in verifyShared thread code 2023-12-14 12:49:26 +01:00
Diego Ximenez
0df7e000fd
Use unique ptrs for petition threads 2023-12-13 17:48:16 +01:00
Diego Ximenez
c5b01a96c9
Change exported node assertions to actual errors 2023-12-12 18:12:46 +01:00
Diego Ximenez
fe7826c6b4
Add proper output codes for error messages 2023-12-12 18:01:40 +01:00
Diego Ximenez
710cda73d2
Fix memory leak after transfer finish 2023-12-12 13:19:17 +01:00
Diego Ximenez
7ed6cfe08a
Fix verification thread not being properly cleaned up 2023-12-12 11:20:02 +01:00
Pablo M
8e3263f1e9 Merge branch 'fix/include-am-missing-plus' into 'develop'
Fix src_libmegacmdclient_la_CXXFLAGS overriden

See merge request apps/MEGAcmd!646
2023-12-12 23:07:33 +13:00
Vibhav Pant
1bc3ef6f81
While creating quota warning string, check email and warnings list for null. 2023-12-12 12:56:21 +05:30
Vibhav Pant
f793904e4d
Merge remote-tracking branch 'origin/develop' into CMD-209-async-node-file-folder-count 2023-12-12 12:49:12 +05:30
Vibhav Pant
921dda5c19
Use the Debian 12 deb for pdfium. 2023-12-11 21:59:07 +05:30
Vibhav Pant
757ce34007
Add additional output checks for whoami -l. 2023-12-11 21:50:12 +05:30
Vibhav Pant
6c05b4e7c4
Merge Whoami* tests into one test, using subtests for the extended cmd. 2023-12-11 21:43:02 +05:30
Vibhav Pant
5365380a3b
Use unique_ptr to avoid leaks for strings returned by AccountDetails methods. 2023-12-11 21:40:05 +05:30
Vibhav Pant
30eb84460b
Add a -lgmock flag for building integration tests on QMake. 2023-12-11 21:30:27 +05:30
Vibhav Pant
f630614546
Disable CMake build for now. 2023-12-11 21:18:43 +05:30
Vibhav Pant
96d4e6d4f5
Ignore the exit code for docker image rm. 2023-12-11 20:58:57 +05:30
Vibhav Pant
2efcbde342
Remove the ignore flag for docker rm. 2023-12-11 20:57:59 +05:30
Vibhav Pant
65a79d7a99
Fix cli options for docker image rm. 2023-12-11 20:55:14 +05:30
Vibhav Pant
dd7e5ccbe3
Remove images before archiving reports 2023-12-11 20:52:12 +05:30
Vibhav Pant
ad3eb95eb8
Remove images built once the pipeline has finished. 2023-12-11 20:47:54 +05:30
Diego Ximenez
c1559baafe
Add environment variable to skip PDF thumbnail tests 2023-12-11 14:28:52 +01:00
Vibhav Pant
30bd51eb1c
Add libtinyxml2.6.2v5 as well. 2023-12-11 18:41:13 +05:30
Vibhav Pant
ecd0933eff
Install libtinyxml2 (-dev) as a dependency. 2023-12-11 18:36:08 +05:30
Vibhav Pant
ca76904fb4
Ensure the correct TSAN_OPTIONS are passed. 2023-12-11 18:35:56 +05:30
Vibhav Pant
a346668dc8
Merge remote-tracking branch 'origin/develop' into CMD-357-create-container-image-for-tests 2023-12-11 18:11:25 +05:30
Vibhav Pant
a3bbc3ff4a
Use the correct name for the testing stage. 2023-12-11 18:11:08 +05:30
Diego Ximenez
6274d553df
Add extra allowed failures for image and PDF thumbnail tests
Thumbanils are not generated for these files in the webclient either, so
it's not an issue with MegaCMD.
2023-12-11 13:27:17 +01:00
Vibhav Pant
671f6f80f7
Add libgmock-dev to build dependencies. 2023-12-11 17:32:42 +05:30
Diego Ximenez
5583ea9a29
Fix memory leak on error teardown 2023-12-11 12:03:47 +01:00
Diego Ximenez
8b36d4e591
Fix possible null pointer dereference 2023-12-11 12:03:13 +01:00
Pablo Martin
6b345a4dc9
fix src_libmegacmdclient_la_CXXFLAGS overriden 2023-12-11 10:59:50 +01:00
Diego Ximenez
87b625122b
Ignore folders in thumbnail python test 2023-12-05 19:13:20 +01:00
Diego Ximenez
5ba419fae9
Add tiff files to the list of allowed failures in thumbnail python test 2023-12-05 18:41:05 +01:00
Diego Ximenez
54495b8679
Ensure auth token string is long enough to extract URL 2023-12-05 18:23:00 +01:00
Diego Ximenez
c81bdba306
Revert unwanted change in previous commit
Accidentally staged the sdk hash.
2023-12-05 10:57:05 +01:00
Diego Ximenez
e15baef696
Merge branch 'develop' into fix/CMD-288_fix_python_tests_failing 2023-12-04 20:16:18 +01:00
Diego Ximenez
4aa94a863d
Check if node is a folder before using getWritableLinkAuthKey 2023-12-04 20:14:44 +01:00
Vibhav Pant
b0c0a5e8f8 Merge branch 'CMD-213-ls-dont-truncate-size-summary' into 'develop'
CMD-213. dumpNodeSummary: Don't truncate node size when printing it in bytes.

Closes CMD-213

See merge request apps/MEGAcmd!608
2023-12-05 04:40:25 +13:00
Vibhav Pant
ff8e1551ec
Merge remote-tracking branch 'origin/develop' into CMD-213-ls-dont-truncate-size-summary 2023-12-04 19:54:49 +05:30
Vibhav Pant
3695642dff
WhoamiLCMD283: Add additional assertion for the ROOT folder. 2023-12-04 19:52:35 +05:30
Vibhav Pant
b95754ebf0
Add integration test to ensure CMD-283 fix is working. 2023-12-04 19:05:13 +05:30
Vibhav Pant
c7198e3533
Merge remote-tracking branch 'origin/develop' into CMD-283-use-account-details-whoami 2023-12-04 17:31:31 +05:30
Diego Ximenez
f52e98eeb9
Fix usage of MegaApi::startDownload after new argument added
A new boolean argument (`undelete`) was added to
`MegaApi::startDownload` before the last argument which was a pointer
with a default value of `NULL`.

The usage of this function was not updated in MEGAcmd, but the compiler
didn't complain because the last argument was implicitly being converted
to boolean, and because the pointer has a default value all was good. So
we were effectively calling this function with `undelete=true` and
`listener=NULL` always.
2023-12-01 17:36:11 +01:00
Callan
d39157e507
add show-handles to mega-tree command. 2023-12-01 17:47:31 +13:00
Callan Christophersen
4616fc3987 Merge branch 'fix/CMD-348_Calls-to-getMegaSyncErrorCode-leak-memory' into 'develop'
CMD-348_Calls-to-getMegaSyncErrorCode-leak-memory

Closes CMD-348

See merge request apps/MEGAcmd!632
2023-12-01 11:02:03 +13:00
Diego Ximenez
83bb7a40a1
Minor improvements
* Remove a comment that is not relevant anymore
* Use assertions to check for nullability on publicLink/nodepath, since
that's likely to be a bug if nullptr
* Set out code to INVALIDSTATE if we fail to generate a writable folder,
and change wording to "read-only"
* Use a reference to avoid copying the result of getOptions
2023-11-30 19:31:43 +01:00
Diego Ximenez
27053360e7
Merge branch 'develop' into task/CMD-200_report-errors-over-existing-exports 2023-11-30 19:15:49 +01:00
Vibhav Pant
64a33c9b96 Merge branch 'CMD-307-parallel-megacmd-server-sockets' into 'develop'
CMD-307. Allow configuring the path used by the server for domain sockets.

Closes CMD-307

See merge request apps/MEGAcmd!622
2023-12-01 03:20:12 +13:00
Vibhav Pant
798c666ef6
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-11-30 18:57:08 +05:30
Pablo M
e98b360771 Merge branch 'task/CMD-306_isolated_tests_infrastructure_with_server_not_outputing_to_stdout' into 'develop'
CMD-354. Have server logs support logging to a file without redirecting stdout.

Closes CMD-306

See merge request apps/MEGAcmd!631
2023-12-01 01:28:15 +13:00
Vibhav Pant
48fd8a7e4c
Revert "Perform a shallow clone for MEGAcmd as well."
This reverts commit 543cec0edaa4167553438f5823316175bee2af22.
2023-11-30 15:58:20 +05:30
Vibhav Pant
543cec0eda
Perform a shallow clone for MEGAcmd as well. 2023-11-30 15:16:34 +05:30
Vibhav Pant
08ef87e2c4
Try performing shallow clones for the SDK. 2023-11-30 15:06:16 +05:30
Vibhav Pant
c826776a7e
Put parallel block inside its own stage. 2023-11-30 14:51:52 +05:30
Vibhav Pant
7eec7272fb
Try cloning MegaCMD and SDK in parallel. 2023-11-30 14:49:29 +05:30
Vibhav Pant
e923c51b28
Set the timeout for test runs to 10 minutes. 2023-11-30 14:42:02 +05:30
Diego Ximenez
8181e4c438 Merge branch 'task/CMD-255_update_windows_build_instructions_on_readme' into 'develop'
CMD-255. Update README.md CMake build instructions for Windows and MacOS

Closes CMD-255

See merge request apps/MEGAcmd!640
2023-11-29 22:11:15 +13:00
Vibhav Pant
f31cb3555b
Use the correct type for storing getenv's return value. 2023-11-29 14:24:30 +05:30
Vibhav Pant
848108f5ff
PlatformDirectories: Fix method names in documentation. 2023-11-29 14:17:50 +05:30
Vibhav Pant
bfbde84464
dataDirPath: Minor refactor. 2023-11-29 14:17:37 +05:30
Vibhav Pant
8335ab6c3e
getOrCreateSocketPath: Print error if mkdir fails. 2023-11-29 14:14:38 +05:30
Pablo Martin
ecb0108555
minor adjustments
types, constrain mayUnisntall to windows, removed redundant virtuals,
args defined using vector.
2023-11-28 18:10:02 +01:00
Pablo Martin
7ca6ddd755
Merge remote-tracking branch 'origin/develop' into task/CMD-306_isolated_tests_infrastructure_with_server_not_outputing_to_stdout
Conflicts:
	tests/integration/MegaCmdTestingTools.cpp
2023-11-28 17:32:47 +01:00
Diego Ximenez
97b1f14a97
Update README.md CMake build instructions for Windows and MacOS 2023-11-28 15:51:20 +01:00
Callan
6d9fb22f57
moving std::unique_ptr scope. 2023-11-28 11:06:21 +13:00
Vibhav Pant
7e84480753
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-11-27 13:00:01 +05:30
Vibhav Pant
dd4212542f Merge branch 'CMD-280-add-github-issue-template' into 'develop'
CMD 280. Add a GitHub issue template.

Closes CMD-280

See merge request apps/MEGAcmd!634
2023-11-27 20:28:55 +13:00
Vibhav Pant
61b875d310
Remove chmod command. 2023-11-25 18:28:54 +05:30
Vibhav Pant
96d5bd7f3e
Remove megasimplesync from installed binaries. 2023-11-25 18:25:17 +05:30
Vibhav Pant
a3cb2e9159
Build with CMake as well, to test the CMake scripts. 2023-11-25 18:05:50 +05:30
Vibhav Pant
fe95b416a7
Use a separate variable for adding "Current session" to output. 2023-11-24 19:28:06 +05:30
Vibhav Pant
b105cf1f64
Merge remote-tracking branch 'origin/develop' into CMD-283-use-account-details-whoami 2023-11-24 18:56:00 +05:30
Vibhav Pant
1d9fe50467
Add libtsan2 2023-11-24 18:54:47 +05:30
Vibhav Pant
794b005ec9
Add a matrix axis for UBSan, add UBSan options. 2023-11-24 17:15:38 +05:30
Vibhav Pant
91d5db39e3
Put stages block inside matrix. 2023-11-23 19:41:07 +05:30
Vibhav Pant
93e1029a96
Fix matrix block for build. 2023-11-23 19:39:48 +05:30
Vibhav Pant
2877530a88
Avoid building redundant container images. 2023-11-23 19:38:54 +05:30
Vibhav Pant
e1b253905f
Set the correct image name for integration tests. 2023-11-23 19:28:46 +05:30
Vibhav Pant
427efa58c4
Install libtsan2 for TSan support. 2023-11-23 19:25:14 +05:30
Vibhav Pant
f4fd210b81
Replace parallel block with matrix axis. 2023-11-23 19:15:07 +05:30
Vibhav Pant
90a77be1f1
Only use stage for the matrix. 2023-11-23 19:06:08 +05:30
Vibhav Pant
d0e9728b60
Run tests with TSan and ASan using matrices. 2023-11-23 19:03:54 +05:30
Vibhav Pant
eb6b65295a
Merge remote-tracking branch 'origin/develop' into CMD-357-create-container-image-for-tests 2023-11-22 16:13:54 +05:30
Vibhav Pant
3d4731e860 Merge branch 'CMD-369-session-unique-ptr' into 'develop'
CMD-369. Use unique_ptr to store string returned from dumpSession.

Closes CMD-369

See merge request apps/MEGAcmd!638
2023-11-22 23:41:51 +13:00
Vibhav Pant
587f905ecf Merge branch 'CMD-370-getcontacts-unique-ptr' into 'develop'
CMD-370. onUsersUpdate: Use a unique_ptr to store the result of getContacts().

Closes CMD-370

See merge request apps/MEGAcmd!639
2023-11-22 23:41:30 +13:00
Vibhav Pant
4988b9febb
onUsersUpdate: Use a unique_ptr to store the result of getContacts(). 2023-11-21 19:28:18 +05:30
Vibhav Pant
3e46e7dee4
Use unique_ptr to store string returned from dumpSession. 2023-11-21 19:03:45 +05:30
Vibhav Pant
c783c11af4
Copy sources instead of mounting them for better caching. 2023-11-21 18:39:46 +05:30
Vibhav Pant
71d07c022c
Set HOME for tests. 2023-11-21 18:34:29 +05:30
Vibhav Pant
8b9b7cbff7
Escape $ for shell substitution. 2023-11-21 18:27:08 +05:30
Vibhav Pant
472444b63e
Run containers as the current user. 2023-11-21 18:22:51 +05:30
Vibhav Pant
6e5fb5a9fc
Run chmod in the post block. 2023-11-21 18:14:29 +05:30
Vibhav Pant
d753a011df
Move test-results permissions stage out of parallel. 2023-11-21 18:09:53 +05:30
Vibhav Pant
6d521e6103
Don't create a new stage for fixing permissions. 2023-11-21 18:07:48 +05:30
Vibhav Pant
b744909254
Fix test-results permissions. 2023-11-21 18:06:20 +05:30
Vibhav Pant
0163d58616
Use environment block for setting DOCKER_BUILDKIT 2023-11-21 17:58:17 +05:30
Vibhav Pant
fc98590762
Add .dockerignore. 2023-11-21 17:09:01 +05:30
Vibhav Pant
0e1481cf99
Pass ASAN_OPTIONS to containers running tests. 2023-11-21 17:05:27 +05:30
Vibhav Pant
253fdf615e
Produce ASan reports as archives. 2023-11-21 17:01:44 +05:30
Vibhav Pant
37325d28bf
Merge remote-tracking branch 'origin/develop' into CMD-357-create-container-image-for-tests 2023-11-21 16:11:28 +05:30
Vibhav Pant
89e91cc9c9
Merge remote-tracking branch 'origin/develop' into CMD-283-use-account-details-whoami 2023-11-21 16:10:37 +05:30
Diego Ximenez
b252a6c314 Merge branch 'task/CMD-355_fix_find_command_integration_test' into 'develop'
CMD-355. Fix "Find" integration test

Closes CMD-355

See merge request apps/MEGAcmd!636
2023-11-21 23:37:04 +13:00
Diego Ximenez
0c23cc7db4
Use a predicate-formatter for custom container assertions 2023-11-21 11:17:10 +01:00
Vibhav Pant
540be97e30
whoami: Use two MegaAccountDetail objects for storage/other details 2023-11-21 14:56:22 +05:30
Diego Ximenez
714f124e41
Avoid parsing console args directly in executeClient for tests 2023-11-20 19:00:44 +01:00
Diego Ximenez
13417a073b
Fix MegaCmdShellCommunicationsNamedPipes not working in integration tests 2023-11-20 18:20:14 +01:00
Vibhav Pant
9fafdd639e
Fix quotes for docker run commands. 2023-11-20 20:05:17 +05:30
Vibhav Pant
72dd2f5416
Remove tag for the commit SHA. 2023-11-20 20:03:47 +05:30
Vibhav Pant
18f062bf98
Fix potential substitution issue. 2023-11-20 20:01:10 +05:30
Vibhav Pant
1b603cb01c
Run integration and unit tests in parallel with credentials. 2023-11-20 19:49:04 +05:30
Diego Ximenez
1e15f43058
Fix Find integration test 2023-11-20 14:59:55 +01:00
Diego Ximenez
1dfcd520f3
Fix incorrect path for testing source file in QtCreator project files 2023-11-20 14:09:33 +01:00
Diego Ximenez
740e530ac8
Improvements to executeInClient testing function 2023-11-20 14:09:06 +01:00
Vibhav Pant
8184d70b4b
Try using a blob pattern to find the report XMLs. 2023-11-18 17:24:58 +05:30
Vibhav Pant
c1be89c9f1
Specify the name of the file. 2023-11-17 21:35:51 +05:30
Vibhav Pant
2dc7502b98
Use junit plugin instead of xunit. 2023-11-17 21:24:51 +05:30
Vibhav Pant
937bced02c
Fix arguments to docker run. 2023-11-17 20:01:51 +05:30
Vibhav Pant
a931ee4479
Use the correct syntax for xunit. 2023-11-17 19:39:07 +05:30
Vibhav Pant
245de6bbf8
Report test results using the xunit test plugin. 2023-11-17 19:36:52 +05:30
Vibhav Pant
a563a8c3e9
Use the correct name for the unit tests executable. 2023-11-17 14:19:43 +05:30
Vibhav Pant
bf7e55b24e
Run unit tests after building the container image. 2023-11-17 14:15:08 +05:30
Vibhav Pant
39cb317208
Don't run docker rm post-pipeline (no container needs to be removed) 2023-11-17 13:50:46 +05:30
Vibhav Pant
dc335586c9
Enable Docker BuildKit. 2023-11-17 13:42:09 +05:30
Vibhav Pant
610b9fe7cc
Use the new Dockerfile for linux builds. 2023-11-17 13:38:37 +05:30
Vibhav Pant
9a7af5fa87
Don't run apt-get clean.
Downloaded packages are stored on a cache mount, which doesn't make
them a part of the image, making apt-get clean unnecessary.
2023-11-17 13:36:00 +05:30
Vibhav Pant
b13b801bb3
Improve caching of downloaded packages. 2023-11-17 13:32:10 +05:30
Vibhav Pant
061376afbc
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-11-17 12:38:04 +05:30
Vibhav Pant
5c2121dd92
Add Dockerfiles for building using autotools and CMake. 2023-11-16 16:53:14 +05:30
Vibhav Pant
e1be4613c5
Use the correct options for adding sanitizer support. 2023-11-16 16:52:50 +05:30
Vibhav Pant
656a22cc5f Merge branch 'feature/CMD-208_API_v3_compatibility' into 'develop'
CMD-358. Fix building after SRW SDK merge

Closes CMD-208

See merge request apps/MEGAcmd!558
2023-11-16 23:42:55 +13:00
Vibhav Pant
635203a918
getOrCreateSocket: Return empty string if runtimedir is empty 2023-11-16 14:37:46 +05:30
Vibhav Pant
91d6d31861
Add a note for Linux distros for field platform-version 2023-11-16 13:14:28 +05:30
Vibhav Pant
e0673beda1
Add "required" validation to all fields. 2023-11-16 13:12:14 +05:30
Diego Ximenez
31bcef86d0
Log error when the password argument is provided and empty 2023-11-09 19:27:55 +01:00
Diego Ximenez
e837b6d3e4
Log expire time and auth errors in exportNode
Convert nodeName to a lambda to save cycles in case the value it's nto
used
Add a bit more info int the "node already exported" error message
2023-11-09 18:38:15 +01:00
Diego Ximenez
1f80e3a10b
Small improvements to copyright acceptance in exportNode 2023-11-09 18:02:34 +01:00
Diego Ximenez
2d58165370
Minor amIPro improvements and fixes 2023-11-09 17:39:42 +01:00
Diego Ximenez
abc666dd4c
Check for PRO status before trying to encrypt link with password 2023-11-09 17:22:09 +01:00
Vibhav Pant
9edc888382
stopWaiting: Check socketPath for appropriate length as well. 2023-11-09 20:25:51 +05:30
Vibhav Pant
505d924996
Use a more suitable name for getOrCreateSocketPath's parameter. 2023-11-09 20:23:04 +05:30
Vibhav Pant
eab64dd08a
Rename getSocketPath to getOrCreateSocketPath. 2023-11-09 20:22:26 +05:30
Vibhav Pant
7a4b2fb05c
homeDirPath: Make pwdbuf's definition readable. 2023-11-09 20:18:11 +05:30
Vibhav Pant
5bf0afea2a
Use the correct type for the returned value of getenv and sysconf 2023-11-09 20:16:22 +05:30
Vibhav Pant
46cac73324
Remove unneeded import. 2023-11-09 19:33:40 +05:30
Vibhav Pant
a6cfcd1834
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-11-09 19:31:06 +05:30
Diego Ximenez
f25d712731
Merge branch 'develop' into task/CMD-200_report-errors-over-existing-exports
Resolved conflicts in src/megacmdexecuter.cpp
2023-11-09 13:38:08 +01:00
Callan
793dfc75bc
Merge branch 'develop' into fix/CMD-348_Calls-to-getMegaSyncErrorCode-leak-memory
# Conflicts:
#	src/megacmdexecuter.cpp
2023-11-09 12:09:36 +13:00
Vibhav Pant
ea35f0ea74
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-11-07 17:57:33 +05:30
Vibhav Pant
749e437e17 Merge branch 'CMD-335-amIPro-free-details' into 'develop'
CMD-335. amIPro: Delete details object after fetching pro level from it.

Closes CMD-335

See merge request apps/MEGAcmd!610
2023-11-08 01:01:23 +13:00
Vibhav Pant
c7e66f5106
Add a GitHub issue template. 2023-11-07 17:17:13 +05:30
Diego Ximenez
af1eed48fb Merge branch 'fix/qtcreator_build_after_sanitizer_change' into 'develop'
Fix QtCreator test project files after latest sanitizer change

See merge request apps/MEGAcmd!633
2023-11-08 00:07:59 +13:00
Vibhav Pant
f090ff730c
onEvent: Log error string in case of an error in the async callback. 2023-11-07 13:41:03 +05:30
Vibhav Pant
85ae0263e8
Check returned value of getXXXNode and getAccountDetails for nullptr 2023-11-07 13:39:45 +05:30
Vibhav Pant
d5ca152a0c
Merge remote-tracking branch 'origin/develop' into CMD-209-async-node-file-folder-count 2023-11-07 13:16:29 +05:30
Vibhav Pant
9606d6a241
Merge remote-tracking branch 'origin/develop' into CMD-213-ls-dont-truncate-size-summary 2023-11-07 12:41:23 +05:30
Vibhav Pant
5c30feca91 Merge branch 'CMD-351-fetchNewNodes-use-unique-ptr-for-listener' into 'develop'
CMD-351 . FetchNodes: use unique_ptr to manage MegaCmdListener objects.

Closes CMD-351

See merge request apps/MEGAcmd!626
2023-11-07 19:11:23 +13:00
Vibhav Pant
2233fe9996
Replace max_size_len argument with MAX_SIZE_LEN constant. 2023-11-07 03:36:29 +05:30
Vibhav Pant
1ea00c68c2
Use unique_ptr for storing MegaAccountDetails pointer. 2023-11-07 03:30:10 +05:30
Vibhav Pant
671b858481
Use a constant MAX_SIZE_LEN for 999 GB files. 2023-11-07 03:25:18 +05:30
Diego Ximenez
8e31c2b648
Change fsanitizer to fsanitize in QtCreator test pro files 2023-11-06 18:10:56 +01:00
Vibhav Pant
89a77ada83 Merge branch 'CMD-276-export-expiry-error-text' into 'develop'
CMD-276. Display helpful error/warnings messages for certain cases while exporting a node.

Closes CMD-276

See merge request apps/MEGAcmd!621
2023-11-07 02:48:16 +13:00
Vibhav Pant
7def5ecfc3 Merge branch 'CMD-331-enable-runtime-checks-build-flags' into 'develop'
CMD-331. Add new flag, --enable-checks.

Closes CMD-331

See merge request apps/MEGAcmd!613
2023-11-07 02:38:00 +13:00
Vibhav Pant
3df71b45ae
Use "sanitizer" as the autoconfig arg name. 2023-11-06 18:40:32 +05:30
Pablo M
9029acafb0 Merge branch 'task/CMD-306_isolated_tests_infrastructure' into 'develop'
CMD-306. Create isolated tests infrastructure and CMD-327. Have integration tests run some mega-XXX command

Closes CMD-306

See merge request apps/MEGAcmd!630
2023-11-07 00:13:19 +13:00
Vibhav Pant
e90286d3f8
Fix line wrapping for other lines. 2023-11-06 16:21:27 +05:30
Vibhav Pant
898425b3c8
Replicate old error strings, fix incorrect line wrapping. 2023-11-06 14:35:17 +05:30
Vibhav Pant
5060f95354
Rename enable-checks to enable-sanitizer. 2023-11-06 12:53:44 +05:30
Callan
d238499cfe
Wrap returned values of all MegaSync::getMegaSyncErrorCode calls with a std::unique_ptr<const char[]> 2023-11-06 14:11:45 +13:00
Diego Ximenez
fe15b4d166
Fix indentation in QtCreator project files 2023-11-03 17:29:36 +01:00
Pablo Martin
420ce42cbf
fix compilation related to uninstall for windows 2023-11-03 17:08:39 +01:00
Pablo Martin
2fd3a12b6c
fix warning unused 2023-11-03 16:37:23 +01:00
Pablo Martin
199f52687a
add missing namespace 2023-11-03 16:36:43 +01:00
Pablo Martin
7ca34e13cf
Merge remote-tracking branch 'origin/task/CMD-306_isolated_tests_infrastructure' into task/CMD-306_isolated_tests_infrastructure_with_server_not_outputing_to_stdout
Conflicts:
	tests/integration/MegaCmdTestingTools.cpp
2023-11-03 16:15:42 +01:00
Pablo Martin
b4e09ff04b
have integration test talk utf-8
- also fixed executeInClient array size
2023-11-03 16:13:55 +01:00
Pablo Martin
b879ce6513
some build fixes for windows 2023-11-03 16:11:51 +01:00
Pablo Martin
14f373bbaa
Merge remote-tracking branch 'origin/develop' into task/CMD-306_isolated_tests_infrastructure
Conflicts:
	build/cmake/CMakeLists.txt
2023-11-03 15:33:28 +01:00
Pablo Martin
7f7c5cd28a
have server logs configurable
Kept existing funcitonality:
- running the server _manually_ will log to stdout
- running the server as a forked process will log to
~/.megaCmd/megacmdserver.log in POSIX
- log parameters and environment variables will remain working as they
where. Except: Windows no also accepts MEGACMD_LOGLEVEL environment
variable
Changes:
- integration tests will log into $HOME/.megaCmd/megacmdserver.log.
- forked stoud/stderr are now logged to separated files
- refactored some of the from ::executeServer into server main
- removed static `LoggedStream LCOUT(&COUT)` Use Instance pattern
instead. Owned by the executeServer scope.
- adjusted broken identification of source for log lines. Needs
robustifying
- added new LoggedStreamXXX clases (for stdout, for default log file,
for null)
- fix executeInClient args array
2023-11-03 15:17:21 +01:00
Vibhav Pant
7f981b6902
printBackupHistory: Construct listener correctly. 2023-11-03 17:29:43 +05:30
Vibhav Pant
feb084a205
onNodesUpdate: Ensure updated node counts are always logged. 2023-11-03 13:43:35 +05:30
Pablo Martin
bb0ae184d6
isolated tests infrastructure
- have MEGAcmd server initiated within integration main
- have client support outputing elsewhere than stdout
- add a few example tests (logged vs non logged vs reading ones)
2023-11-02 17:07:02 +01:00
Vibhav Pant
c4ce94d726
printBackupHistory: Use getFolderInfo to get file and folder counts.
MegaAccountDetails only provides counts for the root node.
2023-11-02 18:42:19 +05:30
Vibhav Pant
ca785dcb59
onNodesUpdate: Construct MegaCmdListenerFuncExecuter with autoremove 2023-11-02 17:45:02 +05:30
Vibhav Pant
15b79e3c1b
onNodesUpdate: Use MegaAccountDetails for getting node counts. 2023-11-02 17:16:26 +05:30
Vibhav Pant
43fbefe54a
printBackupHistory: Initialize MegaCmdListener correctly. 2023-11-02 16:12:32 +05:30
Vibhav Pant
d06a8b577b
printBackupHistory: Use MegaAccountDetails to get file/folder count. 2023-11-01 18:32:13 +05:30
Vibhav Pant
360ebe45f0
onEvent: Use MegaAccountDetails for file and folder counts.
In case of a MegaApi::STORAGE_STATE_PAYWALL event, get account details
asynchronously to get the folder and file counts for the root node.
2023-11-01 18:29:13 +05:30
Vibhav Pant
97d97f1a89
onNodesUpdate: Use unique_ptr to manage MegaNode(List) pointers. 2023-11-01 16:32:36 +05:30
Pablo M
3b705373a1 Merge branch 'task/CMD-299_build_and_run_tests_in_macos_ci' into 'develop'
CMD-299. Have unit & integration tests built for macos & unit ones excecuted

Closes CMD-299

See merge request apps/MEGAcmd!625
2023-11-01 07:15:27 +13:00
Diego Ximenez
6732f68a5d Merge branch 'task/CMD-299_update_vpckg_ports_and_ffmpeg' into 'develop'
CMD-299. Update preferred-ports file with SDK versions and fix ffmpeg not building in XCode 15

Closes CMD-299

See merge request apps/MEGAcmd!614
2023-11-01 04:18:59 +13:00
Vibhav Pant
f16d9d4993
fetchNodes: use unique_ptr to manage MegaCmdListener objects. 2023-10-31 20:44:47 +05:30
Vibhav Pant
520a1e0ca5
Merge remote-tracking branch 'origin/develop' into CMD-331-enable-runtime-checks-build-flags 2023-10-31 19:51:08 +05:30
Vibhav Pant
df622258f1
Merge remote-tracking branch 'origin/develop' into CMD-276-export-expiry-error-text 2023-10-31 19:32:03 +05:30
Pablo Martin
72d44d50d6
have tests common stuff compiled with c++17 in cmake
- done several adjustments to prevent suprises in cmake compilation
 - add missing -pthread flag
- have macos platform stuff be included in the server library rather
than the executable
2023-10-31 14:25:10 +01:00
Vibhav Pant
346b02e3c2
mega-ls: Use the max int64_t value for max_size.
This fixes issues with ls being used with multiple directories, where
we would only calculate it for the first directory. However, it adds a
caveat where files > 999 GB would be misaligned.
2023-10-31 18:23:40 +05:30
Vibhav Pant
08402a15e6
Rewrite forEachFileInNode as a template. 2023-10-31 18:23:25 +05:30
Vibhav Pant
ddc21d9cb9
PlatformDirectories: Add docstrings. 2023-10-31 17:19:41 +05:30
Vibhav Pant
cccac4accc
XDGDirectories::dataDirPath: Return legacy config dir if it exists. 2023-10-31 17:16:13 +05:30
Pablo Martin
92119e562a
Have unit & integration tests built for macos & unit ones excecuted 2023-10-31 11:28:08 +01:00
Victor Teniente
446ceb32d1
Fix linking issues with readline 2023-10-31 11:11:00 +01:00
Victor Teniente
1ebf79bef1
Update min target to 10.13 2023-10-31 11:10:29 +01:00
Victor Teniente
153678034a
Enable cmake. Fix some issues. 2023-10-31 11:09:57 +01:00
Victor Teniente
633019acc7
Remove leftovers from previous ffmpeg dep 2023-10-31 10:32:59 +01:00
Victor Teniente
4f8ba63aa7
Add parameter to support different archs 2023-10-31 10:32:24 +01:00
Diego Ximenez
b36e246795
Possible fix for CMake compilation 2023-10-30 15:26:25 +01:00
Diego Ximenez
b9381ffe06
Fix CMake build 2023-10-30 13:35:02 +01:00
Diego Ximenez
9b76c7b924
Merge branch 'develop' into task/CMD-327_have-initial-integration-test-run-mega-xxxx 2023-10-30 13:31:10 +01:00
Diego Ximenez
5eec9e9c4c
Fix autotools build 2023-10-30 13:12:57 +01:00
Diego Ximenez
b0a7f1dece
Execute dummy megacmd client in basic integration test
Separate main from megacmdclient.cpp
Reorganization of pro and pri files for client, server and integration
tests to support these changes
2023-10-30 12:24:58 +01:00
Vibhav Pant
b8bfd1c72d
Provide the correct argument to _putenv. 2023-10-30 14:22:13 +05:30
Vibhav Pant
35c40bec5c
createSocket: Close socket in case of an error getting the runtime directory. 2023-10-30 13:10:31 +05:30
Vibhav Pant
a0012b4a1c
Use _putenv on Windows. 2023-10-30 13:10:23 +05:30
Vibhav Pant
fc9d113141
Include cstdlib for setenv and friends. 2023-10-30 12:02:22 +05:30
Vibhav Pant
5391a14719
Don't define ARRAYSIZE for _WIN32. 2023-10-30 11:51:29 +05:30
Vibhav Pant
8a79f5aec8
Split TestInstrumentsEnvVarGuard into TestInstrumentsUnsetEnvVarGuard. 2023-10-27 20:39:50 +05:30
Vibhav Pant
76eb967e3c
initialize: Set sockfd to -1 after closing it. 2023-10-27 19:37:03 +05:30
Vibhav Pant
c3ab8bf02a
Use the correct method name for WindowsDirectories::configDirPath 2023-10-27 18:28:33 +05:30
Vibhav Pant
f9146f3d46
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-10-27 18:24:29 +05:30
Vibhav Pant
8c44138f27
Fix syntax error. 2023-10-27 18:23:32 +05:30
Vibhav Pant
8c26597835
Don't use _POSIX_VERSION for detecting unix. 2023-10-27 18:21:22 +05:30
Vibhav Pant
d0f232d4ef
Fix compilation errors on Windows. 2023-10-27 17:16:12 +05:30
Vibhav Pant
6206af88c4
Run tests on QtCreator with Address and UBSan enabled. 2023-10-27 17:03:23 +05:30
Vibhav Pant
c3b8f1e67a
Add support for enabling ThreadSanitizer. 2023-10-27 17:03:12 +05:30
Vibhav Pant
3c8364db21 Merge branch 'CMD-337-rewrite-get-petition-details' into 'develop'
CMD-337. Refactor get_petition_details as a method under CmdPetition.

Closes CMD-337

See merge request apps/MEGAcmd!615
2023-10-27 23:59:28 +13:00
Vibhav Pant
230ff0f92d
Rename formatError to formatErrorAndMaySetErrorCode. 2023-10-27 16:26:18 +05:30
Vibhav Pant
abca833db7
Fix typo. 2023-10-27 16:24:42 +05:30
Vibhav Pant
6c76bf0f4a
executecommand: (export) Use LOG_warn for logging warnings. 2023-10-27 16:23:46 +05:30
Vibhav Pant
7d2493642d
checkNoErrors: Create the entire log message before logging it. 2023-10-27 16:22:52 +05:30
Vibhav Pant
f4e68f4fac
Move numberOfDigits to megacmdcommonutils.h 2023-10-27 13:13:05 +05:30
Vibhav Pant
4e4bac4ba1
Use a more understandable way to calculate width for printing the size. 2023-10-26 17:49:13 +05:30
Vibhav Pant
77581b138a
Ensure max_size_len is calculated after max_size. 2023-10-26 17:42:08 +05:30
Vibhav Pant
bcbc897548
Use size_header_width for calculating the SIZE header's alignment. 2023-10-26 17:25:07 +05:30
Vibhav Pant
9d5a93871e
executecommand("ls"): Avoid recalculating max_size_len. 2023-10-26 17:23:35 +05:30
Vibhav Pant
f58c7d2423
Use __unix__ || __APPPLE__ for initial unices detection. 2023-10-26 17:10:16 +05:30
Vibhav Pant
b95490a987
Merge remote-tracking branch 'origin/develop' into CMD-307-parallel-megacmd-server-sockets 2023-10-26 17:07:53 +05:30
Diego Ximenez
6e292b90a0 Merge branch 'task/CMD-343_add_test_binaries_to_gitignore' into 'develop'
CMD-343. Add unit/integration test binaries to .gitignore file

Closes CMD-343

See merge request apps/MEGAcmd!620
2023-10-26 23:34:37 +13:00
Vibhav Pant
b6397f67c9
Only include pwd and unistd.h for unix systems. 2023-10-26 13:13:23 +05:30
Vibhav Pant
b8179389ed
Rewrite functions to work with unique_ptr MegaNode values. 2023-10-25 23:59:18 +05:30
Vibhav Pant
fee56ffac0
Merge remote-tracking branch 'origin/develop' into CMD-213-ls-dont-truncate-size-summary 2023-10-25 23:52:33 +05:30
Diego Ximenez
12299631f8
Merge branch 'develop' into task/CMD-200_report-errors-over-existing-exports 2023-10-25 19:06:37 +02:00
Diego Ximenez
34351b1720
Report errors over existing exports when using the -a argument
Improve `exportNode` implementation to be more safe and have more modern
style
2023-10-25 19:06:08 +02:00
Vibhav Pant
b46ef406f6
Fix SIZE header not getting displayed correctly on max_size_len < 6. 2023-10-25 20:05:33 +05:30
Vibhav Pant
47d9ba97cd
CmdPetitionPosixSocket: Use std::to_string for getPetitionDetails. 2023-10-25 19:48:23 +05:30
Vibhav Pant
761bf944d2
executecommand: Print warning about exporting working directory to LOG_err 2023-10-25 19:03:58 +05:30
Vibhav Pant
12395882d8
Add formatError, and use it for creating error strings from MegaError.
* checkErrors: Use formatError.
* exportNode: Check for an error beforehand, and use formatError to
log a helpful error message.
2023-10-25 19:00:55 +05:30
Vibhav Pant
927d1305ad
Fix typo. 2023-10-25 17:28:58 +05:30
Vibhav Pant
d86077666d
Fix UNIX detection on apple platforms. 2023-10-25 17:28:51 +05:30
Vibhav Pant
dc298dc514
Use macro _POSIX_VERSION for detecting UNIX. 2023-10-25 17:20:50 +05:30
Vibhav Pant
da5d3028a1
Replace FileSocketCommunicationTests.cpp with PlatformDirectoriesTest.cpp 2023-10-25 16:57:58 +05:30
Vibhav Pant
e51a0a2a5d
Add TestInstrumentsEnvVarGuard. 2023-10-25 16:47:54 +05:30
Vibhav Pant
5e1554210d
Replace getSocketPath with PlatformDirectories.
The PlatformDirectories class allows getting paths to
platform-dependant, application directories for caching, storing
config data, runtime state, etc.
2023-10-25 15:08:52 +05:30
Diego Ximenez
a40d31304a Merge branch 'fix/CMD-324_server-crash-session-resumption' into 'develop'
CMD-324. Fix possible crash when getting the handle to the root node

Closes CMD-324

See merge request apps/MEGAcmd!607
2023-10-25 03:52:00 +13:00
Diego Ximenez
d92a71d73e
Log error & send event when root node is not found 2023-10-24 14:14:49 +02:00
Diego Ximenez
90fc9a3a10
Merge branch 'develop' into fix/CMD-324_server-crash-session-resumption 2023-10-24 13:48:57 +02:00
Pablo M
e8dc4c0111 Merge branch 'fix/CMD-298_use-non-deprecated-send-event' into 'develop'
CMD-301. Refactored event definition and sending logic

Closes CMD-298

See merge request apps/MEGAcmd!601
2023-10-25 00:41:43 +13:00
Pablo Martin
84e8d4eee4
refactor events code to dedicated source/header 2023-10-24 13:04:54 +02:00
Pablo Martin
923e19a64f
Merge remote-tracking branch 'origin/develop' into fix/CMD-298_use-non-deprecated-send-event
Conflicts:
	src/megacmd.h
- new sendEvent methods conflicting with execute/stopServer
ones
2023-10-24 12:41:57 +02:00
Diego Ximenez
12416ce90b Merge branch 'task/CMD-325_nodesbypath_unique_ptr_refactor' into 'develop'
CMD-325. Refactor `nodebypath` and `nodesbypath` to return `unique_ptr`

Closes CMD-325

See merge request apps/MEGAcmd!606
2023-10-24 21:15:17 +13:00
Diego Ximenez
b583bfb01e
Merge branch 'develop' into fix/CMD-324_server-crash-session-resumption 2023-10-23 17:48:59 +02:00
Diego Ximenez
113c729ff2
Fix double-free when using MegaNodeList
Use `reset` instead of unique ptr assignment
2023-10-23 16:21:39 +02:00
Vibhav Pant
6ae36f95eb
Add unit test for ComunicationsManagerFileSockets::getSocketPath. 2023-10-23 19:08:11 +05:30
Vibhav Pant
d30d00611e
Allow configuring the path used by the server for domain sockets.
The directory chosen by megaCMD (both the client and server) follows this
strategy:
* If the environment variables MEGACMD_WORKING_DIR or XDG_RUNTIME_DIR
are set, use it.
* ~/.megaCMD
* Otherwise, create the socket under /tmp/megaCMD_<uid>
2023-10-23 19:06:25 +05:30
Vibhav Pant
accd8b6813
Fix typo. 2023-10-23 17:13:08 +05:30
Vibhav Pant
23b2ad4ea9
Display helpful error messages for certain cases while exporting a node. 2023-10-23 17:02:09 +05:30
Vibhav Pant
3b7a110749
Use ostringstream for creating petition details string. 2023-10-23 16:31:15 +05:30
Diego Ximenez
3a56b3126f
Merge branch 'develop' into task/CMD-325_nodesbypath_unique_ptr_refactor 2023-10-23 12:51:42 +02:00
Diego Ximenez
fcf206712c
Change deleter functions to not take ownership of node pointer 2023-10-23 12:36:25 +02:00
Diego Ximenez
4c843315f9
Fix node use-after-move when deleting
Also change `unique_ptr` assignment to `reset`
2023-10-23 11:05:05 +02:00
Diego Ximenez
4831750f1c
Add unit and integration test binaries to .gitignore file 2023-10-23 10:15:01 +02:00
Vibhav Pant
d8640b7b57
Add ENABLE_{ASAN,UBSAN} flags. 2023-10-23 13:34:43 +05:30
Vibhav Pant
5e315b426d
mega_cmd_unit_tests_SOURCES: Add UtilsTests.cpp. 2023-10-20 17:17:40 +05:30
Vibhav Pant
4f41c73934
Expect the correct returned value for negative integers. 2023-10-20 17:16:50 +05:30
Diego Ximenez
f0e3bdc476
Merge branch 'develop' into task/CMD-299_update_vpckg_ports_and_ffmpeg 2023-10-20 13:43:36 +02:00
Diego Ximenez
63201a8fee
Fix FFmpeg build on Xcode 15 2023-10-20 13:30:47 +02:00
Vibhav Pant
531bf66f10
Merge remote-tracking branch 'origin/develop' into CMD-213-ls-dont-truncate-size-summary 2023-10-20 16:57:40 +05:30
Vibhav Pant
84a470a796
Merge remote-tracking branch 'origin/develop' into CMD-331-enable-runtime-checks-build-flags 2023-10-20 16:57:00 +05:30
Pablo M
3e0a83c2d8 Merge branch 'task/CMD-333_tests-in-autotools' into 'develop'
CMD-333. Support autotools build for tests (integration & unit)

Closes CMD-333

See merge request apps/MEGAcmd!612
2023-10-21 00:19:09 +13:00
Vibhav Pant
c0c841d3d6
forEachFileInNode: Use unique_ptr for storing children. 2023-10-20 16:43:06 +05:30
Vibhav Pant
cb2ca19c7c
Add unit test for numberOfDigits. 2023-10-20 16:40:20 +05:30
Diego Ximenez
2d34c682fb
Fix MEGAcmdUpdater debug build on Windows 2023-10-20 12:14:06 +02:00
Vibhav Pant
5263b63ab3
Merge remote-tracking branch 'origin/develop' into CMD-213-ls-dont-truncate-size-summary 2023-10-20 15:36:48 +05:30
Vibhav Pant
8e2e954c19
Align SIZE values for folders. 2023-10-20 15:33:22 +05:30
Xavier Rins Lozano
291b33edeb Merge branch 'release/1.6.3b' into 'master'
Release 1.6.3b [to master]

See merge request apps/MEGAcmd!617
2023-10-20 22:55:06 +13:00
Xavier Rins Lozano
51d446023c Merge branch 'release/1.6.3a' into 'master'
Release v1.6.3a

See merge request apps/MEGAcmd!587
2023-10-20 22:45:06 +13:00
Pablo M
f107dafe58 Merge branch 'task/exit-on-first-build-failure' into 'develop'
Have "set -e" added to builder.sh

See merge request apps/MEGAcmd!616
2023-10-20 22:44:41 +13:00
Vibhav Pant
a3d47754ff
Merge remote-tracking branch 'origin/develop' into CMD-337-rewrite-get-petition-details 2023-10-20 14:34:33 +05:30
Diego Ximenez
151cd9a9bf
Merge branch 'develop' into task/CMD-299_update_vpckg_ports_and_ffmpeg 2023-10-20 10:10:37 +02:00
Vibhav Pant
a16dd08264
Remove unneeded include <sstream>. 2023-10-20 11:49:19 +05:30
Pablo Martin
3ec85f862b
fix path to unit tests 2023-10-19 18:41:05 +02:00
Pablo Martin
16bb29a8e3
remove unrequired lgmock linkage 2023-10-19 18:06:44 +02:00
Pablo Martin
89169a6699
have "set -e" added to builder.sh 2023-10-19 17:57:44 +02:00
Pablo Martin
1a888ec8c6
add a word on possibility to use --with-gtest with no value 2023-10-19 17:29:56 +02:00
Pablo Martin
a31bb78070
compile gtests & run unit tests 2023-10-19 17:04:52 +02:00
Pablo Martin
280bae3f66
Merge remote-tracking branch 'origin/develop' into task/CMD-333_tests-in-autotools 2023-10-19 16:59:21 +02:00
Xavier Rins Lozano
7ac9ed4a01 Merge branch 'CMD-332-Move-MRs-to-Jenkinsfile' into 'develop'
CMD-332-Move-MRs-to-jenkinsfile

Closes CMD-332

See merge request apps/MEGAcmd!611
2023-10-20 02:45:17 +13:00
Vibhav Pant
56e05f286a
Simplify the creation of the petition details string. 2023-10-19 18:11:39 +05:30
Xavier Rins Lozano
6a8ad70c8d
Fix issues 2023-10-19 14:21:38 +02:00
Diego Ximenez
141d385849
Further updates to preferred-ports file to match SDK's 2023-10-19 14:10:01 +02:00
Pablo Martin
23efbb9276
fix autotools compilation (missed adding SDK's includes to some new targets) 2023-10-19 13:17:21 +02:00
Vibhav Pant
6ba5da676e
Refactor get_petition_details as a method under CmdPetition.
Instead of get_petition_details being a CommunicationsManager method,
add a new method for CmdPetition, getPetitionDetails. This allows us
to implement the method without error-prone down-casting of the
petition object.
2023-10-19 13:55:31 +05:30
Diego Ximenez
da7059a854
Update preferred-ports file with SDK versions 2023-10-18 16:23:50 +02:00
Vibhav Pant
b799d8c5ab
Add new flag, --enable-checks.
--enable-checks allows compiling MEGAcmd components with the given
runtime checks enabled. For now, we support AddressSanitizer and
UndefinedBehaviorSanitizer.
2023-10-18 18:37:52 +05:30
Xavier Rins Lozano
66b29a5a01
add jenkinsfiles 2023-10-18 14:29:00 +02:00
Vibhav Pant
821e320710
Deal with conversion warnings from the compiler. 2023-10-18 17:38:38 +05:30
Vibhav Pant
19f3db36d5
mega-ls: Calculate the maximum size under the node to align columns. 2023-10-18 12:58:42 +05:30
Vibhav Pant
6fcef47ff3
numberOfDigits: New function. 2023-10-18 12:58:26 +05:30
Pablo Martin
25db38edf8
major simplification in include.am
- use intermmediate libraries for common code (tests/comms/instruments)
- have server compiled with MEGACMD_TESTING_CODE when
BUILD_MEGACMD_TESTS
2023-10-17 18:05:35 +02:00
Pablo Martin
894bc01b08
initial adjustments to include unit tests in autotools build
- refactor src/include.am to put some order to it
- add configure.ac to allow to pass --enable-megacmd-tests (requiring
explicit --with-gtest atm)
2023-10-17 13:22:57 +02:00
Vibhav Pant
7528e26614
amIPro: Delete details object after fetching pro level from it.
As per the SDK docs, the return value of getMegaAccountDetails is
owned by the caller.
2023-10-17 16:49:50 +05:30
Pablo M
0d242946fc Merge branch 'task/CMD-334_fix-compilation-cmake-win-tests' into 'develop'
CMD-334. Adjust cmake compilation to fix  building integration tests

Closes CMD-334

See merge request apps/MEGAcmd!609
2023-10-17 23:54:07 +13:00
Pablo Martin
93f223b988
removed unrequired double linkage for unit tests in cmake 2023-10-17 12:13:32 +02:00
Pablo Martin
f6b4fd339b
adjust cmake compilation to fix building integration tests
- refactor common test code in static library
- include missing cpps
- enforce io.h inclusion to have _isatty in TestUtils header
2023-10-17 12:07:44 +02:00
Pablo M
92ba28da45 Merge branch 'task/CMD-293_minor-improvements-in-confirmation-asking-and-no-errors-checks' into 'develop'
CMD-293. Minor enhancements in confirmation asking / checkNoErrors after request

Closes CMD-293

See merge request apps/MEGAcmd!597
2023-10-17 22:54:33 +13:00
Pablo M
e757b8fea7 Merge branch 'task/CMD-304_testing_infrastructure' into 'develop'
CMD-304. Create Google Tests Testing Infrastructure

Closes CMD-304

See merge request apps/MEGAcmd!605
2023-10-17 21:11:08 +13:00
Pablo Martin
88adefb092
minor adjustments
- struct to namespace, remove unused utility method in integration main
2023-10-16 12:59:26 +02:00
Pablo Martin
d9724a52c6
Fixes for Windows building
- unify vcpkg inclusion
- disable object_parallel_to_source for windows
- removed not available icon.rc for tests executables
- disable sanitizer for win32 in unit tests
- other building adjustments
- have InstrumentsException inherit form exception instead of
system_error
2023-10-16 12:50:00 +02:00
Vibhav Pant
e1879be8a9
dumpNodeSummary: Don't truncate node size when printing it in bytes. 2023-10-16 12:35:34 +05:30
Diego Ximenez
30ab7e556a
Fix possible crash when getting root node handle 2023-10-13 14:24:47 +02:00
Pablo Martin
3be402f289
have setup not sleep and use intruments event instead 2023-10-10 14:11:04 +02:00
Pablo Martin
b408d0c561
confine cpu affinity enforcing to linux only in integration tests 2023-10-10 13:14:31 +02:00
Pablo Martin
0eea84d6c2
have cross-platform slep in BasicTest 2023-10-10 13:06:02 +02:00
Pablo Martin
7e7700f08b
change isatty to _isatty to fix win32 error 2023-10-10 12:56:37 +02:00
Pablo Martin
323d394edc
do not use STDOUT_FILENO 2023-10-10 12:48:42 +02:00
Pablo Martin
a1bfa7b1cd
avoid inclusion of unitstd.h in windows 2023-10-10 12:40:16 +02:00
Pablo Martin
6d5f8a7826
avoid name clashing MEGAcmdServer.exe and library in cmake build 2023-10-10 12:11:49 +02:00
Pablo Martin
ff40d6ea96
add cmake support for integration/unit tests
- include other adjustments in cmake
  -> refactor MEGAcmd server build in a library
  -> workaround linkage of not required libavfilter/libavdevice
  -> fix missing NDEBUG causing compilation issues in linux
- add missing include in Instruments.h
2023-10-10 11:56:46 +02:00
Pablo Martin
6583e947bf
add missing new main cpp to cmake 2023-10-09 18:26:34 +02:00
Pablo Martin
2f574c1b6e
have megacmd::executeServer always return integer 2023-10-09 18:05:06 +02:00
Pablo Martin
d4c27c6c33
Create initial integration & unit tests structure
- only qmake
- define mockup tests
- include instruments (to be used/adjusted)
2023-10-09 17:58:30 +02:00
Diego Ximenez
1a7a6e4685
Small style changes 2023-10-09 17:51:40 +02:00
Pablo Martin
968979c6e1
separate main from megacmd.cpp and have a new includable MEGAcmdServer.pri
expose executeServer and stopServer exposed in megacmd.h
2023-10-09 17:21:06 +02:00
Diego Ximenez
97589d984c
Refactor unique_ptr initialization from existing raw pointers 2023-10-09 16:27:31 +02:00
Diego Ximenez
45e2f22b52
Refactor nodebypath to use unique_ptr 2023-10-09 16:12:10 +02:00
Diego Ximenez
a39c91b1d0
Refactor nodesbypath to return unique_ptr 2023-10-09 13:03:42 +02:00
Pablo Martin
70f66a8759
fix compilation in windows
determine ambiguos mega namespace resolution
2023-10-06 10:44:59 +02:00
Diego Ximenez
2b26d2ea29 Merge branch 'task/CMD-323_fix_vcpkg_compilation' into 'develop'
CMD-323. Fix compilation with vcpkg third parties

Closes CMD-323

See merge request apps/MEGAcmd!604
2023-10-06 03:04:41 +13:00
Diego Ximenez
cc509aeaa1
Fix compilation with vcpkg third parties 2023-10-05 15:46:45 +02:00
Roddy Benjamín González Garcés
57ece5a0c0 Merge branch 'feature/CMD-295-fedora39-ubuntu2310-builds' into 'develop'
CMD-295. Add support for ubuntu 23.10 build

Closes CMD-295

See merge request apps/MEGAcmd!603
2023-10-05 05:36:04 +13:00
Roddy González
2e2aff97c7
Add support for ubuntu 23.10 build 2023-10-02 12:36:44 +02:00
Pablo M
8faa47e528 Merge branch 'fix/CMD-298_use-non-deprecated-send-event_single-change' into 'develop'
CMD-298. Stop using deprecated MegaApi::sendEvent version

Closes CMD-298

See merge request apps/MEGAcmd!602
2023-09-30 01:36:46 +13:00
Pablo Martin
f6f03a919a
Adjust MegaApi::sendEvent uses to non deprecated version
And change event code to use GENERATOR_MACRO and refactor the event
sending
2023-09-29 14:13:20 +02:00
Pablo Martin
83c7edc512
stop using deprecated MegaApi::sendEvent version 2023-09-29 14:03:27 +02:00
Pablo M
a041c2e40c Merge branch 'fix/wrong-3rdparty-path-cmake' into 'develop'
use the megacmd specific expected 3rdparty folder in cmake build

See merge request apps/MEGAcmd!598
2023-09-29 00:56:06 +13:00
Pablo Martin
75c185c771
use the megacmd specific expected 3rdparty folder in cmake build 2023-09-28 13:31:06 +02:00
Pablo Martin
d6a705a9d7
minor enhancements in confirmation asking / checkNoErrors after request 2023-09-22 12:17:42 +02:00
Pablo M
6667178a2f Merge branch 'task/fix-packages-creation-after-icu' into 'develop'
add libicu as building dependency in RPM/DEB

See merge request apps/MEGAcmd!596
2023-09-22 21:54:09 +12:00
Pablo Martin
b473a951da
add libicu as building dependency in RPM/DEB 2023-09-22 11:14:05 +02:00
Pablo M
c386e8b52b Merge branch 'task/CMD-291_adjust_to_SDK-2848_startDownload_changes' into 'develop'
CMD-291. Fix startDownload usage

Closes CMD-291

See merge request apps/MEGAcmd!594
2023-09-18 23:46:44 +12:00
Pablo Martin
0d57e0fde9
fix startDownload usage
pass collision check & resolution values to keep existing behaviour
2023-09-18 12:54:59 +02:00
Pablo M
8faffd0fe6 Merge branch 'CMD-285-Deprecate-warning-to-Ub1804-2210-Fed36' into 'develop'
CMD-285-Deprecation-warning Ubuntu 18.04 Ubuntu 22.10 Fedora 36

Closes CMD-285

See merge request apps/MEGAcmd!593
2023-09-07 23:06:59 +12:00
Xavier Rins Lozano
cb8e2a0727
Deprecation-warning Ubuntu 18.04 Ubuntu 22.10 Fedora 36 2023-09-07 12:43:40 +02:00
David Ward
817be6f7a5 Merge branch 'release/1.6.3-synology' into 'develop'
Update Synology build scripts (develop.)

See merge request apps/MEGAcmd!591
2023-07-13 07:58:07 +12:00
David Ward
417c9fb948 Merge branch 'release/1.6.3-qnap' into 'develop'
Update QNAP build scripts (develop.)

See merge request apps/MEGAcmd!589
2023-07-13 07:57:26 +12:00
Victor Teniente
43362191b2 Merge branch 'release/1.6.3b' into 'develop'
Release/1.6.3b

See merge request apps/MEGAcmd!588
2023-06-13 23:22:28 +12:00
Victor Teniente
d8343041aa Merge branch 'release/1.6.3a' into 'develop'
Release v1.6.3a

See merge request apps/MEGAcmd!586
2023-06-13 23:22:10 +12:00
Xavier Rins Lozano
8108edb5fe
Add support for debian12 and Suse15.5 2023-06-13 13:01:56 +02:00
Xavier Rins Lozano
94757c7582
Remove Debian 10 EOL Warning 2023-05-26 12:55:22 +02:00
Pablo M
ca56bffdae Merge branch 'update/files-163' into 'develop'
Update files for 1.6.3 [develop]

See merge request apps/MEGAcmd!584
2023-05-20 02:24:31 +12:00
Pablo M
1c434d5ce7 Merge branch 'release/1.6.3' into 'develop'
Release 1.6.3 [develop]

See merge request apps/MEGAcmd!580
2023-05-10 20:13:39 +12:00
Xavier Rins Lozano
366ca8a214 Merge branch 'CHT-872-Deprecate-EOL-Distributions' into 'develop'
CHT-872-Add warning to deprecated EOL distributions

Closes CHT-872

See merge request apps/MEGAcmd!582
2023-05-03 20:41:01 +12:00
Xavier Rins Lozano
a2738a0df3
Add warning to deprecated EOL distributions 2023-05-02 13:10:43 +02:00
David Yuste
0544eade10
Update setExcludedNames calls using setLegacyExcludedNames 2022-12-01 11:42:39 +13:00
181 changed files with 9771 additions and 3965 deletions

156
.dockerignore Normal file
View File

@ -0,0 +1,156 @@
# Compiled Object files
*.slo
*.lo
*.o
*.obj
*.lo
*.pyc
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Autotool stuff
.deps
/Makefile
/include/Makefile
Makefile.in
aclocal.m4
autom4te.cache
/include/mega/config.h
/include/mega/config.h.in
configure
depcomp
*.swp
install-sh
libtool
ltmain.sh
missing
.libs
stamp-h1
.dirstamp
libmega.pc
*.db
.ycm_extra_conf.py
test-driver
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
compile
clean
config.guess
config.log
config.status
config.sub
py-compile
# Editor and IDE stuff
*~
.project
.cproject
.settings
*~
Debug
Release
*.pro.user*
megaclient_statecache*
mega-cmd
mega-exec
mega-cmd-server
mega-cmd-integration-tests
mega-cmd-unit-tests
/contrib/QtCreator/MEGAcmd/MEGAcmd.pro.user
/contrib/QtCreator/MEGAcmd/MEGAcmd
/contrib/QtCreator/MEGAcmd/Makefile
/contrib/QtCreator/MEGAcmd/moc_*.cpp
src/build/Release_x64
MEGAcmdServer.pro.user
/src/build/megacmd/megacmd.dsc
/src/build/megacmd/megacmd.spec
/src/build/megacmd/megacmd_*.tar.gz
/src/build/megacmd/PKGBUILD
/contrib/QtCreator/MEGAcmd/MEGAcmdClient/MEGAclient
/contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile
/contrib/QtCreator/MEGAcmd/MEGAcmdShell/MEGAcmdShell
/contrib/QtCreator/MEGAcmd/MEGAcmdUpdater/MEGAcmdUpdater
/contrib/QtCreator/MEGAcmd/MEGAcmdServer/MEGAcmd
/contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile
/contrib/QtCreator/MEGAcmd/MEGAcmdLoader/MEGAcmdLoader
/contrib/QtCreator/MEGAcmd/MEGAcmdLoader/Makefile
/contrib/QtCreator/build-*
#built stuff
build/archives
build/megacmd-*
megacmdconfig.h
megacmdconfig.h.in
/build/megacmd/PKGBUILD
/build/megacmd/megacmd.dsc
/build/megacmd/megacmd.spec
/build/megacmd/megacmd_*.tar.gz
/build/build-cmake-*
/build/cmake/CMakeLists.txt.user
contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile.Debug
contrib/QtCreator/MEGAcmd/.qmake.stash
contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile.Debug
contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile.Release
contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile.Release
contrib/QtCreator/MEGAcmd/MEGAcmdUpdateGenerator/Makefile*
contrib/QtCreator/MEGAcmd/MEGAcmdUpdater/Makefile*
contrib/QtCreator/MEGAcmd/build-*
contrib/QtCreator/*/Makefile
contrib/QtCreator/*/*/Makefile
contrib/QtCreator/*/*/*/Makefile
test_integration
test_unit
.qtc_clangd
CMakeFiles
build-x64-windows-mega
Makefile.Debug
Makefile.Release
build/Release_x64
/build/megacmd/megacmd*.dsc
#git stuff
*_BACKUP_*
*_BASE_*
*_LOCAL_*
*_REMOTE_*
.git
#backups
*_bk
compile_commands.json
build/cmake/.cmake/
build/cmake/CMakeCache.txt
build/cmake/CMakeCache.txt.prev
build/cmake/Makefile
build/cmake/Testing/
build/cmake/cmake_install.cmake
build/cmake/compile_commands.json
build/cmake/qtcsettings.cmake
# Created by configure
config.cache
# Created by clangd
.cache
build-with-docker

71
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,71 @@
name: Bug Report
description: "Report an issue with MEGAcmd"
labels: ["bug"]
body:
- type: markdown
attributes:
value: "Thank you for filing a bug report!"
- type: dropdown
id: version
attributes:
label: "MEGAcmd version"
description: "Which version of MEGAcmd did you encountered this issue? (Can be looked up using the `version` command)"
options:
- 1.7.0
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
validations:
required: true
- type: dropdown
id: platform
attributes:
label: "Operating System/Platform"
description: "What platform are you using MEGAcmd on?"
options:
- Windows
- Linux
- MacOS
- Synology
- QNAP
validations:
required: true
- type: input
id: platform-version
attributes:
label: "Platform version. In the case of Linux, please enter the Linux distribution you are using."
placeholder: "ex. Windows 11 Pro"
validations:
required: true
- type: textarea
id: steps
attributes:
label: "Steps"
description: "What steps did you take you encounter this issue?"
placeholder: |
1.
2.
3.
4.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: "Expected behavior"
description: "What did you expect to happen?"
- type: textarea
id: actual-behavior
attributes:
label: "Actual behavior"
description: "What actually happened?"
validations:
required: true

24
.gitignore vendored
View File

@ -66,7 +66,7 @@ py-compile
*~
Debug
Release
*.pro.user
*.pro.user*
megaclient_statecache*
@ -74,6 +74,8 @@ megaclient_statecache*
mega-cmd
mega-exec
mega-cmd-server
mega-cmd-integration-tests
mega-cmd-unit-tests
/contrib/QtCreator/MEGAcmd/MEGAcmd.pro.user
/contrib/QtCreator/MEGAcmd/MEGAcmd
@ -87,6 +89,8 @@ MEGAcmdServer.pro.user
/src/build/megacmd/PKGBUILD
/contrib/QtCreator/MEGAcmd/MEGAcmdClient/MEGAclient
/contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile
/contrib/QtCreator/MEGAcmd/MEGAcmdShell/MEGAcmdShell
/contrib/QtCreator/MEGAcmd/MEGAcmdUpdater/MEGAcmdUpdater
/contrib/QtCreator/MEGAcmd/MEGAcmdServer/MEGAcmd
/contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile
/contrib/QtCreator/MEGAcmd/MEGAcmdLoader/MEGAcmdLoader
@ -105,6 +109,7 @@ megacmdconfig.h.in
/build/megacmd/megacmd_*.tar.gz
/build/build-cmake-*
/build/cmake/CMakeLists.txt.user
build/cmake/build_dir
contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile.Debug
contrib/QtCreator/MEGAcmd/.qmake.stash
contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile.Debug
@ -113,13 +118,30 @@ contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile.Release
contrib/QtCreator/MEGAcmd/MEGAcmdUpdateGenerator/Makefile*
contrib/QtCreator/MEGAcmd/MEGAcmdUpdater/Makefile*
contrib/QtCreator/MEGAcmd/build-*
contrib/QtCreator/*/Makefile
contrib/QtCreator/*/*/Makefile
contrib/QtCreator/*/*/*/Makefile
test_integration
test_unit
.qtc_clangd
CMakeFiles
build-x64-windows-mega
build-x86-windows-mega
Makefile.Debug
Makefile.Release
/Makefile*
build/Release_x64
/build/megacmd/megacmd*.dsc
build/built64
build/built32
#git stuff
*_BACKUP_*
*_BASE_*
*_LOCAL_*
*_REMOTE_*
#backups
*_bk

View File

@ -40,17 +40,8 @@ In order to have support for thumbnails and previews, it is highly recommended t
* In some instanances you may need to run
`apt install --reinstall build-essential`
* **Windows**
* For Windows, we have recently overhauled the build system and now all the steps are captured in this one script that will acquire and build all dependencies, as well as building MEGAcmd itself, using vcpkg and cmake. To get and use this script, follow these steps in a command prompt:
* git clone --recurse-submodules --branch tag/youChoose https://github.com/meganz/MEGAcmd.git
* cd megacmd/build/cmake
* fullBuildFromScratchOnWindows x64-windows-mega
* **MacOS**
* For MacOS, here is a bundle with all the 3rd party dependencies required to build, plus a `config.h` file to be placed at `sdk/include/mega/config.h`:
https://mega.nz/#F!WwZyBZRL!1vXiBr7pJZLINpSRErBxvA
* **Windows and MacOS**
* The simplest way to build on Windows and MacOS is to use CMake. In that case, all required dependencies will be downloaded and compiled automatically.
## Getting the source
@ -62,6 +53,7 @@ cd MEGAcmd && git submodule update --init --recursive
## Building and installing
### With Autotools
For platforms with Autotools, MEGAcmd can be built and installed with:
sh autogen.sh
@ -75,9 +67,26 @@ For platforms with Autotools, MEGAcmd can be built and installed with:
won't work. You would need to `source /YOUR/PREFIX/etc/bash_completion.d/megacmd_completion.sh`
(or link it at /etc/bash_completion.d)
Alternatively you can build using Qt project located at `contrib/QtCreator/MEGAcmd/MEGAcmd.pro`.
### With CMake
With CMake, all third-party libraries and dependencies will be downloaded and compiled automatically in `../3rdparty_megacmd/`. Nothing else is required; the `build_from_scratch` script takes care of everything. Just navigate to `build/cmake/` and run:
```
cmake -DTRIPLET=<triplet> -P build_from_scratch.cmake
```
For Windows/MacOS you will need to place the `3rdparty` folder (included in the dependency bundle referenced [`above`](#requirements)) into `sdk/bindings/qt/`.
Some notes on the above command:
* The `<triplet>` options are (depending on OS and architecture):
* For Windows, either `x64-windows-mega` or `x86-windows-mega`
* For MacOS, either `arm64-osx-mega` or `x64-osx-mega`
* After third-party dependencies are downloaded, the build of the project itself may be controlled with an optional `-DTARGET` parameter (or multiple targets separated by semicolons)
* If not provided, everything will be built (equivalent to `make all`)
* On Windows
* You can use a CMake version from a newer Visual Studio using the `-G` option (e.g., `-G Visual Studio 16 2019`)
* The directory `../3rdparty_megacmd/vcpkg/installed/<triplet>/debug/bin/` (or `../3rdparty_megacmd/vcpkg/installed/<triplet>/bin` for release) must be added to `PATH` _as an absolute path_ to be able to run the executables properly
If the build is successful, the binaries will be located in `build-<triplet>/`.
### With QtCreator
You can build with QtCreator by opening the Qt project file at `contrib/QtCreator/MEGAcmd/MEGAcmd.pro`.
# Usage

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
FROM debian:11-slim
ADD ./builder.sh /opt/builder.sh
RUN chmod +x /opt/builder.sh
# install all build dependencies
RUN apt-get update; \
apt-get install -y libzen-dev libmediainfo-dev pkg-config debhelper libcrypto++-dev libpcre3-dev libc-ares-dev libssl-dev \
libsqlite3-dev zlib1g-dev wget dh-autoreconf libtool-bin libreadline-dev libfreeimage-dev \
libsodium-dev libuv1-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libmediainfo-dev libzen-dev zip libicu-dev
#Install pdfium
RUN wget https://artifactory.developers.mega.co.nz/artifactory/debian-dev/private/Debian_11/amd64/pdfium-mega_5247.0-4.1_amd64.deb
RUN apt-get install -y $PWD/pdfium-mega_5247.0-4.1_amd64.deb
#Install gtest
RUN apt-get install -y libgtest-dev libgmock-dev
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
ENTRYPOINT /opt/builder.sh

View File

@ -0,0 +1,109 @@
# syntax=docker/dockerfile:1
FROM scratch as pdfium
ADD https://artifactory.developers.mega.co.nz/artifactory/debian-dev/private/Debian_12/amd64/pdfium-mega_5247.0-4.1_amd64.deb /tmp/pdfium/pdfium-mega.deb
FROM debian:12-slim as base
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=bind,from=pdfium,source=/tmp/pdfium/pdfium-mega.deb,target=/tmp/pdfium/pdfium-mega.deb \
apt-get update \
&& apt-get install -y --no-install-recommends \
googletest \
libasan8 \
libtsan2 \
libavcodec59 \
libavformat59 \
libavutil57 \
libc6 \
libpcrecpp0v5 \
libc-ares2 \
libcrypto++8 \
libfreeimage3 \
libgcc-s1 \
libicu72 \
libmediainfo0v5 \
libpcre3 \
libpcre32-3 \
libreadline8 \
libsodium23 \
libsqlite3-0 \
libssl3 \
libstdc++6 \
libswscale6 \
libtinyxml2-9 \
libtinyxml2.6.2v5 \
libubsan1 \
libuv1 \
libzen0v5 \
zlib1g \
gpg \
/tmp/pdfium/pdfium-mega.deb
FROM base as build-deps
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ccache \
debhelper dh-autoreconf \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libc-ares-dev \
libcrypto++-dev \
libfreeimage-dev \
libgmock-dev \
libgtest-dev \
libicu-dev \
libmediainfo-dev \
libpcre3-dev \
libreadline-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libswscale-dev \
libtinyxml2-dev \
libtool-bin \
libuv1-dev \
libzen-dev \
pkg-config \
zip \
zlib1g-dev
FROM scratch as src
WORKDIR /usr/src/megacmd
COPY sdk ./sdk
COPY src ./src
COPY tests ./tests
COPY build ./build
COPY contrib ./contrib
COPY Makefile.am autogen.sh clean.sh configure.ac ./
FROM build-deps as build
WORKDIR /usr/src/megacmd
ENV CC "ccache gcc-12"
ENV CXX "ccache g++-12"
ENV CCACHE_DIR /tmp/ccache
ARG BUILD_OPT_SANITIZERS=all
COPY --from=src /usr/src/megacmd /usr/src/megacmd
RUN --mount=type=cache,target=/tmp/ccache \
./autogen.sh \
&& ./configure --disable-silent-rules --prefix=/usr/local \
--disable-examples --enable-megacmd-tests --with-gtest \
--enable-sanitizer=${BUILD_OPT_SANITIZERS} --enable-debug \
&& make -j$(nproc) && make install
FROM base as final
ENV LD_LIBRARY_PATH /usr/local/lib
COPY --from=build /usr/local/ /usr/local/

View File

@ -0,0 +1,129 @@
# syntax=docker/dockerfile:1
FROM scratch as pdfium
ADD https://artifactory.developers.mega.co.nz/artifactory/debian-dev/private/Debian_12/amd64/pdfium-mega_5247.0-4.1_amd64.deb /tmp/pdfium/pdfium-mega.deb
FROM debian:12-slim as base
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=bind,from=pdfium,source=/tmp/pdfium/pdfium-mega.deb,target=/tmp/pdfium/pdfium-mega.deb \
apt-get update \
&& apt-get install -y --no-install-recommends \
googletest \
libasan8 \
libtsan2 \
libavcodec59 \
libavformat59 \
libavutil57 \
libc6 \
libpcrecpp0v5 \
libc-ares2 \
libcrypto++8 \
libfreeimage3 \
libgcc-s1 \
libicu72 \
libmediainfo0v5 \
libpcre3 \
libpcre32-3 \
libreadline8 \
libsodium23 \
libsqlite3-0 \
libssl3 \
libstdc++6 \
libswscale6 \
libtinyxml2-9 \
libtinyxml2.6.2v5 \
libubsan1 \
libuv1 \
libzen0v5 \
zlib1g \
gpg \
/tmp/pdfium/pdfium-mega.deb
FROM base as build-deps
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ccache \
debhelper dh-autoreconf \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libc-ares-dev \
libcrypto++-dev \
libfreeimage-dev \
libgmock-dev \
libgtest-dev \
libicu-dev \
libmediainfo-dev \
libpcre3-dev \
libreadline-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libswscale-dev \
libtinyxml2-dev \
libtool-bin \
libuv1-dev \
libzen-dev \
pkg-config \
zip \
zlib1g-dev
FROM build-deps as build-deps-cmake
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y --no-install-recommends cmake
FROM scratch as src
WORKDIR /usr/src/megacmd
COPY Makefile.am autogen.sh clean.sh configure.ac ./
COPY sdk ./sdk
COPY src ./src
COPY build ./build
COPY contrib ./contrib
COPY tests/common ./tests/common
COPY tests/integration ./tests/integration
COPY tests/unit ./tests/unit
FROM build-deps-cmake as build
WORKDIR /usr/src/megacmd
ENV CC "ccache gcc-12"
ENV CXX "ccache g++-12"
ENV CCACHE_DIR /tmp/ccache
ARG ENABLE_ASAN=ON
ARG ENABLE_UBSAN=ON
ARG ENABLE_TSAN=OFF
ARG ENABLE_MEGACMD_TESTS=ON
COPY --from=src /usr/src/megacmd /usr/src/megacmd
RUN --mount=type=cache,target=/tmp/ccache \
--mount=type=tmpfs,target=/tmp/build \
cmake -S build/cmake -B /tmp/build \
-D ENABLE_ASAN=${ENABLE_ASAN} -D \
ENABLE_UBSAN=${ENABLE_UBSAN} -D \
ENABLE_TSAN=${ENABLE_TSAN} -D \
ENABLE_MEGACMD_TESTS=${ENABLE_MEGACMD_TESTS} \
&& make -C /tmp/build -j$(nproc) mega-cmd mega-cmd-server mega-exec \
mega-cmd-updater mega-cmd-tests-integration mega-cmd-tests-unit \
&& cd /tmp/build \
&& install mega-cmd mega-cmd-server \
mega-cmd-tests-integration mega-cmd-tests-unit \
mega-cmd-updater mega-exec \
/usr/local/bin/
FROM base as final
COPY --from=build /usr/local/ /usr/local/

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
volume_dest="/opt/megacmd"
owner_uid=`stat -c "%u" $volume_dest`
owner_gid=`stat -c "%g" $volume_dest`
groupadd -g $owner_gid jenkins
echo "Adding \"jenkins\" user..."
useradd -r -M -u $owner_uid -g $owner_gid -d $volume_dest -s /bin/bash jenkins
chown -R jenkins:jenkins $volume_dest
echo "Configuring core dumpings on docker"
ulimit -c unlimited
rm -rf installdir || :
exec su - jenkins -c "
set -e
./autogen.sh
./sdk/contrib/build_sdk.sh -b -g -f -I -i -s -n -z -o ./3rd_pkgs -p ./3rd_deps
rm ./3rd_deps/include/sqlite* ./3rd_deps/lib/libsqlite* || :
./configure --disable-silent-rules --disable-examples --prefix=$volume_dest/installdir --with-curl=$volume_dest/3rd_deps --disable-curl-checks --enable-megacmd-tests --with-gtest
make clean
make
make install
#now run the unit tests
$volume_dest/installdir/bin/mega-cmd-unit-tests
"

View File

@ -3,7 +3,7 @@ QPKG_NAME="MEGAcmd"
# Name of the display application.
QPKG_DISPLAY_NAME="MEGAcmd"
# Version of the packaged application.
QPKG_VER="1.6.3"
QPKG_VER="1.7.0"
# Author or maintainer of the package
QPKG_AUTHOR="Mega.nz"
# One-line description of the packaged application

View File

@ -3,7 +3,7 @@
source /pkgscripts/include/pkg_util.sh
package="megacmdpkg"
version="1.6.3-0001"
version="1.7.0-0001"
displayname="MEGAcmd"
maintainer="Mega NZ"

View File

@ -0,0 +1,39 @@
IF "%1%" EQU "-help" (
goto Usage
)
IF [%MEGA_VCPKGPATH%]==[] (
SET MEGA_VCPKGPATH="C:\mega\dev\3rdparty_megacmd"
)
SET MEGA_ARCH=%1
:: CHECK ARCHITECTURE
IF "%MEGA_ARCH%" EQU "64" (
echo "Info: Building x64 only"
SET MEGA_SKIP_32_BIT_BUILD=true
) ELSE (
IF "%MEGA_ARCH%" EQU "32/64" (
echo "Info: Building both x64 and x86"
) ELSE (
echo "Please add the architecture as first parameter: 64 or 32/64"
goto Usage
)
)
cd cmake
cmake -G "Visual Studio 16 2019" -D3RDPARTY_DIR=%MEGA_VCPKGPATH% -DSKIP_PROJECT_BUILD=1 -DTRIPLET=x64-windows-mega -P build_from_scratch.cmake || exit 1 /b
IF NOT "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
cmake -G "Visual Studio 16 2019" -D3RDPARTY_DIR=%MEGA_VCPKGPATH% -DSKIP_PROJECT_BUILD=1 -DTRIPLET=x86-windows-mega -P build_from_scratch.cmake || exit 1 /b
)
cd ..
exit /b
:Usage
echo "Usage: %~0 [-help] [32|32/64|64]"
echo Script for building vcpkg 3rd party dependencies"
exit 2 /b

View File

@ -1,6 +1,26 @@
# For convenient building on windows, eg via generating Visual Studio projects and solutions. Adjust the 'include' line to refer to your repo of MegaSDK
cmake_minimum_required(VERSION 3.8)
# Set min OSX version
if(CMAKE_HOST_APPLE)
# Minimum deployment target differs if we are building for intel or arm64 targets
# CMAKE_SYSTEM_PROCESSOR and CMAKE_HOST_SYSTEM_PROCESSOR are only available after project()
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE HOST_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Setup CMAKE_OSX_DEPLOYMENT_TARGET before project()
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR (NOT CMAKE_OSX_ARCHITECTURES AND HOST_ARCHITECTURE STREQUAL "arm64"))
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.1" CACHE STRING "Minimum OS X deployment version")
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version")
endif()
message(STATUS "Minimum OS X deployment version is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}")
unset(HOST_ARCHITECTURE)
endif()
project(MEGAcmd)
# Turn on SDK flags which might be off by default in the SDK, but should be on for MEGAcmd, also set to 0 flags we want to be aware of but not use yet
@ -19,6 +39,16 @@ set (USE_PCRE 1 CACHE STRING "Provides pattern matching functionality for sync r
set (HAVE_FFMPEG 1 CACHE STRING "Used to create previews/thumbnails for video files")
set (USE_FFMPEG 1 CACHE STRING "Used to create previews/thumbnails for video files")
# Flags for enabling runtime checks
option (ENABLE_ASAN "Build MEGAcmd with AddressSanitizer" OFF)
option (ENABLE_UBSAN "Build MEGAcmd with UndefinedBehaviorSanitizer" OFF)
option (ENABLE_TSAN "Build MEGAcmd with ThreadSanitizer" OFF)
option (ENABLE_MEGACMD_TESTS "Build MEGAcmd with tests" OFF)
if(ENABLE_MEGACMD_TESTS)
add_definitions( -DMEGACMD_TESTING_CODE )
endif()
if(WIN32)
add_definitions( -DUNICODE -D_UNICODE ) # needed for visual studio projects to use the unicode runtime libraries
@ -28,11 +58,40 @@ if(WIN32)
endif()
#specify where 3rd party libraries are available
set(Mega3rdPartyDir "${CMAKE_CURRENT_LIST_DIR}/../../../3rdparty" CACHE STRING "")
set(Mega3rdPartyDir "${CMAKE_CURRENT_LIST_DIR}/../../../3rdparty_megacmd" CACHE STRING "")
# Include SDK's CMakeLists.txt
# this line could also point to an sdk repo outside this one, or you can use the submodule in ./sdk folder
include(${CMAKE_CURRENT_LIST_DIR}/../../sdk/contrib/cmake/CMakeLists.txt)
#Substract not needed avfilter/avdevice when not using vcpkg (linux' system ones)
if (NOT USE_THIRDPARTY_FROM_VCPKG) #vcpkg or system
get_target_property(OVERRIDING_TARGET_LIBRARIES Mega INTERFACE_LINK_LIBRARIES)
LIST(REMOVE_ITEM OVERRIDING_TARGET_LIBRARIES $<${HAVE_FFMPEG}:avfilter> )
LIST(REMOVE_ITEM OVERRIDING_TARGET_LIBRARIES $<${HAVE_FFMPEG}:avdevice> )
set_property(TARGET Mega PROPERTY INTERFACE_LINK_LIBRARIES ${OVERRIDING_TARGET_LIBRARIES} )
endif()
#ensure NDEBUG is set when not debugging
if (NOT CMAKE_BUILD_TYPE EQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG")
endif ()
if (ENABLE_ASAN)
add_compile_options("-fsanitize=address -fno-omit-frame-pointer -fno-common")
link_libraries("-fsanitize=address")
endif()
if (ENABLE_UBSAN)
add_compile_options("-fsanitize=undefined -fno-omit-frame-pointer")
link_libraries("-fsanitize=undefined")
endif()
if (ENABLE_TSAN)
add_compile_options("-fsanitize=thread -fno-omit-frame-pointer")
endif()
set(ProjectDir "${CMAKE_CURRENT_LIST_DIR}/../..")
set (ENABLE_BACKUP 1 CACHE STRING "")
@ -41,10 +100,10 @@ if (ENABLE_BACKUP)
add_definitions( -DENABLE_BACKUPS )
endif (ENABLE_BACKUP)
add_executable(mega-cmd-server
add_library(LMegacmdServer STATIC
"${ProjectDir}/src/megacmd.cpp"
"${ProjectDir}/src/megacmdexecuter.cpp"
"${ProjectDir}/src/megacmd_events.cpp"
"${ProjectDir}/src/megacmdtransfermanager.cpp"
"${ProjectDir}/src/megacmdlogger.cpp"
"${ProjectDir}/src/megacmdsandbox.cpp"
@ -56,14 +115,27 @@ add_executable(mega-cmd-server
"${ProjectDir}/src/comunicationsmanagerportsockets.cpp"
"${ProjectDir}/src/configurationmanager.cpp"
"${ProjectDir}/src/listeners.cpp"
)
if (ENABLE_MEGACMD_TESTS)
list(APPEND c++17targets LMegacmdServer)
target_link_libraries(LMegacmdServer LMegacmdTestsCommon)
endif()
add_executable(mega-cmd-server
"${ProjectDir}/src/megacmd_server_main.cpp"
"${ProjectDir}/contrib/QtCreator/MEGAcmd/MEGAcmdServer/icon.rc"
)
add_executable(mega-exec
add_library(LMegacmdClient STATIC
"${ProjectDir}/src/client/megacmdclient.cpp"
"${ProjectDir}/src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp"
"${ProjectDir}/src/megacmdshell/megacmdshellcommunications.cpp"
"${ProjectDir}/src/megacmdcommonutils.cpp"
)
add_executable(mega-exec
"${ProjectDir}/src/client/megacmd_client_main.cpp"
"${ProjectDir}/contrib/QtCreator/MEGAcmd/MEGAcmdClient/icon.rc"
)
@ -81,8 +153,53 @@ add_executable(mega-cmd-updater WIN32
"${ProjectDir}/contrib/QtCreator/MEGAcmd/MEGAcmdUpdater/icon.rc"
)
if (ENABLE_MEGACMD_TESTS)
#Test Common:
add_library(LMegacmdTestsCommon STATIC
"${ProjectDir}/tests/common/Instruments.cpp"
"${ProjectDir}/tests/common/TestUtils.cpp"
)
target_link_libraries(LMegacmdTestsCommon gmock gtest)
if (NOT WIN32)
target_link_libraries(LMegacmdTestsCommon -pthread)
endif()
list(APPEND c++17targets LMegacmdTestsCommon)
#Integration tests:
add_executable(mega-cmd-tests-integration
"${ProjectDir}/tests/integration/BasicTests.cpp"
"${ProjectDir}/tests/integration/ExportTests.cpp"
"${ProjectDir}/tests/integration/MegaCmdTestingTools.cpp"
"${ProjectDir}/tests/integration/main.cpp"
)
target_include_directories(mega-cmd-tests-integration PUBLIC ${ProjectDir}/src ${ProjectDir}/tests/common)
target_link_libraries(mega-cmd-tests-integration LMegacmdServer LMegacmdClient LMegacmdTestsCommon)
if(APPLE)
target_link_libraries(mega-cmd-tests-integration "-framework Security" )
endif()
list(APPEND c++17targets mega-cmd-tests-integration)
#Unit tests:
add_executable(mega-cmd-tests-unit
"${ProjectDir}/tests/unit/StringUtilsTests.cpp"
"${ProjectDir}/tests/unit/UtilsTests.cpp"
"${ProjectDir}/tests/unit/PlatformDirectoriesTest.cpp"
"${ProjectDir}/tests/unit/main.cpp"
)
target_include_directories(mega-cmd-tests-unit PUBLIC ${ProjectDir}/src ${ProjectDir}/tests/common)
target_link_libraries(mega-cmd-tests-unit LMegacmdServer LMegacmdTestsCommon)
if(APPLE)
target_link_libraries(mega-cmd-tests-unit "-framework Security" )
endif()
list(APPEND c++17targets mega-cmd-tests-unit)
endif()
if (APPLE)
target_sources(mega-cmd-server PRIVATE "${ProjectDir}/src/megacmdplatform.mm")
target_sources(LMegacmdServer PRIVATE "${ProjectDir}/src/megacmdplatform.mm")
target_sources(mega-cmd-updater PRIVATE "${ProjectDir}/src/updater/MacUtils.mm")
endif ()
@ -101,16 +218,51 @@ set_target_properties(mega-cmd-updater PROPERTIES VS_DEBUGGER_ENVIRONMENT "${3RD
set_target_properties(mega-cmd-server PROPERTIES VS_DEBUGGER_ENVIRONMENT "${3RDPARTY_RUNTIME_PATH_DEBUG}")
endif()
target_link_libraries(mega-exec Mega)
target_link_libraries(LMegacmdClient Mega)
target_link_libraries(mega-exec LMegacmdClient)
target_link_libraries(mega-cmd Mega)
target_link_libraries(mega-cmd-updater Mega)
if (WIN32)
target_link_libraries(mega-cmd-server Mega Lz32.lib Taskschd.lib)
target_link_libraries(LMegacmdServer Mega Lz32.lib Taskschd.lib)
target_link_libraries(mega-cmd-updater Mega Lz32.lib Urlmon.lib)
else()
target_link_libraries(mega-cmd-server Mega)
target_link_libraries(LMegacmdServer Mega)
target_link_libraries(mega-cmd-updater LMegacmdServer) # Required for Platform dirs
endif()
target_link_libraries(mega-cmd-server LMegacmdServer)
if (NOT NO_READLINE)
target_link_libraries(mega-cmd readline)
target_link_libraries(mega-cmd ${readline_LIBRARIES})
endif (NOT NO_READLINE)
if (NOT WIN32)
# Magic to selectively replace c++11 flags:
macro(useCompileOptionsInsteadOfCXXFlagsForAllTargets)
separate_arguments(_global_cxx_flags_list UNIX_COMMAND ${CMAKE_CXX_FLAGS})
get_property(_targets DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
foreach(_target ${_targets})
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_global_cxx_flags_list}")
set_target_properties(${_target} PROPERTIES CXX_EXTENSIONS OFF) #this one causes the addition of -std+gnu++11
endforeach()
unset(CMAKE_CXX_FLAGS)
unset(CMAKE_CXX_STANDARD)
set(_flag_sync_required TRUE)
endmacro()
macro(passfrom11to17 _target)
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS)
if(_target_cxx_flags)
list(REMOVE_ITEM _target_cxx_flags "-std=c++11") #the SDK adds this one explicitly
#list(APPEND _target_cxx_flags -std=c++17) #instead of doing this explicitly we will use the target_compile_features
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}")
target_compile_features(${_target} PUBLIC cxx_std_17)
endif()
endmacro()
useCompileOptionsInsteadOfCXXFlagsForAllTargets()
foreach(_target ${c++17targets})
passfrom11to17(${_target})
endforeach()
endif() #NOT WIN32

View File

@ -47,9 +47,13 @@ set(_triplet ${TRIPLET})
set(_cmd_dir "${_script_cwd}/../..")
set(_sdk_dir "${_cmd_dir}/sdk")
message(STATUS "Building for triplet ${_triplet} with CMD ${_cmd_dir} and SDK ${_sdk_dir}")
if(3RDPARTY_DIR)
set (_3rdparty_dir ${3RDPARTY_DIR})
else()
set (_3rdparty_dir "${_cmd_dir}/../3rdparty_megacmd")
endif()
message(STATUS "Building for triplet ${_triplet} with CMD ${_cmd_dir} and SDK ${_sdk_dir} into ${_3rdparty_dir}")
file(MAKE_DIRECTORY ${_3rdparty_dir})
@ -109,7 +113,6 @@ execute_checked_command(
COMMAND ${_3rdparty_tool_exe}
--setup
--removeunusedports
--nopkgconfig
${_3rdparty_tool_common_args}
WORKING_DIRECTORY ${_3rdparty_dir}
)
@ -125,6 +128,7 @@ execute_checked_command(
# Allows use of the VCPKG_XXXX variables defined in the triplet file
# We search our own custom triplet folder, and then the standard ones searched by vcpkg
foreach(_triplet_dir
"${_sdk_dir}/contrib/cmake/vcpkg_overlay_triplets/"
"${_sdk_dir}/contrib/cmake/vcpkg_extra_triplets/"
"${_3rdparty_vcpkg_dir}/triplets/"
"${_3rdparty_vcpkg_dir}/triplets/community"
@ -139,7 +143,11 @@ foreach(_triplet_dir
endforeach()
if(NOT _triplet_file_found)
message(FATAL_ERROR "Could not find triplet ${_triplet} in Mega vcpkg_extra_triplets nor in vcpkg triplet folders")
message(FATAL_ERROR "Could not find triplet ${_triplet} in Mega vcpkg_overlay_triplets nor in vcpkg triplet folders")
endif()
if(SKIP_PROJECT_BUILD)
return()
endif()
# Now set up to build this repo
@ -193,7 +201,7 @@ if(WIN32)
--build ${_build_dir}
${_cmake_target_args}
--config ${_config}
--parallel 4
--parallel 12
)
endforeach()
else()
@ -213,7 +221,7 @@ else()
COMMAND ${_cmake}
--build ${_build_dir}
${_cmake_target_args}
--parallel 4
--parallel 12
)
endforeach()
endif()

View File

@ -1,69 +1,74 @@
# PREFERRED PORTS FOR MEGACMD. This is a modified snapshot of SDK's preferred-ports-sdk.txt
# Read instructions on the above if you want to introduce changes in this file
# Common dependencies
vcpkg-cmake-config/a664e41ee50b61adcc90a44a761eca139a4b7dd7
vcpkg-cmake/a664e41ee50b61adcc90a44a761eca139a4b7dd7
pkgconf/a664e41ee50b61adcc90a44a761eca139a4b7dd7
vcpkg-pkgconfig-get-modules/a664e41ee50b61adcc90a44a761eca139a4b7dd7
vcpkg-tool-meson/a664e41ee50b61adcc90a44a761eca139a4b7dd7
vcpkg-cmake-get-vars/a664e41ee50b61adcc90a44a761eca139a4b7dd7
# direct core dependencies of the SDK
c-ares/c303dd024e2dc03a0665ddffbb12a1077933e649 all:on ios:off
cryptopp/c303dd024e2dc03a0665ddffbb12a1077933e649
curl/7375bb408f2278d2f1875c259beef93332697ba7 all:on ios:off
c-ares/7476f0d4e77d3333fbb249657df8251c28c4faae all:on ios:off
cryptopp/a42af01b72c28a8e1d7b48107b33e4f286a55ef6
curl/a42af01b72c28a8e1d7b48107b33e4f286a55ef6 all:on ios:off
curl[core,sectransp]/7375bb408f2278d2f1875c259beef93332697ba7 all:off ios:curl-for-ios.patch
libsodium/92adeffbce95847e141411177248ed04ac49ea9b all:on ios:libsodium-ios.patch
openssl/c303dd024e2dc03a0665ddffbb12a1077933e649 ios:off osx:off
openssl-unix/c303dd024e2dc03a0665ddffbb12a1077933e649 all:off linux:on
openssl-windows/c303dd024e2dc03a0665ddffbb12a1077933e649 all:off windows:on
libsodium/7476f0d4e77d3333fbb249657df8251c28c4faae all:on ios:libsodium-ios.patch
openssl/7476f0d4e77d3333fbb249657df8251c28c4faae ios:off osx:off
# cmake\vcpkg toolchain dependencies
vcpkg-cmake-config/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
vcpkg-cmake/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
# needed by MEGAcmd:
pcre/d6bd10b9af6f6197711222a0ac827e52e0247e30
# needed by external projects which still rely on SDK to fetch and build it; SDK no longer uses PCRE
# this is the minimum version after PCRE's ftp server switched
pcre/d6bd10b9af6f6197711222a0ac827e52e0247e30 all:on
readline-unix/7476f0d4e77d3333fbb249657df8251c28c4faae all:off osx:on
ncurses/7476f0d4e77d3333fbb249657df8251c28c4faae all:off osx:on
sqlite3/7476f0d4e77d3333fbb249657df8251c28c4faae
zlib/7476f0d4e77d3333fbb249657df8251c28c4faae
readline/8.0 all:off osx:on
sqlite3/c303dd024e2dc03a0665ddffbb12a1077933e649
zlib/e0a9559a9b24af116388eae242d675bf9fde025c
# needed by the SDK if enabling serving/streaming (outgoing) files via http/s or include a an ftp server
libuv/c303dd024e2dc03a0665ddffbb12a1077933e649 ios:off
# needed by the SDK if enabling serving/streaming (outgoing) files via http/s or include a ftp server
libuv/293f090a9be5a88a2a77838c6346d5ef9d3df81b all:off windows:on
libuv/7476f0d4e77d3333fbb249657df8251c28c4faae all:on windows:off
# mediainfo, customized with constrained functionality (determine media properties such as track length, codec, etc)
libmediainfo/19.09
libzen/0.4.37
libmediainfo/23.4
tinyxml2/7476f0d4e77d3333fbb249657df8251c28c4faae
libzen/7476f0d4e77d3333fbb249657df8251c28c4faae
# ffmpeg (video preview/thumbnail generation)
ffmpeg/c303dd024e2dc03a0665ddffbb12a1077933e649 all:on osx:ffmpeg-fix-osx-cross-compilation.patch ios:off
ffmpeg/c67a3059bbdb19799d402085e7323f71e7d68656 all:on ios:off osx:ffmpeg-osx-linker.patch
#freeimage and its dependencies (image preview/thumbnail generation)
freeimage/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 osx:freeimage-bool-typedef-xcode-compiler.patch
libpng/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
libjpeg-turbo/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
tiff/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
openjpeg/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
libwebp/7375bb408f2278d2f1875c259beef93332697ba7 all:libwebp-no-freeglut-no-avx.patch
libraw/7375bb408f2278d2f1875c259beef93332697ba7 ios:libraw-ios.patch
jxrlib/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 ios:jxrlib-ios-guiddef-fix.patch
openexr/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 ios:openexr-ios.patch
imath/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
jasper/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 all:jasper-no-freeglut.patch
liblzma/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 ios:liblzma-ios.patch
#python3 not needed; it only provides python bindings to use openexr from python
libffi/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
opengl/94ce0dab56f4d8ba6bd631ba59ed682b02d45c46
# freeimage and its dependencies (image preview/thumbnail generation)
freeimage/7476f0d4e77d3333fbb249657df8251c28c4faae osx:freeimage-bool-typedef-xcode-compiler.patch
libpng/7476f0d4e77d3333fbb249657df8251c28c4faae
libjpeg-turbo/7476f0d4e77d3333fbb249657df8251c28c4faae
tiff/7476f0d4e77d3333fbb249657df8251c28c4faae
openjpeg/7476f0d4e77d3333fbb249657df8251c28c4faae
libwebp/7476f0d4e77d3333fbb249657df8251c28c4faae
libraw/7476f0d4e77d3333fbb249657df8251c28c4faae
jxrlib/7476f0d4e77d3333fbb249657df8251c28c4faae
openexr/7476f0d4e77d3333fbb249657df8251c28c4faae
imath/7476f0d4e77d3333fbb249657df8251c28c4faae
jasper/7476f0d4e77d3333fbb249657df8251c28c4faae all:jasper-no-freeglut.patch
liblzma/7476f0d4e77d3333fbb249657df8251c28c4faae
egl-registry/7476f0d4e77d3333fbb249657df8251c28c4faae
opengl-registry/7476f0d4e77d3333fbb249657df8251c28c4faae
opengl/7476f0d4e77d3333fbb249657df8251c28c4faae
#freeglut (cross platform window manager) not needed; problematic on some platforms, pulling in many, many dependencies
#vcpkg-cmake-config already added above for SDK
#vcpkg-cmake already added above for SDK
# pdfium libraries, specific version for build stability (preview/thumbnail generation for pdfs)
# no v8 (javascript execution) etc
pdfium/5247
pdfium-freetype/2-12-1
freetype[core,bzip2,png,zlib]/7476f0d4e77d3333fbb249657df8251c28c4faae
# dependencies of pdfium
icu/979a5197b3389cfdf91d0ac5d98b6066ce73fd7a all:off osx:on linux:on
icu/cb91b416cb8f85f0a55853baad23fb18d306148a all:on osx:off linux:off
lcms/c303dd024e2dc03a0665ddffbb12a1077933e649
icu/7476f0d4e77d3333fbb249657df8251c28c4faae
lcms/7476f0d4e77d3333fbb249657df8251c28c4faae
#libjpeg-turbo already added above for freeimage
#openjpeg already added above for freeimage
bzip2/c303dd024e2dc03a0665ddffbb12a1077933e649
bzip2/7476f0d4e77d3333fbb249657df8251c28c4faae
#libpng already added above for freeimage
# tests and tools
asio/c303dd024e2dc03a0665ddffbb12a1077933e649
gtest/c303dd024e2dc03a0665ddffbb12a1077933e649 all:gtest-warnings-are-not-errors.patch

View File

@ -0,0 +1,25 @@
diff --git a/portfile.cmake b/portfile.cmake
index 35bac875b..21757c545 100644
--- a/portfile.cmake
+++ b/portfile.cmake
@@ -536,6 +536,20 @@ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQU
endif()
endif()
+if(VCPKG_TARGET_IS_OSX)
+ execute_process(
+ COMMAND ${VCPKG_DETECTED_CMAKE_C_COMPILER} --version
+ OUTPUT_VARIABLE COMPILER_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ string(REGEX MATCH "[0-9]+\\.[0-9]+" COMP_ONLY_VERSION "${COMPILER_VERSION}")
+
+ if(NOT COMP_ONLY_VERSION VERSION_LESS "15.0")
+ string(APPEND OPTIONS " --extra-ldflags=-Wl,-ld_classic")
+ endif()
+endif()
+
if(VCPKG_TARGET_IS_UWP)
set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\")
string(APPEND OPTIONS " --disable-programs")

View File

@ -114,6 +114,7 @@ mkdir $megacmd_NAME/m4 #create m4 empty folder required in older autotools
mkdir -p $megacmd_NAME/contrib/
ln -s $BASEPATH/sdk/contrib/build_sdk.sh $megacmd_NAME/contrib/
ln -s $BASEPATH/sdk/contrib/FreeImageC99.diff $megacmd_NAME/contrib/
ln -s $archives $megacmd_NAME/archives
tar czfh $megacmd_NAME.tar.gz --exclude-vcs $megacmd_NAME

View File

@ -0,0 +1,159 @@
@echo off
IF "%1%" EQU "-help" (
goto Usage
)
SET MEGA_ARCH=32/64
SET MEGA_SKIP_32_BIT_BUILD=false
SET MEGA_SIGN=sign
SET MEGA_CORES=0
SET MEGA_VERSION_SUFFIX=
IF NOT "%1" == "" (
SET MEGA_ARCH=%1
SET MEGA_SIGN=%2
SET MEGA_CORES=%3
SET MEGA_VERSION_SUFFIX=%4
IF [%MEGA_VCPKGPATH%]==[] (
echo "Error: MEGA_VCPKGPATH environment variable is not set. Please set it."
goto Usage
)
:: CHECK NUMBER OF ARGUMENTS
IF "%3" == "" (
echo "Error: too few arguments"
goto Usage
)
IF NOT "%5" == "" (
echo "Error: too many arguments"
goto Usage
)
) ELSE (
IF [%MEGA_VCPKGPATH%]==[] (
SET MEGA_VCPKGPATH=C:\mega\dev\3rdparty_megacmd
)
)
IF [%MEGA_WIN_KITVER%]==[] (
SET MEGA_WIN_KITVER=10.0.22621.0
)
:: CHECK ARCHITECTURE
IF "%MEGA_ARCH%" EQU "64" (
echo "Info: Building x64 only"
SET MEGA_SKIP_32_BIT_BUILD=true
) ELSE (
IF "%MEGA_ARCH%" EQU "32/64" (
echo "Info: Building both x64 and x86"
) ELSE (
echo "Please add the architecture as first parameter: 64 or 32/64"
goto Usage
)
)
:: CHECK SIGN
IF "%MEGA_SIGN%" EQU "sign" (
echo "Info: Signed installer(s) will be generated"
) ELSE (
IF "%MEGA_SIGN%" EQU "nosign" (
echo "Info: Unsigned installer(s) will be generated"
SET MEGA_THIRD_PARTY_DLL_DIR=bin
) ELSE (
echo "Please add a correct sign argument: sign or nosign"
goto Usage
)
)
:: CHECK CORES
SET "VALID_CORES=1"
IF %MEGA_CORES% LSS 0 (
SET "VALID_CORES=0"
)
IF %MEGA_CORES% GTR 16 (
SET "VALID_CORES=0"
)
IF %MEGA_CORES% EQU 0 (
FOR /f "tokens=2 delims==" %%f IN ('wmic cpu get NumberOfLogicalProcessors /value ^| find "="') DO SET MEGA_CORES=%%f
)
IF %VALID_CORES% EQU 0 (
echo "Please add a correct core argument: 1 to 16, or 0 for default value"
goto Usage
)
echo "Info: CORES SET to %MEGA_CORES%"
REM Clean up any previous leftovers
IF EXIST built32 (
rmdir /s /q built32
)
IF EXIST sign32 (
rmdir /s /q sign32
)
IF EXIST built64 (
rmdir /s /q built64
)
IF EXIST sign64 (
rmdir /s /q sign64
)
IF [%SKIP_BUILD_PRODUCTS%]==[] (
IF EXIST build-x64-windows-mega (
rmdir /s /q build-x64-windows-mega
)
IF EXIST build-x86-windows-mega (
rmdir /s /q build-x86-windows-mega
)
)
IF [%SKIP_BUILD_THIRD_PARTIES%]==[] (
echo calling build_3rd_parties.cmd %MEGA_ARCH%
call build_3rd_parties.cmd %MEGA_ARCH% || exit 1 /b
)
IF NOT [%ONLY_BUILD_THIRD_PARTIES%]==[] (
exit /b
)
IF [%SKIP_BUILD_PRODUCTS%]==[] (
echo calling production_build.cmd
call production_build.cmd || exit 1 /b
)
echo calling gather_built_products.cmd
call gather_built_products.cmd || exit 1 /b
echo calling make_uninstallers.cmd
call make_uninstallers.cmd || exit 1 /b
IF "%MEGA_SIGN%" EQU "sign" (
echo time to sign the executables in built32/64 folders
REM TODO: here in case of IF "%MEGA_SIGN%" EQU "sign" , the signing would need to take place, replacing the built .exes with the signed ones
echo gathering signed executables in the built folders
call gather_signed_products.cmd || exit 1 /b
)
echo calling make_installers.cmd
call make_installers.cmd %MEGA_SIGN% || exit 1 /b
REM TODO: Pending signing the installers themselves!
exit /B
:Usage
echo "Usage: %~0 [-help] [64|32/64 sign|nosign <cores number> [<suffix>]]"
echo Script building, signing and creating the installer(s)
echo It can take 0, 1, 3 or 4 arguments:
echo - -help: this message
echo - 0 arguments: use these settings: 32/64 sign 1
echo - Architecture : 64 or 32/64 to build either for 64 bit or both 32 and 64 bit
echo - Sign: sign or nosign if the binaries must be signed or not
echo - Cores: the number of cores to build the project, or 0 for default value (number of logical cores on the machine)
echo - Suffix for installer: The installer will add this suffix to the version. [OPTIONAl]
echo MEGA_VCPKGPATH environment variable should be set to the root of the 3rd party dir.
echo SKIP_BUILD_THIRD_PARTIES environment variable can be used to skip the attempt to build vcpkg 3rd parties
echo ONLY_BUILD_THIRD_PARTIES environment variable can be used to stop after building 3rd parties
echo MEGA_WIN_KITVER environment variable can be used to set the Windows sdk to use. Value defaults to "10.0.22621.0". Set to "." to use the Universal Kit
exit /B

View File

@ -1,30 +1,52 @@
REM Build with (from MEGAcmd folder)
REM
REM mkdir x64-windows-mega
REM cd x64-windows-mega
REM cmake -G "Visual Studio 15 2017" -A x64 -DMega3rdPartyDir=C:\Users\build\MEGA\build-MEGAcmd\3rdParty_MSVC2017_20210302\3rdParty_megacmd -DVCPKG_TRIPLET=x64-windows-mega -S "..\build\cmake" -B .
REM cmake --build . --config Release
REM
REM mkdir x86-windows-mega
REM cd x86-windows-mega
REM cmake -G "Visual Studio 15 2017" -A Win32 -DMega3rdPartyDir=C:\Users\build\MEGA\build-MEGAcmd\3rdParty_MSVC2017_20210302\3rdParty_megacmd -DVCPKG_TRIPLET=x86-windows-mega -S "..\build\cmake" -B .
REM cmake --build . --config Release
IF [%MEGA_VCPKGPATH%]==[] (
SET MEGA_VCPKGPATH="C:\mega\dev\3rdparty_megacmd"
)
IF [%MEGA_THIRD_PARTY_DLL_DIR%]==[] (
SET MEGA_THIRD_PARTY_DLL_DIR=bin_dlls_signed
)
mkdir built64
mkdir sign64
SET BASEMEGACMDPATH=.
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\*.dll built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAclient.exe built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdServer.exe built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdShell.exe built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdUpdater.exe built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\*.pdb built64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAclient.exe sign64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdServer.exe sign64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdShell.exe sign64
copy %BASEMEGACMDPATH%\build-x64-windows-mega\Release\MEGAcmdUpdater.exe sign64
set "MEGA_VCPKGPATH_COPYABLE=%MEGA_VCPKGPATH:/=\%"
copy %MEGA_VCPKGPATH_COPYABLE%\vcpkg\installed\x64-windows-mega\%MEGA_THIRD_PARTY_DLL_DIR%\*.* built64
IF "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
GOTO :EOF
)
mkdir built32
mkdir built64
mkdir sign32
copy ..\build-x64-windows-mega\Release\MEGAcmdServer.exe built64
copy ..\build-x64-windows-mega\Release\MEGAcmdShell.exe built64
copy ..\build-x64-windows-mega\Release\MEGAclient.exe built64
copy ..\build-x64-windows-mega\Release\MEGAcmdUpdater.exe built64
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\*.dll built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAclient.exe built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdServer.exe built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdShell.exe built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdUpdater.exe built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\*.pdb built32
copy ..\build-x86-windows-mega\Release\MEGAcmdServer.exe built32
copy ..\build-x86-windows-mega\Release\MEGAcmdShell.exe built32
copy ..\build-x86-windows-mega\Release\MEGAclient.exe built32
copy ..\build-x86-windows-mega\Release\MEGAcmdUpdater.exe built32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAclient.exe sign32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdServer.exe sign32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdShell.exe sign32
copy %BASEMEGACMDPATH%\build-x86-windows-mega\Release\MEGAcmdUpdater.exe sign32
copy C:\Users\build\MEGA\build-MEGAcmd\3rdParty_MSVC2019_20211206\3rdParty_megacmd\vcpkg\installed\x64-windows-mega\bin_signed\*.* built64
copy C:\Users\build\MEGA\build-MEGAcmd\3rdParty_MSVC2019_20211206\3rdParty_megacmd\vcpkg\installed\x86-windows-mega\bin_signed\*.* built32
REM copy scritps??
copy %MEGA_VCPKGPATH_COPYABLE%\vcpkg\installed\x86-windows-mega\%MEGA_THIRD_PARTY_DLL_DIR%\*.* built32

View File

@ -0,0 +1,32 @@
:: CHECK SIGN
:Check
echo Info: Checking if sources are signed
"C:\Program Files (x86)\Windows Kits\10\bin\%MEGA_WIN_KITVER%\x64\signtool.exe" verify /pa sign64/*.exe >nul || goto SleepAndRetry
IF NOT "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
"C:\Program Files (x86)\Windows Kits\10\bin\%MEGA_WIN_KITVER%\x64\signtool.exe" verify /pa sign32/*.exe >nul || goto SleepAndRetry
)
echo Signed executables found. Will copy them to builtXX folders
REM Copying signed installers
copy sign64\* built64
copy sign32\* built32
exit /b
:SleepAndRetry
IF [%MSYSTEM%]==[MINGW64] (
REM pause or set \p freezed mingw bash and there are no builtin mechanism for Batch to sleep, using python for it:
echo "you need to place signed executables in sign folders. The signature verification will be retry in 30 seconds"
python -c "import time; time.sleep(30)"
) else (
echo You need to place signed executables in sign folders. After that,
pause
)
goto Check
exit 2 /b

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleIconFile</key>
<string>app.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>MEGAcmd</string>
<key>LSUIElement</key>
<string>1</string>
<key>CFBundleIdentifier</key>
<string>megacmd.mac</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>

Binary file not shown.

View File

@ -1,22 +1,17 @@
#!/bin/zsh -e
Usage () {
echo "Usage: installer_mac.sh [[--build | --build-cmake] | [--sign] | [--create-dmg] | [--notarize] | [--full-pkg | --full-pkg-cmake]]"
echo " --build : Builds the app and creates the bundle using qmake."
echo " --build-cmake : Idem but using cmake"
echo " --sign : Sign the app"
echo " --create-dmg : Create the dmg package"
echo " --notarize : Notarize package against Apple systems."
echo " --full-pkg : Implies and overrides all the above using qmake"
echo " --full-pkg-cmake : Idem but using cmake"
echo "Usage: installer_mac.sh [--arch [arm64|x86_64|universal]] [--build] | [--sign] | [--create-dmg] | [--notarize] | [--full-pkg]"
echo " --build : Builds the app and creates the bundle using cmake"
echo " --sign : Sign the app"
echo " --create-dmg : Create the dmg package"
echo " --notarize : Notarize package against Apple systems."
echo " --full-pkg : Implies and overrides all the above"
echo " --arch [arm64|x86_64|universal] : Arch target. It will use the host arch if none specified."
echo ""
echo "Environment variables needed to build:"
echo " MEGAQTPATH : Point it to a valid Qt installation path"
echo " VCPKGPATH : Point it to a directory containing a valid vcpkg installation"
echo ""
echo "Note: --build and --build-cmake are mutually exclusive."
echo " --full-pkg and --full-pkg-cmake are mutually exclusive."
echo ""
}
if [ $# -eq 0 ]; then
@ -25,7 +20,7 @@ if [ $# -eq 0 ]; then
fi
APP_NAME=MEGAcmd
ID_BUNDLE=mega.mac
VOLUME_NAME="Install MEGAcmd"
MOUNTDIR=tmp
RESOURCES=installer/resourcesDMG
@ -35,23 +30,28 @@ SHELL_PREFIX=MEGAcmdShell/
LOADER_PREFIX=MEGAcmdLoader/
UPDATER_PREFIX=MEGAcmdUpdater/
host_arch=`uname -m`
target_arch=${host_arch}
full_pkg=0
full_pkg_cmake=0
build=0
build_cmake=0
sign=0
createdmg=0
notarize=0
sign_time=0
dmg_time=0
notarize_time=0
total_time=0
while [ "$1" != "" ]; do
case $1 in
--arch )
shift
target_arch="${1}"
if [ "${target_arch}" != "arm64" ] && [ "${target_arch}" != "x86_64" ] && [ "${target_arch}" != "universal" ]; then Usage; echo "Error: Invalid arch value."; exit 1; fi
;;
--build )
build=1
if [ ${build_cmake} -eq 1 ]; then Usage; echo "Error: --build and --build-cmake are mutually exclusive."; exit 1; fi
;;
--build-cmake )
build_cmake=1
if [ ${build} -eq 1 ]; then Usage; echo "Error: --build and --build-cmake are mutually exclusive."; exit 1; fi
;;
--sign )
sign=1
@ -63,19 +63,15 @@ while [ "$1" != "" ]; do
notarize=1
;;
--full-pkg )
if [ ${full_pkg_cmake} -eq 1 ]; then Usage; echo "Error: --full-pkg and --full-pkg-cmake are mutually exclusive."; exit 1; fi
full_pkg=1
;;
--full-pkg-cmake )
if [ ${full_pkg} -eq 1 ]; then Usage; echo "Error: --full-pkg and --full-pkg-cmake are mutually exclusive."; exit 1; fi
full_pkg_cmake=1
;;
-h | --help )
Usage
exit
;;
* )
Usage
echo "Unknown parameter: ${1}"
exit 1
esac
shift
@ -83,276 +79,245 @@ done
if [ ${full_pkg} -eq 1 ]; then
build=1
build_cmake=0
sign=1
createdmg=1
notarize=1
fi
if [ ${full_pkg_cmake} -eq 1 ]; then
build=0
build_cmake=1
sign=1
createdmg=1
notarize=1
fi
if [ ${build} -eq 1 -o ${build_cmake} -eq 1 ]; then
if [ -z "${MEGAQTPATH}" ] || [ ! -d "${MEGAQTPATH}/bin" ]; then
echo "Please set MEGAQTPATH env variable to a valid QT installation path!"
exit 1;
fi
if [ ${build} -ne 1 -a ${sign} -ne 1 -a ${createdmg} -ne 1 -a ${notarize} -ne 1 ]; then
Usage
echo "Error: No action selected. Nothing to do."
exit 1
fi
build_archs=${target_arch}
if [ "$target_arch" = "universal" ]; then
build_archs=(arm64 x86_64)
fi
for build_arch in $build_archs; do
eval build_time_${build_arch}=0
done
if [ ${build} -eq 1 ]; then
for build_arch in $build_archs; do
build_time_start=`date +%s`
if [ -z "${VCPKGPATH}" ] || [ ! -d "${VCPKGPATH}/vcpkg/installed" ]; then
echo "Please set VCPKGPATH env variable to a directory containing a valid vcpkg installation!"
exit 1;
fi
MEGAQTPATH="$(cd "$MEGAQTPATH" && pwd -P)"
echo "Building with:"
echo " MEGAQTPATH : ${MEGAQTPATH}"
echo " VCPKGPATH : ${VCPKGPATH}"
if [ ${build_cmake} -ne 1 ]; then
AVCODEC_VERSION=libavcodec.58.dylib
AVFORMAT_VERSION=libavformat.58.dylib
AVUTIL_VERSION=libavutil.56.dylib
SWSCALE_VERSION=libswscale.5.dylib
CARES_VERSION=libcares.2.dylib
CURL_VERSION=libcurl.dylib
AVCODEC_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$AVCODEC_VERSION
AVFORMAT_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$AVFORMAT_VERSION
AVUTIL_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$AVUTIL_VERSION
SWSCALE_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$SWSCALE_VERSION
CARES_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$CARES_VERSION
CURL_PATH=${VCPKGPATH}/vcpkg/installed/x64-osx-mega/lib/$CURL_VERSION
fi
# Clean previous build
rm -rf Release_x64
mkdir Release_x64
cd Release_x64
[ -z "${SKIP_REMOVAL}" ] && rm -rf Release_${build_arch}
mkdir Release_${build_arch} || true
cd Release_${build_arch}
# Build binaries
if [ ${build_cmake} -eq 1 ]; then
#cmake -DUSE_THIRDPARTY_FROM_VCPKG=1 -DUSE_PREBUILT_3RDPARTY=0 -DCMAKE_PREFIX_PATH=${MEGAQTPATH} -DVCPKG_TRIPLET=x64-osx-mega -DMega3rdPartyDir=${VCPKGPATH} -S ../contrib/cmake
#cmake --build ./ --target MEGAcmd -j`sysctl -n hw.ncpu`
#cmake --build ./ --target MEGAclient -j`sysctl -n hw.ncpu`
#cmake --build ./ --target MEGAcmdShell -j`sysctl -n hw.ncpu`
#cmake --build ./ --target MEGAcmdLoader -j`sysctl -n hw.ncpu`
#cmake --build ./ --target MEGAcmdUpdater -j`sysctl -n hw.ncpu`
SERVER_PREFIX=""
CLIENT_PREFIX=""
SHELL_PREFIX=""
LOADER_PREFIX=""
UPDATER_PREFIX=""
else
[ ! -f ../../sdk/include/mega/config.h ] && cp ../../sdk/contrib/official_build_configs/macos/config.h ../../sdk/include/mega/config.h
${MEGAQTPATH}/bin/qmake "THIRDPARTY_VCPKG_BASE_PATH=${VCPKGPATH}" -r ../../contrib/QtCreator/MEGAcmd/ -spec macx-clang CONFIG+=release CONFIG+=x86_64 -nocache
make -j`sysctl -n hw.ncpu`
# Detect crosscompilation and set CMAKE_OSX_ARCHITECTURES.
if [ "${build_arch}" != "${host_arch}" ]; then
CMAKE_EXTRA="-DCMAKE_OSX_ARCHITECTURES=${build_arch}"
fi
# Prepare MEGAcmd (server, mega-cmd) bundle
cp -R ${SERVER_PREFIX}MEGAcmd.app ${SERVER_PREFIX}MEGAcmd_orig.app
${MEGAQTPATH}/bin/macdeployqt ${SERVER_PREFIX}MEGAcmd.app -no-strip
dsymutil ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmd -o MEGAcmd.app.dSYM
strip ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmd
cmake -DUSE_THIRDPARTY_FROM_VCPKG=1 -DMega3rdPartyDir=${VCPKGPATH} -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_EXTRA} -S ..//cmake
cmake --build ./ --target mega-cmd -j`sysctl -n hw.ncpu`
cmake --build ./ --target mega-exec -j`sysctl -n hw.ncpu`
cmake --build ./ --target mega-cmd-server -j`sysctl -n hw.ncpu`
cmake --build ./ --target mega-cmd-updater -j`sysctl -n hw.ncpu`
SERVER_PREFIX=""
CLIENT_PREFIX=""
SHELL_PREFIX=""
LOADER_PREFIX=""
UPDATER_PREFIX=""
# Prepare MEGAclient (mega-exec) bundle
${MEGAQTPATH}/bin/macdeployqt ${CLIENT_PREFIX}MEGAclient.app -no-strip
dsymutil ${CLIENT_PREFIX}MEGAclient.app/Contents/MacOS/MEGAclient -o MEGAclient.dSYM
strip ${CLIENT_PREFIX}MEGAclient.app/Contents/MacOS/MEGAclient
# create folder structure
mkdir -p ${APP_NAME}.app/Contents/Frameworks
mkdir -p ${APP_NAME}.app/Contents/MacOS
mkdir -p ${APP_NAME}.app/Contents/Resources
# Prepare MEGAcmdSell bundle
${MEGAQTPATH}/bin/macdeployqt ${SHELL_PREFIX}MEGAcmdShell.app -no-strip
dsymutil ${SHELL_PREFIX}MEGAcmdShell.app/Contents/MacOS/MEGAcmdShell -o MEGAcmdShell.dSYM
strip ${SHELL_PREFIX}MEGAcmdShell.app/Contents/MacOS/MEGAcmdShell
# place (and strip) executables
typeset -A execOriginTarget
execOriginTarget[mega-exec]=mega-exec
execOriginTarget[mega-cmd]=MEGAcmdShell
execOriginTarget[mega-cmd-updater]=MEGAcmdUpdater
execOriginTarget[mega-cmd-server]=mega-cmd
# Prepare MEGAcmdLoader bundle
${MEGAQTPATH}/bin/macdeployqt ${LOADER_PREFIX}MEGAcmdLoader.app -no-strip
dsymutil ${LOADER_PREFIX}MEGAcmdLoader.app/Contents/MacOS/MEGAcmdLoader -o MEGAcmdLoader.dSYM
strip ${LOADER_PREFIX}MEGAcmdLoader.app/Contents/MacOS/MEGAcmdLoader
for k in "${(@k)execOriginTarget}"; do
dsymutil $k -o $execOriginTarget[$k].dSYM
cp $k ${APP_NAME}.app/Contents/MacOS/$execOriginTarget[$k]
strip ${APP_NAME}.app/Contents/MacOS/$execOriginTarget[$k]
# have dylibs use relative paths:
for i in $(otool -L ${APP_NAME}.app/Contents/MacOS/$execOriginTarget[$k] | grep dylib | grep -v "\t/usr/lib" | awk '{print $1}'); do
install_name_tool -change $i "@executable_path/../Frameworks/"$(basename $i) ${APP_NAME}.app/Contents/MacOS/$execOriginTarget[$k];
done
done
# Prepare MEGAcmdUpdater bundle
${MEGAQTPATH}/bin/macdeployqt ${UPDATER_PREFIX}MEGAcmdUpdater.app -no-strip
dsymutil ${UPDATER_PREFIX}MEGAcmdUpdater.app/Contents/MacOS/MEGAcmdUpdater -o MEGAcmdUpdater.dSYM
strip ${UPDATER_PREFIX}MEGAcmdUpdater.app/Contents/MacOS/MEGAcmdUpdater
# copy initialize script (it will simple launch MEGAcmdLoader in a terminal) as the new main executable: MEGAcmd
cp ../installer/MEGAcmd.sh ${APP_NAME}.app/Contents/MacOS/MEGAcmd
# Copy client scripts and completion into package contents
cp ../../src/client/mega-* ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/
cp ../../src/client/megacmd_completion.sh ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/
# place commands and completion scripts
cp ../../src/client/mega-* ${APP_NAME}.app/Contents/MacOS/
cp ../../src/client/megacmd_completion.sh ${APP_NAME}.app/Contents/MacOS/
# Rename exec MEGAcmd (aka: MEGAcmdServer) to mega-cmd and add it to package contents
mv ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmd ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/mega-cmd
# Copy initialize script (it will simple launch MEGAcmdLoader in a terminal) as the new main executable: MEGAcmd
cp ../installer/MEGAcmd.sh ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmd
# Rename MEGAClient to mega-exec and add it to package contents
mv ${CLIENT_PREFIX}MEGAclient.app/Contents/MacOS/MEGAclient ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/mega-exec
# Add MEGAcmdLoader into package contents
mv ${LOADER_PREFIX}MEGAcmdLoader.app/Contents/MacOS/MEGAcmdLoader ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmdLoader
# Add MEGAcmdUpdater into package contents
mv ${UPDATER_PREFIX}MEGAcmdUpdater.app/Contents/MacOS/MEGAcmdUpdater ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmdUpdater
# Add MEGAcmdShell into package contents
mv ${SHELL_PREFIX}MEGAcmdShell.app/Contents/MacOS/MEGAcmdShell ${SERVER_PREFIX}MEGAcmd.app/Contents/MacOS/MEGAcmdShell
# place dylibs
for i in $(otool -L ./mega-cmd ./mega-cmd-server ./mega-cmd-updater ./mega-exec | grep dylib | grep -v "\t/usr/lib" | sort | uniq | grep -o "lib[a-x0-9\.]*dylib"); do
# copy dylib into its place
libinAppPath=${APP_NAME}.app/Contents/Frameworks/$i
cp "${VCPKGPATH}"/vcpkg/installed/${build_arch//x86_64/x64}-osx-mega/lib/$i $libinAppPath;
# have their ids matching the relative one that will be set in the executable
install_name_tool -id "@executable_path/../Frameworks/"$(basename $i) ${libinAppPath};
# and have their linked dylibs use relative paths too:
for l in $(otool -L ${libinAppPath} | grep dylib | grep "^\t" | grep -v "\t/usr/lib" | grep -v "executable_path" | awk '{print $1}'); do
install_name_tool -change $l "@executable_path/../Frameworks/"$(basename $l) ${libinAppPath};
done
done;
# place icns
cp ../../contrib/QtCreator/MEGAcmd/MEGAcmdServer/app.icns ${APP_NAME}.app/Contents/Resources/app.icns
#place PkgInfo
echo 'APPL????' > ${APP_NAME}.app/Contents/PkgInfo
#place empty empty.lproj
touch ${APP_NAME}.app/Contents/Resources/empty.lproj
#place Info.plist
cp ../installer/Info.plist ${APP_NAME}.app/Contents/Info.plist
if [ ${build_cmake} -ne 1 ]; then
# update version into Info.plist
MEGACMD_VERSION=`grep -o "[0-9][0-9]*$" ../../src/megacmdversion.h | head -n 3 | paste -s -d '.' -`
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $MEGACMD_VERSION" "$APP_NAME.app/Contents/Info.plist"
# Remove unneded Qt stuff
rm -rf ${SERVER_PREFIX}MEGAcmd.app/Contents/Plugins
rm -rf ${SERVER_PREFIX}MEGAcmd.app/Contents/Resources/qt.conf
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVCODEC_VERSION ] && cp -L $AVCODEC_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVFORMAT_VERSION ] && cp -L $AVFORMAT_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVUTIL_VERSION ] && cp -L $AVUTIL_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$SWSCALE_VERSION ] && cp -L $SWSCALE_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$CARES_VERSION ] && cp -L $CARES_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
[ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$CURL_VERSION ] && cp -L $CURL_PATH MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/
if [ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVCODEC_VERSION ] \
|| [ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVFORMAT_VERSION ] \
|| [ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$AVUTIL_VERSION ] \
|| [ ! -f MEGAcmdServer/MEGAcmd.app/Contents/Frameworks/$SWSCALE_VERSION ];
then
echo "Error copying FFmpeg libs to app bundle."
exit 1
fi
fi
#MEGASYNC_VERSION=`grep "const QString Preferences::VERSION_STRING" ../src/MEGASync/control/Preferences.cpp | awk -F '"' '{print $2}'`
#/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $MEGASYNC_VERSION" "${MSYNC_PREFIX}$APP_NAME.app/Contents/Info.plist"
if [ ${build_cmake} -ne 1 ]; then
rm -r $APP_NAME.app || :
mv ${SERVER_PREFIX}$APP_NAME.app ./
fi
otool -L MEGAcmd.app/Contents/MacOS/mega-cmd
otool -L MEGAcmd.app/Contents/MacOS/mega-exec
otool -L MEGAcmd.app/Contents/MacOS/MEGAcmdLoader
otool -L MEGAcmd.app/Contents/MacOS/MEGAcmdUpdater
otool -L MEGAcmd.app/Contents/MacOS/MEGAcmdShell
otool -L ${APP_NAME}.app/Contents/MacOS/mega-cmd
otool -L ${APP_NAME}.app/Contents/MacOS/mega-exec
otool -L ${APP_NAME}.app/Contents/MacOS/MEGAcmdLoader || true
otool -L ${APP_NAME}.app/Contents/MacOS/MEGAcmdUpdater
otool -L ${APP_NAME}.app/Contents/MacOS/MEGAcmdShell
cd ..
eval build_time_${build_arch}=`expr $(date +%s) - $build_time_start`
unset build_time_start
done
fi
if [ "$target_arch" = "universal" ]; then
# Remove Release_universal folder (despite SKIP_REMOVAL, since it does not contain previous compilation results)
rm -rf Release_${target_arch} || true
for i in `find Release_arm64/MEGAcmd.app -type d`; do mkdir -p $i ${i/Release_arm64/Release_universal}; done
# copy x86_64 files
for i in `find Release_x86_64/MEGAcmd.app -type f`; do
cp $i ${i/Release_x86_64/Release_universal}
done
# replace them by arm64
for i in `find Release_arm64/MEGAcmd.app -type f`; do
cp $i ${i/Release_arm64/Release_universal};
done
# merge binaries:
for i in `find Release_arm64/MEGAcmd.app -type f ! -size 0 ! -name app.icns | perl -lne 'print if -B'`; do
lipo -create $i ${i/Release_arm64/Release_x86_64} -output ${i/Release_arm64/Release_universal} || true;
done
fi
if [ "$sign" = "1" ]; then
cd Release_x64
cp -R $APP_NAME.app ${APP_NAME}_unsigned.app
echo "Signing 'APPBUNDLE'"
codesign --force --verify --verbose --preserve-metadata=entitlements --options runtime --sign "Developer ID Application: Mega Limited" --deep $APP_NAME.app
echo "Checking signature"
spctl -vv -a $APP_NAME.app
cd ..
sign_time_start=`date +%s`
cd Release_${target_arch}
cp -R $APP_NAME.app ${APP_NAME}_unsigned.app
echo "Signing 'APPBUNDLE'"
codesign --force --verify --verbose --preserve-metadata=entitlements --options runtime --sign "Developer ID Application: Mega Limited" --deep $APP_NAME.app
echo "Checking signature"
spctl -vv -a $APP_NAME.app
cd ..
sign_time=`expr $(date +%s) - $sign_time_start`
fi
if [ "$createdmg" = "1" ]; then
cd Release_x64
[ -f $APP_NAME.dmg ] && rm $APP_NAME.dmg
echo "DMG CREATION PROCESS..."
echo "Creating temporary Disk Image (1/7)"
#Create a temporary Disk Image
/usr/bin/hdiutil create -srcfolder $APP_NAME.app/ -volname $APP_NAME -ov $APP_NAME-tmp.dmg -fs HFS+ -format UDRW >/dev/null
dmg_time_start=`date +%s`
cd Release_${target_arch}
[ -f $APP_NAME.dmg ] && rm $APP_NAME.dmg
echo "DMG CREATION PROCESS..."
echo "Creating temporary Disk Image (1/7)"
#Create a temporary Disk Image
/usr/bin/hdiutil create -srcfolder $APP_NAME.app/ -volname $VOLUME_NAME -ov $APP_NAME-tmp.dmg -fs HFS+ -format UDRW >/dev/null
echo "Attaching the temporary image (2/7)"
#Attach the temporary image
mkdir $MOUNTDIR
/usr/bin/hdiutil attach $APP_NAME-tmp.dmg -mountroot $MOUNTDIR >/dev/null
echo "Attaching the temporary image (2/7)"
#Attach the temporary image
mkdir $MOUNTDIR
/usr/bin/hdiutil attach $APP_NAME-tmp.dmg -mountroot $MOUNTDIR >/dev/null
echo "Copying resources (3/7)"
#Copy the background, the volume icon and DS_Store files
unzip -d $MOUNTDIR/$APP_NAME ../$RESOURCES.zip
/usr/bin/SetFile -a C $MOUNTDIR/$APP_NAME
echo "Copying resources (3/7)"
#Copy the background, the volume icon and DS_Store files
unzip -d $MOUNTDIR/$VOLUME_NAME ../$RESOURCES.zip
/usr/bin/SetFile -a C $MOUNTDIR/$VOLUME_NAME
echo "Adding symlinks (4/7)"
#Add a symbolic link to the Applications directory
ln -s /Applications/ $MOUNTDIR/$APP_NAME/Applications
echo "Adding symlinks (4/7)"
#Add a symbolic link to the Applications directory
ln -s /Applications/ $MOUNTDIR/$VOLUME_NAME/Applications
echo "Detaching temporary Disk Image (5/7)"
#Detach the temporary image
/usr/bin/hdiutil detach $MOUNTDIR/$APP_NAME >/dev/null
# Delete unnecessary file system events log if possible
echo "Deleting .fseventsd"
rm -rf $MOUNTDIR/$VOLUME_NAME/.fseventsd || true
echo "Compressing Image (6/7)"
#Compress it to a new image
/usr/bin/hdiutil convert $APP_NAME-tmp.dmg -format UDZO -o $APP_NAME.dmg >/dev/null
echo "Detaching temporary Disk Image (5/7)"
#Detach the temporary image
/usr/bin/hdiutil detach $MOUNTDIR/$VOLUME_NAME >/dev/null
echo "Deleting temporary image (7/7)"
#Delete the temporary image
rm $APP_NAME-tmp.dmg
rmdir $MOUNTDIR
cd ..
echo "Compressing Image (6/7)"
#Compress it to a new image
/usr/bin/hdiutil convert $APP_NAME-tmp.dmg -format UDZO -o $APP_NAME.dmg >/dev/null
echo "Deleting temporary image (7/7)"
#Delete the temporary image
rm $APP_NAME-tmp.dmg
rmdir $MOUNTDIR
cd ..
dmg_time=`expr $(date +%s) - $dmg_time_start`
fi
if [ "$notarize" = "1" ]; then
notarize_time_start=`date +%s`
cd Release_${target_arch}
if [ ! -f $APP_NAME.dmg ];then
echo ""
echo "There is no dmg to be notarized."
echo ""
exit 1
fi
cd Release_x64
if [ ! -f $APP_NAME.dmg ];then
echo ""
echo "There is no dmg to be notarized."
echo ""
exit 1
fi
echo "Sending dmg for notarization (1/3)"
rm querystatus.txt staple.txt || :
xcrun notarytool submit $APP_NAME.dmg --keychain-profile "AC_PASSWORD" --wait 2>&1 | tee notarylog.txt
echo >> notarylog.txt
echo "NOTARIZATION PROCESS..."
echo "Getting USERNAME for notarization commands (1/7)"
xcrun stapler staple -v $APP_NAME.dmg 2>&1 | tee -a notarylog.txt
AC_USERNAME=$(security find-generic-password -s AC_PASSWORD | grep acct | cut -d '"' -f 4)
if [[ -z "$AC_USERNAME" ]]; then
echo "Error USERNAME not found for notarization process. You should add item named AC_PASSWORD with and account value matching the username to macOS keychain"
false
fi
echo "Stapling ok (2/3)"
echo "Sending dmg for notarization (2/7)"
xcrun altool --notarize-app -t osx -f $APP_NAME.dmg --primary-bundle-id $ID_BUNDLE -u $AC_USERNAME -p "@keychain:AC_PASSWORD" --output-format xml 2>&1 > staple.txt
RUUID=$(cat staple.txt | grep RequestUUID -A 1 | tail -n 1 | awk -F "[<>]" '{print $3}')
echo $RUUID
if [ ! -z "$RUUID" ] ; then
echo "Received UUID for notarization request. Checking state... (3/7)"
attempts=60
while [ $attempts -gt 0 ]
do
echo "Querying state of notarization..."
xcrun altool --notarization-info $RUUID -u $AC_USERNAME -p "@keychain:AC_PASSWORD" --output-format xml 2>&1 > querystatus.txt
RUUIDQUERY=$(cat querystatus.txt | grep RequestUUID -A 1 | tail -n 1 | awk -F "[<>]" '{print $3}')
if [[ "$RUUID" != "$RUUIDQUERY" ]]; then
echo "UUIDs missmatch"
false
fi
#Mount dmg volume to check if app bundle is notarized
echo "Checking signature and notarization (3/3)"
mkdir $MOUNTDIR || :
hdiutil attach $APP_NAME.dmg -mountroot $MOUNTDIR >/dev/null
spctl --assess -vv -a $MOUNTDIR/$VOLUME_NAME/$APP_NAME.app
hdiutil detach $MOUNTDIR/$VOLUME_NAME >/dev/null
rmdir $MOUNTDIR
STATUS=$(cat querystatus.txt | grep -i ">Status<" -A 1 | tail -n 1 | awk -F "[<>]" '{print $3}')
if [[ $STATUS == "invalid" ]]; then
echo "INVALID status. Check file querystatus.txt for further information"
echo $STATUS
break
elif [[ $STATUS == "success" ]]; then
echo "Notarized ok. Stapling dmg file..."
xcrun stapler staple -v $APP_NAME.dmg
echo "Stapling ok"
#Mount dmg volume to check if app bundle is notarized
echo "Checking signature and notarization"
mkdir $MOUNTDIR || :
hdiutil attach $APP_NAME.dmg -mountroot $MOUNTDIR >/dev/null
spctl -v -a $MOUNTDIR/$APP_NAME/$APP_NAME.app
hdiutil detach $MOUNTDIR/$APP_NAME >/dev/null
rmdir $MOUNTDIR
break
else
echo $STATUS
fi
attempts=$((attempts - 1))
sleep 30
done
if [[ $attempts -eq 0 ]]; then
echo "Notarization still in process, timed out waiting for the process to end"
false
fi
fi
cd ..
cd ..
notarize_time=`expr $(date +%s) - $notarize_time_start`
fi
echo "DONE"
echo ""
if [ ${build} -eq 1 ]; then for build_arch in $build_archs; do echo "Build ${build_arch}: ${(P)$(echo build_time_${build_arch})} s"; done; fi
if [ ${sign} -eq 1 ]; then echo "Sign: ${sign_time} s"; fi
if [ ${createdmg} -eq 1 ]; then echo "dmg: ${dmg_time} s"; fi
if [ ${notarize} -eq 1 ]; then echo "Notarization: ${notarize_time} s"; fi
echo ""
echo "DONE in "`expr $(for build_arch in $build_archs; do echo "${(P)$(echo build_time_${build_arch})} + "; done) ${sign_time} + ${dmg_time} + ${notarize_time}`" s"

View File

@ -5,9 +5,11 @@ RequestExecutionLevel user
Unicode true
#!define BUILD_UNINSTALLER
!define BUILD_X64_VERSION
#!define BUILD_X64_VERSION
#!define ENABLE_DEBUG_MESSAGES
#!define WINKITVER "${WINKITVER}"
!macro DEBUG_MSG message
!ifdef ENABLE_DEBUG_MESSAGES
MessageBox MB_OK "${message}"
@ -24,10 +26,10 @@ VIAddVersionKey "LegalCopyright" "MEGA Limited 2019"
VIAddVersionKey "ProductName" "MEGAcmd"
; Version info
VIProductVersion "1.6.3.0"
VIAddVersionKey "FileVersion" "1.6.3.0"
VIAddVersionKey "ProductVersion" "1.6.3.0"
!define PRODUCT_VERSION "1.6.3"
VIProductVersion "1.7.0.0"
VIAddVersionKey "FileVersion" "1.7.0.0"
VIAddVersionKey "ProductVersion" "1.7.0.0"
!define PRODUCT_VERSION "1.7.0"
!define PRODUCT_PUBLISHER "Mega Limited"
!define PRODUCT_WEB_SITE "http://www.mega.nz"
@ -193,6 +195,7 @@ Name $APP_NAME
!ifdef BUILD_UNINSTALLER
OutFile "UninstallerGenerator.exe"
!else
!pragma warning disable 6020 ; Disable warning: Uninstaller script code found but WriteUninstaller never used - no uninstaller will be created
!ifdef BUILD_X64_VERSION
OutFile "MEGAcmdSetup64.exe"
!else
@ -367,47 +370,47 @@ modeselected:
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\concrt140.dll" "$INSTDIR\concrt140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\vccorlib140.dll" "$INSTDIR\vccorlib140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.OpenMP\vcomp140.dll" "$INSTDIR\vcomp140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\ucrtbase.dll" "$INSTDIR\ucrtbase.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-utility-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-time-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-string-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-stdio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-runtime-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-process-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-private-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-private-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-multibyte-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-math-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-locale-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-filesystem-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-environment-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-convert-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-conio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-util-l1-1-0.dll" "$INSTDIR\api-ms-win-core-util-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-timezone-l1-1-0.dll" "$INSTDIR\api-ms-win-core-timezone-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-sysinfo-l1-1-0.dll" "$INSTDIR\api-ms-win-core-sysinfo-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-synch-l1-2-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-synch-l1-1-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-string-l1-1-0.dll" "$INSTDIR\api-ms-win-core-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-rtlsupport-l1-1-0.dll" "$INSTDIR\api-ms-win-core-rtlsupport-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-profile-l1-1-0.dll" "$INSTDIR\api-ms-win-core-profile-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-processthreads-l1-1-1.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-1.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-processthreads-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-processenvironment-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processenvironment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-namedpipe-l1-1-0.dll" "$INSTDIR\api-ms-win-core-namedpipe-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-memory-l1-1-0.dll" "$INSTDIR\api-ms-win-core-memory-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-localization-l1-2-0.dll" "$INSTDIR\api-ms-win-core-localization-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-libraryloader-l1-1-0.dll" "$INSTDIR\api-ms-win-core-libraryloader-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-interlocked-l1-1-0.dll" "$INSTDIR\api-ms-win-core-interlocked-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-core-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-handle-l1-1-0.dll" "$INSTDIR\api-ms-win-core-handle-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-file-l2-1-0.dll" "$INSTDIR\api-ms-win-core-file-l2-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-file-l1-2-0.dll" "$INSTDIR\api-ms-win-core-file-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-file-l1-1-0.dll" "$INSTDIR\api-ms-win-core-file-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-errorhandling-l1-1-0.dll" "$INSTDIR\api-ms-win-core-errorhandling-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-debug-l1-1-0.dll" "$INSTDIR\api-ms-win-core-debug-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-datetime-l1-1-0.dll" "$INSTDIR\api-ms-win-core-datetime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-core-console-l1-1-0.dll" "$INSTDIR\api-ms-win-core-console-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\ucrtbase.dll" "$INSTDIR\ucrtbase.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-utility-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-time-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-string-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-stdio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-runtime-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-process-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-private-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-private-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-multibyte-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-math-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-locale-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-filesystem-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-environment-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-convert-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-crt-conio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-util-l1-1-0.dll" "$INSTDIR\api-ms-win-core-util-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-timezone-l1-1-0.dll" "$INSTDIR\api-ms-win-core-timezone-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-sysinfo-l1-1-0.dll" "$INSTDIR\api-ms-win-core-sysinfo-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-synch-l1-2-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-synch-l1-1-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-string-l1-1-0.dll" "$INSTDIR\api-ms-win-core-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-rtlsupport-l1-1-0.dll" "$INSTDIR\api-ms-win-core-rtlsupport-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-profile-l1-1-0.dll" "$INSTDIR\api-ms-win-core-profile-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-processthreads-l1-1-1.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-1.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-processthreads-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-processenvironment-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processenvironment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-namedpipe-l1-1-0.dll" "$INSTDIR\api-ms-win-core-namedpipe-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-memory-l1-1-0.dll" "$INSTDIR\api-ms-win-core-memory-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-localization-l1-2-0.dll" "$INSTDIR\api-ms-win-core-localization-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-libraryloader-l1-1-0.dll" "$INSTDIR\api-ms-win-core-libraryloader-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-interlocked-l1-1-0.dll" "$INSTDIR\api-ms-win-core-interlocked-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-core-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-handle-l1-1-0.dll" "$INSTDIR\api-ms-win-core-handle-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-file-l2-1-0.dll" "$INSTDIR\api-ms-win-core-file-l2-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-file-l1-2-0.dll" "$INSTDIR\api-ms-win-core-file-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-file-l1-1-0.dll" "$INSTDIR\api-ms-win-core-file-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-errorhandling-l1-1-0.dll" "$INSTDIR\api-ms-win-core-errorhandling-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-debug-l1-1-0.dll" "$INSTDIR\api-ms-win-core-debug-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-datetime-l1-1-0.dll" "$INSTDIR\api-ms-win-core-datetime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x64\api-ms-win-core-console-l1-1-0.dll" "$INSTDIR\api-ms-win-core-console-l1-1-0.dll"
!else
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\vcruntime140.dll" "$INSTDIR\vcruntime140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\msvcp140.dll" "$INSTDIR\msvcp140.dll"
@ -418,47 +421,47 @@ modeselected:
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\concrt140.dll" "$INSTDIR\concrt140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\vccorlib140.dll" "$INSTDIR\vccorlib140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.OpenMP\vcomp140.dll" "$INSTDIR\vcomp140.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\ucrtbase.dll" "$INSTDIR\ucrtbase.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-utility-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-time-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-string-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-stdio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-runtime-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-process-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-private-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-private-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-multibyte-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-math-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-locale-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-filesystem-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-environment-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-convert-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-crt-conio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-util-l1-1-0.dll" "$INSTDIR\api-ms-win-core-util-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-timezone-l1-1-0.dll" "$INSTDIR\api-ms-win-core-timezone-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-sysinfo-l1-1-0.dll" "$INSTDIR\api-ms-win-core-sysinfo-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-synch-l1-2-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-synch-l1-1-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-string-l1-1-0.dll" "$INSTDIR\api-ms-win-core-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-rtlsupport-l1-1-0.dll" "$INSTDIR\api-ms-win-core-rtlsupport-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-profile-l1-1-0.dll" "$INSTDIR\api-ms-win-core-profile-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-processthreads-l1-1-1.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-1.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-processthreads-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-processenvironment-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processenvironment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-namedpipe-l1-1-0.dll" "$INSTDIR\api-ms-win-core-namedpipe-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-memory-l1-1-0.dll" "$INSTDIR\api-ms-win-core-memory-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-localization-l1-2-0.dll" "$INSTDIR\api-ms-win-core-localization-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-libraryloader-l1-1-0.dll" "$INSTDIR\api-ms-win-core-libraryloader-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-interlocked-l1-1-0.dll" "$INSTDIR\api-ms-win-core-interlocked-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-core-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-handle-l1-1-0.dll" "$INSTDIR\api-ms-win-core-handle-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-file-l2-1-0.dll" "$INSTDIR\api-ms-win-core-file-l2-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-file-l1-2-0.dll" "$INSTDIR\api-ms-win-core-file-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-file-l1-1-0.dll" "$INSTDIR\api-ms-win-core-file-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-errorhandling-l1-1-0.dll" "$INSTDIR\api-ms-win-core-errorhandling-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-debug-l1-1-0.dll" "$INSTDIR\api-ms-win-core-debug-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-datetime-l1-1-0.dll" "$INSTDIR\api-ms-win-core-datetime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\api-ms-win-core-console-l1-1-0.dll" "$INSTDIR\api-ms-win-core-console-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\ucrtbase.dll" "$INSTDIR\ucrtbase.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-utility-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-time-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-string-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-stdio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-runtime-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-process-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-private-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-private-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-multibyte-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-math-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-locale-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-filesystem-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-environment-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-convert-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-crt-conio-l1-1-0.dll" "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-util-l1-1-0.dll" "$INSTDIR\api-ms-win-core-util-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-timezone-l1-1-0.dll" "$INSTDIR\api-ms-win-core-timezone-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-sysinfo-l1-1-0.dll" "$INSTDIR\api-ms-win-core-sysinfo-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-synch-l1-2-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-synch-l1-1-0.dll" "$INSTDIR\api-ms-win-core-synch-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-string-l1-1-0.dll" "$INSTDIR\api-ms-win-core-string-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-rtlsupport-l1-1-0.dll" "$INSTDIR\api-ms-win-core-rtlsupport-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-profile-l1-1-0.dll" "$INSTDIR\api-ms-win-core-profile-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-processthreads-l1-1-1.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-1.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-processthreads-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processthreads-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-processenvironment-l1-1-0.dll" "$INSTDIR\api-ms-win-core-processenvironment-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-namedpipe-l1-1-0.dll" "$INSTDIR\api-ms-win-core-namedpipe-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-memory-l1-1-0.dll" "$INSTDIR\api-ms-win-core-memory-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-localization-l1-2-0.dll" "$INSTDIR\api-ms-win-core-localization-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-libraryloader-l1-1-0.dll" "$INSTDIR\api-ms-win-core-libraryloader-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-interlocked-l1-1-0.dll" "$INSTDIR\api-ms-win-core-interlocked-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-heap-l1-1-0.dll" "$INSTDIR\api-ms-win-core-heap-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-handle-l1-1-0.dll" "$INSTDIR\api-ms-win-core-handle-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-file-l2-1-0.dll" "$INSTDIR\api-ms-win-core-file-l2-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-file-l1-2-0.dll" "$INSTDIR\api-ms-win-core-file-l1-2-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-file-l1-1-0.dll" "$INSTDIR\api-ms-win-core-file-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-errorhandling-l1-1-0.dll" "$INSTDIR\api-ms-win-core-errorhandling-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-debug-l1-1-0.dll" "$INSTDIR\api-ms-win-core-debug-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-datetime-l1-1-0.dll" "$INSTDIR\api-ms-win-core-datetime-l1-1-0.dll"
!insertmacro Install3264DLL "C:\Program Files (x86)\Windows Kits\10\Redist\${WINKITVER}\ucrt\DLLs\x86\api-ms-win-core-console-l1-1-0.dll" "$INSTDIR\api-ms-win-core-console-l1-1-0.dll"
!endif
!ifndef BUILD_UNINSTALLER ; if building uninstaller, skip files below
@ -471,58 +474,28 @@ modeselected:
SetOutPath "$INSTDIR"
SetOverwrite on
AllowSkipFiles off
File "${SRCDIR_MEGACMD}\MEGAcmdServer.exe"
AccessControl::SetFileOwner "$INSTDIR\MEGAcmdServer.exe" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\MEGAcmdServer.exe" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\MEGAclient.exe"
AccessControl::SetFileOwner "$INSTDIR\MEGAclient.exe" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\MEGAclient.exe" "$USERNAME" "GenericRead + GenericWrite"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\MEGAcmdServer.exe" "$INSTDIR\MEGAcmdServer.exe"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\MEGAclient.exe" "$INSTDIR\MEGAclient.exe"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\MEGAcmdShell.exe" "$INSTDIR\MEGAcmdShell.exe"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\MEGAcmdUpdater.exe" "$INSTDIR\MEGAcmdUpdater.exe"
File "${SRCDIR_MEGACMD}\MEGAcmdShell.exe"
AccessControl::SetFileOwner "$INSTDIR\MEGAcmdShell.exe" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\MEGAcmdShell.exe" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\MEGAcmdUpdater.exe"
AccessControl::SetFileOwner "$INSTDIR\MEGAcmdUpdater.exe" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\MEGAcmdUpdater.exe" "$USERNAME" "GenericRead + GenericWrite"
!ifdef BUILD_X64_VERSION
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libcrypto-1_1-x64.dll" "$INSTDIR\libcrypto-1_1-x64.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libssl-1_1-x64.dll" "$INSTDIR\libssl-1_1-x64.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libssl-3-x64.dll" "$INSTDIR\libssl-3-x64.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libcrypto-3-x64.dll" "$INSTDIR\libcrypto-3-x64.dll"
!else
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libcrypto-1_1.dll" "$INSTDIR\libcrypto-1_1.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libssl-1_1.dll" "$INSTDIR\libssl-1_1.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libcrypto-3.dll" "$INSTDIR\libcrypto-3.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libssl-3.dll" "$INSTDIR\libssl-3.dll"
!endif
File "${SRCDIR_MEGACMD}\libcurl.dll"
AccessControl::SetFileOwner "$INSTDIR\libcurl.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\libcurl.dll" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\cares.dll"
AccessControl::SetFileOwner "$INSTDIR\cares.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\cares.dll" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\avcodec-58.dll"
AccessControl::SetFileOwner "$INSTDIR\avcodec-58.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\avcodec-58.dll" "$USERNAME" "GenericRead + GenericWrite"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\libcurl.dll" "$INSTDIR\libcurl.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\cares.dll" "$INSTDIR\cares.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\avcodec-59.dll" "$INSTDIR\avcodec-59.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\avformat-59.dll" "$INSTDIR\avformat-59.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\avutil-57.dll" "$INSTDIR\avutil-57.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\swscale-6.dll" "$INSTDIR\swscale-6.dll"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\swresample-4.dll" "$INSTDIR\swresample-4.dll"
File "${SRCDIR_MEGACMD}\avformat-58.dll"
AccessControl::SetFileOwner "$INSTDIR\avformat-58.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\avformat-58.dll" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\avutil-56.dll"
AccessControl::SetFileOwner "$INSTDIR\avutil-56.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\avutil-56.dll" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\swscale-5.dll"
AccessControl::SetFileOwner "$INSTDIR\swscale-5.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\swscale-5.dll" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_MEGACMD}\swresample-3.dll"
AccessControl::SetFileOwner "$INSTDIR\swresample-3.dll" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\swresample-3.dll" "$USERNAME" "GenericRead + GenericWrite"
;remove old DLLs that we no longer use (some became static; some have later version number)
Delete "$INSTDIR\avcodec-57.dll"
Delete "$INSTDIR\avformat-57.dll"
@ -532,242 +505,80 @@ modeselected:
Delete "$INSTDIR\libsodium.dll"
Delete "$INSTDIR\pdfium.dll"
Delete "$INSTDIR\FreeImage.dll"
Delete "$INSTDIR\avcodec-58.dll"
Delete "$INSTDIR\avformat-58.dll"
Delete "$INSTDIR\avutil-56.dll"
Delete "$INSTDIR\swscale-5.dll"
Delete "$INSTDIR\swresample-3.dll"
Delete "$INSTDIR\libcrypto-1_1-x64.dll"
Delete "$INSTDIR\libssl-1_1-x64.dll"
Delete "$INSTDIR\libcrypto-1_1.dll"
Delete "$INSTDIR\libssl-1_1.dll"
; BAT files
File "${SRCDIR_BATFILES}\mega-attr.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-attr.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-attr.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-cd.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-cd.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-cd.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-confirm.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-confirm.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-confirm.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-cp.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-cp.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-cp.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-debug.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-debug.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-debug.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-du.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-du.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-du.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-df.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-df.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-df.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-proxy.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-proxy.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-proxy.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-export.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-export.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-export.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-find.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-find.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-find.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-get.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-get.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-get.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-help.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-help.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-help.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-https.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-https.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-https.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-webdav.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-webdav.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-webdav.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-deleteversions.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-deleteversions.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-deleteversions.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-transfers.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-transfers.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-transfers.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-import.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-import.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-import.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-invite.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-invite.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-invite.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-ipc.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-ipc.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-ipc.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-killsession.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-killsession.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-killsession.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-lcd.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-lcd.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-lcd.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-log.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-log.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-log.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-login.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-login.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-login.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-logout.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-logout.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-logout.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-lpwd.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-lpwd.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-lpwd.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-ls.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-ls.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-ls.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-backup.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-backup.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-backup.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-mkdir.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-mkdir.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-mkdir.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-mount.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-mount.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-mount.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-mv.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-mv.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-mv.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-passwd.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-passwd.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-passwd.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-preview.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-preview.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-preview.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-put.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-put.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-put.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-pwd.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-pwd.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-pwd.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-quit.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-quit.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-quit.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-reload.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-reload.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-reload.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-rm.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-rm.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-rm.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-session.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-session.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-session.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-share.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-share.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-share.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-showpcr.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-showpcr.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-showpcr.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-signup.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-signup.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-signup.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-speedlimit.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-speedlimit.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-speedlimit.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-sync.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-sync.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-sync.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-exclude.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-exclude.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-exclude.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-thumbnail.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-thumbnail.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-thumbnail.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-userattr.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-userattr.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-userattr.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-users.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-users.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-users.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-version.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-version.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-version.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-whoami.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-whoami.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-whoami.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-cat.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-cat.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-cat.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-tree.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-tree.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-tree.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-mediainfo.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-mediainfo.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-mediainfo.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-graphics.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-graphics.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-graphics.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-ftp.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-ftp.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-ftp.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-cancel.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-cancel.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-cancel.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-confirmcancel.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-confirmcancel.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-confirmcancel.bat" "$USERNAME" "GenericRead + GenericWrite"
File "${SRCDIR_BATFILES}\mega-errorcode.bat"
AccessControl::SetFileOwner "$INSTDIR\mega-errorcode.bat" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\mega-errorcode.bat" "$USERNAME" "GenericRead + GenericWrite"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-attr.bat" "$INSTDIR\mega-attr.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-cd.bat" "$INSTDIR\mega-cd.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-confirm.bat" "$INSTDIR\mega-confirm.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-cp.bat" "$INSTDIR\mega-cp.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-debug.bat" "$INSTDIR\mega-debug.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-du.bat" "$INSTDIR\mega-du.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-df.bat" "$INSTDIR\mega-df.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-proxy.bat" "$INSTDIR\mega-proxy.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-export.bat" "$INSTDIR\mega-export.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-find.bat" "$INSTDIR\mega-find.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-get.bat" "$INSTDIR\mega-get.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-help.bat" "$INSTDIR\mega-help.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-https.bat" "$INSTDIR\mega-https.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-webdav.bat" "$INSTDIR\mega-webdav.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-deleteversions.bat" "$INSTDIR\mega-deleteversions.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-transfers.bat" "$INSTDIR\mega-transfers.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-import.bat" "$INSTDIR\mega-import.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-invite.bat" "$INSTDIR\mega-invite.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-ipc.bat" "$INSTDIR\mega-ipc.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-killsession.bat" "$INSTDIR\mega-killsession.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-lcd.bat" "$INSTDIR\mega-lcd.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-log.bat" "$INSTDIR\mega-log.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-login.bat" "$INSTDIR\mega-login.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-logout.bat" "$INSTDIR\mega-logout.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-lpwd.bat" "$INSTDIR\mega-lpwd.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-ls.bat" "$INSTDIR\mega-ls.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-backup.bat" "$INSTDIR\mega-backup.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-mkdir.bat" "$INSTDIR\mega-mkdir.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-mount.bat" "$INSTDIR\mega-mount.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-mv.bat" "$INSTDIR\mega-mv.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-passwd.bat" "$INSTDIR\mega-passwd.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-preview.bat" "$INSTDIR\mega-preview.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-put.bat" "$INSTDIR\mega-put.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-pwd.bat" "$INSTDIR\mega-pwd.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-quit.bat" "$INSTDIR\mega-quit.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-reload.bat" "$INSTDIR\mega-reload.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-rm.bat" "$INSTDIR\mega-rm.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-session.bat" "$INSTDIR\mega-session.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-share.bat" "$INSTDIR\mega-share.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-showpcr.bat" "$INSTDIR\mega-showpcr.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-signup.bat" "$INSTDIR\mega-signup.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-speedlimit.bat" "$INSTDIR\mega-speedlimit.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-sync.bat" "$INSTDIR\mega-sync.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-exclude.bat" "$INSTDIR\mega-exclude.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-thumbnail.bat" "$INSTDIR\mega-thumbnail.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-userattr.bat" "$INSTDIR\mega-userattr.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-users.bat" "$INSTDIR\mega-users.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-version.bat" "$INSTDIR\mega-version.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-whoami.bat" "$INSTDIR\mega-whoami.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-cat.bat" "$INSTDIR\mega-cat.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-tree.bat" "$INSTDIR\mega-tree.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-mediainfo.bat" "$INSTDIR\mega-mediainfo.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-graphics.bat" "$INSTDIR\mega-graphics.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-ftp.bat" "$INSTDIR\mega-ftp.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-cancel.bat" "$INSTDIR\mega-cancel.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-confirmcancel.bat" "$INSTDIR\mega-confirmcancel.bat"
!insertmacro Install3264DLL "${SRCDIR_BATFILES}\mega-errorcode.bat" "$INSTDIR\mega-errorcode.bat"
; Uninstaller
;!ifndef BUILD_UNINSTALLER ; if building uninstaller, skip this check
File "${SRCDIR_MEGACMD}\${UNINSTALLER_NAME}"
AccessControl::SetFileOwner "$INSTDIR\${UNINSTALLER_NAME}" "$USERNAME"
AccessControl::GrantOnFile "$INSTDIR\${UNINSTALLER_NAME}" "$USERNAME" "GenericRead + GenericWrite"
!insertmacro Install3264DLL "${SRCDIR_MEGACMD}\${UNINSTALLER_NAME}" "$INSTDIR\${UNINSTALLER_NAME}"
!endif
!insertmacro DEBUG_MSG "Creating shortcuts"
@ -918,19 +729,22 @@ Section Uninstall
Delete "$INSTDIR\MEGAclient.exe"
Delete "$INSTDIR\libeay32.dll"
Delete "$INSTDIR\ssleay32.dll"
Delete "$INSTDIR\libcrypto-1_1-x64.dll"
Delete "$INSTDIR\libssl-1_1-x64.dll"
Delete "$INSTDIR\libcrypto-1_1.dll"
Delete "$INSTDIR\libssl-1_1.dll"
Delete "$INSTDIR\libcurl.dll"
Delete "$INSTDIR\cares.dll"
Delete "$INSTDIR\libuv.dll"
Delete "$INSTDIR\NSIS.Library.RegTool*.exe"
Delete "$INSTDIR\avcodec-58.dll"
Delete "$INSTDIR\avformat-58.dll"
Delete "$INSTDIR\avutil-56.dll"
Delete "$INSTDIR\swscale-5.dll"
Delete "$INSTDIR\swresample-3.dll"
Delete "$INSTDIR\avcodec-59.dll"
Delete "$INSTDIR\avformat-59.dll"
Delete "$INSTDIR\avutil-57.dll"
Delete "$INSTDIR\swscale-6.dll"
Delete "$INSTDIR\swresample-4.dll"
;!ifdef BUILD_X64_VERSION
Delete "$INSTDIR\libssl-3-x64.dll"
Delete "$INSTDIR\libcrypto-3-x64.dll"
;!else
Delete "$INSTDIR\libcrypto-3.dll"
Delete "$INSTDIR\libssl-3.dll"
;!endif
;Still remove old DLLs though we no longer produce them (non-VCPKG may still produce them)
Delete "$INSTDIR\avcodec-57.dll"
@ -941,6 +755,16 @@ Section Uninstall
Delete "$INSTDIR\libsodium.dll"
Delete "$INSTDIR\pdfium.dll"
Delete "$INSTDIR\FreeImage.dll"
Delete "$INSTDIR\libcrypto-1_1-x64.dll"
Delete "$INSTDIR\libssl-1_1-x64.dll"
Delete "$INSTDIR\libcrypto-1_1.dll"
Delete "$INSTDIR\libssl-1_1.dll"
Delete "$INSTDIR\avcodec-58.dll"
Delete "$INSTDIR\avformat-58.dll"
Delete "$INSTDIR\avutil-56.dll"
Delete "$INSTDIR\swscale-5.dll"
Delete "$INSTDIR\swresample-3.dll"
; BAT files
Delete "$INSTDIR\mega-attr.bat"

54
build/make_installers.cmd Normal file
View File

@ -0,0 +1,54 @@
IF "%1%" EQU "-help" (
goto Usage
)
SET SUFFIX_DEF=
if not "%MEGA_VERSION_SUFFIX%" == "" (
SET SUFFIX_DEF=/DVERSION_SUFFIX=%MEGA_VERSION_SUFFIX%
)
SET MEGA_SIGN=%1
:: DOUBLE CHECK SIGN
IF "%MEGA_SIGN%" EQU "sign" (
echo "Info: Signed installer(s) will be generated. Checking if sources are signed"
"C:\Program Files (x86)\Windows Kits\10\bin\%MEGA_WIN_KITVER%\x64\signtool.exe" verify /pa built64/*.exe || exit 1 /b
IF NOT "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
"C:\Program Files (x86)\Windows Kits\10\bin\%MEGA_WIN_KITVER%\x64\signtool.exe" verify /pa built32/*.exe || exit 1 /b
)
) ELSE (
IF "%MEGA_SIGN%" EQU "nosign" (
echo "Info: Unsigned installer(s) will be generated"
SET MEGA_THIRD_PARTY_DLL_DIR=bin
) ELSE (
echo "Please add a correct sign argument: sign or nosign"
goto Usage
)
)
erase MEGAcmdSetup64.exe 2>nul
erase MEGAcmdSetup64_unsigned.exe 2>nul
"C:\Program Files (x86)\NSIS\makensis.exe" /DWINKITVER=%MEGA_WIN_KITVER% /DBUILD_X64_VERSION %SUFFIX_DEF% installer_win.nsi || exit 1 /b
IF "%MEGA_SIGN%" EQU "nosign" (
ren MEGAcmdSetup64.exe MEGAcmdSetup64_unsigned.exe
)
IF "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
GOTO :EOF
)
erase MEGAcmdSetup32.exe >nul
erase MEGAcmdSetup32_unsigned.exe >nul
"C:\Program Files (x86)\NSIS\makensis.exe" /DWINKITVER=%MEGA_WIN_KITVER% %SUFFIX_DEF% installer_win.nsi || exit 1 /b
IF "%MEGA_SIGN%" EQU "nosign" (
ren MEGAcmdSetup32.exe MEGAcmdSetup32_unsigned.exe
)
exit /B
:Usage
echo "Usage: %~0 [-help] [sign|nosign]"
echo Script for making the installer, expecting files in built folders"
exit 2 /b

View File

@ -0,0 +1,20 @@
SET SUFFIX_DEF=
if not "%MEGA_VERSION_SUFFIX%" == "" (
SET SUFFIX_DEF=/DVERSION_SUFFIX=%MEGA_VERSION_SUFFIX%
)
"C:\Program Files (x86)\NSIS\makensis.exe" /DWINKITVER=%MEGA_WIN_KITVER% /DBUILD_UNINSTALLER /DBUILD_X64_VERSION %SUFFIX_DEF% installer_win.nsi || exit 1 /b
UninstallerGenerator.exe
erase UninstallerGenerator.exe
copy uninst.exe built64
move uninst.exe sign64
IF "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
GOTO :EOF
)
"C:\Program Files (x86)\NSIS\makensis.exe" /DWINKITVER=%MEGA_WIN_KITVER% /DBUILD_UNINSTALLER %SUFFIX_DEF% installer_win.nsi || exit 1 /b
UninstallerGenerator.exe
erase UninstallerGenerator.exe
copy uninst.exe built32
move uninst.exe sign32

View File

@ -1,3 +1,15 @@
megacmd (1.7.0) stable; urgency=low
* Improved startup time
* Reduced memory consumption: cached metadata is no longer loaded at startup
* Fixes and improvements in whoami, ls, backup and export commands
* Fixed several memory leaks and improved overall memory consumption
* Fixed file permissions on Unix
* Added support for the Apple silicon (M1)
* Many other fixes and improvements
-- MEGA Team <linux@mega.co.nz> Mon, 20 May 2024 14:07:19 +0200
megacmd (1.6.3) stable; urgency=low
* Improvements in session resumption

View File

@ -8,6 +8,7 @@ Build-Depends: debhelper,
libssl-dev,
libsqlite3-dev,
zlib1g-dev,
libicu-dev,
wget,
libtool,
dh-autoreconf,

View File

@ -5,7 +5,9 @@ distro=$(cat /usr/share/doc/megacmd/distro)
#ver=$(lsb_release -rs)
ver=$(cat /usr/share/doc/megacmd/version)
if [[ $distro = "Raspbian GNU/Linux 11"* ]]; then
if [[ $distro = "Raspbian GNU/Linux 12"* ]]; then
str="Raspbian_12"
elif [[ $distro = "Raspbian GNU/Linux 11"* ]]; then
str="Raspbian_11"
elif [[ $distro = "Raspbian GNU/Linux 10"* ]]; then
str="Raspbian_10.0"
@ -14,6 +16,10 @@ elif [[ $distro = "Raspbian GNU/Linux 9"* ]]; then
elif [[ $distro = "Raspbian GNU/Linux 8"* ]]; then
str="Raspbian_8.0"
# Ubuntu
elif [[ $ver = "24.04" ]]; then
str="xUbuntu_24.04"
elif [[ $ver = "23.10" ]]; then
str="xUbuntu_23.10"
elif [[ $ver = "23.04" ]]; then
str="xUbuntu_23.04"
elif [[ $ver = "22.10" ]]; then
@ -71,6 +77,8 @@ elif [[ $ver = 10* ]]; then
str="Debian_10.0"
elif [[ $ver = 11* ]]; then
str="Debian_11"
elif [[ $ver = 12* ]]; then
str="Debian_12"
elif [[ $ver = "testing" ]]; then
str="Debian_testing"
# Elementary OS Luna uses 12.04

View File

@ -1,9 +1,10 @@
#!/usr/bin/make -f
NJOBS := $(shell echo ${DEB_BUILD_OPTIONS} | sed -rn 's/.*parallel=([0-9]*).*/\1/p')
CPPFLAGS := $(shell cat /etc/issue | grep "Ubuntu 1[234579]\|Ubuntu 18.10\|Ubuntu 20.10\|Ubuntu 21\|Debian.* [789]\|Debian.* 10" >/dev/null && echo "$$CPPFLAGS -DMEGACMD_DEPRECATED_OS" || echo "")
CPPFLAGS := $(shell cat /etc/issue | grep "Ubuntu 1[2345789]\|Ubuntu 20.10\|Ubuntu 21\|Ubuntu 22.10\|Ubuntu 23.04\|Debian.* [789]" >/dev/null && echo "$$CPPFLAGS -DMEGACMD_DEPRECATED_OS" || echo "")
FCRYPTOPP := $(shell cat /etc/issue | grep "Ubuntu 1[4-8]\|Ubuntu 19.04\|Debian.* [8]" >/dev/null && echo "" || echo "-q")
WCRYPTOPP := $(shell cat /etc/issue | grep "Ubuntu 1[4-8]\|Ubuntu 19.04\|Debian.* [8]" >/dev/null && echo "" || echo "--with-cryptopp=$(CURDIR)/deps")
DPKGXZ := $(shell cat /etc/issue | grep "Ubuntu 23\|Lunar Lobster\|Ubuntu 22\|Jammy Jellyfish\|Ubuntu 21.10" >/dev/null && echo "-- -Zxz" || echo "")
DPKGXZ := $(shell cat /etc/issue | grep "Ubuntu 24\|Noble Numbat\|Ubuntu 23\|Mantic Minotaur\|Lunar Lobster\|Ubuntu 22\|Jammy Jellyfish\|Ubuntu 21.10" >/dev/null && echo "-- -Zxz" || echo "")
SQLITE3 := $(shell cat /etc/issue | grep "Ubuntu 18.04\|Ubuntu 20.04\|Debian.* \b\([0-9]\|10\)\b" >/dev/null && echo "" || (grep -- -L sdk/contrib/build_sdk.sh >/dev/null && echo "-L") )
FMEDIAINFO := $(shell dpkg -l | grep mediainfo >/dev/null && echo "-i" || echo " ")
WMEDIAINFO := $(shell dpkg -l | grep mediainfo >/dev/null && echo " " || echo "--with-libmediainfo=$(CURDIR)/deps --with-libzen=$(CURDIR)/deps")
RFFMPEG := $(shell cat /etc/issue | grep "Raspbian" >/dev/null && echo "" || echo '-DREQUIRE_HAVE_FFMPEG')
@ -12,6 +13,7 @@ RPDFIUM := $(shell dpkg --print-architecture | grep -i "i386\|arm" >/dev/null &&
INSTALL3RD := $(shell dpkg --print-architecture | grep -i "i386\|arm" >/dev/null && echo "" || echo 'install3rd')
LDFLAGS := $(shell dpkg --print-architecture | grep -i "i386\|arm" >/dev/null && echo "" || echo "$$LDFLAGS -Wl,-rpath,/opt/megacmd/lib")
DEB_TESTING := $(shell cat /etc/issue | grep "Debian" > /dev/null && cat /etc/apt/sources.list.d/debian.sources | grep -v "^\#" | grep testing > /dev/null && echo "testing")
EXPORTCCMFPU := $(shell cat /etc/issue | grep "Raspbian GNU/Linux 12" >/dev/null && echo "export CC='cc -mfpu=vfp'" || echo ":")
MEGA_BUILD_ID := $(shell cat MEGA_BUILD_ID || echo "1")
@ -24,8 +26,8 @@ build-stamp:
#build dependencies into folder deps
mkdir deps || :
bash -x ./sdk/contrib/build_sdk.sh -o archives \
-g -b $(FMEDIAINFO) $(FCRYPTOPP) -l -c -s -u -v -a -z -I -p deps/
( $(EXPORTCCMFPU) ; bash -x ./sdk/contrib/build_sdk.sh -o archives \
-g -b $(FMEDIAINFO) $(FCRYPTOPP) $(SQLITE3) -l -c -s -u -v -a -z -I -p deps/ )
# Link dynamically with freeimage if pdfium is required.
if [ -n "$(INSTALL3RD)" ]; then \

View File

@ -1,3 +1,14 @@
Mon May 20 02:06:31 PM CEST 2024 - linux@mega.co.nz
- Update to version 1.7.0:
* Improved startup time
* Reduced memory consumption: cached metadata is no longer loaded at startup
* Fixes and improvements in whoami, ls, backup and export commands
* Fixed several memory leaks and improved overall memory consumption
* Fixed file permissions on Unix
* Added support for the Apple silicon (M1)
* Many other fixes and improvements
-------------------------------------------------------------------
Thu May 4 16:18:29 CEST 2023 - linux@mega.co.nz
- Update to version 1.6.3:
* Improvements in session resumption

View File

@ -75,6 +75,7 @@ sAdVa6xer/c=
-----END PGP PUBLIC KEY BLOCK-----
KEY
pacman-key --init || true
pacman-key --lsign-key B01C811880480C854C73EC7E1A664B787094A482
sysctl -p /etc/sysctl.d/99-megacmd-inotify-limit.conf
@ -165,6 +166,7 @@ sAdVa6xer/c=
-----END PGP PUBLIC KEY BLOCK-----
KEY
pacman-key --init || true
pacman-key --lsign-key B01C811880480C854C73EC7E1A664B787094A482
fi

View File

@ -0,0 +1,35 @@
IF [%MEGA_VCPKGPATH%]==[] (
SET MEGA_VCPKGPATH=C:\mega\dev\3rdparty_megacmd
)
IF [%MEGA_CORES%]==[] (
FOR /f "tokens=2 delims==" %%f IN ('wmic cpu get NumberOfLogicalProcessors /value ^| find "="') DO SET MEGA_CORES=%%f
)
REM Clean up any previous leftovers
IF EXIST build-x64-windows-mega (
rmdir /s /q build-x64-windows-mega
)
mkdir build-x64-windows-mega
cd build-x64-windows-mega
cmake -G "Visual Studio 16 2019" -A x64 -DMega3rdPartyDir=%MEGA_VCPKGPATH% -DVCPKG_TRIPLET=x64-windows-mega -S "..\cmake" -B . || exit 1 /b
cmake --build . --config Release --target mega-exec --target mega-cmd-server --target mega-cmd --target mega-cmd-updater -j%MEGA_CORES% || exit 1 /b
cd ..
IF "%MEGA_SKIP_32_BIT_BUILD%" == "true" (
GOTO :EOF
)
REM Clean up any previous leftovers
IF EXIST build-x86-windows-mega (
rmdir /s /q build-x86-windows-mega
)
mkdir build-x86-windows-mega
cd build-x86-windows-mega
cmake -G "Visual Studio 16 2019" -A Win32 -DMega3rdPartyDir=%MEGA_VCPKGPATH% -DVCPKG_TRIPLET=x86-windows-mega -S "..\cmake" -B . || exit 1 /b
cmake --build . --config Release --target mega-exec --target mega-cmd-server --target mega-cmd --target mega-cmd-updater -j%MEGA_CORES% || exit 1 /b
REM cmake --build . --config Release --target MEGAcmd --target MEGAcmdServer --target MEGAcmdShell --target MEGAcmdUpdater -j%MEGA_CORES%
cd ..

View File

@ -26,7 +26,7 @@ arch=('i686' 'x86_64')
url="http://mega.nz/cmd"
license=("https://github.com/meganz/megacmd/blob/master/LICENSE")
groups=()
depends=('glibc>=2.37' 'gcc-libs>=13.1.1' 'sqlite' 'openssl>=1.1.1' 'zlib' 'libpsl' 'icu>=69.1' 'bash-completion' 'pcre' 'bzip2' 'xz')
depends=('glibc>=2.37' 'sqlite' 'openssl>=1.1.1' 'zlib' 'libpsl' 'icu>=69.1' 'bash-completion' 'pcre' 'bzip2' 'xz')
makedepends=('unzip' 'wget' 'ca-certificates' 'ffmpeg-mega' 'pdfium-mega' 'bzip2' 'xz')
checkdepends=()
optdepends=()
@ -48,13 +48,16 @@ prepare() {
}
build() {
set -x
cd "$pkgname-$pkgver"
./autogen.sh
#build dependencies into folder deps
SQLITE3=$(grep -- -L ./contrib/build_sdk.sh >/dev/null && echo "-L" || echo "")
mkdir deps || :
bash -x ./contrib/build_sdk.sh -o archives \
-e -g -b -l -c -s -u -v -a -q -I -p deps/
-e -g -b -l -c -s -u -v -a -q -I -p $SQLITE3 deps/
# Link dynamically with freeimage
ln -sfr $PWD/deps/lib/libfreeimage*.so $PWD/deps/lib/libfreeimage.so.3

View File

@ -7,7 +7,7 @@ Version: megacmd_VERSION
DEBTRANSFORM-RELEASE: 1
Maintainer: MEGA Linux Team <linux@mega.co.nz>
Homepage: https://mega.nz/cmd
Build-Depends: ffmpeg-mega [!armhf], pdfium-mega [amd64], libzen-dev, libmediainfo-dev, pkg-config, debhelper, libcrypto++-dev, libpcre3-dev, libc-ares-dev, libssl-dev, libsqlite3-dev, zlib1g-dev, wget, dh-autoreconf, cdbs, unzip, wget, libtool-bin (>= 2.4.2-1.10) | libtool (<< 2.4.2-1.10)
Build-Depends: ffmpeg-mega [!armhf], pdfium-mega [amd64], libzen-dev, libmediainfo-dev, pkg-config, debhelper, libcrypto++-dev, libpcre3-dev, libc-ares-dev, libssl-dev, libsqlite3-dev, zlib1g-dev, wget, dh-autoreconf, cdbs, unzip, libicu-dev, wget, libtool-bin (>= 2.4.2-1.10) | libtool (<< 2.4.2-1.10)
Package-List:
megacmd deb gnome optional
Files:

View File

@ -9,15 +9,15 @@ Source0: megacmd_%{version}.tar.gz
Vendor: MEGA Limited
Packager: MEGA Linux Team <linux@mega.co.nz>
BuildRequires: zlib-devel, autoconf, automake, libtool, gcc-c++, pcre-devel
BuildRequires: hicolor-icon-theme, unzip, wget
BuildRequires: autoconf, automake, libtool, gcc-c++, pcre-devel, libicu-devel
BuildRequires: hicolor-icon-theme, unzip
BuildRequires: ffmpeg-mega pdfium-mega
#OpenSUSE
%if 0%{?suse_version} || 0%{?sle_version}
BuildRequires: libopenssl-devel, sqlite3-devel
BuildRequires: libbz2-devel
BuildRequires: libbz2-devel, zlib-devel, wget
# disabling post-build-checks that ocassionally prevent opensuse rpms from being generated
# plus it speeds up building process
@ -49,6 +49,12 @@ BuildRequires: ffmpeg-mega pdfium-mega
%if 0%{?fedora}
BuildRequires: openssl-devel, sqlite-devel, c-ares-devel
%if 0%{?fedora_version} >= 40
BuildRequires: wget2, wget2-wget, zlib-ng-compat
%else
BuildRequires: wget, zlib-devel
%endif
%if 0%{?fedora_version} < 33
BuildRequires: cryptopp-devel
@ -157,6 +163,13 @@ sed -i -E "s/(^#define MEGACMD_BUILD_ID )[0-9]*/\1${mega_build_id}/g" src/megacm
sed -i "s#AC_INIT#m4_pattern_allow(AC_PROG_OBJCXX)\nAC_INIT#g" sdk/configure.ac
%endif
# Build SQLite3
%define flag_disablesqlite3 `grep -- -L ./contrib/build_sdk.sh >/dev/null && echo "-L"`
%if 0%{?centos_version} == 700
%define flag_disablesqlite3 %{nil}
%endif
%define fullreqs -DREQUIRE_HAVE_PDFIUM -DREQUIRE_HAVE_FFMPEG -DREQUIRE_HAVE_LIBUV -DREQUIRE_USE_MEDIAINFO -DREQUIRE_USE_PCRE
./autogen.sh
@ -164,12 +177,12 @@ sed -i -E "s/(^#define MEGACMD_BUILD_ID )[0-9]*/\1${mega_build_id}/g" src/megacm
#build dependencies into folder deps
mkdir deps || :
bash -x ./contrib/build_sdk.sh %{flag_cryptopp} %{flag_libraw} %{flag_cares} -o archives \
-g %{flag_disablezlib} %{flag_disablemediainfo} -b -l -c -s -u -v -a -I -p deps/
-g %{flag_disablezlib} %{flag_disablemediainfo} %{flag_disablesqlite3} -b -l -c -s -u -v -a -I -p deps/
ln -sfr $PWD/deps/lib/libfreeimage*.so $PWD/deps/lib/libfreeimage.so.3
ln -sfn libfreeimage.so.3 $PWD/deps/lib/libfreeimage.so
%if ( 0%{?fedora_version} && 0%{?fedora_version}<=35 ) || ( 0%{?centos_version} == 600 ) || ( 0%{?centos_version} == 800 ) || ( 0%{?sle_version} && 0%{?sle_version} < 150400 )
%if ( 0%{?fedora_version} && 0%{?fedora_version}<=37 ) || ( 0%{?centos_version} == 600 ) || ( 0%{?centos_version} == 800 ) || ( 0%{?sle_version} && 0%{?sle_version} < 150500 )
export CPPFLAGS="$CPPFLAGS -DMEGACMD_DEPRECATED_OS"
%endif
@ -284,6 +297,14 @@ DATA
%define reponame openSUSE_Leap_15.4
%endif
%if 0%{?sle_version} == 150500
%define reponame openSUSE_Leap_15.5
%endif
%if 0%{?sle_version} == 150600
%define reponame openSUSE_Leap_15.6
%endif
%if 0%{?sle_version} == 0 && 0%{?suse_version} >= 1550
%define reponame openSUSE_Tumbleweed
%endif

View File

@ -1 +1 @@
1.6.3
1.7.0

View File

@ -127,6 +127,54 @@ AC_TYPE_SIZE_T
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h sys/socket.h sys/timeb.h htonl glob.h malloc.h sys/malloc.h malloc/malloc.h])
# Runtime checks
AC_ARG_ENABLE(sanitizer,
AS_HELP_STRING([--enable-sanitizer@<:@=LIST@:>@],
[compile with (potentially expensive) runtime checks enabled. LIST can be used to enable only certain checks.
Available checks are: asan, ubsan, tsan, all (enables ubsan, asan), none.]),
[ac_checks="${enableval}"], [])
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checks
do
case $check in
no)
CHECKS_CXXFLAGS=""
CHECKS_CPPFLAGS=""
CHECKS_LDFLAGS=""
;;
all)
# Only enable Address and UB Sanitizer, as ThreadSanitizer cannot be enabled with ASan.
CHECKS_CXXFLAGS="-fsanitize=address -fsanitize=undefined -fno-common"
CHECKS_CPPFLAGS="-fsanitize=address -fsanitize=undefined -fno-common"
CHECKS_LDFLAGS="-fsanitize=address -fsanitize=undefined"
enable_debug="yes"
;;
asan)
CHECKS_CXXFLAGS="-fsanitize=address -fno-common $CHECKS_CXXFLAGS"
CHECKS_CPPFLAGS="-fsanitize=address -fno-common $CHECKS_CPPFLAGS"
CHECKS_LDFLAGS="-fsanitize=address $CHECKS_LDFLAGS"
enable_debug="yes"
;;
ubsan)
CHECKS_CXXFLAGS="-fsanitize=undefined $CHECKS_CXXFLAGS"
CHECKS_CPPFLAGS="-fsanitize=undefined $CHECKS_CPPFLAGS"
CHECKS_LDFLAGS="-fsanitize=undefined $CHECKS_LDFLAGS"
enable_debug="yes"
;;
tsan)
CHECKS_CXXFLAGS="-fsanitize=thread $CHECKS_CXXFLAGS"
CHECKS_CPPFLAGS="-fsanitize=thread $CHECKS_CPPFLAGS"
CHECKS_LDFLAGS="-fsanitize=thread $CHECKS_LDFLAGS"
enable_debug="yes"
;;
*) AC_MSG_ERROR([unknown check $check]) ;;
esac
done
IFS="$ac_save_IFS"
CXXFLAGS="$CHECKS_CXXFLAGS $CXXFLAGS"
CPPFLAGS="$CHECKS_CPPFLAGS $CPPFLAGS"
LDFLAGS="$CHECKS_LDFLAGS $LDFLAGS"
# Debug
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug], [enable support for running in debug mode]),
@ -134,8 +182,8 @@ AC_ARG_ENABLE(debug,
# Enable debug flags / build
if test "x$enable_debug" = "xyes" ; then
AM_CXXFLAGS="-Wall -g -ggdb3 -O0"
CXXFLAGS="-Wall -g -ggdb3 -O0"
AM_CXXFLAGS="-Wall -ggdb3 -Og -fno-omit-frame-pointer"
CXXFLAGS="-Wall -ggdb3 -Og -fno-omit-frame-pointer"
AC_SUBST([AM_CXXFLAGS])
AC_DEFINE(DEBUG, 1, [Define to enable debug logging])
else
@ -535,6 +583,23 @@ if test "$HAVE_PTHREAD" = "yes"; then
fi
AM_CONDITIONAL([HAVE_PTHREAD], [test "${HAVE_PTHREAD}" = "yes"])
## Tests
AC_MSG_CHECKING([if building MEGAcmd tests])
AC_ARG_ENABLE(megacmd-tests,
AS_HELP_STRING([--enable-megacmd-tests], [build MEGAcmd test applications]),
[], [enable_megacmd_tests=no])
if test "x$enable_megacmd_tests" = "xyes" ; then
AC_ARG_WITH(gtest,
AS_HELP_STRING(--with-gtest=PATH, specify GTest location),
[AC_SUBST([GTEST_DIR],[$with_gtest])],
[AC_MSG_ERROR([GTest location must be specified. You can pass simply "--with-gtest" if expected to be in your include path])]
)
fi
AM_CONDITIONAL([BUILD_MEGACMD_TESTS], [test "$enable_megacmd_tests" = "yes"])
AC_MSG_RESULT([$enable_megacmd_tests])
# Add -latomic to LDFLAGS if needed
CHECK_ATOMIC()
@ -568,4 +633,6 @@ AC_MSG_NOTICE([MEGAcmd configuration:
Termcap: $TERMCAP_CXXFLAGS $TERMCAP_LDFLAGS $TERMCAP_LIBS
PCRE: $PCRE_CXXFLAGS $PCRE_LDFLAGS $PCRE_LIBS
SDK includes: $LMEGAINC
MEGAcmd Tests: $enable_megacmd_tests
])

View File

@ -10,10 +10,11 @@ CONFIG(release, debug|release) {
TEMPLATE = subdirs
SUBDIRS = MEGAcmdShell MEGAcmdClient \
MEGAcmdServer MEGAcmdUpdater
MEGAcmdServer MEGAcmdUpdater \
MEGAcmdTests
macx {
SUBDIRS += MEGAcmdLoader
QMAKE_INFO_PLIST = Info_MEGA.plist
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
}

View File

@ -0,0 +1,13 @@
include(../MEGAcmdCommon.pri)
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
SOURCES += \
$$MEGACMD_BASE_PATH/src/client/megacmdclient.cpp \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunications.cpp \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp
HEADERS += \
$$MEGACMD_BASE_PATH/src/megacmdclient.h \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunications.h \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunicationsnamedpipes.h

View File

@ -14,16 +14,9 @@ TARGET = MEGAclient
TEMPLATE = app
CONFIG += console
include(../MEGAcmdCommon.pri)
include(MEGAcmdClient.pri)
SOURCES += ../../../../src/client/megacmdclient.cpp \
../../../../src/megacmdshell/megacmdshellcommunications.cpp \
../../../../src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp \
../../../../src/megacmdcommonutils.cpp
HEADERS += ../../../../src/megacmdshell/megacmdshellcommunications.h \
../../../../src/megacmdshell/megacmdshellcommunicationsnamedpipes.h \
../../../../src/megacmdcommonutils.h
SOURCES += $$MEGACMD_BASE_PATH/src/client/megacmd_client_main.cpp
#win32{
# DEFINES += USE_WIN32THREAD
@ -54,14 +47,11 @@ else{
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}
macx {
!vcpkg{
INCLUDEPATH += $$PWD/../../../../sdk/bindings/qt/3rdparty/include
LIBS += $$PWD/../../../../sdk/bindings/qt/3rdparty/libs/libreadline.a
INCLUDEPATH += $$MEGACMD_BASE_PATH/sdk/bindings/qt/3rdparty/include
LIBS += $$MEGACMD_BASE_PATH/sdk/bindings/qt/3rdparty/libs/libreadline.a
}
LIBS += -framework Cocoa -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Security
LIBS += -lncurses
}

View File

@ -1,30 +1,13 @@
isEmpty(THIRDPARTY_VCPKG_BASE_PATH){
THIRDPARTY_VCPKG_BASE_PATH = $$PWD/../../../3rdParty_megacmd
}
# This guard is needed to avoid a double-include of this file in the test
# projects (since they include both the client and the server .pri files)
isEmpty(MEGACMD_COMMON_INCLUDED) {
MEGACMD_COMMON_INCLUDED = true
win32 {
contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x64-windows-mega
!contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x86-windows-mega
}
macx{
isEmpty(VCPKG_TRIPLET){
contains(QT_ARCH, x86_64):VCPKG_TRIPLET = x64-osx-mega
contains(QT_ARCH, arm64):VCPKG_TRIPLET = arm64-osx-mega
}
contains(VCPKG_TRIPLET, arm64-osx-mega):contains(QMAKE_HOST.arch, arm64):QMAKE_APPLE_DEVICE_ARCHS=arm64
message("Building for macOS $$QT_ARCH in a $$QMAKE_HOST.arch host.")
}
unix:!macx:VCPKG_TRIPLET = x64-linux
message("THIRDPARTY_VCPKG_BASE_PATH: $$THIRDPARTY_VCPKG_BASE_PATH")
message("VCPKG_TRIPLET: $$VCPKG_TRIPLET")
include(vcpkg_inclusion.pri)
packagesExist(libpcrecpp) | macx {
LIBS += -lpcrecpp
CONFIG += USE_PCRE
LIBS += -lpcrecpp
CONFIG += USE_PCRE
}
CONFIG += USE_MEDIAINFO
@ -32,9 +15,9 @@ CONFIG += USE_LIBUV
DEFINES += ENABLE_BACKUPS
CONFIG += USE_CONSOLE
unix:!macx {
exists(/usr/include/fpdfview.h) {
CONFIG += USE_PDFIUM
}
exists(/usr/include/fpdfview.h) {
CONFIG += USE_PDFIUM
}
}
else {
CONFIG += USE_PDFIUM
@ -48,9 +31,9 @@ CONFIG+=c++17
}
unix:!macx {
exists(/usr/include/ffmpeg-mega)|exists(mega/bindings/qt/3rdparty/include/ffmpeg)|packagesExist(libavcodec) {
CONFIG += USE_FFMPEG
}
exists(/usr/include/ffmpeg-mega)|exists(mega/bindings/qt/3rdparty/include/ffmpeg)|packagesExist(libavcodec) {
CONFIG += USE_FFMPEG
}
}
else {
CONFIG += USE_FFMPEG
@ -75,20 +58,23 @@ else {
LIBS += -lpcre
}
MEGACMD_BASE_PATH_RELATIVE = ../../../..
MEGACMD_COMMON_BASE_PATH = $$PWD/../../..
macx {
HEADERS += ../../../../src/megacmdplatform.h
OBJECTIVE_SOURCES += ../../../../src/megacmdplatform.mm
HEADERS += $$MEGACMD_COMMON_BASE_PATH/src/megacmdplatform.h
OBJECTIVE_SOURCES += $$MEGACMD_COMMON_BASE_PATH/src/megacmdplatform.mm
ICON = app.icns
QMAKE_INFO_PLIST = Info_MEGA.plist
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
LIBS += -framework Cocoa -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Security
LIBS += -lncurses
QMAKE_CXXFLAGS += -g
}
include(../../../sdk/bindings/qt/sdk.pri)
include($$MEGACMD_COMMON_BASE_PATH/sdk/bindings/qt/sdk.pri)
DEFINES -= USE_QT
DEFINES -= MEGA_QT_LOGGING
@ -100,15 +86,22 @@ SOURCES -= bindings/qt/QTMegaSyncListener.cpp
SOURCES -= bindings/qt/QTMegaListener.cpp
SOURCES -= bindings/qt/QTMegaEvent.cpp
CONFIG(FULLREQUIREMENTS) {
DEFINES += REQUIRE_HAVE_FFMPEG
DEFINES += REQUIRE_HAVE_LIBUV
#DEFINES += REQUIRE_HAVE_LIBRAW
#DEFINES += REQUIRE_ENABLE_CHAT
DEFINES += REQUIRE_ENABLE_BACKUPS
#DEFINES += REQUIRE_ENABLE_WEBRTC
#DEFINES += REQUIRE_ENABLE_EVT_TLS
DEFINES += REQUIRE_USE_MEDIAINFO
DEFINES += REQUIRE_USE_PCRE
DEFINES += REQUIRE_HAVE_FFMPEG
DEFINES += REQUIRE_HAVE_LIBUV
#DEFINES += REQUIRE_HAVE_LIBRAW
#DEFINES += REQUIRE_ENABLE_CHAT
DEFINES += REQUIRE_ENABLE_BACKUPS
#DEFINES += REQUIRE_ENABLE_WEBRTC
#DEFINES += REQUIRE_ENABLE_EVT_TLS
DEFINES += REQUIRE_USE_MEDIAINFO
DEFINES += REQUIRE_USE_PCRE
}
SOURCES += \
$$MEGACMD_COMMON_BASE_PATH/src/megacmdcommonutils.cpp
HEADERS += \
$$MEGACMD_COMMON_BASE_PATH/src/megacmdcommonutils.h
}

View File

@ -16,8 +16,12 @@
<string>1</string>
<key>CFBundleIdentifier</key>
<string>megacmd.mac</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View File

@ -0,0 +1,45 @@
CONFIG += USE_MEGAAPI
include(../MEGAcmdCommon.pri)
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
SOURCES += \
$$MEGACMD_BASE_PATH/src/megacmd.cpp \
$$MEGACMD_BASE_PATH/src/listeners.cpp \
$$MEGACMD_BASE_PATH/src/megacmdexecuter.cpp \
$$MEGACMD_BASE_PATH/src/megacmd_events.cpp \
$$MEGACMD_BASE_PATH/src/megacmdlogger.cpp \
$$MEGACMD_BASE_PATH/src/megacmdsandbox.cpp \
$$MEGACMD_BASE_PATH/src/configurationmanager.cpp \
$$MEGACMD_BASE_PATH/src/comunicationsmanager.cpp \
$$MEGACMD_BASE_PATH/src/megacmdutils.cpp
CONFIG(USE_DOWNLOADS_COMMAND) {
DEFINES += HAVE_DOWNLOADS_COMMAND
SOURCES += $$MEGACMD_BASE_PATH/src/megacmdtransfermanager.cpp
HEADERS += $$MEGACMD_BASE_PATH/src/megacmdtransfermanager.h
}
HEADERS += \
$$MEGACMD_BASE_PATH/src/megacmd.h \
$$MEGACMD_BASE_PATH/src/megacmdexecuter.h \
$$MEGACMD_BASE_PATH/src/deferred_single_trigger.h \
$$MEGACMD_BASE_PATH/src/megacmd_events.h \
$$MEGACMD_BASE_PATH/src/listeners.h \
$$MEGACMD_BASE_PATH/src/megacmdlogger.h \
$$MEGACMD_BASE_PATH/src/megacmdsandbox.h \
$$MEGACMD_BASE_PATH/src/configurationmanager.h \
$$MEGACMD_BASE_PATH/src/comunicationsmanager.h \
$$MEGACMD_BASE_PATH/src/megacmdutils.h \
$$MEGACMD_BASE_PATH/src/megacmdversion.h \
$$MEGACMD_BASE_PATH/src/megacmdplatform.h
win32 {
SOURCES += $$MEGACMD_BASE_PATH/src/comunicationsmanagernamedpipes.cpp
HEADERS += $$MEGACMD_BASE_PATH/src/comunicationsmanagernamedpipes.h
}
else {
SOURCES += $$MEGACMD_BASE_PATH/src/comunicationsmanagerfilesockets.cpp
HEADERS += $$MEGACMD_BASE_PATH/src/comunicationsmanagerfilesockets.h
}

View File

@ -18,43 +18,8 @@ TARGET = MEGAcmd
}
TEMPLATE = app
CONFIG += console
CONFIG += USE_MEGAAPI
include(../MEGAcmdCommon.pri)
SOURCES += ../../../../src/megacmd.cpp \
../../../../src/listeners.cpp \
../../../../src/megacmdexecuter.cpp \
../../../../src/megacmdlogger.cpp \
../../../../src/megacmdsandbox.cpp \
../../../../src/configurationmanager.cpp \
../../../../src/comunicationsmanager.cpp \
../../../../src/megacmdutils.cpp \
../../../../src/megacmdcommonutils.cpp
CONFIG(USE_DOWNLOADS_COMMAND) {
DEFINES+=HAVE_DOWNLOADS_COMMAND
SOURCES += ../../../../src/megacmdtransfermanager.cpp
HEADERS += ../../../../src/megacmdtransfermanager.h
}
HEADERS += ../../../../src/megacmd.h \
../../../../src/megacmdexecuter.h \
../../../../src/listeners.h \
../../../../src/megacmdlogger.h \
../../../../src/megacmdsandbox.h \
../../../../src/configurationmanager.h \
../../../../src/comunicationsmanager.h \
../../../../src/megacmdutils.h \
../../../../src/megacmdcommonutils.h \
../../../../src/megacmdversion.h \
../../../../src/megacmdplatform.h
win32 {
SOURCES += ../../../../src/comunicationsmanagernamedpipes.cpp
HEADERS += ../../../../src/comunicationsmanagernamedpipes.h
RC_FILE = icon.rc
QMAKE_LFLAGS += /LARGEADDRESSAWARE
QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01
@ -62,7 +27,8 @@ win32 {
DEFINES += PSAPI_VERSION=1
DEFINES += UNICODE _UNICODE NTDDI_VERSION=0x06000000 _WIN32_WINNT=0x0600
}
else {
SOURCES +=../../../../src/comunicationsmanagerfilesockets.cpp
HEADERS +=../../../../src/comunicationsmanagerfilesockets.h
}
include(MEGAcmdServer.pri)
SOURCES += \
$$MEGACMD_BASE_PATH/src/megacmd_server_main.cpp

View File

@ -14,21 +14,20 @@ TARGET = MEGAcmdShell
TEMPLATE = app
CONFIG += console
include(../MEGAcmdCommon.pri)
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
SOURCES += ../../../../src/megacmdshell/megacmdshell.cpp \
../../../../src/megacmdshell/megacmdshellcommunications.cpp \
../../../../src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp \
../../../../src/megacmdcommonutils.cpp
SOURCES += \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshell.cpp \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunications.cpp \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp
HEADERS += ../../../../src/megacmdshell/megacmdshell.h \
../../../../src/megacmdshell/megacmdshellcommunications.h \
../../../../src/megacmdshell/megacmdshellcommunicationsnamedpipes.h \
../../../../sdk/include/mega/thread.h \
../../../../src/megacmdcommonutils.h
HEADERS += \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshell.h \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunications.h \
$$MEGACMD_BASE_PATH/src/megacmdshell/megacmdshellcommunicationsnamedpipes.h \
$$MEGACMD_BASE_PATH/sdk/include/mega/thread.h
win32{
RC_FILE = icon.rc
@ -45,8 +44,8 @@ win32 {
macx {
!vcpkg {
INCLUDEPATH += $$PWD/../../../../sdk/bindings/qt/3rdparty/include
LIBS += $$PWD/../../../../sdk/bindings/qt/3rdparty/libs/libreadline.a
INCLUDEPATH += $$MEGACMD_BASE_PATH/sdk/bindings/qt/3rdparty/include
LIBS += $$MEGACMD_BASE_PATH/sdk/bindings/qt/3rdparty/libs/libreadline.a
}
LIBS += -framework Cocoa -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Security
LIBS += -lncurses

View File

@ -0,0 +1,15 @@
include(../../vcpkg_inclusion.pri)
MEGACMD_BASE_PATH_RELATIVE = ../../../../..
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
INCLUDEPATH += \
$$MEGACMD_BASE_PATH/tests/common/ \
SOURCES += \
$$MEGACMD_BASE_PATH/tests/common/Instruments.cpp \
$$MEGACMD_BASE_PATH/tests/common/TestUtils.cpp \
HEADERS += \
$$MEGACMD_BASE_PATH/tests/common/Instruments.h \
$$MEGACMD_BASE_PATH/tests/common/TestUtils.h \

View File

@ -0,0 +1,72 @@
CONFIG(debug, debug|release) {
CONFIG -= debug release
CONFIG += debug
}
CONFIG(release, debug|release) {
CONFIG -= debug release
CONFIG += release
}
TARGET = test_integration
TEMPLATE = app
CONFIG -= qt
!win32:CONFIG += object_parallel_to_source
CONFIG += console
DEFINES += MEGACMD_TESTING_CODE
win32 {
LIBS += -lshlwapi -lws2_32
LIBS += -lshell32 -luser32 -ladvapi32
QMAKE_LFLAGS += /LARGEADDRESSAWARE
QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01
QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01
DEFINES += PSAPI_VERSION=1
DEFINES += UNICODE _UNICODE NTDDI_VERSION=0x06000000 _WIN32_WINNT=0x0600
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
debug:LIBS += -lgtestd -lgmockd
!debug:LIBS += -lgtest -lgmock
}
else {
exists(/opt/gtest/gtest-1.10.0/lib) {
LIBS += -L/opt/gtest/gtest-1.10.0/lib
INCLUDEPATH += /opt/gtest/gtest-1.10.0/include
}
LIBS += -lgtest -lgmock
LIBS += -lpthread
}
include(../../MEGAcmdServer/MEGAcmdServer.pri)
include(../../MEGAcmdClient/MEGAcmdClient.pri)
CONFIG -= c++11
QMAKE_CXXFLAGS-=-std=c++11
CONFIG += c++17
QMAKE_CXXFLAGS+=-std=c++17
!win32 {
QMAKE_CXXFLAGS += "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-common"
QMAKE_LFLAGS += "-fsanitize=address -fsanitize=undefined"
QMAKE_CXXFLAGS_DEBUG += "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-common"
}
include(../MEGAcmdTest_common/MEGAcmdTest_common.pri)
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
INCLUDEPATH += \
$$MEGACMD_BASE_PATH/src
SOURCES += \
$$MEGACMD_BASE_PATH/tests/integration/BasicTests.cpp \
$$MEGACMD_BASE_PATH/tests/integration/ExportTests.cpp \
$$MEGACMD_BASE_PATH/tests/integration/MegaCmdTestingTools.cpp \
$$MEGACMD_BASE_PATH/tests/integration/main.cpp
HEADERS += \
$$MEGACMD_BASE_PATH/tests/integration/MegaCmdTestingTools.h

View File

@ -0,0 +1,69 @@
CONFIG(debug, debug|release) {
CONFIG -= debug release
CONFIG += debug
}
CONFIG(release, debug|release) {
CONFIG -= debug release
CONFIG += release
}
TARGET = test_unit
TEMPLATE = app
CONFIG -= qt
!win32:CONFIG += object_parallel_to_source
CONFIG += console
DEFINES += MEGACMD_TESTING_CODE
win32 {
LIBS += -lshlwapi -lws2_32
LIBS += -lshell32 -luser32 -ladvapi32
QMAKE_LFLAGS += /LARGEADDRESSAWARE
QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01
QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01
DEFINES += PSAPI_VERSION=1
DEFINES += UNICODE _UNICODE NTDDI_VERSION=0x06000000 _WIN32_WINNT=0x0600
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
debug:LIBS += -lgtestd -lgmockd
!debug:LIBS += -lgtest -lgmock
}
else {
exists(/opt/gtest/gtest-1.10.0/lib) {
LIBS += -L/opt/gtest/gtest-1.10.0/lib
INCLUDEPATH += /opt/gtest/gtest-1.10.0/include
}
LIBS += -lgtest -lgmock
LIBS += -lpthread
}
include(../../MEGAcmdServer/MEGAcmdServer.pri)
include(../../MEGAcmdClient/MEGAcmdClient.pri)
CONFIG -= c++11
QMAKE_CXXFLAGS-=-std=c++11
CONFIG += c++17
QMAKE_CXXFLAGS+=-std=c++17
!win32 {
QMAKE_CXXFLAGS += "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-common"
QMAKE_LFLAGS += "-fsanitize=address -fsanitize=undefined"
QMAKE_CXXFLAGS_DEBUG += "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-common"
}
include(../MEGAcmdTest_common/MEGAcmdTest_common.pri)
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
INCLUDEPATH += \
$$MEGACMD_BASE_PATH/sdk/include \
$$MEGACMD_BASE_PATH/src \
SOURCES += \
$$MEGACMD_BASE_PATH/tests/unit/StringUtilsTests.cpp \
$$MEGACMD_BASE_PATH/tests/unit/UtilsTests.cpp \
$$MEGACMD_BASE_PATH/tests/unit/PlatformDirectoriesTest.cpp \
$$MEGACMD_BASE_PATH/tests/unit/main.cpp

View File

@ -0,0 +1,4 @@
TEMPLATE = subdirs
SUBDIRS += MEGAcmdTest_unit
SUBDIRS += MEGAcmdTest_integration

View File

@ -1,35 +1,3 @@
isEmpty(THIRDPARTY_VCPKG_BASE_PATH){
THIRDPARTY_VCPKG_BASE_PATH = $$PWD/../../../3rdParty_megacmd
}
win32 {
contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x64-windows-mega
!contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x86-windows-mega
}
macx{
isEmpty(VCPKG_TRIPLET){
contains(QT_ARCH, x86_64):VCPKG_TRIPLET = x64-osx-mega
contains(QT_ARCH, arm64):VCPKG_TRIPLET = arm64-osx-mega
}
contains(VCPKG_TRIPLET, arm64-osx-mega):contains(QMAKE_HOST.arch, arm64):QMAKE_APPLE_DEVICE_ARCHS=arm64
message("Building for macOS $$QT_ARCH in a $$QMAKE_HOST.arch host.")
}
unix:!macx:VCPKG_TRIPLET = x64-linux
message("THIRDPARTY_VCPKG_BASE_PATH: $$THIRDPARTY_VCPKG_BASE_PATH")
message("VCPKG_TRIPLET: $$VCPKG_TRIPLET")
THIRDPARTY_VCPKG_PATH = $$THIRDPARTY_VCPKG_BASE_PATH/vcpkg/installed/$$VCPKG_TRIPLET
exists($$THIRDPARTY_VCPKG_PATH) {
CONFIG += vcpkg
}
vcpkg:debug:message("Building DEBUG with VCPKG 3rdparty at $$THIRDPARTY_VCPKG_PATH")
vcpkg:release:message("Building RELEASE with VCPKG 3rdparty at $$THIRDPARTY_VCPKG_PATH")
!vcpkg:message("vcpkg not used")
CONFIG -= qt
MEGASDK_BASE_PATH = $$PWD/../../../../sdk
@ -40,6 +8,7 @@ CONFIG(debug, debug|release) {
CONFIG(release, debug|release) {
CONFIG -= debug release
CONFIG += release
DEFINES += NDEBUG
}
TARGET = MEGAcmdUpdater
@ -48,6 +17,14 @@ TEMPLATE = app
CONFIG += console
}
include(../vcpkg_inclusion.pri)
!win32 {
# These are required to have PlaftformDirectories stuff
include(../MEGAcmdServer/MEGAcmdServer.pri)
include(../MEGAcmdClient/MEGAcmdClient.pri)
}
HEADERS += ../../../../src/updater/UpdateTask.h \
../../../../src/updater/Preferences.h \
../../../../src/updater/MacUtils.h
@ -61,7 +38,7 @@ else:INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include
macx {
OBJECTIVE_SOURCES += ../../../../src/updater/MacUtils.mm
DEFINES += _DARWIN_FEATURE_64_BIT_INODE CRYPTOPP_DISABLE_ASM
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
!vcpkg:LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/
vcpkg:debug:LIBS += -L$$THIRDPARTY_VCPKG_PATH/debug/lib/
vcpkg:release:LIBS += -L$$THIRDPARTY_VCPKG_PATH/lib/
@ -96,18 +73,12 @@ win32 {
}
DEFINES += UNICODE _UNICODE NTDDI_VERSION=0x06000000 _WIN32_WINNT=0x0600
vcpkg:LIBS += -lurlmon -lShlwapi -lShell32 -lAdvapi32 -lcryptopp-staticcrt
vcpkg:LIBS += -lurlmon -lShlwapi -lShell32 -lAdvapi32 -lcryptopp
else:LIBS += -lurlmon -lShlwapi -lShell32 -lAdvapi32 -lcryptoppmt
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_RELEASE += -MT
QMAKE_CXXFLAGS_DEBUG += -MTd
QMAKE_CXXFLAGS_RELEASE -= -MD
QMAKE_CXXFLAGS_DEBUG -= -MDd
RC_FILE = icon.rc
QMAKE_LFLAGS += /LARGEADDRESSAWARE
QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01

View File

@ -0,0 +1,51 @@
macx|win32 {
# have VCPKG included if not done already
isEmpty(VCPKG_TRIPLET) {
MEGACMD_BASE_PATH_RELATIVE = ../../..
MEGACMD_BASE_PATH = $$PWD/$$MEGACMD_BASE_PATH_RELATIVE
isEmpty(THIRDPARTY_VCPKG_BASE_PATH){
THIRDPARTY_VCPKG_BASE_PATH = $$MEGACMD_BASE_PATH/../3rdParty_megacmd
}
win32 {
contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x64-windows-mega
!contains(QMAKE_TARGET.arch, x86_64):VCPKG_TRIPLET = x86-windows-mega
}
macx{
isEmpty(VCPKG_TRIPLET){
contains(QT_ARCH, x86_64):VCPKG_TRIPLET = x64-osx-mega
contains(QT_ARCH, arm64):VCPKG_TRIPLET = arm64-osx-mega
}
contains(VCPKG_TRIPLET, arm64-osx-mega):contains(QMAKE_HOST.arch, arm64):QMAKE_APPLE_DEVICE_ARCHS=arm64
message("Building for macOS $$QT_ARCH in a $$QMAKE_HOST.arch host.")
}
unix:!macx:VCPKG_TRIPLET = x64-linux
message("vcpkg inclusion: THIRDPARTY_VCPKG_BASE_PATH: $$THIRDPARTY_VCPKG_BASE_PATH")
message("vcpkg inclusion: VCPKG_TRIPLET: $$VCPKG_TRIPLET")
THIRDPARTY_VCPKG_PATH = $$THIRDPARTY_VCPKG_BASE_PATH/vcpkg/installed/$$VCPKG_TRIPLET
exists($$THIRDPARTY_VCPKG_PATH) {
CONFIG += vcpkg
}
}
else {
message("vcpkg inclusion: REUSING THIRDPARTY_VCPKG_BASE_PATH: $$THIRDPARTY_VCPKG_BASE_PATH")
message("vcpkg inclusion: REUSING VCPKG_TRIPLET: $$VCPKG_TRIPLET")
}
#print vcpkg inclusion status
vcpkg:debug:message("vcpkg inclusion: Building DEBUG with VCPKG 3rdparty at $$THIRDPARTY_VCPKG_PATH")
vcpkg:release:message("vcpkg inclusion: Building RELEASE with VCPKG 3rdparty at $$THIRDPARTY_VCPKG_PATH")
!vcpkg:message("vcpkg inclusion: vcpkg not used")
# Now do the actual includes:
vcpkg:INCLUDEPATH += $$THIRDPARTY_VCPKG_PATH/include
release:LIBS += -L"$$THIRDPARTY_VCPKG_PATH/lib"
debug:LIBS += -L"$$THIRDPARTY_VCPKG_PATH/debug/lib"
} #macx|win32

View File

@ -16,12 +16,11 @@ Log levels range from FATAL (the lowest) to VERBOSE (the highest).
## How to access the logs
Accessing the logs depends on the platform you are in.
Accessing the logs depends on the platform you are in.
### MacOS
By default, whenever MEGAcmdServer is executed, it will log the output into
`$HOME/.megaCmd/megacmdserver.log`.
By default, whenever MEGAcmdServer is executed, it will log the output to `$HOME/.megaCmd/megacmdserver.log`.
If you want to launch it manually execute in a terminal:
@ -31,8 +30,7 @@ export PATH=/Applications/MEGAcmd.app/Contents/MacOS:$PATH
```
### Linux
By default, whenever MEGAcmdServer is executed, it will log the output into
$HOME/.megaCmd/megacmdserver.log.
By default, whenever MEGAcmdServer is executed, it will log the output to `$HOME/.megaCmd/megacmdserver.log`.
If you want to launch it manually execute in a terminal:
@ -42,9 +40,13 @@ mega-cmd-server
### Windows
MEGAcmdServer is executed in the background without saving the log into a file. If you want to
MEGAcmdServer is executed in the background without saving the log into a file. If you want to
see the output you would need to execute the server (MEGAcmdServer.exe) manually.
## Accessing stdout and stderr
The standard output and error streams can be found in the `megacmdserver.log.out` and `megacmdserver.log.err` files, respectively. They're located in the same directories as the logs.
## Verbosity on startup
You can start the server with higher level of verbosity in order to have log levels increased at startup.
@ -89,6 +91,6 @@ SDK log level = VERBOSE
## Controlling verbosity of a single command
You can pass `-v` (`-vv`, `-vvv`, and so on for a more verbose output)
You can pass `-v` (`-vv`, `-vvv`, and so on for a more verbose output)
to an specific command and it will use higher level of verbosity of MEGAcmd based messages.

View File

@ -0,0 +1,13 @@
### autocomplete
Modifes how tab completion operates.
Usage: `autocomplete [dos | unix]`
<pre>
The default is to operate like the native platform. However
you can switch it between mode 'dos' and 'unix' as you prefer.
Options:
dos Each press of tab places the next option into the command line
unix Options are listed in a table, or put in-line if there is only one
Note: this command is only available on some versions of Windows
</pre>

View File

@ -0,0 +1,82 @@
### backup
Controls backups
Usage: `backup (localpath remotepath --period="PERIODSTRING" --num-backups=N | [-lhda] [TAG|localpath] [--period="PERIODSTRING"] [--num-backups=N]) [--time-format=FORMAT]`
<pre>
This command can be used to configure and control backups.
A tutorial can be found here: https://github.com/meganz/MEGAcmd/blob/master/contrib/docs/BACKUPS.md
If no argument is given it will list the configured backups
To get extra info on backups use -l or -h (see Options below)
When a backup of a folder (localfolder) is established in a remote folder (remotepath)
MEGAcmd will create subfolder within the remote path with names like: "localfoldername_bk_TIME"
which shall contain a backup of the local folder at that specific time
In order to configure a backup you need to specify the local and remote paths,
the period and max number of backups to store (see Configuration Options below).
Once configured, you can see extended info asociated to the backup (See Display Options)
Notice that MEGAcmd server need to be running for backups to be created.
Display Options:
-l Show extended info: period, max number, next scheduled backup
or the status of current/last backup
-h Show history of created backups
Backup states:
While a backup is being performed, the backup will be considered and labeled as ONGOING
If a transfer is cancelled or fails, the backup will be considered INCOMPLETE
If a backup is aborted (see -a), all the transfers will be canceled and the backup be ABORTED
If MEGAcmd server stops during a transfer, it will be considered MISCARRIED
Notice that currently when MEGAcmd server is restarted, ongoing and scheduled transfers
will be carried out nevertheless.
If MEGAcmd server is not running when a backup is scheduled and the time for the next one has already arrived,
an empty BACKUP will be created with state SKIPPED
If a backup(1) is ONGOING and the time for the next backup(2) arrives, it won't start untill the previous one(1)
is completed, and if by the time the first one(1) ends the time for the next one(3) has already arrived,
an empty BACKUP(2) will be created with state SKIPPED
--path-display-size=N Use a fixed size of N characters for paths
--time-format=FORMAT show time in available formats. Examples:
RFC2822: Example: Fri, 06 Apr 2018 13:05:37 +0200
ISO6081: Example: 2018-04-06
ISO6081_WITH_TIME: Example: 2018-04-06T13:05:37
SHORT: Example: 06Apr2018 13:05:37
SHORT_UTC: Example: 06Apr2018 13:05:37
CUSTOM. e.g: --time-format="%Y %b": Example: 2018 Apr
You can use any strftime compliant format: http://www.cplusplus.com/reference/ctime/strftime/
Configuration Options:
--period="PERIODSTRING" Period: either time in TIMEFORMAT (see below) or a cron like expression
Cron like period is formatted as follows
- - - - - -
| | | | | |
| | | | | |
| | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday)
| | | | +------ Month of the Year (range: 1-12)
| | | +-------- Day of the Month (range: 1-31)
| | +---------- Hour (range: 0-23)
| +------------ Minute (range: 0-59)
+-------------- Second (range: 0-59)
examples:
- daily at 04:00:00 (UTC): "0 0 4 * * *"
- every 15th day at 00:00:00 (UTC) "0 0 0 15 * *"
- mondays at 04.30.00 (UTC): "0 30 4 * * 1"
TIMEFORMAT can be expressed in hours(h), days(d),
minutes(M), seconds(s), months(m) or years(y)
e.g. "1m12d3h" indicates 1 month, 12 days and 3 hours
Notice that this is an uncertain measure since not all months
last the same and Daylight saving time changes are not considered
If possible use a cron like expresion
Notice: regardless of the period expresion, the first time you establish a backup,
it will be created immediately
--num-backups=N Maximum number of backups to store
After creating the backup (N+1) the oldest one will be deleted
That might not be true in case there are incomplete backups:
in order not to lose data, at least one COMPLETE backup will be kept
Use backup TAG|localpath --option=VALUE to modify existing backups
Management Options:
-d TAG|localpath Removes a backup by its TAG or local path
Folders created by backup won't be deleted
-a TAG|localpath Aborts ongoing backup
Caveat: This functionality is in BETA state. If you experience any issue with this, please contact: support@mega.nz
</pre>

View File

@ -0,0 +1,11 @@
### cancel
Cancels your MEGA account
Usage: `cancel`
<pre>
Caution: The account under this email address will be permanently closed
and your data deleted. This can not be undone.
The cancellation will not take place immediately. You will need to confirm the cancellation
using a link that will be delivered to your email. See "confirmcancel --help"
</pre>

View File

@ -0,0 +1,8 @@
### cat
Prints the contents of remote files
Usage: `cat remotepath1 remotepath2 ...`
<pre>
To avoid issues with encoding on Windows, if you want to cat the exact binary contents of a remote file into a local one,
use non-interactive mode with -o /path/to/file. See help "non-interactive"
</pre>

View File

@ -0,0 +1,7 @@
### cd
Changes the current remote folder
Usage: `cd [remotepath]`
<pre>
If no folder is provided, it will be changed to the root folder
</pre>

View File

@ -0,0 +1,4 @@
### clear
Clear screen
Usage: `clear`

View File

@ -0,0 +1,15 @@
### codepage
Switches the codepage used to decide which characters show on-screen.
Usage: `codepage [N [M]]`
<pre>
MEGAcmd supports unicode or specific code pages. For european countries you may need
to select a suitable codepage or secondary codepage for the character set you use.
Of course a font containing the glyphs you need must have been selected for the terminal first.
Options:
(no option) Outputs the selected code page and secondary codepage (if configured).
N Sets the main codepage to N. 65001 is Unicode.
M Sets the secondary codepage to M, which is used if the primary can't translate a character.
Note: this command is only available on some versions of Windows
</pre>

View File

@ -0,0 +1,7 @@
### confirm
Confirm an account using the link provided after the "signup" process.
Usage: `confirm link email password`
<pre>
It requires the email and the password used to obtain the link.
</pre>

View File

@ -0,0 +1,8 @@
### confirmcancel
Confirms the cancellation of your MEGA account
Usage: `confirmcancel link password`
<pre>
Caution: The account under this email address will be permanently closed
and your data deleted. This can not be undone.
</pre>

View File

@ -0,0 +1,15 @@
### cp
Copies files/folders into a new location (all remotes)
Usage: `cp [--use-pcre] srcremotepath [srcremotepath2 srcremotepath3 ..] dstremotepath|dstemail:`
<pre>
If the location exists and is a folder, the source will be copied there
If the location doesn't exist, and only one source is provided,
the file/folder will be copied and renamed to the destination name given.
If "dstemail:" provided, the file/folder will be sent to that user's inbox (//in)
e.g: cp /path/to/file user@doma.in:
Remember the trailing ":", otherwise a file with the name of that user ("user@doma.in") will be created
Options:
--use-pcre use PCRE expressions
</pre>

View File

@ -0,0 +1,7 @@
### debug
Enters debugging mode (HIGHLY VERBOSE)
Usage: `debug`
<pre>
For a finer control of log level see "log --help"
</pre>

View File

@ -0,0 +1,17 @@
### deleteversions
Deletes previous versions.
Usage: `deleteversions [-f] (--all | remotepath1 remotepath2 ...) [--use-pcre]`
<pre>
This will permanently delete all historical versions of a file.
The current version of the file will remain.
Note: any file version shared to you from a contact will need to be deleted by them.
Options:
-f Force (no asking)
--all Delete versions of all nodes. This will delete the version histories of all files (not current files).
--use-pcre use PCRE expressions
To see versions of a file use "ls --versions".
To see space occupied by file versions use "du --versions".
</pre>

View File

@ -0,0 +1,10 @@
### df
Shows storage info
Usage: `df [-h]`
<pre>
Shows total storage used in the account, storage per main folder (see mount)
Options:
-h Human readable sizes. Otherwise, size will be expressed in Bytes
</pre>

View File

@ -0,0 +1,15 @@
### du
Prints size used by files/folders
Usage: `du [-h] [--versions] [remotepath remotepath2 remotepath3 ... ] [--use-pcre]`
<pre>
remotepath can be a pattern (Perl Compatible Regular Expressions with "--use-pcre"
or wildcarded expresions with ? or * like f*00?.txt)
Options:
-h Human readable
--versions Calculate size including all versions.
You can remove all versions with "deleteversions" and list them with "ls --versions"
--path-display-size=N Use a fixed size of N characters for paths
--use-pcre use PCRE expressions
</pre>

View File

@ -0,0 +1,4 @@
### errorcode
Translate error code into string
Usage: `errorcode number`

View File

@ -0,0 +1,15 @@
### exclude
Manages exclusions in syncs.
Usage: `exclude [(-a|-d) pattern1 pattern2 pattern3]`
<pre>
Options:
-a pattern1 pattern2 ... adds pattern(s) to the exclusion list
(* and ? wildcards allowed)
-d pattern1 pattern2 ... deletes pattern(s) from the exclusion list
Caveat: removal of patterns may not trigger sync transfers right away.
Consider:
a) disable/reenable synchronizations manually
b) restart MEGAcmd server
</pre>

View File

@ -0,0 +1,8 @@
### exit
Quits MEGAcmd
Usage: `exit [--only-shell]`
<pre>
Notice that the session will still be active, and local caches available
The session will be resumed when the service is restarted
</pre>

View File

@ -0,0 +1,42 @@
### export
Prints/Modifies the status of current exports
Usage: `export [-d|-a [--writable] [--mega-hosted] [--password=PASSWORD] [--expire=TIMEDELAY] [-f]] [remotepath] [--use-pcre] [--time-format=FORMAT]`
<pre>
Options:
--use-pcre The provided path will use Perl Compatible Regular Expressions (PCRE)
-a Adds an export.
Returns an error if the export already exists.
To modify an existing export (e.g. to change expiration time, password, etc.), it must be deleted and then re-added.
--writable Turn an export folder into a writable folder link. You can use writable folder links to share and receive files from anyone; including people who dont have a MEGA account.
This type of link is the same as a "file request" link that can be created through the webclient, except that writable folder links are not write-only. Writable folder links and file requests cannot be mixed, as they use different encryption schemes.
The auth-key shown has the following format <handle>#<key>:<auth-key>. The auth-key must be provided at login, otherwise you will log into this link with read-only privileges. See "mega-login --help" for more details about logging into links.
--mega-hosted The share key of this specific folder will be shared with MEGA.
This is intended to be used for folders accessible through MEGA's S4 service.
Encryption will occur nonetheless within MEGA's S4 service.
--password=PASSWORD Protects the export with a password. Passwords cannot contain " or '.
A password-protected link will be printed only after exporting it.
If "mega-export" is used to print it again, it will be shown unencrypted.
Note: only PRO users can protect an export with a password.
--expire=TIMEDELAY Sets the expiration time of the export.
The time format can contain hours(h), days(d), minutes(M), seconds(s), months(m) or years(y).
E.g., "1m12d3h" will set an expiration time of 1 month, 12 days and 3 hours (relative to the current time).
Note: only PRO users can set an expiration time for an export.
-f Implicitly accepts copyright terms (only shown the first time an export is made).
MEGA respects the copyrights of others and requires that users of the MEGA cloud service comply with the laws of copyright.
You are strictly prohibited from using the MEGA cloud service to infringe copyright.
You may not upload, download, store, share, display, stream, distribute, email, link to, transmit or otherwise make available any files, data or content that infringes any copyright or other proprietary rights of any person or entity.
-d Deletes an export.
The file/folder itself is not deleted, only the export link.
--time-format=FORMAT show time in available formats. Examples:
RFC2822: Example: Fri, 06 Apr 2018 13:05:37 +0200
ISO6081: Example: 2018-04-06
ISO6081_WITH_TIME: Example: 2018-04-06T13:05:37
SHORT: Example: 06Apr2018 13:05:37
SHORT_UTC: Example: 06Apr2018 13:05:37
CUSTOM. e.g: --time-format="%Y %b": Example: 2018 Apr
You can use any strftime compliant format: http://www.cplusplus.com/reference/ctime/strftime/
If a remote path is provided without the add/delete options, all existing exports within its tree will be displayed.
If no remote path is given, the current working directory will be used.
</pre>

View File

@ -0,0 +1,36 @@
### find
Find nodes matching a pattern
Usage: `find [remotepath] [-l] [--pattern=PATTERN] [--type=d|f] [--mtime=TIMECONSTRAIN] [--size=SIZECONSTRAIN] [--use-pcre] [--time-format=FORMAT] [--show-handles|--print-only-handles]`
<pre>
Options:
--pattern=PATTERN Pattern to match (Perl Compatible Regular Expressions with "--use-pcre"
or wildcarded expresions with ? or * like f*00?.txt)
--type=d|f Determines type. (d) for folder, f for files
--mtime=TIMECONSTRAIN Determines time constrains, in the form: [+-]TIMEVALUE
TIMEVALUE may include hours(h), days(d), minutes(M),
seconds(s), months(m) or years(y)
Examples:
"+1m12d3h" shows files modified before 1 month,
12 days and 3 hours the current moment
"-3h" shows files modified within the last 3 hours
"-3d+1h" shows files modified in the last 3 days prior to the last hour
--size=SIZECONSTRAIN Determines size constrains, in the form: [+-]TIMEVALUE
TIMEVALUE may include (B)ytes, (K)ilobytes, (M)egabytes, (G)igabytes & (T)erabytes
Examples:
"+1m12k3B" shows files bigger than 1 Mega, 12 Kbytes and 3Bytes
"-3M" shows files smaller than 3 Megabytes
"-4M+100K" shows files smaller than 4 Mbytes and bigger than 100 Kbytes
--show-handles Prints files/folders handles (H:XXXXXXXX). You can address a file/folder by its handle
--print-only-handles Prints only files/folders handles (H:XXXXXXXX). You can address a file/folder by its handle
--use-pcre use PCRE expressions
-l Prints file info
--time-format=FORMAT show time in available formats. Examples:
RFC2822: Example: Fri, 06 Apr 2018 13:05:37 +0200
ISO6081: Example: 2018-04-06
ISO6081_WITH_TIME: Example: 2018-04-06T13:05:37
SHORT: Example: 06Apr2018 13:05:37
SHORT_UTC: Example: 06Apr2018 13:05:37
CUSTOM. e.g: --time-format="%Y %b": Example: 2018 Apr
You can use any strftime compliant format: http://www.cplusplus.com/reference/ctime/strftime/
</pre>

View File

@ -0,0 +1,24 @@
### ftp
Configures a FTP server to serve a location in MEGA
Usage: `ftp [-d ( --all | remotepath ) ] [ remotepath [--port=PORT] [--data-ports=BEGIN-END] [--public] [--tls --certificate=/path/to/certificate.pem --key=/path/to/certificate.key]] [--use-pcre]`
<pre>
This can also be used for streaming files. The server will be running as long as MEGAcmd Server is.
If no argument is given, it will list the ftp enabled locations.
Options:
--d Stops serving that location
--all When used with -d, stops serving all locations (and stops the server)
--public *Allow access from outside localhost
--port=PORT *Port to serve. DEFAULT=4990
--data-ports=BEGIN-END *Ports range used for data channel (in passive mode). DEFAULT=1500-1600
--tls *Serve with TLS (FTPs)
--certificate=/path/to/certificate.pem *Path to PEM formated certificate
--key=/path/to/certificate.key *Path to PEM formated key
--use-pcre use PCRE expressions
*If you serve more than one location, these parameters will be ignored and used those of the first location served.
If you want to change those parameters, you need to stop serving all locations and configure them again.
Caveat: This functionality is in BETA state. It might not be available on all platforms. If you experience any issue with this, please contact: support@mega.nz
</pre>

View File

@ -0,0 +1,27 @@
### get
Downloads a remote file/folder or a public link
Usage: `get [-m] [-q] [--ignore-quota-warn] [--use-pcre] [--password=PASSWORD] exportedlink|remotepath [localpath]`
<pre>
In case it is a file, the file will be downloaded at the specified folder
(or at the current folder if none specified).
If the localpath (destination) already exists and is the same (same contents)
nothing will be done. If differs, it will create a new file appending " (NUM)"
For folders, the entire contents (and the root folder itself) will be
by default downloaded into the destination folder
Exported links: Exported links are usually formed as publiclink#key.
Alternativelly you can provide a password-protected link and
provide the password with --password. Please, avoid using passwords containing " or '
Options:
-q queue download: execute in the background. Don't wait for it to end
-m if the folder already exists, the contents will be merged with the
downloaded one (preserving the existing files)
--ignore-quota-warn ignore quota surpassing warning.
The download will be attempted anyway.
--password=PASSWORD Password to decrypt the password-protected link. Please, avoid using passwords containing " or '
--use-pcre use PCRE expressions
</pre>

View File

@ -0,0 +1,16 @@
### graphics
Shows if special features related to images and videos are enabled.
Usage: `graphics [on|off]`
<pre>
Use "graphics on/off" to enable/disable it.
Disabling these features will avoid the upload of previews and thumbnails
for images and videos.
It's only recommended to disable these features before uploading files
with image or video extensions that are not really images or videos,
or that are encrypted in the local drive so they can't be analyzed anyway.
Notice that this setting will be saved for the next time you open MEGAcmd
</pre>

View File

@ -0,0 +1,12 @@
### help
Prints list of commands
Usage: `help [-f|-ff|--non-interactive|--upgrade|--paths]`
<pre>
Options:
-f Include a brief description of the commands
-ff Get a complete description of all commands
--non-interactive Display information on how to use MEGAcmd with scripts
--upgrade Display information on PRO plans
--paths Show caveats of local and remote paths
</pre>

View File

@ -0,0 +1,10 @@
### https
Shows if HTTPS is used for transfers. Use "https on" to enable it.
Usage: `https [on|off]`
<pre>
HTTPS is not necesary since all data is stored and transfered encrypted.
Enabling it will increase CPU usage and add network overhead.
Notice that this setting will be saved for the next time you open MEGAcmd
</pre>

View File

@ -0,0 +1,10 @@
### import
Imports the contents of a remote link into user's cloud
Usage: `import exportedlink [--password=PASSWORD] [remotepath]`
<pre>
If no remote path is provided, the current local folder will be used
Exported links: Exported links are usually formed as publiclink#key.
Alternativelly you can provide a password-protected link and
provide the password with --password. Please, avoid using passwords containing " or '
</pre>

View File

@ -0,0 +1,14 @@
### invite
Invites a contact / deletes an invitation
Usage: `invite [-d|-r] dstemail [--message="MESSAGE"]`
<pre>
Options:
-d Deletes invitation
-r Sends the invitation again
--message="MESSAGE" Sends inviting message
Use "showpcr" to browse invitations
Use "ipc" to manage invitations received
Use "users" to see contacts
</pre>

View File

@ -0,0 +1,14 @@
### ipc
Manages contact incoming invitations.
Usage: `ipc email|handle -a|-d|-i`
<pre>
Options:
-a Accepts invitation
-d Rejects invitation
-i Ignores invitation [WARNING: do not use unless you know what you are doing]
Use "mega-invite" to send/remove invitations to other users
Use "mega-showpcr" to browse incoming/outgoing invitations
Use "mega-users" to see contacts
</pre>

View File

@ -0,0 +1,10 @@
### killsession
Kills a session of current user.
Usage: `killsession [-a | sessionid1 sessionid2 ... ]`
<pre>
Options:
-a kills all sessions except the current one
To see all sessions use "whoami -l"
</pre>

View File

@ -0,0 +1,10 @@
### lcd
Changes the current local folder for the interactive console
Usage: `lcd [localpath]`
<pre>
It will be used for uploads and downloads
If not using interactive console, the current local folder will be
that of the shell executing mega comands
</pre>

View File

@ -0,0 +1,15 @@
### log
Prints/Modifies the current logs level
Usage: `log [-sc] level`
<pre>
Options:
-c CMD log level (higher level messages).
Messages captured by MEGAcmd server.
-s SDK log level (lower level messages).
Messages captured by the engine and libs
Regardless of the log level of the
interactive shell, you can increase the amount of information given
by any command by passing "-v" ("-vv", "-vvv", ...)
</pre>

View File

@ -0,0 +1,18 @@
### login
Logs into a MEGA account or folder link. You can only log into one entity at a time.
Usage: `login [--auth-code=XXXX] email password | exportedfolderurl#key [--auth-key=XXXX] | passwordprotectedlink [--password=PASSWORD] | session`
<pre>
Logging into a MEGA account:
You can log into a MEGA account by providing either a session ID or a username and password. A session ID simply identifies a session that you have previously logged in with using a username and password; logging in with a session ID simply resumes that session. If this is your first time logging in, you will need to do so with a username and password.
Options:
--auth-code=XXXXXX: If you're logging in using a username and password, and this account has multifactor authentication (MFA) enabled, then this option allows you to pass the MFA token in directly rather than being prompted for it later on. For more information on this topic, please visit https://mega.nz/blog_48.
Logging into a MEGA folder link (an exported/public folder):
MEGA folder links have the form URL#KEY. To log into one, simply execute the login command with the link.
Options:
--password=PASSWORD: If the link is a password protected link, then this option can be used to pass in the password for that link.
--auth-key=AUTHKEY: If the link is a writable folder link, then this option allows you to log in with write privileges. Without this option, you will log into the link with read access only.
For more information about MEGA folder links, see "mega-export --help".
</pre>

View File

@ -0,0 +1,8 @@
### logout
Logs out
Usage: `logout [--keep-session]`
<pre>
Options:
--keep-session Keeps the current session.
</pre>

View File

@ -0,0 +1,10 @@
### lpwd
Prints the current local folder for the interactive console
Usage: `lpwd`
<pre>
It will be used for uploads and downloads
If not using interactive console, the current local folder will be
that of the shell executing mega comands
</pre>

View File

@ -0,0 +1,42 @@
### ls
Lists files in a remote path
Usage: `ls [-halRr] [--show-handles] [--tree] [--versions] [remotepath] [--use-pcre] [--show-creation-time] [--time-format=FORMAT]`
<pre>
remotepath can be a pattern (Perl Compatible Regular Expressions with "--use-pcre"
or wildcarded expresions with ? or * like f*00?.txt)
Also, constructions like /PATTERN1/PATTERN2/PATTERN3 are allowed
Options:
-R|-r List folders recursively
--tree Prints tree-like exit (implies -r)
--show-handles Prints files/folders handles (H:XXXXXXXX). You can address a file/folder by its handle
-l Print summary (--tree has no effect)
SUMMARY contents:
FLAGS: Indicate type/status of an element:
xxxx
|||+---- Sharing status: (s)hared, (i)n share or not shared(-)
||+----- if exported, whether it is (p)ermanent or (t)temporal
|+------ e/- wheter node is (e)xported
+-------- Type(d=folder,-=file,r=root,i=inbox,b=rubbish,x=unsupported)
VERS: Number of versions in a file
SIZE: Size of the file in bytes:
DATE: Modification date for files and creation date for folders (in UTC time):
NAME: name of the node
-h Show human readable sizes in summary
-a Include extra information
If this flag is repeated (e.g: -aa) more info will appear
(public links, expiration dates, ...)
--versions show historical versions
You can delete all versions of a file with "deleteversions"
--show-creation-time show creation time instead of modification time for files
--time-format=FORMAT show time in available formats. Examples:
RFC2822: Example: Fri, 06 Apr 2018 13:05:37 +0200
ISO6081: Example: 2018-04-06
ISO6081_WITH_TIME: Example: 2018-04-06T13:05:37
SHORT: Example: 06Apr2018 13:05:37
SHORT_UTC: Example: 06Apr2018 13:05:37
CUSTOM. e.g: --time-format="%Y %b": Example: 2018 Apr
You can use any strftime compliant format: http://www.cplusplus.com/reference/ctime/strftime/
--use-pcre use PCRE expressions
</pre>

View File

@ -0,0 +1,13 @@
### masterkey
Shows your master key.
Usage: `masterkey pathtosave`
<pre>
Your data is only readable through a chain of decryption operations that begins
with your master encryption key (Recovery Key), which MEGA stores encrypted with your password.
This means that if you lose your password, your Recovery Key can no longer be decrypted,
and you can no longer decrypt your data.
Exporting the Recovery Key and keeping it in a secure location
enables you to set a new password without data loss.
Always keep physical control of your master key (e.g. on a client device, external storage, or print)
</pre>

View File

@ -0,0 +1,8 @@
### mediainfo
Prints media info of remote files
Usage: `info remotepath1 remotepath2 ...`
<pre>
Options:
--path-display-size=N Use a fixed size of N characters for paths
</pre>

View File

@ -0,0 +1,8 @@
### mkdir
Creates a directory or a directories hierarchy
Usage: `mkdir [-p] remotepath`
<pre>
Options:
-p Allow recursive
</pre>

View File

@ -0,0 +1,8 @@
### mount
Lists all the root nodes
Usage: `mount`
<pre>
This includes the root node in your cloud drive, Inbox, Rubbish Bin
and all the in-shares (nodes shares to you from other users)
</pre>

View File

@ -0,0 +1,10 @@
### mv
Moves file(s)/folder(s) into a new location (all remotes)
Usage: `mv srcremotepath [--use-pcre] [srcremotepath2 srcremotepath3 ..] dstremotepath`
<pre>
If the location exists and is a folder, the source will be moved there
If the location doesn't exist, the source will be renamed to the destination name given
Options:
--use-pcre use PCRE expressions
</pre>

View File

@ -0,0 +1,14 @@
### passwd
Modifies user password
Usage: `passwd [-f] [--auth-code=XXXX] newpassword`
<pre>
Notice that modifying the password will close all your active sessions
in all your devices (except for the current one)
Please, avoid using passwords containing " or '
Options:
-f Force (no asking)
--auth-code=XXXX Two-factor Authentication code. More info: https://mega.nz/blog_48
</pre>

View File

@ -0,0 +1,18 @@
### permissions
Shows/Establish default permissions for files and folders created by MEGAcmd.
Usage: `permissions [(--files|--folders) [-s XXX]]`
<pre>
Permissions are unix-like permissions, with 3 numbers: one for owner, one for group and one for others
Options:
--files To show/set files default permissions.
--folders To show/set folders default permissions.
--s XXX To set new permissions for newly created files/folder.
Notice that for files minimum permissions is 600,
for folders minimum permissions is 700.
Further restrictions to owner are not allowed (to avoid missfunctioning).
Notice that permissions of already existing files/folders will not change.
Notice that permissions of already existing files/folders will not change.
Note: permissions will be saved for the next time you execute MEGAcmd server. They will be removed if you logout. Permissions are not available on Windows.
</pre>

View File

@ -0,0 +1,10 @@
### preview
To download/upload the preview of a file.
Usage: `preview [-s] remotepath localpath`
<pre>
If no -s is inidicated, it will download the preview.
Options:
-s Sets the preview to the specified file
</pre>

View File

@ -0,0 +1,14 @@
### proxy
Show or sets proxy configuration
Usage: `proxy [URL|--auto|--none] [--username=USERNAME --password=PASSWORD]`
<pre>
With no parameter given, this will print proxy configuration
Options:
URL Proxy URL (e.g: https://127.0.0.1:8080)
--none To disable using a proxy
--auto To use the proxy configured in your system
--username=USERNAME The username, for authenticated proxies
--password=PASSWORD The password, for authenticated proxies. Please, avoid using passwords containing " or '
</pre>

View File

@ -0,0 +1,8 @@
### psa
Shows the next available Public Service Announcement (PSA)
Usage: `psa [--discard]`
<pre>
Options:
--discard Discards last received PSA
</pre>

View File

@ -0,0 +1,16 @@
### put
Uploads files/folders to a remote folder
Usage: `put [-c] [-q] [--ignore-quota-warn] localfile [localfile2 localfile3 ...] [dstremotepath]`
<pre>
Options:
-c Creates remote folder destination in case of not existing.
-q queue upload: execute in the background. Don't wait for it to end
--ignore-quota-warn ignore quota surpassing warning.
The upload will be attempted anyway.
Notice that the dstremotepath can only be omitted when only one local path is provided.
In such case, the current remote working dir will be the destination for the upload.
Mind that using wildcards for local paths in non-interactive mode in a supportive console (e.g. bash),
could result in multiple paths being passed to MEGAcmd.
</pre>

View File

@ -0,0 +1,4 @@
### pwd
Prints the current remote folder
Usage: `pwd`

View File

@ -0,0 +1,8 @@
### quit
Quits MEGAcmd
Usage: `quit [--only-shell]`
<pre>
Notice that the session will still be active, and local caches available
The session will be resumed when the service is restarted
</pre>

Some files were not shown because too many files have changed in this diff Show More