mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-04-07 14:06:31 +08:00
Compare commits
236 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a8a3487749 | |||
| e31c77d42c | |||
| e06a076e30 | |||
| e421a16469 | |||
| bc3a6cd4e9 | |||
| 5b54f203b6 | |||
| 7a115ed3b4 | |||
| 203fa4a554 | |||
| 1ae3df953c | |||
| a06b1a3eae | |||
| 1008de5dcf | |||
| 7e5a509c32 | |||
| 72ae1f18fd | |||
| b5ad4ae8a7 | |||
| e1132269e5 | |||
| 2c43b6e49a | |||
| 2599806cb1 | |||
| 00d31b2354 | |||
| 9d1d24811b | |||
| cf4cac9482 | |||
| 3537d7c05d | |||
| f2022f2607 | |||
| 23d96dbd4d | |||
| a651981b61 | |||
| 6376218441 | |||
| cff2f7256a | |||
| a7c6f1f81a | |||
| fa23cb1efe | |||
| 2c6a2e81ec | |||
| cf0f2feb29 | |||
| b35ba7f6d5 | |||
| 659ef4b804 | |||
| 610fb0e711 | |||
| d641c85aea | |||
| 0a4aaa0583 | |||
| d6e85aa352 | |||
| 191c895d6b | |||
| 1acd5bf8bb | |||
| 86a3dcedd9 | |||
| 1a4e6aa5ab | |||
| bdd4b7ee45 | |||
| fd24c14da4 | |||
| e15a138ff7 | |||
| 4389f35509 | |||
| 8b2c7cac42 | |||
| b2f22ff710 | |||
| 2edf26d70a | |||
| e0d2229b16 | |||
| cec0423b14 | |||
| c2646afd40 | |||
| 03cf7e26b7 | |||
| 4649f8b854 | |||
| 0d81353be1 | |||
| 0fb05dd5e8 | |||
| a38d97c302 | |||
| c0ead7a4c7 | |||
| 7a142c714f | |||
| e1f0b3bdcc | |||
| c4cf3710a7 | |||
| 22666b8bba | |||
| 811a82a211 | |||
| 84b81d2df0 | |||
| 05fa273558 | |||
| 8b23a074a3 | |||
| c6cc482b92 | |||
| 9ccad7a417 | |||
| 71e4b7b2ef | |||
| 39dd4e3aa4 | |||
| 1a35214b2b | |||
| 0d1f975687 | |||
| 418d8f74cf | |||
| 92f7db0a50 | |||
| e93317ebb2 | |||
| d922e03c95 | |||
| c218aebea6 | |||
| cedb7af539 | |||
| 0b0277923f | |||
| 6e69de0acc | |||
| 54838d542b | |||
| a3a7289d42 | |||
| 130933db36 | |||
| 8030ac6beb | |||
| f8091afb69 | |||
| 0a41abdff7 | |||
| 8381ef6c24 | |||
| 880dc8450b | |||
| 8de2dec4e1 | |||
| fc3013a066 | |||
| dfcde3fef9 | |||
| 278bcb6136 | |||
| 105d69337c | |||
| fc2e7b5382 | |||
| 9a69116d8f | |||
| d5bf7cff40 | |||
| a00f198a33 | |||
| 3d9870e8a3 | |||
| 070c77f11a | |||
| b34e11cfdf | |||
| 25a453fa1e | |||
| 830b01114a | |||
| 48f2d54676 | |||
| c3ab2959bd | |||
| 4e5fe85e6d | |||
| 730b2e5adb | |||
| c28c329085 | |||
| 1e933cefcb | |||
| 5217b7c342 | |||
| ee22cbca1b | |||
| c1e21f9884 | |||
| 74a6da2f57 | |||
| c25c28333a | |||
| fc80745b8d | |||
| b361128ec4 | |||
| fa7dfa2e96 | |||
| f4d6c67431 | |||
| 8fe758e14a | |||
| bb58688b49 | |||
| 676b519f46 | |||
| 626a121eb0 | |||
| c89a54ccf4 | |||
| 23a7b9cc87 | |||
| 351192378d | |||
| aa978f56d1 | |||
| a8b9d2ce3e | |||
| 6e1db8eb00 | |||
| df98984a40 | |||
| 661041b1df | |||
| ff1c0c9b41 | |||
| 0c111433c8 | |||
| e0754402d8 | |||
| 1af7d31285 | |||
| 1fd9566702 | |||
| dd3f9410cb | |||
| 3942c2f69a | |||
| 8c93a0ebae | |||
| e9359c86d2 | |||
| 0519981d24 | |||
| e86f2b3e9f | |||
| d9df09ceec | |||
| afde46bbae | |||
| ee9fed8fe8 | |||
| d26eee685a | |||
| 68a2eb8742 | |||
| d582343874 | |||
| a6c4dcaad3 | |||
| ac071bd62b | |||
| b6260f100a | |||
| 61ac320826 | |||
| 64dce5a060 | |||
| 71692df973 | |||
| e1b94bf226 | |||
| c895e4da83 | |||
| 98f211bd4b | |||
| b41a1b8a67 | |||
| 83cc90fbbd | |||
| 5dac0c57cb | |||
| 4aef611665 | |||
| da28605e63 | |||
| 2a6c42eb1f | |||
| 46fc1d8142 | |||
| aa2df4f6df | |||
| 9ca7fea042 | |||
| 9661121b38 | |||
| e6b8396d2c | |||
| 0df4b93182 | |||
| c20656897d | |||
| 1540675db7 | |||
| 0fb4a31c3c | |||
| f4a3c8dc0f | |||
| c61ba0cb77 | |||
| 407db1a1ae | |||
| 345af89c97 | |||
| bd3568eba0 | |||
| 9486e8ef1c | |||
| 9cb14b295b | |||
| 686b576588 | |||
| 00cad780a9 | |||
| 1f4748afc4 | |||
| 2abdf201df | |||
| 8a61529d41 | |||
| 46202ce1c7 | |||
| 50d0e4dc61 | |||
| 1cf2095e98 | |||
| faf5d1904f | |||
| 807f5a6bab | |||
| cf5b322852 | |||
| d52d724e66 | |||
| 42ac2b9907 | |||
| 95c41f4a6a | |||
| 0a832f3e5f | |||
| c2550f7f91 | |||
| 917165cc86 | |||
| 12c18895e9 | |||
| 832147f4d2 | |||
| a9ad740efe | |||
| 0b33ff68bf | |||
| d685720dd6 | |||
| c305cf4684 | |||
| 66aa92eab9 | |||
| f254b46efc | |||
| 83bdcb6ada | |||
| b627457c98 | |||
| a739db1854 | |||
| 7e20b9eaa2 | |||
| 8e1ccbf685 | |||
| 5389dffc35 | |||
| 5631c9825e | |||
| 9ff45e3e3c | |||
| 11487b4fd2 | |||
| a8e7b74393 | |||
| 7bb5eba0ea | |||
| 284b7e2f90 | |||
| b3b23e4d47 | |||
| 68030465f7 | |||
| f09cd28ba3 | |||
| 7cd507d023 | |||
| 68cfbf067d | |||
| 9538741b11 | |||
| 7219c65dcb | |||
| 938019d26f | |||
| c4b81dc438 | |||
| 46bbbd1bc0 | |||
| bb690328a8 | |||
| 043b77e06a | |||
| 5e7b22b6d7 | |||
| 4a4e8b7568 | |||
| 26ce05f76c | |||
| 1f3f801124 | |||
| 63a6ecd17f | |||
| 55448fcb73 | |||
| 6364de594f | |||
| dd8145083e | |||
| d17eec062c | |||
| 22d8c377df | |||
| ad12cc9a54 | |||
| baee5f58b8 |
25
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report an issue with build_tools you've discovered.
|
||||
---
|
||||
|
||||
**Describe your problem**:
|
||||
|
||||
*Be clear in your description of the problem.
|
||||
Open an issue with a descriptive title and a summary in complete sentences.*
|
||||
|
||||
*Use the template below when reporting bugs. Please, make sure that
|
||||
you're fetched latest master of build_tools and that the problem you're reporting
|
||||
hasn't been reported (and potentially fixed) already.*
|
||||
|
||||
*Before filing the ticket you should replace all cursive text with your own words.*
|
||||
|
||||
**Steps to reproduce the problem**:
|
||||
|
||||
*Please make sure your error can be reproduced, Docker can be a great help*
|
||||
|
||||
**build_tools base repo version**:
|
||||
|
||||
**Operating system**:
|
||||
|
||||
**Compiler version**:
|
||||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
@ -12,4 +12,4 @@ jobs:
|
||||
- name: Check *.md files by `markdownlint`
|
||||
run: |
|
||||
npm install -g markdownlint-cli
|
||||
markdownlint *.md
|
||||
markdownlint *.md develop/*.md
|
||||
|
||||
33
.github/workflows/update-version.yml
vendored
Normal file
33
.github/workflows/update-version.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Update hard-coded version
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
|
||||
update-version:
|
||||
if: >-
|
||||
${{ contains(github.ref, 'refs/heads/hotfix/v') ||
|
||||
contains(github.ref, 'refs/heads/release/v') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.PUSH_TOKEN }}
|
||||
|
||||
- name: Set version
|
||||
run: >-
|
||||
echo "${{ github.ref_name }}" |
|
||||
awk '{gsub(/.+\/v/,"version=");print;}' >> $GITHUB_ENV
|
||||
|
||||
- name: Save version
|
||||
run: echo "${{ env.version }}" > version
|
||||
|
||||
- name: Commit & push changes
|
||||
uses: EndBug/add-and-commit@v8
|
||||
with:
|
||||
author_name: github-actions[bot]
|
||||
author_email: github-actions[bot]@users.noreply.github.com
|
||||
message: Update hard-coded version to v${{ env.version }}
|
||||
add: version
|
||||
@ -4,9 +4,10 @@ ENV TZ=Etc/UTC
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y install python3 \
|
||||
apt-get -y install python \
|
||||
python3 \
|
||||
sudo
|
||||
|
||||
RUN rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python
|
||||
ADD . /build_tools
|
||||
WORKDIR /build_tools
|
||||
|
||||
|
||||
661
LICENSE.txt
Normal file
661
LICENSE.txt
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
15
README.md
15
README.md
@ -167,10 +167,6 @@ LD_LIBRARY_PATH=./ ./DesktopEditors
|
||||
proxy_pass http://localhost:8000;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
location /spellchecker/ {
|
||||
proxy_pass http://localhost:8080/;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -261,16 +257,7 @@ allow to run foreground processes in background mode.
|
||||
./converter
|
||||
```
|
||||
|
||||
2. Start the **SpellChecker** service:
|
||||
|
||||
```bash
|
||||
cd out/linux_64/onlyoffice/documentserver/server/SpellChecker
|
||||
NODE_ENV=development-linux \
|
||||
NODE_CONFIG_DIR=$PWD/../Common/config \
|
||||
./spellchecker
|
||||
```
|
||||
|
||||
3. Start the **DocService** service:
|
||||
2. Start the **DocService** service:
|
||||
|
||||
```bash
|
||||
cd out/linux_64/onlyoffice/documentserver/server/DocService
|
||||
|
||||
3
Rakefile
3
Rakefile
@ -2,8 +2,9 @@
|
||||
|
||||
desc 'Cleanup old build files'
|
||||
task :clean do
|
||||
archive_name_pattern = 'build_tools*.tar.gz'
|
||||
sh('sudo rm -rf out')
|
||||
sh('rm build_tools*.tar.gz')
|
||||
sh("rm #{archive_name_pattern}") unless Dir.glob(archive_name_pattern).empty?
|
||||
end
|
||||
|
||||
desc 'Build version anew'
|
||||
|
||||
385
build.pro
385
build.pro
@ -4,35 +4,15 @@ ROOT_DIR=$$PWD/..
|
||||
DEPLOY_DIR=$$PWD/deploy
|
||||
CORE_ROOT_DIR=$$ROOT_DIR/core
|
||||
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
||||
MAKEFILE=makefiles/build.makefile_$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
PRO_SUFFIX=$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
|
||||
core_debug {
|
||||
MAKEFILE=$$join(MAKEFILE, MAKEFILE, "", "_debug_")
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, PRO_SUFFIX, "", "_debug_")
|
||||
}
|
||||
build_xp {
|
||||
MAKEFILE=$$join(MAKEFILE, MAKEFILE, "", "_xp")
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, PRO_SUFFIX, "", "_xp")
|
||||
}
|
||||
OO_BRANDING_SUFFIX = $$(OO_BRANDING)
|
||||
!isEmpty(OO_BRANDING_SUFFIX) {
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, PRO_SUFFIX, "", "$$OO_BRANDING_SUFFIX")
|
||||
MAKEFILE=$$join(MAKEFILE, MAKEFILE, "", "$$OO_BRANDING_SUFFIX")
|
||||
}
|
||||
|
||||
message(current_makefile)
|
||||
message($$MAKEFILE)
|
||||
include($$PWD/common.pri)
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
core_windows {
|
||||
CONFIG += core_and_multimedia
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
}
|
||||
core_linux {
|
||||
CONFIG += core_and_multimedia
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
}
|
||||
core_mac {
|
||||
CONFIG += no_desktop_apps
|
||||
@ -40,317 +20,96 @@ core_mac {
|
||||
core_ios {
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
}
|
||||
core_android {
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
}
|
||||
|
||||
SUBDIRS = \
|
||||
cryptopp \
|
||||
\
|
||||
kernel \
|
||||
unicodeconverter \
|
||||
graphics \
|
||||
pdfwriter \
|
||||
djvufile \
|
||||
xpsfile \
|
||||
htmlrenderer \
|
||||
pdfreader \
|
||||
htmlfile2 \
|
||||
doctrenderer \
|
||||
fb2file \
|
||||
epubfile
|
||||
|
||||
addSubProject(cryptopp, $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/cryptopp.pro)
|
||||
addSubProject(kernel, $$CORE_ROOT_DIR/Common/kernel.pro,\
|
||||
cryptopp)
|
||||
addSubProject(unicodeconverter, $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter.pro,\
|
||||
kernel)
|
||||
addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\
|
||||
kernel)
|
||||
addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(pdfwriter, $$CORE_ROOT_DIR/PdfWriter/PdfWriter.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(djvufile, $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro,\
|
||||
kernel unicodeconverter graphics pdfwriter)
|
||||
addSubProject(xpsfile, $$CORE_ROOT_DIR/XpsFile/XpsFile.pro,\
|
||||
kernel unicodeconverter graphics pdfwriter)
|
||||
addSubProject(htmlrenderer, $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro,\
|
||||
kernel unicodeconverter graphics pdfwriter)
|
||||
addSubProject(pdfreader, $$CORE_ROOT_DIR/PdfReader/PdfReader.pro,\
|
||||
kernel unicodeconverter graphics pdfwriter htmlrenderer)
|
||||
addSubProject(htmlfile2, $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro,\
|
||||
kernel unicodeconverter graphics network)
|
||||
addSubProject(doctrenderer, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/doctrenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(fb2file, $$CORE_ROOT_DIR/Fb2File/Fb2File.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\
|
||||
kernel unicodeconverter graphics htmlfile2)
|
||||
!no_x2t {
|
||||
SUBDIRS += \
|
||||
docxformat \
|
||||
pptxformat \
|
||||
docxfile \
|
||||
txtxmlformat \
|
||||
rtfformat \
|
||||
pptformat \
|
||||
docformat \
|
||||
odffilereader \
|
||||
odffilewriter \
|
||||
xlsformat \
|
||||
x2t
|
||||
addSubProject(docxformat, $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro)
|
||||
addSubProject(pptxformat, $$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro)
|
||||
addSubProject(docxfile, $$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro)
|
||||
addSubProject(txtxmlformat, $$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro)
|
||||
addSubProject(rtfformat, $$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro)
|
||||
addSubProject(pptformat, $$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro)
|
||||
addSubProject(docformat, $$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro)
|
||||
addSubProject(odffilereader, $$CORE_ROOT_DIR/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro)
|
||||
addSubProject(odffilewriter, $$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro)
|
||||
addSubProject(xlsformat, $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro)
|
||||
addSubProject(x2t, $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro,\
|
||||
docxformat pptxformat docxfile txtxmlformat rtfformat pptformat docformat odffilereader odffilewriter xlsformat fb2file epubfile)
|
||||
}
|
||||
|
||||
!no_use_common_binary {
|
||||
SUBDIRS += \
|
||||
allfontsgen \
|
||||
allthemesgen \
|
||||
docbuilder
|
||||
addSubProject(allfontsgen, $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/AllFontsGen.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(allthemesgen, $$CORE_ROOT_DIR/DesktopEditor/allthemesgen/allthemesgen.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(docbuilder, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/docbuilder.pro,\
|
||||
kernel unicodeconverter graphics doctrenderer)
|
||||
}
|
||||
|
||||
core_ios:CONFIG += no_tests
|
||||
core_android:CONFIG += no_tests
|
||||
!no_tests {
|
||||
SUBDIRS += standardtester
|
||||
addSubProject(standardtester, $$CORE_ROOT_DIR/Test/Applications/StandardTester/standardtester.pro)
|
||||
}
|
||||
|
||||
core_and_multimedia {
|
||||
SUBDIRS += \
|
||||
videoplayer
|
||||
addSubProject(videoplayer, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/videoplayerlib.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
}
|
||||
|
||||
desktop {
|
||||
message(desktop)
|
||||
|
||||
SUBDIRS += \
|
||||
hunspell \
|
||||
ooxmlsignature \
|
||||
documentscore \
|
||||
documentscore_helper
|
||||
|
||||
!core_mac {
|
||||
SUBDIRS += qtdocumentscore
|
||||
}
|
||||
|
||||
!no_desktop_apps {
|
||||
core_windows:SUBDIRS += projicons
|
||||
SUBDIRS += desktopapp
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ordered {
|
||||
# remove all makefiles
|
||||
|
||||
defineTest(removeFile) {
|
||||
file = $$1
|
||||
win32:file ~= s,/,\\,g
|
||||
core_windows {
|
||||
system(if exist $$shell_quote($$file) $$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
defineTest(qmakeClear) {
|
||||
dir = $$1
|
||||
name = $$2
|
||||
removeFile($$1/Makefile.$$2$$PRO_SUFFIX)
|
||||
removeFile($$1/.qmake.stash)
|
||||
}
|
||||
|
||||
qmakeClear($$CORE_ROOT_DIR/Common/3dParty/cryptopp/project, cryptopp)
|
||||
qmakeClear($$CORE_ROOT_DIR/Common, kernel)
|
||||
qmakeClear($$CORE_ROOT_DIR/UnicodeConverter, UnicodeConverter)
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/graphics/pro, graphics)
|
||||
qmakeClear($$CORE_ROOT_DIR/PdfWriter, PdfWriter)
|
||||
qmakeClear($$CORE_ROOT_DIR/DjVuFile, DjVuFile)
|
||||
qmakeClear($$CORE_ROOT_DIR/XpsFile, XpsFile)
|
||||
qmakeClear($$CORE_ROOT_DIR/HtmlRenderer, htmlrenderer)
|
||||
qmakeClear($$CORE_ROOT_DIR/PdfReader, PdfReader)
|
||||
qmakeClear($$CORE_ROOT_DIR/HtmlFile2, HtmlFile2)
|
||||
qmakeClear($$CORE_ROOT_DIR/EpubFile, EpubFile)
|
||||
qmakeClear($$CORE_ROOT_DIR/Fb2File, Fb2File)
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/doctrenderer, doctrenderer)
|
||||
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/AllFontsGen, AllFontsGen)
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/allthemesgen, allthemesgen)
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder, docbuilder)
|
||||
qmakeClear($$CORE_ROOT_DIR/Test/Applications/StandardTester, standardtester)
|
||||
|
||||
qmakeClear($$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib, DocxFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib, PPTXFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux, ASCOfficeDocxFile2Lib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux, TxtXmlFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux, RtfFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux, PPTFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux, DocFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeOdfFile/linux, OdfFileReaderLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux, OdfFileWriterLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux, XlsFormatLib)
|
||||
qmakeClear($$CORE_ROOT_DIR/X2tConverter/build/Qt, X2tConverter)
|
||||
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/hunspell-1.3.3/src/qt, hunspell)
|
||||
qmakeClear($$CORE_ROOT_DIR/DesktopEditor/xmlsec/src, ooxmlsignature)
|
||||
qmakeClear($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib, ascdocumentscore)
|
||||
qmakeClear($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib, ascdocumentscore_helper)
|
||||
qmakeClear($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper, qtascdocumentscore)
|
||||
qmakeClear($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib, videoplayerlib)
|
||||
qmakeClear($$ROOT_DIR/desktop-apps/win-linux/extras/projicons, ProjIcons)
|
||||
qmakeClear($$ROOT_DIR/desktop-apps/win-linux, ASCDocumentEditor)
|
||||
}
|
||||
|
||||
# PROJECTS
|
||||
cryptopp.file = $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/cryptopp.pro
|
||||
cryptopp.makefile = $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/Makefile.cryptopp$$PRO_SUFFIX
|
||||
|
||||
kernel.file = $$CORE_ROOT_DIR/Common/kernel.pro
|
||||
kernel.makefile = $$CORE_ROOT_DIR/Common/Makefile.kernel$$PRO_SUFFIX
|
||||
|
||||
unicodeconverter.file = $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter.pro
|
||||
unicodeconverter.makefile = $$CORE_ROOT_DIR/UnicodeConverter/Makefile.UnicodeConverter$$PRO_SUFFIX
|
||||
|
||||
graphics.file = $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro
|
||||
graphics.makefile = $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/Makefile.graphics$$PRO_SUFFIX
|
||||
|
||||
pdfwriter.file = $$CORE_ROOT_DIR/PdfWriter/PdfWriter.pro
|
||||
pdfwriter.makefile = $$CORE_ROOT_DIR/PdfWriter/Makefile.PdfWriter$$PRO_SUFFIX
|
||||
|
||||
djvufile.file = $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro
|
||||
djvufile.makefile = $$CORE_ROOT_DIR/DjVuFile/Makefile.DjVuFile$$PRO_SUFFIX
|
||||
|
||||
xpsfile.file = $$CORE_ROOT_DIR/XpsFile/XpsFile.pro
|
||||
xpsfile.makefile = $$CORE_ROOT_DIR/XpsFile/Makefile.XpsFile$$PRO_SUFFIX
|
||||
|
||||
htmlrenderer.file = $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro
|
||||
htmlrenderer.makefile = $$CORE_ROOT_DIR/HtmlRenderer/Makefile.htmlrenderer$$PRO_SUFFIX
|
||||
|
||||
pdfreader.file = $$CORE_ROOT_DIR/PdfReader/PdfReader.pro
|
||||
pdfreader.makefile = $$CORE_ROOT_DIR/PdfReader/Makefile.PdfReader$$PRO_SUFFIX
|
||||
|
||||
htmlfile2.file = $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro
|
||||
htmlfile2.makefile = $$CORE_ROOT_DIR/HtmlFile2/Makefile.HtmlFile2$$PRO_SUFFIX
|
||||
|
||||
doctrenderer.file = $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/doctrenderer.pro
|
||||
doctrenderer.makefile = $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/Makefile.doctrenderer$$PRO_SUFFIX
|
||||
|
||||
fb2file.file = $$CORE_ROOT_DIR/Fb2File/Fb2File.pro
|
||||
fb2file.makefile = $$CORE_ROOT_DIR/Fb2File/Makefile.Fb2File$$PRO_SUFFIX
|
||||
|
||||
epubfile.file = $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro
|
||||
epubfile.makefile = $$CORE_ROOT_DIR/EpubFile/Makefile.EpubFile$$PRO_SUFFIX
|
||||
|
||||
!no_use_common_binary {
|
||||
allfontsgen.file = $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/AllFontsGen.pro
|
||||
allfontsgen.makefile = $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/Makefile.AllFontsGen$$PRO_SUFFIX
|
||||
|
||||
allthemesgen.file = $$CORE_ROOT_DIR/DesktopEditor/allthemesgen/allthemesgen.pro
|
||||
allthemesgen.makefile = $$CORE_ROOT_DIR/DesktopEditor/allthemesgen/Makefile.allthemesgen$$PRO_SUFFIX
|
||||
|
||||
docbuilder.file = $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/docbuilder.pro
|
||||
docbuilder.makefile = $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/Makefile.docbuilder$$PRO_SUFFIX
|
||||
}
|
||||
|
||||
!no_tests {
|
||||
standardtester.file = $$CORE_ROOT_DIR/Test/Applications/StandardTester/standardtester.pro
|
||||
standardtester.makefile = $$CORE_ROOT_DIR/Test/Applications/StandardTester/Makefile.standardtester$$PRO_SUFFIX
|
||||
}
|
||||
|
||||
!no_x2t {
|
||||
docxformat.file = $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
|
||||
docxformat.makefile = $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/Makefile.DocxFormatLib$$PRO_SUFFIX
|
||||
|
||||
pptxformat.file = $$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
|
||||
pptxformat.makefile = $$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile.PPTXFormatLib$$PRO_SUFFIX
|
||||
|
||||
docxfile.file = $$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro
|
||||
docxfile.makefile = $$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux/Makefile.ASCOfficeDocxFile2Lib$$PRO_SUFFIX
|
||||
|
||||
txtxmlformat.file = $$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro
|
||||
txtxmlformat.makefile = $$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/Makefile.TxtXmlFormatLib$$PRO_SUFFIX
|
||||
|
||||
rtfformat.file = $$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro
|
||||
rtfformat.makefile = $$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux/Makefile.RtfFormatLib$$PRO_SUFFIX
|
||||
|
||||
pptformat.file = $$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro
|
||||
pptformat.makefile = $$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux/Makefile.PPTFormatLib$$PRO_SUFFIX
|
||||
|
||||
docformat.file = $$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro
|
||||
docformat.makefile = $$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux/Makefile.DocFormatLib$$PRO_SUFFIX
|
||||
|
||||
odffilereader.file = $$CORE_ROOT_DIR/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
|
||||
odffilereader.makefile = $$CORE_ROOT_DIR/ASCOfficeOdfFile/linux/Makefile.OdfFileReaderLib$$PRO_SUFFIX
|
||||
|
||||
odffilewriter.file = $$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro
|
||||
odffilewriter.makefile = $$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux/Makefile.OdfFileWriterLib$$PRO_SUFFIX
|
||||
|
||||
xlsformat.file = $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro
|
||||
xlsformat.makefile = $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/Makefile.XlsFormatLib$$PRO_SUFFIX
|
||||
|
||||
x2t.file = $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro
|
||||
x2t.makefile = $$CORE_ROOT_DIR/X2tConverter/build/Qt/Makefile.X2tConverter$$PRO_SUFFIX
|
||||
}
|
||||
|
||||
desktop {
|
||||
hunspell.file = $$CORE_ROOT_DIR/DesktopEditor/hunspell-1.3.3/src/qt/hunspell.pro
|
||||
hunspell.makefile = $$CORE_ROOT_DIR/DesktopEditor/hunspell-1.3.3/src/qt/Makefile.hunspell$$PRO_SUFFIX
|
||||
|
||||
ooxmlsignature.file = $$CORE_ROOT_DIR/DesktopEditor/xmlsec/src/ooxmlsignature.pro
|
||||
ooxmlsignature.makefile = $$CORE_ROOT_DIR/DesktopEditor/xmlsec/src/Makefile.ooxmlsignature$$PRO_SUFFIX
|
||||
|
||||
documentscore.file = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore.pro
|
||||
documentscore.makefile = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/Makefile.ascdocumentscore$$PRO_SUFFIX
|
||||
|
||||
documentscore_helper.file = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro
|
||||
documentscore_helper.makefile = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/Makefile.ascdocumentscore_helper$$PRO_SUFFIX
|
||||
|
||||
message(desktop)
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
addSubProject(ooxmlsignature, $$CORE_ROOT_DIR/DesktopEditor/xmlsec/src/ooxmlsignature.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(documentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore.pro,\
|
||||
kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdfwriter pdfreader djvufile xpsfile)
|
||||
addSubProject(documentscore_helper, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro,\
|
||||
documentscore)
|
||||
!core_mac {
|
||||
qtdocumentscore.file = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper/qtascdocumentscore.pro
|
||||
qtdocumentscore.makefile = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper/Makefile.qtascdocumentscore$$PRO_SUFFIX
|
||||
addSubProject(qtdocumentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper/qtascdocumentscore.pro,\
|
||||
documentscore)
|
||||
}
|
||||
|
||||
|
||||
!no_desktop_apps {
|
||||
core_windows {
|
||||
projicons.file = $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/ProjIcons.pro
|
||||
projicons.makefile = $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/Makefile.ProjIcons$$PRO_SUFFIX
|
||||
}
|
||||
desktopapp.file = $$ROOT_DIR/desktop-apps/win-linux/ASCDocumentEditor.pro
|
||||
desktopapp.makefile = $$ROOT_DIR/desktop-apps/win-linux/Makefile.ASCDocumentEditor$$PRO_SUFFIX
|
||||
core_windows:addSubProject(projicons, $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/ProjIcons.pro,\
|
||||
documentscore videoplayer)
|
||||
addSubProject(desktopapp, $$ROOT_DIR/desktop-apps/win-linux/ASCDocumentEditor.pro,\
|
||||
documentscore videoplayer)
|
||||
}
|
||||
}
|
||||
|
||||
core_and_multimedia {
|
||||
videoplayer.file = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/videoplayerlib.pro
|
||||
videoplayer.makefile = $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/Makefile.videoplayerlib$$PRO_SUFFIX
|
||||
}
|
||||
|
||||
# DEPENDS
|
||||
kernel.depends = cryptopp
|
||||
unicodeconverter.depends = kernel
|
||||
graphics.depends = kernel unicodeconverter
|
||||
pdfwriter.depends = kernel unicodeconverter graphics
|
||||
djvufile.depends = kernel unicodeconverter graphics pdfwriter
|
||||
xpsfile.depends = kernel unicodeconverter graphics pdfwriter
|
||||
htmlrenderer.depends = kernel unicodeconverter graphics pdfwriter
|
||||
pdfreader.depends = kernel unicodeconverter graphics pdfwriter htmlrenderer
|
||||
htmlfile2.depends = kernel unicodeconverter graphics
|
||||
doctrenderer.depends = kernel unicodeconverter graphics
|
||||
fb2file.depends = kernel unicodeconverter graphics
|
||||
epubfile.depends = kernel unicodeconverter graphics htmlfile2
|
||||
|
||||
!no_use_common_binary {
|
||||
allfontsgen.depends = kernel unicodeconverter graphics
|
||||
allthemesgen.depends = kernel unicodeconverter graphics
|
||||
|
||||
docbuilder.depends = kernel unicodeconverter graphics doctrenderer
|
||||
}
|
||||
|
||||
core_and_multimedia {
|
||||
videoplayer.depends = kernel unicodeconverter graphics
|
||||
}
|
||||
|
||||
desktop {
|
||||
ooxmlsignature.depends = kernel unicodeconverter graphics
|
||||
documentscore.depends = kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdfwriter pdfreader djvufile xpsfile
|
||||
documentscore_helper.depends = documentscore
|
||||
|
||||
!core_mac {
|
||||
qtdocumentscore.depends = documentscore
|
||||
mobile {
|
||||
message(mobile)
|
||||
!desktop {
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
}
|
||||
|
||||
!no_desktop_apps {
|
||||
core_windows:projicons.depends = documentscore videoplayer
|
||||
desktopapp.depends = documentscore videoplayer
|
||||
}
|
||||
}
|
||||
|
||||
!no_x2t {
|
||||
x2t.depends = \
|
||||
docxformat \
|
||||
pptxformat \
|
||||
docxfile \
|
||||
txtxmlformat \
|
||||
rtfformat \
|
||||
pptformat \
|
||||
docformat \
|
||||
odffilereader \
|
||||
odffilewriter \
|
||||
xlsformat \
|
||||
fb2file \
|
||||
epubfile
|
||||
}
|
||||
69
common.pri
Normal file
69
common.pri
Normal file
@ -0,0 +1,69 @@
|
||||
# must setup CORE_ROOT_DIR before including
|
||||
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
||||
MAKEFILE=makefiles/build.makefile_$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
PRO_SUFFIX=$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
|
||||
core_debug {
|
||||
MAKEFILE=$$join(MAKEFILE, , , "_debug_")
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, , , "_debug_")
|
||||
}
|
||||
build_xp {
|
||||
MAKEFILE=$$join(MAKEFILE, , , "_xp")
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, , , "_xp")
|
||||
}
|
||||
OO_BRANDING_SUFFIX = $$(OO_BRANDING)
|
||||
!isEmpty(OO_BRANDING_SUFFIX) {
|
||||
PRO_SUFFIX=$$join(PRO_SUFFIX, , , "$$OO_BRANDING_SUFFIX")
|
||||
MAKEFILE=$$join(MAKEFILE, , , "$$OO_BRANDING_SUFFIX")
|
||||
}
|
||||
|
||||
message(current_makefile)
|
||||
message($$MAKEFILE)
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
defineTest(removeFile) {
|
||||
file = $$1
|
||||
win32:file ~= s,/,\\,g
|
||||
core_windows {
|
||||
system(if exist $$shell_quote($$file) $$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
defineTest(qmakeClear) {
|
||||
dir = $$1
|
||||
name = $$2
|
||||
removeFile($$1/Makefile.$$2$$PRO_SUFFIX)
|
||||
removeFile($$1/.qmake.stash)
|
||||
}
|
||||
|
||||
# addSubProject() - adds project to SUBDIRS, creates variables associated with the project(file, makefile, depends)
|
||||
# Arg1 - Project name
|
||||
# Arg2 - Qmake file of project
|
||||
# Arg3(optional) - Project dependencies
|
||||
defineTest(addSubProject) {
|
||||
pro_name = $$1
|
||||
pro_file = $$2
|
||||
pro_depends = $$3
|
||||
isEmpty(pro_name):error(Sub-project name is not defined.)
|
||||
isEmpty(pro_file):error(Qmake file of sub-project \'$$pro_name\' is not defined.)
|
||||
!exists($$pro_file):error(Sub-project qmake file \'$$pro_file\' is not exists.)
|
||||
path = $$section(pro_file, /, 0, -2)
|
||||
ext_name = $$section(pro_file, /, -1, -1)
|
||||
name = $$section(ext_name, ., 0, 0)
|
||||
SUBDIRS += $$pro_name
|
||||
export(SUBDIRS)
|
||||
$${pro_name}.file = $$pro_file
|
||||
export($${pro_name}.file)
|
||||
$${pro_name}.makefile = $$path/Makefile.$$name$$PRO_SUFFIX
|
||||
export($${pro_name}.makefile)
|
||||
!isEmpty(pro_depends) {
|
||||
$${pro_name}.depends = $$pro_depends
|
||||
export($${pro_name}.depends)
|
||||
}
|
||||
# remove makefile
|
||||
qmakeClear($$path, $$name)
|
||||
}
|
||||
1
defaults
1
defaults
@ -1,2 +1,3 @@
|
||||
sdkjs-plugin="photoeditor, macros, ocr, translator, thesaurus, youtube, highlightcode"
|
||||
sdkjs-plugin-server="speech, zotero, mendeley"
|
||||
sdkjs-addons="sdkjs-forms"
|
||||
|
||||
11
develop/Dockerfile
Normal file
11
develop/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM onlyoffice/documentserver:latest
|
||||
RUN apt-get update -y && \
|
||||
apt-get install git -y \
|
||||
python -y \
|
||||
openjdk-11-jdk -y \
|
||||
npm -y && \
|
||||
npm install -g grunt-cli -y && \
|
||||
git clone --depth 1 https://github.com/ONLYOFFICE/build_tools.git var/www/onlyoffice/documentserver/build_tools && \
|
||||
sed -i '/documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}/d' /app/ds/run-document-server.sh && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT python /var/www/onlyoffice/documentserver/build_tools/develop/run_build_js.py /var/www/onlyoffice/documentserver && /bin/sh -c /app/ds/run-document-server.sh
|
||||
46
develop/README.md
Normal file
46
develop/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Docker
|
||||
|
||||
This directory containing instruction for developers,
|
||||
who want to change something in sdkjs or web-apps module,
|
||||
but don't want to compile pretty compilcated core product to make those changes.
|
||||
|
||||
## Installing ONLYOFFICE Docs
|
||||
|
||||
## How to use - Linux
|
||||
|
||||
**Note**: You need the latest Docker version installed.
|
||||
|
||||
You might need to pull **onlyoffice/documentserver** image:
|
||||
|
||||
**Note**: Do not prefix docker command with sudo.
|
||||
[This](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
|
||||
instruction show how to use docker without sudo.
|
||||
|
||||
```bash
|
||||
docker pull onlyoffice/documentserver
|
||||
```
|
||||
|
||||
### Create develop image
|
||||
|
||||
To create a image with the ability to include external non-minified sdkjs code,
|
||||
use the following command from the dockerfile directory:
|
||||
|
||||
```bash
|
||||
docker build -t documentserver-develop .
|
||||
```
|
||||
|
||||
**Note**: The dot at the end is required.
|
||||
|
||||
### Connecting external folders
|
||||
|
||||
To connect external folders to the container,
|
||||
you need to pass the "-v" parameter
|
||||
along with the relative paths to the required folders.
|
||||
|
||||
**For example, let's connect the external folders "sdkjs" and "web-apps" to the container:**
|
||||
|
||||
```bash
|
||||
docker run -i -t -d -p 80:80 --restart=always \
|
||||
-v /host-dir/sdkjs:/var/www/onlyoffice/documentserver/sdkjs \
|
||||
-v /host-dir/web-apps:/var/www/onlyoffice/documentserver/web-apps documentserver-develop
|
||||
```
|
||||
12
develop/run_build_js.py
Normal file
12
develop/run_build_js.py
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append(sys.argv[1] + '/build_tools/scripts')
|
||||
import build_js
|
||||
import config
|
||||
import base
|
||||
|
||||
base.cmd_in_dir(sys.argv[1] + '/build_tools/', 'python', ['configure.py'])
|
||||
config.parse()
|
||||
|
||||
build_js.build_js_develop(sys.argv[1])
|
||||
12
make.py
12
make.py
@ -13,13 +13,13 @@ import build_js
|
||||
import build_server
|
||||
import deploy
|
||||
import make_common
|
||||
import config_server as develop_config_server
|
||||
import dependence
|
||||
import develop
|
||||
|
||||
# parse configuration
|
||||
config.parse()
|
||||
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
|
||||
base.set_env("BUILD_PLATFORM", config.option("platform"))
|
||||
|
||||
# branding
|
||||
@ -59,13 +59,7 @@ if ("1" == config.option("update")):
|
||||
base.configure_common_apps()
|
||||
|
||||
# developing...
|
||||
if ("1" == config.option("develop")):
|
||||
if not dependence.check_dependencies():
|
||||
exit(1)
|
||||
build_server.build_server_develop()
|
||||
build_js.build_js_develop(base_dir + "/..")
|
||||
develop_config_server.make()
|
||||
exit(0)
|
||||
develop.make();
|
||||
|
||||
# check only js builds
|
||||
if ("1" == base.get_env("OO_ONLY_BUILD_JS")):
|
||||
|
||||
39
make_packages.py
Executable file
39
make_packages.py
Executable file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append('scripts')
|
||||
import optparse
|
||||
import config
|
||||
import base
|
||||
import packages
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option("--branding", action="store", type="string", dest="branding", default="", help="provides branding path")
|
||||
parser.add_option("--product", action="store", type="string", dest="product", default="", help="defines product")
|
||||
parser.add_option("--package", action="store", type="string", dest="package", default="", help="defines packages")
|
||||
|
||||
(options, args) = parser.parse_args(sys.argv[1:])
|
||||
configOptions = vars(options)
|
||||
|
||||
branding = configOptions["branding"]
|
||||
product = configOptions["product"]
|
||||
package_list = configOptions["package"]
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
|
||||
# branding
|
||||
if ("" != branding):
|
||||
branding_dir = base_dir + "/../" + branding
|
||||
|
||||
if base.is_file(branding_dir + "/build_tools/make_packages.py"):
|
||||
base.check_build_version(branding_dir + "/build_tools")
|
||||
base.cmd_in_dir(branding_dir + "/build_tools",
|
||||
"python3", ["make_packages.py",
|
||||
'--product', product,
|
||||
'--package', package_list
|
||||
])
|
||||
exit(0)
|
||||
|
||||
base.check_build_version(base_dir)
|
||||
|
||||
# build packages
|
||||
packages.make(product, package_list)
|
||||
151
scripts/base.py
151
scripts/base.py
@ -31,6 +31,11 @@ def host_platform():
|
||||
def is_os_64bit():
|
||||
return platform.machine().endswith('64')
|
||||
|
||||
def is_os_arm():
|
||||
if -1 == platform.machine().find('arm'):
|
||||
return False
|
||||
return True
|
||||
|
||||
def is_python_64bit():
|
||||
return (struct.calcsize("P") == 8)
|
||||
|
||||
@ -97,6 +102,14 @@ def copy_file(src, dst):
|
||||
return
|
||||
return shutil.copy2(get_path(src), get_path(dst))
|
||||
|
||||
def move_file(src, dst):
|
||||
if is_file(dst):
|
||||
delete_file(dst)
|
||||
if not is_file(src):
|
||||
print("move warning [file not exist]: " + src)
|
||||
return
|
||||
return shutil.move(get_path(src), get_path(dst))
|
||||
|
||||
def copy_files(src, dst, override=True):
|
||||
for file in glob.glob(src):
|
||||
file_name = os.path.basename(file)
|
||||
@ -111,6 +124,20 @@ def copy_files(src, dst, override=True):
|
||||
copy_files(file + "/*", dst + "/" + file_name, override)
|
||||
return
|
||||
|
||||
def move_files(src, dst, override=True):
|
||||
for file in glob.glob(src):
|
||||
file_name = os.path.basename(file)
|
||||
if is_file(file):
|
||||
if override and is_file(dst + "/" + file_name):
|
||||
delete_file(dst + "/" + file_name)
|
||||
if not is_file(dst + "/" + file_name):
|
||||
move_file(file, dst)
|
||||
elif is_dir(file):
|
||||
if not is_dir(dst + "/" + file_name):
|
||||
create_dir(dst + "/" + file_name)
|
||||
move_files(file + "/*", dst + "/" + file_name, override)
|
||||
return
|
||||
|
||||
def copy_dir_content(src, dst, filterInclude = "", filterExclude = ""):
|
||||
src_folder = src
|
||||
if ("/" != src[-1:]):
|
||||
@ -328,11 +355,29 @@ def run_command(sCommand):
|
||||
return result
|
||||
|
||||
def run_command_in_dir(directory, sCommand):
|
||||
dir = get_path(directory)
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(dir)
|
||||
host = host_platform()
|
||||
if (host == 'windows'):
|
||||
dir = get_path(directory)
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(dir)
|
||||
|
||||
ret = run_command(sCommand)
|
||||
os.chdir(cur_dir)
|
||||
|
||||
if (host == 'windows'):
|
||||
os.chdir(cur_dir)
|
||||
return ret
|
||||
|
||||
def exec_command_in_dir(directory, sCommand):
|
||||
host = host_platform()
|
||||
if (host == 'windows'):
|
||||
dir = get_path(directory)
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(dir)
|
||||
|
||||
ret = os.system(sCommand)
|
||||
|
||||
if (host == 'windows'):
|
||||
os.chdir(cur_dir)
|
||||
return ret
|
||||
|
||||
def run_process(args=[]):
|
||||
@ -390,8 +435,10 @@ def git_update(repo, is_no_errors=False, is_current_dir=False):
|
||||
print("branch does not exist...")
|
||||
print("switching to master...")
|
||||
cmd("git", ["checkout", "-f", "master"])
|
||||
cmd("git", ["submodule", "update", "--init", "--recursive"], True)
|
||||
if (0 != config.option("branch").find("tags/")):
|
||||
cmd("git", ["pull"], False if ("1" != config.option("update-light")) else True)
|
||||
cmd("git", ["submodule", "update", "--recursive", "--remote"], True)
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
|
||||
@ -412,16 +459,32 @@ def get_repositories():
|
||||
if config.check_option("module", "desktop"):
|
||||
result["desktop-sdk"] = [False, False]
|
||||
result["desktop-apps"] = [False, False]
|
||||
result["document-templates"] = [False, False]
|
||||
|
||||
if (config.check_option("module", "server")):
|
||||
result["server"] = [False, False]
|
||||
result.update(get_server_addons())
|
||||
result["document-server-integration"] = [False, False]
|
||||
result["document-templates"] = [False, False]
|
||||
|
||||
if (config.check_option("module", "server") or config.check_option("platform", "ios")):
|
||||
result["core-fonts"] = [False, False]
|
||||
|
||||
get_branding_repositories(result)
|
||||
return result
|
||||
|
||||
def get_branding_repositories(checker):
|
||||
modules = ["core", "server", "mobile", "desktop", "builder"]
|
||||
for mod in modules:
|
||||
if not config.check_option("module", mod):
|
||||
continue
|
||||
name = "repositories_" + mod
|
||||
repos = config.option(name).rsplit(", ")
|
||||
for repo in repos:
|
||||
if (repo != ""):
|
||||
checker[repo] = [False, False]
|
||||
return
|
||||
|
||||
def create_pull_request(branches_to, repo, is_no_errors=False, is_current_dir=False):
|
||||
print("[git] create pull request: " + repo)
|
||||
url = "https://github.com/ONLYOFFICE/" + repo + ".git"
|
||||
@ -445,7 +508,7 @@ def create_pull_request(branches_to, repo, is_no_errors=False, is_current_dir=Fa
|
||||
if "" != run_command("git log origin/" + branch_to + "..origin/" + branch_from)["stdout"]:
|
||||
cmd("git", ["checkout", "-f", branch_to], is_no_errors)
|
||||
cmd("git", ["pull"], is_no_errors)
|
||||
cmd("hub", ["pull-request", "--force", "--base", branch_to, "--head", branch_from, "--message", "Merge from " + branch_from + " to " + branch_to], is_no_errors)
|
||||
cmd("gh", ["pr", "create", "--base", branch_to, "--head", branch_from, "--title", "Merge branch " + branch_from + " to " + branch_to, "--body", ""], is_no_errors)
|
||||
if 0 != cmd("git", ["merge", "origin/" + branch_from, "--no-ff", "--no-edit"], is_no_errors):
|
||||
print_error("[git] Conflicts merge " + "origin/" + branch_from + " to " + branch_to + " in repo " + url)
|
||||
cmd("git", ["merge", "--abort"], is_no_errors)
|
||||
@ -501,6 +564,10 @@ def qt_config(platform):
|
||||
config_param += " iphoneos device"
|
||||
if (-1 == config_param_lower.find("debug")):
|
||||
config_param += " release"
|
||||
if ("mac_arm64" == platform):
|
||||
config_param += " apple_silicon use_javascript_core"
|
||||
if config.check_option("module", "mobile"):
|
||||
config_param += " support_web_socket"
|
||||
return config_param
|
||||
|
||||
def qt_major_version():
|
||||
@ -510,9 +577,21 @@ def qt_major_version():
|
||||
def qt_copy_lib(lib, dir):
|
||||
qt_dir = get_env("QT_DEPLOY")
|
||||
if ("windows" == host_platform()):
|
||||
copy_lib(qt_dir, dir, lib)
|
||||
if ("" == qt_dst_postfix()):
|
||||
copy_lib(qt_dir, dir, lib)
|
||||
else:
|
||||
copy_lib(qt_dir, dir, lib + "d")
|
||||
else:
|
||||
copy_file(qt_dir + "/../lib/lib" + lib + ".so." + qt_version(), dir + "/lib" + lib + ".so." + qt_major_version())
|
||||
src_file = qt_dir + "/../lib/lib" + lib + ".so." + qt_version()
|
||||
if (is_file(src_file)):
|
||||
copy_file(src_file, dir + "/lib" + lib + ".so." + qt_major_version())
|
||||
else:
|
||||
libFramework = lib
|
||||
libFramework = libFramework.replace("Qt5", "Qt")
|
||||
libFramework = libFramework.replace("Qt6", "Qt")
|
||||
libFramework += ".framework"
|
||||
if (is_dir(qt_dir + "/../lib/" + libFramework)):
|
||||
copy_dir(qt_dir + "/../lib/" + libFramework, dir + "/" + libFramework)
|
||||
return
|
||||
|
||||
def _check_icu_common(dir, out):
|
||||
@ -550,8 +629,12 @@ def qt_copy_plugin(name, out):
|
||||
for file in glob.glob(out + "/" + name + "/*d.dll"):
|
||||
fileCheck = file[0:-5] + ".dll"
|
||||
if is_file(fileCheck):
|
||||
delete_file(file)
|
||||
|
||||
if ("" == qt_dst_postfix()):
|
||||
delete_file(file)
|
||||
else:
|
||||
delete_file(fileCheck)
|
||||
for file in glob.glob(out + "/" + name + "/*.pdb"):
|
||||
delete_file(file)
|
||||
return
|
||||
|
||||
def qt_dst_postfix():
|
||||
@ -655,7 +738,7 @@ def generate_plist(path):
|
||||
content += "\t<key>CFBundleGetInfoString</key>\n"
|
||||
content += "\t<string>Created by " + bundle_creator + "</string>\n"
|
||||
content += "\t<key>CFBundleIdentifier</key>\n"
|
||||
content += "\t<string>" + bundle_id_url + name + "</string>\n"
|
||||
content += "\t<string>" + bundle_id_url + correct_bundle_identifier(name) + "</string>\n"
|
||||
content += "\t<key>CFBundlePackageType</key>\n"
|
||||
content += "\t<string>FMWK</string>\n"
|
||||
content += "\t<key>CFBundleShortVersionString</key>\n"
|
||||
@ -679,6 +762,9 @@ def generate_plist(path):
|
||||
|
||||
return
|
||||
|
||||
def correct_bundle_identifier(bundle_identifier):
|
||||
return re.sub("[^a-zA-Z0-9\.\-]", "-", bundle_identifier)
|
||||
|
||||
def get_sdkjs_addons():
|
||||
result = {}
|
||||
if ("" == config.option("sdkjs-addons")):
|
||||
@ -822,13 +908,16 @@ def vcvarsall_end():
|
||||
return
|
||||
|
||||
def run_as_bat(lines, is_no_errors=False):
|
||||
name = "tmp.bat"
|
||||
name = "tmp.bat" if ("windows" == host_platform()) else "./tmp.sh"
|
||||
content = "\n".join(lines)
|
||||
|
||||
file = codecs.open(name, "w", "utf-8")
|
||||
file.write(content)
|
||||
file.close()
|
||||
|
||||
if ("windows" != host_platform()):
|
||||
os.system("chmod +x " + name)
|
||||
|
||||
cmd(name, [], is_no_errors)
|
||||
delete_file(name)
|
||||
return
|
||||
@ -883,10 +972,11 @@ def mac_correct_rpath_x2t(dir):
|
||||
mac_correct_rpath_library("icuuc.58", ["icudata.58"])
|
||||
mac_correct_rpath_library("UnicodeConverter", ["icuuc.58", "icudata.58", "kernel"])
|
||||
mac_correct_rpath_library("kernel", [])
|
||||
mac_correct_rpath_library("kernel_network", ["kernel"])
|
||||
mac_correct_rpath_library("graphics", ["UnicodeConverter", "kernel"])
|
||||
mac_correct_rpath_library("doctrenderer", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("HtmlFile2", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("EpubFile", ["kernel", "HtmlFile2"])
|
||||
mac_correct_rpath_library("doctrenderer", ["UnicodeConverter", "kernel", "kernel_network", "graphics"])
|
||||
mac_correct_rpath_library("HtmlFile2", ["UnicodeConverter", "kernel", "kernel_network", "graphics"])
|
||||
mac_correct_rpath_library("EpubFile", ["kernel", "HtmlFile2", "graphics"])
|
||||
mac_correct_rpath_library("Fb2File", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("HtmlRenderer", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("PdfWriter", ["UnicodeConverter", "kernel", "graphics"])
|
||||
@ -895,7 +985,7 @@ def mac_correct_rpath_x2t(dir):
|
||||
mac_correct_rpath_library("XpsFile", ["kernel", "UnicodeConverter", "graphics", "PdfWriter"])
|
||||
cmd("chmod", ["-v", "+x", "./x2t"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./x2t"], True)
|
||||
mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer"])
|
||||
mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer"])
|
||||
if is_file("./allfontsgen"):
|
||||
cmd("chmod", ["-v", "+x", "./allfontsgen"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./allfontsgen"], True)
|
||||
@ -903,7 +993,7 @@ def mac_correct_rpath_x2t(dir):
|
||||
if is_file("./allthemesgen"):
|
||||
cmd("chmod", ["-v", "+x", "./allthemesgen"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./allthemesgen"], True)
|
||||
mac_correct_rpath_binary("./allthemesgen", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "graphics", "doctrenderer"])
|
||||
mac_correct_rpath_binary("./allthemesgen", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "graphics", "kernel_network", "doctrenderer"])
|
||||
os.chdir(cur_dir)
|
||||
return
|
||||
|
||||
@ -913,9 +1003,9 @@ def mac_correct_rpath_desktop(dir):
|
||||
os.chdir(dir)
|
||||
mac_correct_rpath_library("hunspell", [])
|
||||
mac_correct_rpath_library("ooxmlsignature", ["kernel"])
|
||||
mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
|
||||
mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "kernel_network", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
|
||||
cmd("install_name_tool", ["-change", "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework", "@rpath/Chromium Embedded Framework.framework/Chromium Embedded Framework", "libascdocumentscore.dylib"])
|
||||
mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
|
||||
mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Frameworks", "./editors_helper.app/Contents/MacOS/editors_helper"], True)
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Resources/converter", "./editors_helper.app/Contents/MacOS/editors_helper"], True)
|
||||
cmd("chmod", ["-v", "+x", "./editors_helper.app/Contents/MacOS/editors_helper"])
|
||||
@ -1049,3 +1139,28 @@ def hack_xcode_ios():
|
||||
with open(get_path(qmake_spec_file), "w") as file:
|
||||
file.write(filedata)
|
||||
return
|
||||
|
||||
def find_mac_sdk_version():
|
||||
sdk_dir = run_command("xcode-select -print-path")['stdout']
|
||||
sdk_dir = os.path.join(sdk_dir, "Platforms/MacOSX.platform/Developer/SDKs")
|
||||
sdks = [re.findall('^MacOSX(1\d\.\d+)\.sdk$', s) for s in os.listdir(sdk_dir)]
|
||||
sdks = [s[0] for s in sdks if s]
|
||||
return sdks[0]
|
||||
|
||||
def find_mac_sdk():
|
||||
return run_command("xcrun --sdk macosx --show-sdk-path")['stdout']
|
||||
|
||||
def get_mac_sdk_version_number():
|
||||
ver = find_mac_sdk_version()
|
||||
ver_arr = ver.split(".")
|
||||
if 0 == len(ver_arr):
|
||||
return 0
|
||||
if 1 == len(ver_arr):
|
||||
return 1000 * int(ver_arr[0])
|
||||
return 1000 * int(ver_arr[0]) + int(ver_arr[1])
|
||||
|
||||
def get_android_sdk_home():
|
||||
ndk_root_path = get_env("ANDROID_NDK_ROOT")
|
||||
if (-1 != ndk_root_path.find("/ndk/")):
|
||||
return ndk_root_path + "/../.."
|
||||
return ndk_root_path + "/.."
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
import multiprocessing
|
||||
|
||||
def make_pro_file(makefiles_dir, pro_file):
|
||||
platforms = config.option("platform").split()
|
||||
@ -66,7 +67,10 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
base.cmd_and_return_cwd(base.app_make(), ["clean", "-f", makefiles_dir + "/build.makefile_" + file_suff], True)
|
||||
base.cmd_and_return_cwd(base.app_make(), ["distclean", "-f", makefiles_dir + "/build.makefile_" + file_suff], True)
|
||||
base.cmd(qt_dir + "/bin/qmake", ["-nocache", pro_file, "CONFIG+=" + config_param] + qmake_addon)
|
||||
base.cmd_and_return_cwd(base.app_make(), ["-f", makefiles_dir + "/build.makefile_" + file_suff])
|
||||
if ("0" != config.option("multiprocess")):
|
||||
base.cmd_and_return_cwd(base.app_make(), ["-f", makefiles_dir + "/build.makefile_" + file_suff, "-j" + str(multiprocessing.cpu_count())])
|
||||
else:
|
||||
base.cmd_and_return_cwd(base.app_make(), ["-f", makefiles_dir + "/build.makefile_" + file_suff])
|
||||
else:
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" " + ("x86" if base.platform_is_32(platform) else "x64"))
|
||||
@ -78,6 +82,8 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
if ("1" == config.option("clean")):
|
||||
qmake_bat.append("call nmake clean -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
qmake_bat.append("call nmake distclean -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
if ("0" != config.option("multiprocess")):
|
||||
qmake_bat.append("set CL=/MP")
|
||||
qmake_bat.append("call nmake -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
base.run_as_bat(qmake_bat)
|
||||
|
||||
|
||||
@ -2,12 +2,15 @@
|
||||
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
|
||||
# make build.pro
|
||||
def make():
|
||||
if ("1" == base.get_env("OO_NO_BUILD_JS")):
|
||||
return
|
||||
|
||||
base.set_env('NODE_ENV', 'production')
|
||||
|
||||
base_dir = base.get_script_dir() + "/.."
|
||||
out_dir = base_dir + "/out/js/";
|
||||
branding = config.option("branding-name")
|
||||
@ -44,26 +47,46 @@ def make():
|
||||
|
||||
# mobile
|
||||
if config.check_option("module", "mobile"):
|
||||
build_sdk_native(base_dir + "/../sdkjs/build")
|
||||
build_sdk_native(base_dir + "/../sdkjs/build", False)
|
||||
base.create_dir(out_dir + "/mobile")
|
||||
base.create_dir(out_dir + "/mobile/sdkjs")
|
||||
vendor_dir_src = base_dir + "/../web-apps/vendor/"
|
||||
sdk_dir_src = base_dir + "/../sdkjs/deploy/sdkjs/"
|
||||
# banners
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/common/Native/Wrappers/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/mobile/sdkjs/banners_word.js")
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
sdk_dir_src + "common/Native/native.js",
|
||||
sdk_dir_src + "../../common/Native/Wrappers/common.js",
|
||||
sdk_dir_src + "common/Native/jquery_native.js"],
|
||||
out_dir + "/mobile/sdkjs/banners.js")
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/cell/native/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/mobile/sdkjs/banners_cell.js")
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/common/Native/Wrappers/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/mobile/sdkjs/banners_slide.js")
|
||||
|
||||
base.create_dir(out_dir + "/mobile/sdkjs/word")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "word/sdk-all-min.js", sdk_dir_src + "word/sdk-all.js"], out_dir + "/mobile/sdkjs/word/script.bin")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners_word.js", sdk_dir_src + "word/sdk-all-min.js", sdk_dir_src + "word/sdk-all.js"], out_dir + "/mobile/sdkjs/word/script.bin")
|
||||
base.create_dir(out_dir + "/mobile/sdkjs/cell")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "cell/sdk-all-min.js", sdk_dir_src + "cell/sdk-all.js"], out_dir + "/mobile/sdkjs/cell/script.bin")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners_cell.js", sdk_dir_src + "cell/sdk-all-min.js", sdk_dir_src + "cell/sdk-all.js"], out_dir + "/mobile/sdkjs/cell/script.bin")
|
||||
base.create_dir(out_dir + "/mobile/sdkjs/slide")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "slide/sdk-all-min.js", sdk_dir_src + "slide/sdk-all.js"], out_dir + "/mobile/sdkjs/slide/script.bin")
|
||||
base.delete_file(out_dir + "/mobile/sdkjs/banners.js")
|
||||
base.join_scripts([out_dir + "/mobile/sdkjs/banners_slide.js", sdk_dir_src + "slide/sdk-all-min.js", sdk_dir_src + "slide/sdk-all.js"], out_dir + "/mobile/sdkjs/slide/script.bin")
|
||||
|
||||
base.delete_file(out_dir + "/mobile/sdkjs/banners_word.js")
|
||||
base.delete_file(out_dir + "/mobile/sdkjs/banners_cell.js")
|
||||
base.delete_file(out_dir + "/mobile/sdkjs/banners_slide.js")
|
||||
return
|
||||
|
||||
# JS build
|
||||
@ -82,9 +105,12 @@ def build_interface(directory):
|
||||
return
|
||||
|
||||
def get_build_param(minimize=True):
|
||||
minimize_scripts = minimize
|
||||
if config.check_option("jsminimize", "0"):
|
||||
minimize_scripts = False
|
||||
beta = "true" if config.check_option("beta", "1") else "false"
|
||||
params = ["--beta=" + beta]
|
||||
return params + (["--level=ADVANCED"] if minimize else ["--level=WHITESPACE_ONLY", "--formatting=PRETTY_PRINT"])
|
||||
return params + (["--level=ADVANCED"] if minimize_scripts else ["--level=WHITESPACE_ONLY", "--formatting=PRETTY_PRINT"])
|
||||
|
||||
def build_sdk_desktop(directory):
|
||||
#_run_npm_cli(directory)
|
||||
@ -98,10 +124,10 @@ def build_sdk_builder(directory):
|
||||
_run_grunt(directory, get_build_param() + base.sdkjs_addons_param())
|
||||
return
|
||||
|
||||
def build_sdk_native(directory):
|
||||
def build_sdk_native(directory, minimize=True):
|
||||
#_run_npm_cli(directory)
|
||||
_run_npm(directory)
|
||||
_run_grunt(directory, get_build_param() + ["--mobile=true"] + base.sdkjs_addons_param())
|
||||
_run_grunt(directory, get_build_param(minimize) + ["--mobile=true"] + base.sdkjs_addons_param())
|
||||
return
|
||||
|
||||
def build_js_develop(root_dir):
|
||||
@ -116,4 +142,15 @@ def build_js_develop(root_dir):
|
||||
_run_npm(root_dir + external_folder + "/web-apps/build")
|
||||
_run_npm(root_dir + external_folder + "/web-apps/build/sprites")
|
||||
_run_grunt(root_dir + external_folder + "/web-apps/build/sprites", [])
|
||||
|
||||
old_cur = os.getcwd()
|
||||
old_product_version = base.get_env("PRODUCT_VERSION")
|
||||
base.set_env("PRODUCT_VERSION", old_product_version + "d")
|
||||
os.chdir(root_dir + external_folder + "/web-apps/vendor/framework7-react")
|
||||
base.cmd("npm", ["install"])
|
||||
base.cmd("npm", ["run", "deploy-word"])
|
||||
base.cmd("npm", ["run", "deploy-cell"])
|
||||
base.cmd("npm", ["run", "deploy-slide"])
|
||||
base.set_env("PRODUCT_VERSION", old_product_version)
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
|
||||
58
scripts/build_js_native.py
Normal file
58
scripts/build_js_native.py
Normal file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
import build_js
|
||||
|
||||
# parse configuration
|
||||
config.parse()
|
||||
config.extend_option("jsminimize", "0")
|
||||
|
||||
branding = config.option("branding-name")
|
||||
if ("" == branding):
|
||||
branding = "onlyoffice"
|
||||
|
||||
base_dir = base.get_script_dir() + "/.."
|
||||
out_dir = base_dir + "/../native-sdk/examples/win-linux-mac/build/sdkjs"
|
||||
base.create_dir(out_dir)
|
||||
|
||||
build_js.build_sdk_native(base_dir + "/../sdkjs/build")
|
||||
vendor_dir_src = base_dir + "/../web-apps/vendor/"
|
||||
sdk_dir_src = base_dir + "/../sdkjs/deploy/sdkjs/"
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/common/Native/Wrappers/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/banners_word.js")
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/cell/native/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/banners_cell.js")
|
||||
|
||||
base.join_scripts([vendor_dir_src + "xregexp/xregexp-all-min.js",
|
||||
vendor_dir_src + "underscore/underscore-min.js",
|
||||
base_dir + "/../sdkjs/common/externs/jszip-utils.js",
|
||||
base_dir + "/../sdkjs/common/Native/native.js",
|
||||
base_dir + "/../sdkjs/common/Native/Wrappers/common.js",
|
||||
base_dir + "/../sdkjs/common/Native/jquery_native.js"],
|
||||
out_dir + "/banners_slide.js")
|
||||
|
||||
base.create_dir(out_dir + "/word")
|
||||
base.join_scripts([out_dir + "/banners_word.js", sdk_dir_src + "word/sdk-all-min.js", sdk_dir_src + "word/sdk-all.js"], out_dir + "/word/script.bin")
|
||||
base.create_dir(out_dir + "/cell")
|
||||
base.join_scripts([out_dir + "/banners_cell.js", sdk_dir_src + "cell/sdk-all-min.js", sdk_dir_src + "cell/sdk-all.js"], out_dir + "/cell/script.bin")
|
||||
base.create_dir(out_dir + "/slide")
|
||||
base.join_scripts([out_dir + "/banners_slide.js", sdk_dir_src + "slide/sdk-all-min.js", sdk_dir_src + "slide/sdk-all.js"], out_dir + "/slide/script.bin")
|
||||
|
||||
base.delete_file(out_dir + "/banners_word.js")
|
||||
base.delete_file(out_dir + "/banners_cell.js")
|
||||
base.delete_file(out_dir + "/banners_slide.js")
|
||||
|
||||
@ -41,7 +41,7 @@ def make():
|
||||
if(base.is_exist(custom_public_key)):
|
||||
base.copy_file(custom_public_key, server_build_dir + '/Common/sources')
|
||||
|
||||
pkg_target = "node10"
|
||||
pkg_target = "node14"
|
||||
|
||||
if ("linux" == base.host_platform()):
|
||||
pkg_target += "-linux"
|
||||
@ -52,18 +52,10 @@ def make():
|
||||
base.cmd_in_dir(server_build_dir + "/DocService", "pkg", [".", "-t", pkg_target, "--options", "max_old_space_size=4096", "-o", "docservice"])
|
||||
base.cmd_in_dir(server_build_dir + "/FileConverter", "pkg", [".", "-t", pkg_target, "-o", "converter"])
|
||||
base.cmd_in_dir(server_build_dir + "/Metrics", "pkg", [".", "-t", pkg_target, "-o", "metrics"])
|
||||
base.cmd_in_dir(server_build_dir + "/SpellChecker", "pkg", [".", "-t", pkg_target, "-o", "spellchecker"])
|
||||
|
||||
example_dir = base.get_script_dir() + "/../../document-server-integration/web/documentserver-example/nodejs"
|
||||
base.delete_dir(example_dir + "/node_modules")
|
||||
base.cmd_in_dir(example_dir, "npm", ["install"])
|
||||
sync_rpc_lib_dir = example_dir + "/node_modules/sync-rpc/lib"
|
||||
patch_file = base.get_script_dir() + "/../tools/linux/sync-rpc.patch"
|
||||
if ("linux" == base.host_platform()):
|
||||
base.cmd_in_dir(sync_rpc_lib_dir, "patch", ["-N", "-i", patch_file])
|
||||
if ("windows" == base.host_platform()):
|
||||
patch_exe_dir = base.git_dir() + "/usr/bin"
|
||||
base.cmd_in_dir(patch_exe_dir, "patch.exe", ["-N", "-d", sync_rpc_lib_dir, "-i", patch_file])
|
||||
base.cmd_in_dir(example_dir, "pkg", [".", "-t", pkg_target, "-o", "example"])
|
||||
|
||||
def build_server_develop():
|
||||
|
||||
@ -26,7 +26,7 @@ def parse():
|
||||
global platforms
|
||||
platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp",
|
||||
"linux_64", "linux_32",
|
||||
"mac_64",
|
||||
"mac_64", "mac_arm64",
|
||||
"ios",
|
||||
"android_arm64_v8a", "android_armv7", "android_x86", "android_x86_64"]
|
||||
|
||||
@ -53,6 +53,10 @@ def parse():
|
||||
else:
|
||||
options["platform"] += (" mac_" + bits)
|
||||
|
||||
if ("mac" == host_platform) and check_option("platform", "mac_arm64") and (platform.machine() != "arm64"):
|
||||
if not check_option("platform", "mac_64"):
|
||||
options["platform"] = "mac_64 " + options["platform"]
|
||||
|
||||
if check_option("platform", "xp") and ("windows" == host_platform):
|
||||
options["platform"] += " win_64_xp win_32_xp"
|
||||
|
||||
@ -99,6 +103,12 @@ def check_compiler(platform):
|
||||
compiler["compiler"] = platform
|
||||
compiler["compiler_64"] = platform
|
||||
|
||||
if base.host_platform() == "mac":
|
||||
if not base.is_dir(options["qt-dir"] + "/" + compiler["compiler_64"]):
|
||||
if base.is_dir(options["qt-dir"] + "/macos"):
|
||||
compiler["compiler"] = "macos"
|
||||
compiler["compiler_64"] = "macos"
|
||||
|
||||
return compiler
|
||||
|
||||
def check_option(name, value):
|
||||
@ -126,6 +136,14 @@ def branding():
|
||||
branding = "onlyoffice"
|
||||
return branding
|
||||
|
||||
def is_mobile_platform():
|
||||
all_platforms = option("platform")
|
||||
if (-1 != all_platforms.find("android")):
|
||||
return True
|
||||
if (-1 != all_platforms.find("ios")):
|
||||
return True
|
||||
return False
|
||||
|
||||
def parse_defaults():
|
||||
defaults_path = base.get_script_dir() + "/../defaults"
|
||||
if ("" != option("branding")):
|
||||
|
||||
22
scripts/core_common/make_common.py
Normal file → Executable file
22
scripts/core_common/make_common.py
Normal file → Executable file
@ -6,19 +6,41 @@ sys.path.append('..')
|
||||
|
||||
import config
|
||||
import base
|
||||
import glob
|
||||
|
||||
import boost
|
||||
import cef
|
||||
import icu
|
||||
import openssl
|
||||
import curl
|
||||
import websocket
|
||||
import v8
|
||||
import html2
|
||||
import hunspell
|
||||
import glew
|
||||
|
||||
def check_android_ndk_macos_arm(dir):
|
||||
if base.is_dir(dir + "/darwin-x86_64") and not base.is_dir(dir + "/darwin-arm64"):
|
||||
print("copy toolchain... [" + dir + "]")
|
||||
base.copy_dir(dir + "/darwin-x86_64", dir + "/darwin-arm64")
|
||||
return
|
||||
|
||||
|
||||
def make():
|
||||
if (config.check_option("platform", "android")) and (base.host_platform() == "mac") and (base.is_os_arm()):
|
||||
for toolchain in glob.glob(base.get_env("ANDROID_NDK_ROOT") + "/toolchains/*"):
|
||||
if base.is_dir(toolchain):
|
||||
check_android_ndk_macos_arm(toolchain + "/prebuilt")
|
||||
|
||||
boost.make()
|
||||
cef.make()
|
||||
icu.make()
|
||||
openssl.make()
|
||||
v8.make()
|
||||
html2.make()
|
||||
hunspell.make(False)
|
||||
glew.make()
|
||||
if config.check_option("module", "mobile"):
|
||||
curl.make()
|
||||
websocket.make()
|
||||
return
|
||||
|
||||
@ -68,12 +68,12 @@ def make():
|
||||
if ("windows" == base.host_platform()):
|
||||
win_toolset = "msvc-14.0"
|
||||
if (-1 != config.option("platform").find("win_64")) and not base.is_dir("../build/win_64"):
|
||||
base.cmd("bootstrap.bat")
|
||||
base.cmd("bootstrap.bat", ["vc14"])
|
||||
base.cmd("b2.exe", ["headers"])
|
||||
base.cmd("b2.exe", ["--clean"])
|
||||
base.cmd("b2.exe", ["--prefix=./../build/win_64", "link=static", "--with-filesystem", "--with-system", "--with-date_time", "--with-regex", "--toolset=" + win_toolset, "address-model=64", "install"])
|
||||
if (-1 != config.option("platform").find("win_32")) and not base.is_dir("../build/win_32"):
|
||||
base.cmd("bootstrap.bat")
|
||||
base.cmd("bootstrap.bat", ["vc14"])
|
||||
base.cmd("b2.exe", ["headers"])
|
||||
base.cmd("b2.exe", ["--clean"])
|
||||
base.cmd("b2.exe", ["--prefix=./../build/win_32", "link=static", "--with-filesystem", "--with-system", "--with-date_time", "--with-regex", "--toolset=" + win_toolset, "address-model=32", "install"])
|
||||
@ -87,13 +87,6 @@ def make():
|
||||
base.cmd("./b2", ["--prefix=./../build/linux_64", "link=static", "cxxflags=-fPIC", "install"])
|
||||
# TODO: support x86
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_64"):
|
||||
clang_correct()
|
||||
base.cmd("./bootstrap.sh", ["--with-libraries=filesystem,system,date_time,regex"])
|
||||
base.cmd("./b2", ["headers"])
|
||||
base.cmd("./b2", ["--clean"])
|
||||
base.cmd("./b2", ["--prefix=./../build/mac_64", "link=static", "install"])
|
||||
|
||||
if (-1 != config.option("platform").find("ios")) and not base.is_dir("../build/ios"):
|
||||
clang_correct()
|
||||
os.chdir("../")
|
||||
@ -102,6 +95,20 @@ def make():
|
||||
if (-1 != config.option("platform").find("android")) and not base.is_dir("../build/android"):
|
||||
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"])
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_64"):
|
||||
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"], "mac_64")
|
||||
directory_build = base_dir + "/build/mac_64/lib"
|
||||
base.delete_file(directory_build + "/libboost_system.a")
|
||||
base.delete_file(directory_build + "/libboost_system.dylib")
|
||||
base.copy_files(directory_build + "/mac_64/*.a", directory_build)
|
||||
|
||||
if (-1 != config.option("platform").find("mac_arm64")) and not base.is_dir("../build/mac_arm64"):
|
||||
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"], "mac_arm64")
|
||||
directory_build = base_dir + "/build/mac_arm64/lib"
|
||||
base.delete_file(directory_build + "/libboost_system.a")
|
||||
base.delete_file(directory_build + "/libboost_system.dylib")
|
||||
base.copy_files(directory_build + "/mac_arm64/*.a", directory_build)
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
|
||||
|
||||
@ -7,12 +7,12 @@ import base
|
||||
import os
|
||||
import build
|
||||
|
||||
def make(src_dir, modules):
|
||||
def make(src_dir, modules, build_platform="android"):
|
||||
old_cur = os.getcwd()
|
||||
|
||||
print("boost-headers...")
|
||||
base.cmd("./bootstrap.sh", ["--with-libraries=system"])
|
||||
base.cmd("./b2", ["--prefix=./../build/android", "headers", "install"])
|
||||
base.cmd("./b2", ["--prefix=./../build/" + build_platform, "headers", "install"])
|
||||
|
||||
for module in modules:
|
||||
print("boost-module: " + module + " ...")
|
||||
@ -40,7 +40,7 @@ def make(src_dir, modules):
|
||||
pro_file_content.append("")
|
||||
pro_file_content.append("SOURCES += $$files($$PWD/src/*.cpp, true)")
|
||||
pro_file_content.append("")
|
||||
pro_file_content.append("DESTDIR = $$BOOST_SOURCES/../build/android/lib/$$CORE_BUILDS_PLATFORM_PREFIX")
|
||||
pro_file_content.append("DESTDIR = $$BOOST_SOURCES/../build/" + build_platform + "/lib/$$CORE_BUILDS_PLATFORM_PREFIX")
|
||||
base.save_as_script(module_dir + "/" + module + ".pro", pro_file_content)
|
||||
build.make_pro_file(module_dir + "/makefiles", module_dir + "/" + module + ".pro")
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ def make():
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(base_dir)
|
||||
|
||||
platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp", "linux_64", "linux_32", "mac_64"]
|
||||
platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp", "linux_64", "linux_32", "mac_64", "mac_arm64"]
|
||||
|
||||
url = "http://d2ettrnqo7v976.cloudfront.net/cef/4280/"
|
||||
|
||||
@ -54,14 +54,14 @@ def make():
|
||||
base.create_dir("./build")
|
||||
|
||||
# deploy
|
||||
if ("mac_64" != platform):
|
||||
if (0 != platform.find("mac")):
|
||||
base.copy_files("cef_binary/Release/*", "build/")
|
||||
base.copy_files("cef_binary/Resources/*", "build/")
|
||||
|
||||
if (0 == platform.find("linux")):
|
||||
base.cmd("chmod", ["a+xr", "build/locales"])
|
||||
|
||||
if ("mac_64" == platform):
|
||||
if (0 == platform.find("mac")):
|
||||
base.cmd("mv", ["Chromium Embedded Framework.framework", "build/Chromium Embedded Framework.framework"])
|
||||
|
||||
os.chdir(base_dir)
|
||||
|
||||
27
scripts/core_common/modules/curl.py
Normal file
27
scripts/core_common/modules/curl.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import config
|
||||
import subprocess
|
||||
import os
|
||||
import base
|
||||
|
||||
def make():
|
||||
path = base.get_script_dir() + "/../../core/Common/3dParty/curl"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(path)
|
||||
if (-1 != config.option("platform").find("android")):
|
||||
if base.is_dir(path + "/build/android"):
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
subprocess.call(["./build-android-curl.sh"])
|
||||
|
||||
elif (-1 != config.option("platform").find("ios")):
|
||||
if base.is_dir(path + "/build/ios"):
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
subprocess.call(["./build-ios-curl.sh"])
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
34
scripts/core_common/modules/glew.py
Normal file
34
scripts/core_common/modules/glew.py
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
|
||||
def clean():
|
||||
if base.is_dir("glew-2.1.0"):
|
||||
base.delete_dir("glew-2.1.0");
|
||||
return
|
||||
|
||||
def make():
|
||||
if ("windows" != base.host_platform()):
|
||||
return
|
||||
|
||||
if not config.check_option("module", "mobile"):
|
||||
return;
|
||||
|
||||
print("[fetch & build]: glew")
|
||||
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/glew"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(base_dir)
|
||||
|
||||
base.common_check_version("glew", "1", clean)
|
||||
|
||||
if not base.is_dir("glew-2.1.0"):
|
||||
base.download("https://deac-ams.dl.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0-win32.zip", "./archive.zip")
|
||||
base.extract("./archive.zip", "./")
|
||||
base.delete_file("./archive.zip")
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
171
scripts/core_common/modules/hunspell.py
Normal file
171
scripts/core_common/modules/hunspell.py
Normal file
@ -0,0 +1,171 @@
|
||||
import sys
|
||||
sys.path.append('../../../scripts')
|
||||
import base
|
||||
import os
|
||||
|
||||
def make(build_js = True):
|
||||
|
||||
old_cur_dir = os.getcwd()
|
||||
#fetch libhunspell
|
||||
print("[fetch & build]: hunspell")
|
||||
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/hunspell"
|
||||
os.chdir(base_dir)
|
||||
if not base.is_dir("hunspell"):
|
||||
last_stable_commit = "8a2fdfe5a6bb1cbafc04b0c8486abcefd17ad903"
|
||||
repo_path = "https://github.com/hunspell/hunspell.git"
|
||||
base.cmd("git", ["clone", repo_path])
|
||||
os.chdir("hunspell")
|
||||
base.cmd("git", ["checkout", last_stable_commit])
|
||||
base.replaceInFile("./src/hunspell/filemgr.hxx", "FileMgr& operator=(const FileMgr&);", "FileMgr& operator=(const FileMgr&); \n"
|
||||
+" #ifdef HUNSPELL_WASM_MODULE \n char* memory;size_t index;size_t size; \n #endif") #custon filemgr support watch filemgr_wrapper_new.cxx
|
||||
os.chdir("../")
|
||||
|
||||
if not build_js:
|
||||
os.chdir(old_cur_dir)
|
||||
return
|
||||
base.configure_common_apps()
|
||||
|
||||
# remove previous version
|
||||
if base.is_dir("./deploy"):
|
||||
base.delete_dir("./deploy")
|
||||
base.create_dir("./deploy")
|
||||
base.create_dir("./deploy/spell")
|
||||
|
||||
# fetch emsdk
|
||||
command_prefix = "" if ("windows" == base.host_platform()) else "./"
|
||||
if not base.is_dir("emsdk"):
|
||||
base.cmd("git", ["clone", "https://github.com/emscripten-core/emsdk.git"])
|
||||
os.chdir("emsdk")
|
||||
base.cmd(command_prefix + "emsdk", ["install", "latest"])
|
||||
base.cmd(command_prefix + "emsdk", ["activate", "latest"])
|
||||
os.chdir("../")
|
||||
|
||||
# compile
|
||||
compiler_flags = ["-o spell.js",
|
||||
"-O3",
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
"-s WASM=1",
|
||||
"-s ALLOW_MEMORY_GROWTH=1",
|
||||
"-s FILESYSTEM=0",
|
||||
"-s ENVIRONMENT='web,worker'"]
|
||||
|
||||
exported_functions = ["_malloc",
|
||||
"_free",
|
||||
"_Spellchecker_Malloc",
|
||||
"_Spellchecker_Free",
|
||||
"_Spellchecker_Create",
|
||||
"_Spellchecker_Destroy",
|
||||
"_Spellchecker_AddDictionary",
|
||||
"_Spellchecker_RemoveDicrionary",
|
||||
"_Spellchecker_Load",
|
||||
"_Spellchecker_Spell",
|
||||
"_Spellchecker_Suggest",
|
||||
"_Spellchecker_RemoveEngine",
|
||||
"_Spellchecker_TotalAllocatedMemory"]
|
||||
|
||||
version_hunspell = 17
|
||||
libhunspell_src_path = "./hunspell/src/hunspell"
|
||||
|
||||
input_sources = ["affentry.cxx",
|
||||
"affixmgr.cxx",
|
||||
"csutil.cxx",
|
||||
"dictmgr.cxx",
|
||||
"hashmgr.cxx",
|
||||
"hunspell.cxx",
|
||||
"hunzip.cxx",
|
||||
"phonet.cxx",
|
||||
"replist.cxx",
|
||||
"suggestmgr.cxx"]
|
||||
|
||||
sources = []
|
||||
for item in input_sources:
|
||||
if base.is_file(libhunspell_src_path + "/" + item):
|
||||
sources.append(libhunspell_src_path + "/" + item)
|
||||
|
||||
if (13 == version_hunspell):
|
||||
sources.append("./wasm/src/filemgr_wrapper.cxx")
|
||||
else:
|
||||
sources.append("./wasm/src/filemgr_wrapper_new.cxx")
|
||||
|
||||
sources.append("./wasm/src/base.cpp")
|
||||
|
||||
compiler_flags.append("-I" + libhunspell_src_path)
|
||||
compiler_flags.append("-DWIN32 -DNDEBUG -DHUNSPELL_STATIC -DBUILDING_LIBHUNSPELL -DHUNSPELL_WASM_MODULE")
|
||||
|
||||
# arguments
|
||||
arguments = ""
|
||||
for item in compiler_flags:
|
||||
arguments += (item + " ")
|
||||
|
||||
arguments += "-s EXPORTED_FUNCTIONS=\"["
|
||||
for item in exported_functions:
|
||||
arguments += ("'" + item + "',")
|
||||
arguments = arguments[:-1]
|
||||
arguments += "]\" "
|
||||
|
||||
for item in sources:
|
||||
arguments += (item + " ")
|
||||
|
||||
|
||||
# command
|
||||
windows_bat = []
|
||||
if (base.host_platform() == "windows"):
|
||||
windows_bat.append("call emsdk/emsdk_env.bat")
|
||||
windows_bat.append("call emcc " + arguments)
|
||||
else:
|
||||
windows_bat.append("#!/bin/bash")
|
||||
windows_bat.append("source ./emsdk/emsdk_env.sh")
|
||||
windows_bat.append("emcc " + arguments)
|
||||
base.run_as_bat(windows_bat)
|
||||
|
||||
# finalize
|
||||
base.replaceInFile("./spell.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){self.onEngineInit();}];")
|
||||
base.replaceInFile("./spell.js", "function getBinaryPromise(){", "function getBinaryPromise2(){")
|
||||
|
||||
spell_js_content = base.readFile("./spell.js")
|
||||
engine_base_js_content = base.readFile("./wasm/js/spell.js")
|
||||
engine_js_content = engine_base_js_content.replace("//module", spell_js_content)
|
||||
|
||||
# write new version
|
||||
base.writeFile("./deploy/spell/spell.js", engine_js_content)
|
||||
base.copy_file("spell.wasm", "./deploy/spell/spell.wasm")
|
||||
|
||||
# ie asm version
|
||||
arguments = arguments.replace("WASM=1", "WASM=0")
|
||||
|
||||
# command
|
||||
windows_bat = []
|
||||
if (base.host_platform() == "windows"):
|
||||
windows_bat.append("call emsdk/emsdk_env.bat")
|
||||
windows_bat.append("call emcc " + arguments)
|
||||
else:
|
||||
windows_bat.append("#!/bin/bash")
|
||||
windows_bat.append("source ./emsdk/emsdk_env.sh")
|
||||
windows_bat.append("emcc " + arguments)
|
||||
base.run_as_bat(windows_bat)
|
||||
|
||||
# finalize
|
||||
base.replaceInFile("./spell.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){self.onEngineInit();}];")
|
||||
base.replaceInFile("./spell.js", "function getBinaryPromise(){", "function getBinaryPromise2(){")
|
||||
|
||||
spell_js_content = base.readFile("./spell.js")
|
||||
engine_base_js_content = base.readFile("./wasm/js/spell.js")
|
||||
engine_base_js_polyfill = base.readFile("./wasm/js/polyfill.js")
|
||||
engine_js_content = engine_base_js_polyfill + "\n\n" + engine_base_js_content.replace("//module", spell_js_content)
|
||||
|
||||
# write new version
|
||||
base.writeFile("./deploy/spell/spell_ie.js", engine_js_content)
|
||||
base.copy_file("spell.js.mem", "./deploy/spell/spell.js.mem")
|
||||
|
||||
base.copy_file("./wasm/js/code.js", "./deploy/spell.js")
|
||||
base.copy_file("./wasm/js/index.html", "./deploy/index.html")
|
||||
|
||||
base.delete_file("spell.js")
|
||||
base.delete_file("spell.js.mem")
|
||||
os.chdir(old_cur_dir)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# manual compile
|
||||
make(True)
|
||||
@ -67,10 +67,12 @@ def make():
|
||||
if (-1 != config.option("platform").find("ios")):
|
||||
if not base.is_dir("build"):
|
||||
base.bash("./icu_ios")
|
||||
elif (platform == "mac_64") and not base.is_dir(platform + "/build"):
|
||||
base.cmd_in_dir(base_dir + "/../../../../build_tools/scripts/core_common/modules", "python", ["icu_mac.py"])
|
||||
elif ("" != platform) and not base.is_dir(platform + "/build"):
|
||||
base.create_dir(platform)
|
||||
os.chdir("icu/source")
|
||||
base.cmd("./runConfigureICU", ["Linux" if "linux" == base.host_platform() else "MacOSX"])
|
||||
base.cmd("./runConfigureICU", ["Linux"])
|
||||
old_dest_dir = base.get_env("DESTDIR")
|
||||
base.set_env("DESTDIR", base_dir + "/" + platform)
|
||||
base.cmd("make", ["install"])
|
||||
@ -83,9 +85,6 @@ def make():
|
||||
if ("linux_64" == platform):
|
||||
base.copy_file("icu/source/lib/libicudata.so." + icu_major + "." + icu_minor, platform + "/build/libicudata.so." + icu_major)
|
||||
base.copy_file("icu/source/lib/libicuuc.so." + icu_major + "." + icu_minor, platform + "/build/libicuuc.so." + icu_major)
|
||||
elif ("mac_64" == platform):
|
||||
base.copy_file("icu/source/lib/libicudata." + icu_major + "." + icu_minor + ".dylib", platform + "/build/libicudata." + icu_major + ".dylib")
|
||||
base.copy_file("icu/source/lib/libicuuc." + icu_major + "." + icu_minor + ".dylib", platform + "/build/libicuuc." + icu_major + ".dylib")
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
|
||||
98
scripts/core_common/modules/icu_mac.py
Executable file
98
scripts/core_common/modules/icu_mac.py
Executable file
@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import base
|
||||
import os
|
||||
|
||||
def change_icu_defs(current_dir, arch):
|
||||
icudef_file = current_dir + "/icudefs.mk"
|
||||
icudef_file_old = current_dir + "/icudefs.mk.back"
|
||||
|
||||
param = "-arch x86_64"
|
||||
if arch == "arm64":
|
||||
param = "-arch arm64 -isysroot " + base.find_mac_sdk()
|
||||
|
||||
param += " -mmacosx-version-min=10.12"
|
||||
|
||||
base.copy_file(icudef_file, icudef_file_old)
|
||||
|
||||
base.replaceInFile(icudef_file, "CFLAGS = ", "CFLAGS = " + param + " ")
|
||||
base.replaceInFile(icudef_file, "CXXFLAGS = ", "CXXFLAGS = " + param + " ")
|
||||
base.replaceInFile(icudef_file, "RPATHLDFLAGS =", "RPATHLDFLAGS2 =")
|
||||
base.replaceInFile(icudef_file, "LDFLAGS = ", "LDFLAGS = " + param + " ")
|
||||
base.replaceInFile(icudef_file, "RPATHLDFLAGS2 =", "RPATHLDFLAGS =")
|
||||
|
||||
return
|
||||
|
||||
def restore_icu_defs(current_dir):
|
||||
icudef_file = current_dir + "/icudefs.mk"
|
||||
icudef_file_old = current_dir + "/icudefs.mk.back"
|
||||
|
||||
base.delete_file(icudef_file)
|
||||
base.copy_file(icudef_file_old, icudef_file)
|
||||
base.delete_file(icudef_file_old)
|
||||
return
|
||||
|
||||
icu_major = "58"
|
||||
icu_minor = "2"
|
||||
|
||||
current_dir_old = os.getcwd()
|
||||
current_dir = base.get_script_dir() + "/../../core/Common/3dParty/icu"
|
||||
|
||||
os.chdir(current_dir)
|
||||
|
||||
if not base.is_dir(current_dir + "/mac_cross_64"):
|
||||
base.create_dir(current_dir + "/mac_cross_64")
|
||||
os.chdir(current_dir + "/mac_cross_64")
|
||||
|
||||
base.cmd("../icu/source/runConfigureICU", ["MacOSX",
|
||||
"--prefix=" + current_dir + "/mac_cross_64", "CFLAGS=-Os CXXFLAGS=--std=c++11"])
|
||||
|
||||
change_icu_defs(current_dir + "/mac_cross_64", "x86_64")
|
||||
|
||||
base.cmd("make", ["-j4"])
|
||||
base.cmd("make", ["install"], True)
|
||||
|
||||
restore_icu_defs(current_dir + "/mac_cross_64")
|
||||
|
||||
os.chdir(current_dir)
|
||||
|
||||
os.chdir(current_dir + "/icu/source")
|
||||
|
||||
base.cmd("./configure", ["--prefix=" + current_dir + "/mac_arm_64",
|
||||
"--with-cross-build=" + current_dir + "/mac_cross_64", "VERBOSE=1"])
|
||||
|
||||
change_icu_defs(current_dir + "/icu/source", "arm64")
|
||||
|
||||
base.cmd("make", ["-j4"])
|
||||
base.cmd("make", ["install"])
|
||||
|
||||
restore_icu_defs(current_dir + "/icu/source")
|
||||
|
||||
os.chdir(current_dir)
|
||||
|
||||
if base.is_dir(current_dir + "/mac_64"):
|
||||
base.delete_dir(current_dir + "/mac_64")
|
||||
|
||||
if base.is_dir(current_dir + "/mac_arm64"):
|
||||
base.delete_dir(current_dir + "/mac_arm64")
|
||||
|
||||
base.create_dir(current_dir + "/mac_64")
|
||||
base.create_dir(current_dir + "/mac_64/build")
|
||||
|
||||
base.create_dir(current_dir + "/mac_arm64")
|
||||
base.create_dir(current_dir + "/mac_arm64/build")
|
||||
|
||||
base.copy_dir(current_dir + "/mac_cross_64/include", current_dir + "/mac_64/build/include")
|
||||
base.copy_file(current_dir + "/mac_cross_64/lib/libicudata." + icu_major + "." + icu_minor + ".dylib", current_dir + "/mac_64/build/libicudata." + icu_major + ".dylib")
|
||||
base.copy_file(current_dir + "/mac_cross_64/lib/libicuuc." + icu_major + "." + icu_minor + ".dylib", current_dir + "/mac_64/build/libicuuc." + icu_major + ".dylib")
|
||||
|
||||
base.copy_dir(current_dir + "/mac_arm_64/include", current_dir + "/mac_arm64/build/include")
|
||||
base.copy_file(current_dir + "/mac_arm_64/lib/libicudata." + icu_major + "." + icu_minor + ".dylib", current_dir + "/mac_arm64/build/libicudata." + icu_major + ".dylib")
|
||||
base.copy_file(current_dir + "/mac_arm_64/lib/libicuuc." + icu_major + "." + icu_minor + ".dylib", current_dir + "/mac_arm64/build/libicuuc." + icu_major + ".dylib")
|
||||
|
||||
base.delete_dir(current_dir + "/mac_cross_64")
|
||||
base.delete_dir(current_dir + "/mac_arm_64")
|
||||
|
||||
os.chdir(current_dir_old)
|
||||
191
scripts/core_common/modules/ixwebsocket.py
Normal file
191
scripts/core_common/modules/ixwebsocket.py
Normal file
@ -0,0 +1,191 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import base
|
||||
import os
|
||||
import config
|
||||
from distutils.version import LooseVersion, StrictVersion
|
||||
|
||||
current_dir = base.get_script_dir() + "/../../core/Common/3dParty/ixwebsocket"
|
||||
|
||||
CMAKE = "cmake"
|
||||
|
||||
def find_last_version(arr_input, base_directory):
|
||||
arr = []
|
||||
for arr_rec in arr_input:
|
||||
if base.is_file(base_directory + "/" + arr_rec + "/bin/cmake"):
|
||||
arr.append(arr_rec)
|
||||
res = arr[0]
|
||||
for version in arr:
|
||||
if(LooseVersion(version) > LooseVersion(res)):
|
||||
res = version
|
||||
return res
|
||||
|
||||
def build_arch(platform, arch, params, is_debug=False):
|
||||
print("ixwebsocket build: " + platform + "....." + arch + " ----------------------------------------")
|
||||
|
||||
if base.is_dir(current_dir + "/IXWebSocket/build/"+ platform + "/" + arch):
|
||||
base.delete_dir(current_dir + "/IXWebSocket/build/" + platform + "/" + arch)
|
||||
base.create_dir(current_dir + "/IXWebSocket/build/" + platform + "/" + arch)
|
||||
cache_dir = current_dir + "/IXWebSocket/build/" + platform + "/cache"
|
||||
base.create_dir(cache_dir)
|
||||
os.chdir(cache_dir)
|
||||
|
||||
libext = "a"
|
||||
prefix = "/"
|
||||
zlib = "1"
|
||||
if (0 == platform.find("windows")):
|
||||
zlib = "0"
|
||||
libext = "lib"
|
||||
prefix = cache_dir + "/../" + arch
|
||||
|
||||
path = platform
|
||||
if(platform == "ios" or platform == "android"):
|
||||
path += "/"
|
||||
else:
|
||||
path = ""
|
||||
|
||||
base.cmd(CMAKE, ["../../..",
|
||||
"-DUSE_WS=0", "-DUSE_ZLIB=" + zlib, "-DUSE_TLS=1", "-DUSE_OPEN_SSL=1",
|
||||
"-DOPENSSL_ROOT_DIR=" + cache_dir + "/../../../../../openssl/build/" + path + arch,
|
||||
"-DOPENSSL_INCLUDE_DIR=" + cache_dir + "/../../../../../openssl/build/" + path + arch + "/include",
|
||||
"-DOPENSSL_CRYPTO_LIBRARY=" + cache_dir + "/../../../../../openssl/build/" + path + arch + "/lib/libcrypto." + libext,
|
||||
"-DOPENSSL_SSL_LIBRARY=" + cache_dir + "/../../../../../openssl/build/" + path + arch + "/lib/libssl." + libext,
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=" + prefix] + params)
|
||||
|
||||
if(-1 != platform.find("ios") or -1 != platform.find("mac")):
|
||||
base.cmd(CMAKE, ["--build", ".", "--config", "Release"])
|
||||
base.cmd(CMAKE, ["--install", ".", "--config", "Release", "--prefix", cache_dir + "/../" + arch])
|
||||
elif(-1 != platform.find("android") or -1 != platform.find("linux")):
|
||||
base.cmd("make", ["-j4"])
|
||||
base.cmd("make", ["DESTDIR=" + cache_dir + "/../" + arch, "install"])
|
||||
elif(-1 != platform.find("windows")):
|
||||
conf = "Debug" if is_debug else "Release"
|
||||
base.cmd(CMAKE, ["--build", ".", "--target", "install", "--config", conf])
|
||||
|
||||
base.delete_dir(cache_dir)
|
||||
os.chdir(current_dir)
|
||||
|
||||
return
|
||||
|
||||
def make():
|
||||
if not base.is_dir(current_dir):
|
||||
base.create_dir(current_dir)
|
||||
|
||||
print("[fetch & build]: ixwebsocket")
|
||||
|
||||
current_dir_old = os.getcwd()
|
||||
|
||||
os.chdir(current_dir)
|
||||
|
||||
if not base.is_dir(current_dir + "/IXWebSocket"):
|
||||
base.cmd("git", ["clone", "https://github.com/machinezone/IXWebSocket"])
|
||||
|
||||
|
||||
# build for platform
|
||||
if (-1 != config.option("platform").find("android")):
|
||||
if base.is_dir(current_dir + "/IXWebSocket/build/android"):
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
|
||||
os.chdir(current_dir + "/IXWebSocket")
|
||||
|
||||
global CMAKE
|
||||
|
||||
CMAKE_TOOLCHAIN_FILE = base.get_env("ANDROID_NDK_ROOT") + "/build/cmake/android.toolchain.cmake"
|
||||
CMAKE_DIR = base.get_android_sdk_home() + "/cmake/"
|
||||
CMAKE = CMAKE_DIR + find_last_version(os.listdir(CMAKE_DIR), CMAKE_DIR) + "/bin/cmake"
|
||||
|
||||
def param_android(arch, api):
|
||||
return ["-G","Unix Makefiles", "-DANDROID_NATIVE_API_LEVEL=" + api, "-DANDROID_ABI=" + arch, "-DANDROID_TOOLCHAIN=clang", "-DANDROID_NDK=" + base.get_env("ANDROID_NDK_ROOT"), "-DCMAKE_TOOLCHAIN_FILE=" + CMAKE_TOOLCHAIN_FILE, "-DCMAKE_MAKE_PROGRAM=make"]
|
||||
|
||||
build_arch("android", "arm64-v8a", param_android("arm64-v8a", "21"))
|
||||
build_arch("android", "armeabi-v7a", param_android("armeabi-v7a", "16"))
|
||||
build_arch("android", "x86_64", param_android("x86_64", "21"))
|
||||
build_arch("android", "x86", param_android("x86", "16"))
|
||||
|
||||
|
||||
elif (-1 != config.option("platform").find("ios") or -1 != config.option("platform").find("mac")):
|
||||
platform = "ios" if -1 != config.option("platform").find("ios") else "mac"
|
||||
if base.is_dir(current_dir + "/IXWebSocket/build/" + platform):
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
|
||||
if not base.is_dir(current_dir + "/ios-cmake"):
|
||||
base.cmd("git", ["clone", "https://github.com/leetal/ios-cmake"])
|
||||
|
||||
CMAKE_TOOLCHAIN_FILE = current_dir + "/ios-cmake/ios.toolchain.cmake"
|
||||
|
||||
os_cmd = 'cmake'
|
||||
if os.system(os_cmd) != 0:
|
||||
base.cmd("brew install", ["cmake"])
|
||||
|
||||
os.chdir(current_dir + "/IXWebSocket")
|
||||
|
||||
def param_apple(platform, arch):
|
||||
return ["-G","Xcode", "-DDEPLOYMENT_TARGET=10", "-DENABLE_BITCODE=1", "-DPLATFORM=" + platform, "-DARCHS=" + arch, "-DCMAKE_TOOLCHAIN_FILE=" + CMAKE_TOOLCHAIN_FILE]
|
||||
|
||||
if(platform == "ios"):
|
||||
build_arch("ios", "armv7", param_apple("OS", "armv7"))
|
||||
build_arch("ios", "arm64", param_apple("OS64", "arm64"))
|
||||
build_arch("ios", "i386", param_apple("SIMULATOR", "i386"))
|
||||
build_arch("ios", "x86_64", param_apple("SIMULATOR64", "x86_64"))
|
||||
else:
|
||||
build_arch("mac", "mac_arm64", param_apple("MAC_ARM64", "arm64"))
|
||||
build_arch("mac", "mac_64", param_apple("MAC", "x86_64"))
|
||||
|
||||
os.chdir(current_dir)
|
||||
|
||||
if(platform == "ios"):
|
||||
base.create_dir(current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal/include")
|
||||
base.create_dir(current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal/lib")
|
||||
|
||||
#copy include
|
||||
prefix_dir = current_dir + "/IXWebSocket/build/ios/"
|
||||
postfix_dir = ""
|
||||
if base.is_dir(prefix_dir + "armv7/usr"):
|
||||
postfix_dir = "/usr"
|
||||
|
||||
if base.is_dir(prefix_dir + "armv7" + postfix_dir + "/include"):
|
||||
base.cmd("cp", [ "-r", prefix_dir + "armv7" + postfix_dir + "/include", current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal"])
|
||||
elif base.is_dir(prefix_dir + "armv64" + postfix_dir + "/include"):
|
||||
base.cmd("cp", [ "-r", prefix_dir + "armv64" + postfix_dir + "/include", current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal"])
|
||||
elif base.is_dir(prefix_dir + "i386" + postfix_dir + "/include"):
|
||||
base.cmd("cp", [ "-r", prefix_dir + "i386" + postfix_dir + "/include", current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal"])
|
||||
elif base.is_dir(prefix_dir + "x86_64" + postfix_dir + "/include"):
|
||||
base.cmd("cp", [ "-r", prefix_dir + "x86_64" + postfix_dir + "/include", current_dir + "/IXWebSocket/build/ios/ixwebsocket-universal"])
|
||||
|
||||
# Create fat lib
|
||||
base.cmd("lipo", ["IXWebSocket/build/ios/armv7" + postfix_dir + "/lib/libixwebsocket.a", "IXWebSocket/build/ios/arm64" + postfix_dir + "/lib/libixwebsocket.a",
|
||||
"IXWebSocket/build/ios/i386" + postfix_dir + "/lib/libixwebsocket.a", "IXWebSocket/build/ios/x86_64" + postfix_dir + "/lib/libixwebsocket.a",
|
||||
"-create", "-output",
|
||||
"IXWebSocket/build/ios/ixwebsocket-universal/lib/libixwebsocket.a"])
|
||||
|
||||
|
||||
elif (-1 != config.option("platform").find("linux")):
|
||||
if base.is_dir(current_dir + "/IXWebSocket/build/linux"):
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
|
||||
#will support when openssl x86 will support
|
||||
#if (-1 != config.option("platform").find("linux_32")):
|
||||
#build_arch("linux", "linux_32", ["-G","Unix Makefiles", "-DCMAKE_MAKE_PROGRAM=make", "-DCMAKE_C_FLAGS=-m32", "-DCMAKE_CXX_FLAGS=-m32"])
|
||||
if (-1 != config.option("platform").find("linux_64")):
|
||||
build_arch("linux", "linux_64", ["-G","Unix Makefiles", "-DCMAKE_MAKE_PROGRAM=make"])
|
||||
|
||||
|
||||
elif ("windows" == base.host_platform()):
|
||||
if base.is_dir(current_dir + "/IXWebSocket/build/windows"):
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
|
||||
if (-1 != config.option("platform").find("win_32")):
|
||||
build_arch("windows", "win_32", ["-G","Visual Studio 14 2015", "-A", "Win32"])
|
||||
build_arch("windows_debug", "win_32", ["-G","Visual Studio 14 2015", "-A", "Win32"], True)
|
||||
if (-1 != config.option("platform").find("win_64")):
|
||||
build_arch("windows", "win_64", ["-G","Visual Studio 14 2015 Win64"])
|
||||
build_arch("windows_debug", "win_64", ["-G","Visual Studio 14 2015 Win64"], True)
|
||||
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
@ -5,6 +5,7 @@ sys.path.append('../..')
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
import openssl_mobile
|
||||
|
||||
def clean():
|
||||
if base.is_dir("openssl"):
|
||||
@ -14,11 +15,13 @@ def clean():
|
||||
return
|
||||
|
||||
def make():
|
||||
if ("android" == base.host_platform() or "ios" == config.option("platform")):
|
||||
return
|
||||
|
||||
print("[fetch & build]: openssl")
|
||||
|
||||
if (-1 != config.option("platform").find("android") or -1 != config.option("platform").find("ios")):
|
||||
openssl_mobile.make()
|
||||
return
|
||||
|
||||
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/openssl"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(base_dir)
|
||||
@ -83,7 +86,25 @@ def make():
|
||||
# TODO: support x86
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_64"):
|
||||
base.cmd("./config", ["no-shared", "no-asm", "--prefix=" + old_cur_dir + "/build/mac_64", "--openssldir=" + old_cur_dir + "/build/mac_64", "-mmacosx-version-min=10.11"])
|
||||
base.cmd("./Configure", ["no-shared", "no-asm", "darwin64-x86_64-cc", "--prefix=" + old_cur_dir + "/build/mac_64", "--openssldir=" + old_cur_dir + "/build/mac_64", "-mmacosx-version-min=10.11"])
|
||||
base.cmd("make", ["build_libs", "install"])
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_arm64"):
|
||||
os.chdir(base_dir)
|
||||
base.cmd("git", ["clone", "--depth=1", "--branch", "OpenSSL_1_1_1f", "https://github.com/openssl/openssl.git", "openssl2"])
|
||||
os.chdir(base_dir + "/openssl2")
|
||||
replace1 = "\"darwin64-x86_64-cc\" => {"
|
||||
replace2 = "\"darwin64-arm64-cc\" => {\n\
|
||||
inherit_from => [ \"darwin-common\", asm(\"aarch64_asm\") ],\n\
|
||||
CFLAGS => add(\"-Wall\"),\n\
|
||||
cflags => add(\"-arch arm64 -isysroot " + base.find_mac_sdk() + "\"),\n\
|
||||
lib_cppflags => add(\"-DL_ENDIAN\"),\n\
|
||||
bn_ops => \"SIXTY_FOUR_BIT_LONG\",\n\
|
||||
perlasm_scheme => \"macosx\",\n\
|
||||
},\n\
|
||||
\"darwin64-x86_64-cc\" => {"
|
||||
base.replaceInFile(base_dir + "/openssl2/Configurations/10-main.conf", replace1, replace2)
|
||||
base.cmd("./Configure", ["no-shared", "no-asm", "darwin64-arm64-cc", "--prefix=" + old_cur_dir + "/build/mac_arm64", "--openssldir=" + old_cur_dir + "/build/mac_arm64"])
|
||||
base.cmd("make", ["build_libs", "install"])
|
||||
|
||||
os.chdir(old_cur)
|
||||
|
||||
21
scripts/core_common/modules/openssl_mobile.py
Executable file
21
scripts/core_common/modules/openssl_mobile.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import base
|
||||
import config
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def make():
|
||||
path = base.get_script_dir() + "/../../core/Common/3dParty/openssl"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(path)
|
||||
base.set_env("ANDROID_HOME", base.get_android_sdk_home())
|
||||
|
||||
if (-1 != config.option("platform").find("android") and not base.is_dir("./build/android")):
|
||||
subprocess.call(["./build-android-openssl.sh"])
|
||||
|
||||
if (-1 != config.option("platform").find("ios") and not base.is_dir("./build/ios")):
|
||||
subprocess.call(["./build-ios-openssl.sh"])
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
62
scripts/core_common/modules/socketrocket.py
Normal file
62
scripts/core_common/modules/socketrocket.py
Normal file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
import config
|
||||
|
||||
current_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketrocket"
|
||||
|
||||
def buildIOS():
|
||||
|
||||
# Build for iphone
|
||||
base.cmd("xcodebuild", ["-sdk", "iphoneos", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release"])
|
||||
|
||||
# Build for simulator
|
||||
base.cmd("xcodebuild", ["-sdk", "iphonesimulator", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release"])
|
||||
|
||||
# Remove arm64 for simulator for SDK 14
|
||||
base.cmd("lipo", ["-remove", "arm64", "-output", "build/Release-iphonesimulator/libSocketRocket.a", "build/Release-iphonesimulator/libSocketRocket.a"])
|
||||
|
||||
base.create_dir(current_dir + "/build/ios/lib")
|
||||
|
||||
# Create fat lib
|
||||
base.cmd("lipo", ["./build/Release-iphonesimulator/libSocketRocket.a", "./build/Release-iphoneos/libSocketRocket.a", "-create", "-output",
|
||||
"./build/ios/lib/libSoсketRocket.a"])
|
||||
|
||||
return
|
||||
|
||||
def buildMacOS():
|
||||
|
||||
# Build for iphone
|
||||
base.cmd("xcodebuild", ["-sdk", "macosx", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release"])
|
||||
|
||||
base.create_dir(current_dir + "/build/mac_64/lib")
|
||||
base.create_dir(current_dir + "/build/mac_arm64/lib")
|
||||
|
||||
base.cmd("lipo", ["build/Release/libSocketRocket.a", "-thin", "x86_64", "-output", "build/mac_64/lib/libSoсketRocket.a"])
|
||||
base.cmd("lipo", ["build/Release/libSocketRocket.a", "-thin", "arm64", "-output", "build/mac_arm64/lib/libSoсketRocket.a"])
|
||||
|
||||
base.delete_file("build/Release/libSocketRocket.a")
|
||||
|
||||
return
|
||||
|
||||
def make():
|
||||
if (-1 == config.option("platform").find("mac") and -1 == config.option("platform").find("ios")):
|
||||
return
|
||||
|
||||
current_dir_old = os.getcwd()
|
||||
|
||||
print("[build]: socketrocket")
|
||||
os.chdir(current_dir)
|
||||
|
||||
if (-1 != config.option("platform").find("mac")):
|
||||
if not base.is_dir(current_dir + "/build/mac_64") or not base.is_dir(current_dir + "/build/mac_arm_64"):
|
||||
buildMacOS()
|
||||
elif (-1 != config.option("platform").find("ios")):
|
||||
if not base.is_dir(current_dir + "/build/ios"):
|
||||
buildIOS()
|
||||
os.chdir(current_dir_old)
|
||||
return
|
||||
@ -67,6 +67,9 @@ def make():
|
||||
if (-1 == config.option("platform").find("linux")) and (-1 == config.option("platform").find("mac")) and (-1 == config.option("platform").find("win")):
|
||||
return
|
||||
|
||||
if ("mac" == base.host_platform()) and (-1 == config.option("config").find("use_v8")):
|
||||
return
|
||||
|
||||
print("[fetch & build]: v8")
|
||||
old_env = dict(os.environ)
|
||||
|
||||
@ -146,6 +149,11 @@ def make():
|
||||
base.replaceInFile("v8/build/config/mac/mac_sdk.gni", "if (mac_sdk_version != mac_sdk_min_build_override", "if (false && mac_sdk_version != mac_sdk_min_build_override")
|
||||
base.replaceInFile("v8/build/mac/find_sdk.py", "^MacOSX(10\\.\\d+)\\.sdk$", "^MacOSX(1\\d\\.\\d+)\\.sdk$")
|
||||
|
||||
if (11003 <= base.get_mac_sdk_version_number()):
|
||||
base.copy_dir("v8/third_party/llvm-build/Release+Asserts/include", "v8/third_party/llvm-build/Release+Asserts/__include")
|
||||
base.delete_dir("v8/third_party/llvm-build/Release+Asserts/include")
|
||||
base.replaceInFile("v8/build/config/mac/BUILD.gn", "\"-mmacosx-version-min=$mac_deployment_target\",", "\"-mmacosx-version-min=$mac_deployment_target\",\n \"-Wno-deprecated-declarations\",")
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# build
|
||||
os.chdir("v8")
|
||||
|
||||
16
scripts/core_common/modules/websocket.py
Executable file
16
scripts/core_common/modules/websocket.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import config
|
||||
import base
|
||||
import ixwebsocket
|
||||
import socketrocket
|
||||
|
||||
config_file = base.get_script_dir() + "/../../core/Common/WebSocket/websocket.pri"
|
||||
|
||||
def make():
|
||||
ixwebsocket.make()
|
||||
socketrocket.make()
|
||||
|
||||
return
|
||||
@ -34,6 +34,7 @@ def make():
|
||||
# x2t
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfReader")
|
||||
@ -72,7 +73,7 @@ def make():
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(core_build_dir + "/lib/" + platform_postfix + "/doctrenderer.lib", root_dir + "/doctrenderer.lib")
|
||||
base.copy_files(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", root_dir + "/")
|
||||
else:
|
||||
elif (-1 == config.option("config").find("use_javascript_core")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", root_dir + "/icudtl.dat")
|
||||
|
||||
# app
|
||||
|
||||
@ -24,20 +24,22 @@ def make():
|
||||
base.create_dir(archive_dir)
|
||||
|
||||
platform = native_platform
|
||||
platform_postfix = platform + base.qt_dst_postfix()
|
||||
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "doctrenderer")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "HtmlRenderer")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "DjVuFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "XpsFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "PdfReader")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "PdfWriter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "HtmlFile2")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "Fb2File")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform, archive_dir, "EpubFile")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform, archive_dir, "x2t")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "kernel_network")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "doctrenderer")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlRenderer")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DjVuFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "XpsFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfReader")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfWriter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlFile2")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "Fb2File")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "EpubFile")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "x2t")
|
||||
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", archive_dir + "/sdkjs")
|
||||
base.create_dir(archive_dir + "/sdkjs/vendor")
|
||||
@ -49,11 +51,12 @@ def make():
|
||||
base.copy_files(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", archive_dir + "/")
|
||||
else:
|
||||
base.copy_files(core_dir + "/Common/3dParty/icu/" + platform + "/build/*", archive_dir + "/")
|
||||
base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", archive_dir + "/")
|
||||
if (-1 == config.option("config").find("use_javascript_core")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", archive_dir + "/")
|
||||
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform, archive_dir, "allfontsgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform, archive_dir, "allthemesgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform, archive_dir, "standardtester")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "allfontsgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "allthemesgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "standardtester")
|
||||
|
||||
if base.is_file(archive_dir + "/core.7z"):
|
||||
base.delete_file(archive_dir + "/core.7z")
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
import platform
|
||||
|
||||
def make():
|
||||
base_dir = base.get_script_dir() + "/../out"
|
||||
@ -43,6 +44,7 @@ def make():
|
||||
# x2t
|
||||
base.create_dir(root_dir + "/converter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel_network")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfWriter")
|
||||
@ -80,11 +82,11 @@ def make():
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "doctrenderer")
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_files(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", root_dir + "/converter/")
|
||||
else:
|
||||
elif (-1 == config.option("config").find("use_javascript_core")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", root_dir + "/converter/icudtl.dat")
|
||||
|
||||
base.generate_doctrenderer_config(root_dir + "/converter/DoctRenderer.config", "../editors/", "desktop")
|
||||
base.copy_dir(git_dir + "/desktop-apps/common/converter/empty", root_dir + "/converter/empty")
|
||||
base.copy_dir(git_dir + "/document-templates/new", root_dir + "/converter/empty")
|
||||
|
||||
# dictionaries
|
||||
base.create_dir(root_dir + "/dictionaries")
|
||||
@ -178,9 +180,7 @@ def make():
|
||||
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt", root_dir + "/editors/sdkjs-plugins", "advanced2", True)
|
||||
#base.copy_dir(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/common/{14A8FC87-8E26-4216-B34E-F27F053B2EC4}", root_dir + "/editors/sdkjs-plugins/{14A8FC87-8E26-4216-B34E-F27F053B2EC4}")
|
||||
#base.copy_dir(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/engine/database/{9AB4BBA8-A7E5-48D5-B683-ECE76A020BB1}", root_dir + "/editors/sdkjs-plugins/{9AB4BBA8-A7E5-48D5-B683-ECE76A020BB1}")
|
||||
|
||||
if (0 != platform.find("mac")):
|
||||
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "sendto", True)
|
||||
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "sendto", True)
|
||||
|
||||
base.copy_file(base_dir + "/js/" + branding + "/desktop/index.html", root_dir + "/index.html")
|
||||
base.copy_dir(git_dir + "/desktop-apps/common/loginpage/providers", root_dir + "/providers")
|
||||
@ -200,6 +200,10 @@ def make():
|
||||
base.delete_file(root_dir + "/cef_sandbox.lib")
|
||||
base.delete_file(root_dir + "/libcef.lib")
|
||||
|
||||
isMacArmPlaformOnIntel = False
|
||||
if (platform == "mac_arm64") and not base.is_os_arm():
|
||||
isMacArmPlaformOnIntel = True
|
||||
|
||||
# all themes generate ----
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allfontsgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allthemesgen")
|
||||
@ -207,16 +211,23 @@ def make():
|
||||
if (0 == platform.find("mac")):
|
||||
base.mac_correct_rpath_desktop(root_dir)
|
||||
|
||||
themes_params = []
|
||||
if ("" != config.option("themesparams")):
|
||||
themes_params = ["--params=\"" + config.option("themesparams") + "\""]
|
||||
base.cmd_exe(root_dir + "/converter/allfontsgen", ["--use-system=\"1\"", "--input=\"" + root_dir + "/fonts\"", "--input=\"" + git_dir + "/core-fonts\"", "--allfonts=\"" + root_dir + "/converter/AllFonts.js\"", "--selection=\"" + root_dir + "/converter/font_selection.bin\""])
|
||||
base.cmd_exe(root_dir + "/converter/allthemesgen", ["--converter-dir=\"" + root_dir + "/converter\"", "--src=\"" + root_dir + "/editors/sdkjs/slide/themes\"", "--allfonts=\"AllFonts.js\"", "--output=\"" + root_dir + "/editors/sdkjs/common/Images\""] + themes_params)
|
||||
if isMacArmPlaformOnIntel:
|
||||
sdkjs_dir = root_dir + "/editors/sdkjs"
|
||||
end_find_platform = sdkjs_dir.rfind("/mac_arm64/")
|
||||
sdkjs_dir_mac64 = sdkjs_dir[0:end_find_platform] + "/mac_64/" + sdkjs_dir[end_find_platform+11:]
|
||||
base.delete_dir(sdkjs_dir)
|
||||
base.copy_dir(sdkjs_dir_mac64, sdkjs_dir)
|
||||
else:
|
||||
themes_params = []
|
||||
if ("" != config.option("themesparams")):
|
||||
themes_params = ["--params=\"" + config.option("themesparams") + "\""]
|
||||
base.cmd_exe(root_dir + "/converter/allfontsgen", ["--use-system=\"1\"", "--input=\"" + root_dir + "/fonts\"", "--input=\"" + git_dir + "/core-fonts\"", "--allfonts=\"" + root_dir + "/converter/AllFonts.js\"", "--selection=\"" + root_dir + "/converter/font_selection.bin\""])
|
||||
base.cmd_exe(root_dir + "/converter/allthemesgen", ["--converter-dir=\"" + root_dir + "/converter\"", "--src=\"" + root_dir + "/editors/sdkjs/slide/themes\"", "--allfonts=\"AllFonts.js\"", "--output=\"" + root_dir + "/editors/sdkjs/common/Images\""] + themes_params)
|
||||
base.delete_file(root_dir + "/converter/AllFonts.js")
|
||||
base.delete_file(root_dir + "/converter/font_selection.bin")
|
||||
|
||||
base.delete_exe(root_dir + "/converter/allfontsgen")
|
||||
base.delete_exe(root_dir + "/converter/allthemesgen")
|
||||
base.delete_file(root_dir + "/converter/AllFonts.js")
|
||||
base.delete_file(root_dir + "/converter/font_selection.bin")
|
||||
|
||||
if not isUseJSC:
|
||||
base.delete_file(root_dir + "/editors/sdkjs/slide/sdk-all.cache")
|
||||
|
||||
@ -3,6 +3,11 @@
|
||||
import config
|
||||
import base
|
||||
|
||||
def exclude_arch(directory, frameworks):
|
||||
for lib in frameworks:
|
||||
base.cmd("lipo", ["-remove", "arm64", directory + "/" + lib + ".framework/" + lib, "-o", directory + "/" + lib + ".framework/" + lib])
|
||||
return
|
||||
|
||||
def make():
|
||||
base_dir = base.get_script_dir() + "/../out"
|
||||
git_dir = base.get_script_dir() + "/../.."
|
||||
@ -34,6 +39,7 @@ def make():
|
||||
|
||||
# x2t
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter")
|
||||
@ -45,7 +51,17 @@ def make():
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "doctrenderer")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "Fb2File")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "EpubFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "x2t")
|
||||
|
||||
if (0 == platform.find("win") or 0 == platform.find("linux") or 0 == platform.find("mac")):
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir, "x2t")
|
||||
else:
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "x2t")
|
||||
|
||||
if ("ios" == platform) and config.check_option("config", "bundle_dylibs") and config.check_option("config", "simulator"):
|
||||
exclude_arch(root_dir, ["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfWriter",
|
||||
"PdfReader", "DjVuFile", "XpsFile", "HtmlFile2", "HtmlRenderer", "doctrenderer",
|
||||
"Fb2File", "EpubFile", "x2t"])
|
||||
|
||||
|
||||
# icu
|
||||
if (0 == platform.find("win")):
|
||||
|
||||
@ -32,7 +32,8 @@ def make():
|
||||
continue
|
||||
|
||||
root_dir = base_dir + ("/" + native_platform + "/" + branding + "/documentserver")
|
||||
root_dir_snap = root_dir + '-snap'
|
||||
root_dir_snap = root_dir + '-snap/var/www/onlyoffice/documentserver'
|
||||
root_dir_snap_example = root_dir_snap + '-example'
|
||||
if (base.is_dir(root_dir)):
|
||||
base.delete_dir(root_dir)
|
||||
base.create_dir(root_dir)
|
||||
@ -57,11 +58,6 @@ def make():
|
||||
base.create_dir(build_server_dir + '/Metrics/node_modules/modern-syslog/build/Release')
|
||||
base.copy_file(bin_server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node", build_server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node")
|
||||
|
||||
base.create_dir(build_server_dir + '/SpellChecker')
|
||||
base.copy_exe(bin_server_dir + "/SpellChecker", build_server_dir + '/SpellChecker', "spellchecker")
|
||||
base.create_dir(build_server_dir + '/SpellChecker/node_modules/nodehun/build/Release')
|
||||
base.copy_file(bin_server_dir + "/SpellChecker/node_modules/nodehun/build/Release/Nodehun.node", build_server_dir + '/SpellChecker/node_modules/nodehun/build/Release/Nodehun.node')
|
||||
|
||||
|
||||
qt_dir = base.qt_setup(native_platform)
|
||||
platform = native_platform
|
||||
@ -76,6 +72,7 @@ def make():
|
||||
base.create_dir(converter_dir)
|
||||
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "kernel")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "kernel_network")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "UnicodeConverter")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "graphics")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfWriter")
|
||||
@ -106,7 +103,7 @@ def make():
|
||||
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_files(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", converter_dir + "/")
|
||||
else:
|
||||
elif (-1 == config.option("config").find("use_javascript_core")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", converter_dir + "/icudtl.dat")
|
||||
|
||||
# builder
|
||||
@ -139,7 +136,7 @@ def make():
|
||||
branding_dir = git_dir + '/' + config.option("branding") + '/server'
|
||||
|
||||
#dictionaries
|
||||
spellchecker_dictionaries = build_server_dir + '/SpellChecker/dictionaries'
|
||||
spellchecker_dictionaries = root_dir + '/dictionaries'
|
||||
spellchecker_dictionaries_files = server_dir + '/../dictionaries/*_*'
|
||||
base.create_dir(spellchecker_dictionaries)
|
||||
base.copy_files(spellchecker_dictionaries_files, spellchecker_dictionaries)
|
||||
@ -161,6 +158,12 @@ def make():
|
||||
base.create_dir(core_fonts)
|
||||
base.copy_dir_content(core_fonts_files, core_fonts, "", ".git")
|
||||
|
||||
#document-templates
|
||||
document_templates_files = server_dir + '/../document-templates'
|
||||
document_templates = build_server_dir + '/../document-templates'
|
||||
base.create_dir(document_templates)
|
||||
base.copy_dir(document_templates_files, document_templates)
|
||||
|
||||
#license
|
||||
license_file1 = server_dir + '/LICENSE.txt'
|
||||
license_file2 = server_dir + '/3rd-Party.txt'
|
||||
@ -191,6 +194,8 @@ def make():
|
||||
|
||||
# snap
|
||||
if (0 == platform.find("linux")):
|
||||
if (base.is_dir(root_dir_snap)):
|
||||
base.delete_dir(root_dir_snap)
|
||||
base.create_dir(root_dir_snap)
|
||||
base.copy_dir(root_dir, root_dir_snap)
|
||||
base.copy_dir(bin_server_dir + '/DocService/node_modules', root_dir_snap + '/server/DocService/node_modules')
|
||||
@ -200,12 +205,12 @@ def make():
|
||||
base.copy_dir(bin_server_dir + '/FileConverter/node_modules', root_dir_snap + '/server/FileConverter/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/FileConverter/sources', root_dir_snap + '/server/FileConverter/sources')
|
||||
base.delete_file(root_dir_snap + '/server/FileConverter/converter')
|
||||
base.copy_dir(bin_server_dir + '/SpellChecker/node_modules', root_dir_snap + '/server/SpellChecker/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/SpellChecker/sources', root_dir_snap + '/server/SpellChecker/sources')
|
||||
base.delete_file(root_dir_snap + '/server/SpellChecker/spellchecker')
|
||||
base.copy_dir(bin_server_dir + '/Common/node_modules', root_dir_snap + '/server/Common/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/Common/sources', root_dir_snap + '/server/Common/sources')
|
||||
base.copy_dir(bin_example_dir + '/..', root_dir_snap + '/example')
|
||||
if (base.is_dir(root_dir_snap_example)):
|
||||
base.delete_dir(root_dir_snap_example)
|
||||
base.create_dir(root_dir_snap_example)
|
||||
base.copy_dir(bin_example_dir + '/..', root_dir_snap_example)
|
||||
base.delete_file(root_dir_snap + '/example/nodejs/example')
|
||||
|
||||
return
|
||||
|
||||
@ -64,9 +64,8 @@ def make():
|
||||
base.generate_doctrenderer_config("./DoctRenderer.config", "../../../sdkjs/deploy/", "server", "../../../web-apps/vendor/")
|
||||
base.support_old_versions_plugins(git_dir + "/sdkjs-plugins")
|
||||
|
||||
if base.is_dir(git_dir + "/fonts"):
|
||||
base.delete_dir(git_dir + "/fonts")
|
||||
base.create_dir(git_dir + "/fonts")
|
||||
if not base.is_dir(git_dir + "/fonts"):
|
||||
base.create_dir(git_dir + "/fonts")
|
||||
|
||||
if ("mac" == base.host_platform()):
|
||||
base.mac_correct_rpath_x2t("./")
|
||||
@ -89,7 +88,7 @@ def make():
|
||||
#base.cmd_exe("./allthemesgen", ["--converter-dir=\"" + git_dir + "/server/FileConverter/bin\"", "--src=\"" + git_dir + "/sdkjs/slide/themes\"", "--output=\"" + git_dir + "/sdkjs/common/Images\"", "--postfix=android", "--params=280,224"])
|
||||
|
||||
# add directories to open directories
|
||||
addon_base_path = "../../../"
|
||||
addon_base_path = "../../"
|
||||
server_config = {}
|
||||
static_content = {}
|
||||
sql = {}
|
||||
|
||||
@ -102,11 +102,11 @@ def check_dependencies():
|
||||
install_args += checksResult.get_uninstall()
|
||||
install_args += checksResult.get_removepath()
|
||||
install_args += checksResult.get_install()
|
||||
install_args[0] = './scripts/develop/' + install_args[0]
|
||||
if (host_platform == 'windows'):
|
||||
install_args[0] = './scripts/develop/' + install_args[0]
|
||||
code = libwindows.sudo(unicode(sys.executable), install_args)
|
||||
elif (host_platform == 'linux'):
|
||||
base.cmd_in_dir('./scripts/develop/', 'python', install_args)
|
||||
base.cmd('python', install_args, False)
|
||||
get_updates()
|
||||
|
||||
check_npmPath()
|
||||
@ -151,6 +151,7 @@ def check_git():
|
||||
def check_nodejs():
|
||||
dependence = CDependencies()
|
||||
|
||||
isNeedReinstall = False
|
||||
base.print_info('Check installed Node.js')
|
||||
nodejs_version = base.run_command('node -v')['stdout']
|
||||
if (nodejs_version == ''):
|
||||
@ -158,12 +159,34 @@ def check_nodejs():
|
||||
dependence.append_install('Node.js')
|
||||
return dependence
|
||||
|
||||
nodejs_cur_version = int(nodejs_version.split('.')[0][1:])
|
||||
print('Installed Node.js version: ' + str(nodejs_cur_version))
|
||||
nodejs_min_version = 8
|
||||
nodejs_max_version = 14
|
||||
if (nodejs_min_version > nodejs_cur_version or nodejs_cur_version > nodejs_max_version):
|
||||
print('Installed Node.js version must be 8.x to 14.x')
|
||||
nodejs_cur_version_major = int(nodejs_version.split('.')[0][1:])
|
||||
nodejs_cur_version_minor = int(nodejs_version.split('.')[1])
|
||||
print('Installed Node.js version: ' + nodejs_version[1:])
|
||||
nodejs_min_version = '10.20'
|
||||
nodejs_min_version_minor = 0
|
||||
major_minor_min_version = nodejs_min_version.split('.')
|
||||
nodejs_min_version_major = int(major_minor_min_version[0])
|
||||
if len(major_minor_min_version) > 1:
|
||||
nodejs_min_version_minor = int(major_minor_min_version[1])
|
||||
nodejs_max_version = '14'
|
||||
nodejs_max_version_minor = float("inf")
|
||||
major_minor_max_version = nodejs_max_version.split('.')
|
||||
nodejs_max_version_major = int(major_minor_max_version[0])
|
||||
if len(major_minor_max_version) > 1:
|
||||
nodejs_max_version_minor = int(major_minor_max_version[1])
|
||||
|
||||
if (nodejs_min_version_major > nodejs_cur_version_major or nodejs_cur_version_major > nodejs_max_version_major):
|
||||
print('Installed Node.js version must be 10.20 to 14.x')
|
||||
isNeedReinstall = True
|
||||
elif (nodejs_min_version_major == nodejs_cur_version_major):
|
||||
if (nodejs_min_version_minor > nodejs_cur_version_minor):
|
||||
isNeedReinstall = True
|
||||
elif (nodejs_cur_version_major == nodejs_max_version_major):
|
||||
if (nodejs_cur_version_minor > nodejs_max_version_minor):
|
||||
isNeedReinstall = True
|
||||
|
||||
if (True == isNeedReinstall):
|
||||
print('Installed Node.js version must be 10.20 to 14.x')
|
||||
if (host_platform == 'windows'):
|
||||
dependence.append_uninstall('Node.js')
|
||||
elif (host_platform == 'linux'):
|
||||
@ -195,16 +218,24 @@ def check_java():
|
||||
def get_erlang_path_to_bin():
|
||||
erlangPath = ''
|
||||
if (host_platform == 'windows'):
|
||||
erlangPath = os.getenv("ERLANG_HOME")
|
||||
if (erlangPath is not None):
|
||||
erlangPath += '\\bin'
|
||||
erlangPath = os.getenv("ERLANG_HOME", "")
|
||||
if (erlangPath != ""):
|
||||
erlangPath += "\\bin"
|
||||
return erlangPath
|
||||
def check_erlang():
|
||||
dependence = CDependencies()
|
||||
base.print_info('Check installed Erlang')
|
||||
|
||||
erlangBitness = base.run_command_in_dir(get_erlang_path_to_bin(), 'erl -eval "erlang:display(erlang:system_info(wordsize)), halt()." -noshell')['stdout']
|
||||
|
||||
erlangBitness = ""
|
||||
erlang_path_home = get_erlang_path_to_bin()
|
||||
if base.is_exist(erlang_path_home) == False:
|
||||
dependence.append_uninstall('Erlang')
|
||||
dependence.append_uninstall('RabbitMQ')
|
||||
return dependence
|
||||
|
||||
if ("" != erlang_path_home or host_platform != 'windows'):
|
||||
erlangBitness = base.run_command_in_dir(erlang_path_home, 'erl -eval "erlang:display(erlang:system_info(wordsize)), halt()." -noshell')['stdout']
|
||||
|
||||
if (erlangBitness == '8'):
|
||||
print("Installed Erlang is valid")
|
||||
return dependence
|
||||
@ -384,6 +415,31 @@ def check_7z():
|
||||
|
||||
return dependence
|
||||
|
||||
def check_gh():
|
||||
base.print_info('Check installed GitHub CLI')
|
||||
|
||||
result = base.run_command('gh --version')['stdout']
|
||||
|
||||
if (result == ''):
|
||||
base.print_info('GitHub CLI not found')
|
||||
# ToDo install
|
||||
return False
|
||||
|
||||
base.print_info('GitHub CLI is installed')
|
||||
return True
|
||||
|
||||
def check_gh_auth():
|
||||
base.print_info('Check auth for GitHub CLI')
|
||||
|
||||
result = base.run_command('gh auth status')['stderr']
|
||||
|
||||
if (result.find('not logged') != -1):
|
||||
base.print_info('GitHub CLI not logged in to github')
|
||||
return False
|
||||
|
||||
base.print_info('GitHub CLI logged in to github')
|
||||
return True
|
||||
|
||||
def get_mysql_path_to_bin(mysqlPath = ''):
|
||||
if (host_platform == 'windows'):
|
||||
if (mysqlPath == ''):
|
||||
@ -450,9 +506,14 @@ def check_mysqlServer():
|
||||
|
||||
print('Valid MySQL Server not found')
|
||||
dependence.append_uninstall('MySQL Server')
|
||||
dependence.append_uninstall('MySQL Installer')
|
||||
dependence.append_install('MySQLInstaller')
|
||||
dependence.append_install('MySQLServer')
|
||||
|
||||
MySQLData = os.environ['ProgramData'] + '\\MySQL\\'
|
||||
if base.is_exist(MySQLData) == False:
|
||||
return dependence
|
||||
|
||||
dir = os.listdir(MySQLData)
|
||||
for path in dir:
|
||||
if (path.find('MySQL Server') != -1) and (base.is_file(MySQLData + path) == False):
|
||||
@ -467,27 +528,26 @@ def check_MySQLConfig(mysqlPath = ''):
|
||||
if (base.run_command_in_dir(mysql_path_to_bin, mysqlLoginSrt + ' -e "SHOW DATABASES;"')['stdout'].find('onlyoffice') == -1):
|
||||
print('Database onlyoffice not found')
|
||||
creatdb_path = base.get_script_dir() + "/../../server/schema/mysql/createdb.sql"
|
||||
result = execMySQLScript(mysqlPath, creatdb_path)
|
||||
result = execMySQLScript(mysql_path_to_bin, creatdb_path)
|
||||
if (base.run_command_in_dir(mysql_path_to_bin, mysqlLoginSrt + ' -e "SELECT plugin from mysql.user where User=' + "'" + install_params['MySQLServer']['user'] + "';" + '"')['stdout'].find('mysql_native_password') == -1):
|
||||
print('Password encryption is not valid')
|
||||
result = set_MySQLEncrypt(mysqlPath, 'mysql_native_password') and result
|
||||
result = set_MySQLEncrypt(mysql_path_to_bin, 'mysql_native_password') and result
|
||||
|
||||
return result
|
||||
def execMySQLScript(mysqlPath, scriptPath):
|
||||
#ToDo check path to mysql
|
||||
def execMySQLScript(mysql_path_to_bin, scriptPath):
|
||||
print('Execution ' + scriptPath)
|
||||
|
||||
code = subprocess.call(get_mysqlLoginSrting() + ' < "' + scriptPath + '"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
mysqlLoginSrt = get_mysqlLoginSrting()
|
||||
|
||||
code = base.exec_command_in_dir(mysql_path_to_bin, get_mysqlLoginSrting() + ' < "' + scriptPath + '"')
|
||||
if (code != 0):
|
||||
print('Execution failed!')
|
||||
return False
|
||||
print('Execution completed')
|
||||
return True
|
||||
def set_MySQLEncrypt(mysqlPath, sEncrypt):
|
||||
#ToDo check path to mysql
|
||||
def set_MySQLEncrypt(mysql_path_to_bin, sEncrypt):
|
||||
print('Setting MySQL password encrypting...')
|
||||
|
||||
code = subprocess.call(get_mysqlLoginSrting() + ' -e "' + "ALTER USER '" + install_params['MySQLServer']['user'] + "'@'localhost' IDENTIFIED WITH " + sEncrypt + " BY '" + install_params['MySQLServer']['pass'] + "';" + '"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
code = base.exec_command_in_dir(mysql_path_to_bin, get_mysqlLoginSrting() + ' -e "' + "ALTER USER '" + install_params['MySQLServer']['user'] + "'@'localhost' IDENTIFIED WITH " + sEncrypt + " BY '" + install_params['MySQLServer']['pass'] + "';" + '"')
|
||||
if (code != 0):
|
||||
print('Setting password encryption failed!')
|
||||
return False
|
||||
@ -508,8 +568,8 @@ def uninstall_mysqlserver():
|
||||
def get_postrgre_path_to_bin(postgrePath = ''):
|
||||
if (host_platform == 'windows'):
|
||||
if (postgrePath == ''):
|
||||
postgrePath = os.environ['PROGRAMW6432'] + '\\PostgreSQL\\13\\'
|
||||
postgrePath += 'bin'
|
||||
postgrePath = os.environ['PROGRAMW6432'] + '\\PostgreSQL\\13'
|
||||
postgrePath += '\\bin'
|
||||
return postgrePath
|
||||
def get_postgreLoginSrting(userName):
|
||||
if (host_platform == 'windows'):
|
||||
@ -548,8 +608,9 @@ def check_postgreSQL():
|
||||
|
||||
if (host_platform == 'linux'):
|
||||
result = os.system(postgreLoginSrt + ' -c "\q"')
|
||||
connectionResult = base.run_command(connectionString)['stdout']
|
||||
|
||||
if (result != 0):
|
||||
if (result != 0 or connectionResult.find(install_params['PostgreSQL']['dbPort']) == -1):
|
||||
print('Valid PostgreSQL not found!')
|
||||
dependence.append_install('PostgreSQL')
|
||||
dependence.append_uninstall('PostgreSQL')
|
||||
@ -563,7 +624,7 @@ def check_postgreSQL():
|
||||
for info in arrInfo:
|
||||
if (base.is_dir(info['Location']) == False):
|
||||
continue
|
||||
|
||||
|
||||
postgre_full_name = 'PostgreSQL ' + info['Version'][:2] + ' '
|
||||
connectionResult = base.run_command_in_dir(get_postrgre_path_to_bin(info['Location']), connectionString)['stdout']
|
||||
|
||||
@ -601,60 +662,55 @@ def check_postgreConfig(postgrePath = ''):
|
||||
if (os.system(postgreLoginDbUser + '-c "\q"') != 0):
|
||||
print('Invalid user password!')
|
||||
base.print_info('Changing password...')
|
||||
result = change_userPass(dbUser, dbPass, postgrePath) and result
|
||||
result = change_userPass(dbUser, dbPass, postgre_path_to_bin) and result
|
||||
else:
|
||||
print('User ' + dbUser + ' not exist!')
|
||||
base.print_info('Creating ' + dbName + ' user...')
|
||||
result = create_postgreUser(dbUser, dbPass, postgrePath) and result
|
||||
result = create_postgreUser(dbUser, dbPass, postgre_path_to_bin) and result
|
||||
|
||||
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "SELECT datname FROM pg_database;"')['stdout'].find('onlyoffice') == -1):
|
||||
print('Database ' + dbName + ' not found')
|
||||
base.print_info('Creating ' + dbName + ' database...')
|
||||
result = create_postgreDb(dbName, postgrePath) and configureDb(dbUser, dbName, creatdb_path, postgrePath)
|
||||
result = create_postgreDb(dbName, postgre_path_to_bin) and configureDb(dbUser, dbName, creatdb_path, postgre_path_to_bin)
|
||||
else:
|
||||
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "SELECT pg_size_pretty(pg_database_size(' + "'" + dbName + "'" + '));"')['stdout'].find('7559 kB') != -1):
|
||||
print('Database ' + dbName + ' not configured')
|
||||
base.print_info('Configuring ' + dbName + ' database...')
|
||||
result = configureDb(dbName, creatdb_path, postgrePath) and result
|
||||
result = configureDb(dbName, creatdb_path, postgre_path_to_bin) and result
|
||||
print('Database ' + dbName + ' is valid')
|
||||
|
||||
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "\l+ ' + dbName + '"')['stdout'].find(dbUser +'=CTc/' + rootUser) == -1):
|
||||
print('User ' + dbUser + ' has no database privileges!')
|
||||
base.print_info('Setting database privileges for user ' + dbUser + '...')
|
||||
result = set_dbPrivilegesForUser(dbUser, dbName, postgrePath) and result
|
||||
result = set_dbPrivilegesForUser(dbUser, dbName, postgre_path_to_bin) and result
|
||||
print('User ' + dbUser + ' has database privileges')
|
||||
|
||||
return result
|
||||
def create_postgreDb(dbName, postgrePath = ''):
|
||||
#ToDo check path to postgre
|
||||
def create_postgreDb(dbName, postgre_path_to_bin = ''):
|
||||
postgreLoginUser = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
|
||||
if (os.system(postgreLoginUser + '-c "CREATE DATABASE ' + dbName +';"') != 0):
|
||||
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "CREATE DATABASE ' + dbName +';"') != 0):
|
||||
return False
|
||||
return True
|
||||
def set_dbPrivilegesForUser(userName, dbName, postgrePath = ''):
|
||||
#ToDo check path to postgre
|
||||
def set_dbPrivilegesForUser(userName, dbName, postgre_path_to_bin = ''):
|
||||
postgreLoginUser = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
|
||||
if (os.system(postgreLoginUser + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + userName + ';"') != 0):
|
||||
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + userName + ';"') != 0):
|
||||
return False
|
||||
return True
|
||||
def create_postgreUser(userName, userPass, postgrePath = ''):
|
||||
#ToDo check path to postgre
|
||||
def create_postgreUser(userName, userPass, postgre_path_to_bin = ''):
|
||||
postgreLoginRoot = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
|
||||
if (os.system(postgreLoginRoot + '-c "CREATE USER ' + userName + ' WITH password ' + "'" + userPass + "'" + ';"') != 0):
|
||||
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "CREATE USER ' + userName + ' WITH password ' + "'" + userPass + "'" + ';"') != 0):
|
||||
return False
|
||||
return True
|
||||
def change_userPass(userName, userPass, postgrePath = ''):
|
||||
#ToDo check path to postgre
|
||||
def change_userPass(userName, userPass, postgre_path_to_bin = ''):
|
||||
postgreLoginRoot = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
|
||||
if (os.system(postgreLoginRoot + '-c "ALTER USER ' + userName + " WITH PASSWORD '" + userPass + "';" + '"') != 0):
|
||||
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "ALTER USER ' + userName + " WITH PASSWORD '" + userPass + "';" + '"') != 0):
|
||||
return False
|
||||
return True
|
||||
def configureDb(userName, dbName, scriptPath, postgrePath = ''):
|
||||
#ToDo check path to postgre
|
||||
def configureDb(userName, dbName, scriptPath, postgre_path_to_bin = ''):
|
||||
print('Execution ' + scriptPath)
|
||||
postgreLoginSrt = get_postgreLoginSrting(userName)
|
||||
|
||||
code = os.system(postgreLoginSrt + ' -d ' + dbName + ' -f "' + scriptPath + '"')
|
||||
code = base.exec_command_in_dir(postgre_path_to_bin, postgreLoginSrt + ' -d ' + dbName + ' -f "' + scriptPath + '"')
|
||||
if (code != 0):
|
||||
print('Execution failed!')
|
||||
return False
|
||||
@ -667,6 +723,7 @@ def uninstall_postgresql():
|
||||
code = os.system('sudo rm -rf /etc/postgresql/') and code
|
||||
code = os.system('sudo userdel -r postgres') and code
|
||||
code = os.system('sudo groupdel postgres') and code
|
||||
os.system('sudo kill ' + base.run_command('sudo fuser -vn tcp 5432')['stdout'])
|
||||
|
||||
return code
|
||||
|
||||
@ -724,12 +781,11 @@ def uninstallProgram(sName):
|
||||
if (code != 0):
|
||||
print("Uninstalling was failed!")
|
||||
return False
|
||||
|
||||
|
||||
return True
|
||||
|
||||
def installProgram(sName):
|
||||
base.print_info("Installing " + sName + "...")
|
||||
|
||||
if (host_platform == 'windows'):
|
||||
if (sName in install_special):
|
||||
code = install_special[sName]()
|
||||
@ -891,3 +947,4 @@ install_params = {
|
||||
uninstall_params = {
|
||||
'PostgreSQL': '--mode unattended --unattendedmodeui none'
|
||||
}
|
||||
|
||||
|
||||
26
scripts/develop/develop.py
Normal file
26
scripts/develop/develop.py
Normal file
@ -0,0 +1,26 @@
|
||||
import sys
|
||||
sys.path.append('scripts')
|
||||
sys.path.append('scripts/develop')
|
||||
import base
|
||||
import build_js
|
||||
import build_server
|
||||
import config
|
||||
import dependence
|
||||
import config_server as develop_config_server
|
||||
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
|
||||
def make():
|
||||
if ("1" != config.option("develop")):
|
||||
return
|
||||
if not dependence.check_dependencies():
|
||||
exit(1)
|
||||
build_server.build_server_develop()
|
||||
build_js.build_js_develop(base_dir + "/../../..")
|
||||
develop_config_server.make()
|
||||
if ("" != config.option("branding")):
|
||||
branding_develop_script_dir = base_dir + "/../../../" + config.option("branding") + "/build_tools/scripts"
|
||||
if base.is_file(branding_develop_script_dir + "/develop.py"):
|
||||
base.cmd_in_dir(branding_develop_script_dir, "python", ["develop.py"], True)
|
||||
exit(0)
|
||||
|
||||
51
scripts/develop/print_repositories.py
Executable file
51
scripts/develop/print_repositories.py
Executable file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../')
|
||||
|
||||
import optparse
|
||||
import config
|
||||
import base
|
||||
import os
|
||||
|
||||
arguments = sys.argv[1:]
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option("--module", action="store", type="string", dest="module", default="core desktop builder server", help="defines modules")
|
||||
parser.add_option("--platform", action="store", type="string", dest="platform", default="native", help="defines platform")
|
||||
parser.add_option("--branding", action="store", type="string", dest="branding", default="onlyoffice", help="provides branding path")
|
||||
|
||||
(options, args) = parser.parse_args(arguments)
|
||||
configOptions = vars(options)
|
||||
|
||||
base.cmd_in_dir('../../', 'python',['configure.py',
|
||||
'--module', configOptions["module"],
|
||||
'--platform', configOptions["platform"],
|
||||
'--branding', configOptions["branding"]])
|
||||
|
||||
# parse configuration
|
||||
config.parse()
|
||||
config.parse_defaults()
|
||||
|
||||
repositories = base.get_repositories()
|
||||
|
||||
# Add other plugins
|
||||
repositories.update(base.get_plugins('autocomplete, easybib, wordpress'))
|
||||
|
||||
# Add other repositories
|
||||
if config.check_option("module", "builder"):
|
||||
repositories['document-builder-package'] = [False, False]
|
||||
|
||||
if (config.check_option("module", "server")):
|
||||
repositories['document-server-package'] = [False, False]
|
||||
repositories['Docker-DocumentServer'] = [False, False]
|
||||
|
||||
for repo in repositories:
|
||||
line = repo
|
||||
repo_dir = repositories[repo][1]
|
||||
if repo_dir != False:
|
||||
repo_dir = os.path.relpath(repo_dir, base.get_script_dir() + "../../..")
|
||||
line += " " + repo_dir
|
||||
print(line)
|
||||
|
||||
sys.exit(0)
|
||||
@ -7,14 +7,26 @@ import base
|
||||
import dependence
|
||||
import config
|
||||
|
||||
branch_from = ''
|
||||
branches_to = []
|
||||
def protect_brunch(branch, repo, strict = False):
|
||||
team = '' if strict else 'dep-application-development-leads'
|
||||
command = 'echo {"required_status_checks": null,"enforce_admins":true,"required_pull_request_reviews": null,"restrictions": {"users":[],"teams":["'
|
||||
command += team + '"]}} | gh api -X PUT repos/ONLYOFFICE/' + repo + '/branches/' + branch + '/protection --input -'
|
||||
result = base.run_command(command)
|
||||
if ('' != result['stderr']):
|
||||
print(result['stderr'])
|
||||
return
|
||||
|
||||
branch_from = 'release/v6.2.0'
|
||||
branches_to = ['develop']
|
||||
|
||||
platform = base.host_platform()
|
||||
if ("windows" == platform):
|
||||
dependence.check_pythonPath()
|
||||
dependence.check_gitPath()
|
||||
|
||||
if (dependence.check_gh() != True or dependence.check_gh_auth() != True):
|
||||
sys.exit(0)
|
||||
|
||||
base.cmd_in_dir('../../', 'python', ['configure.py', '--branding', 'onlyoffice', '--branding-url', 'https://github.com/ONLYOFFICE/onlyoffice.git', '--branch', branch_from, '--module', 'core desktop builder server mobile', '--update', '1', '--update-light', '1', '--clean', '0'])
|
||||
|
||||
# parse configuration
|
||||
@ -37,6 +49,14 @@ base.update_repositories(repositories)
|
||||
repositories['onlyoffice'] = [True, False]
|
||||
|
||||
for repo in repositories:
|
||||
base.create_pull_request(branches_to, repo, True)
|
||||
current_dir = repositories[repo][1]
|
||||
if current_dir != False:
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(current_dir)
|
||||
|
||||
base.create_pull_request(branches_to, repo, True, current_dir)
|
||||
|
||||
if current_dir != False:
|
||||
os.chdir(cur_dir)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
@ -9,7 +9,7 @@ import traceback
|
||||
|
||||
def install_module(path):
|
||||
base.print_info('Install: ' + path)
|
||||
base.cmd_in_dir(path, 'npm', ['install'])
|
||||
base.cmd_in_dir(path, 'npm', ['ci'])
|
||||
|
||||
def run_module(directory, args=[]):
|
||||
base.run_nodejs_in_dir(directory, args)
|
||||
@ -31,12 +31,21 @@ def start_mac_services():
|
||||
base.run_process(['mysql.server', 'restart'])
|
||||
base.print_info('Start RabbitMQ Server')
|
||||
base.run_process(['rabbitmq-server'])
|
||||
base.print_info('Start Redis')
|
||||
base.run_process(['redis-server'])
|
||||
# base.print_info('Start Redis')
|
||||
# base.run_process(['redis-server'])
|
||||
|
||||
def start_linux_services():
|
||||
base.print_info('Restart MySQL Server')
|
||||
os.system('sudo service mysql restart')
|
||||
base.print_info('Restart RabbitMQ Server')
|
||||
os.system('sudo service rabbitmq-server restart')
|
||||
|
||||
def run_integration_example():
|
||||
base.cmd_in_dir('../../../document-server-integration/web/documentserver-example/nodejs', 'python', ['run-develop.py'])
|
||||
|
||||
def start_linux_services():
|
||||
base.print_info('Restart MySQL Server')
|
||||
|
||||
def make(args = []):
|
||||
try:
|
||||
base.configure_common_apps()
|
||||
@ -48,6 +57,9 @@ def make(args = []):
|
||||
restart_win_rabbit()
|
||||
elif ("mac" == platform):
|
||||
start_mac_services()
|
||||
elif ("linux" == platform):
|
||||
start_linux_services()
|
||||
|
||||
|
||||
branch = base.run_command('git rev-parse --abbrev-ref HEAD')['stdout']
|
||||
|
||||
@ -62,20 +74,19 @@ def make(args = []):
|
||||
install_module('../../../server/DocService')
|
||||
install_module('../../../server/Common')
|
||||
install_module('../../../server/FileConverter')
|
||||
install_module('../../../server/SpellChecker')
|
||||
|
||||
base.set_env('NODE_ENV', 'development-' + platform)
|
||||
base.set_env('NODE_CONFIG_DIR', '../../Common/config')
|
||||
base.set_env('NODE_CONFIG_DIR', '../Common/config')
|
||||
|
||||
if ("mac" == platform):
|
||||
base.set_env('DYLD_LIBRARY_PATH', '../../FileConverter/bin/')
|
||||
base.set_env('DYLD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
elif ("linux" == platform):
|
||||
base.set_env('LD_LIBRARY_PATH', '../../FileConverter/bin/')
|
||||
base.set_env('LD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
|
||||
run_module('../../../server/DocService/sources', ['server.js'])
|
||||
run_module('../../../server/DocService/sources', ['gc.js'])
|
||||
run_module('../../../server/FileConverter/sources', ['convertermaster.js'])
|
||||
run_module('../../../server/SpellChecker/sources', ['server.js'])
|
||||
run_module('../../../server/DocService', ['sources/server.js'])
|
||||
# run_module('../../../server/DocService', ['sources/gc.js'])
|
||||
run_module('../../../server/FileConverter', ['sources/convertermaster.js'])
|
||||
# run_module('../../../server/SpellChecker', ['sources/server.js'])
|
||||
except SystemExit:
|
||||
input("Ignoring SystemExit. Press Enter to continue...")
|
||||
exit(0)
|
||||
|
||||
14
scripts/packages.py
Normal file
14
scripts/packages.py
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import packages_desktop
|
||||
# import packages_server
|
||||
# import packages_builder
|
||||
|
||||
def make(product, package_list):
|
||||
if ("desktop" == product):
|
||||
packages_desktop.make(package_list.split())
|
||||
# if ("server" == product):
|
||||
# packages_server.make(package_list.split())
|
||||
# if ("builder" == product):
|
||||
# packages_builder.make(package_list.split())
|
||||
return
|
||||
93
scripts/packages_desktop.py
Normal file
93
scripts/packages_desktop.py
Normal file
@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import base
|
||||
import os
|
||||
import re
|
||||
|
||||
def make(packages):
|
||||
base_dir = base.get_script_dir() + "/../out"
|
||||
git_dir = base.get_script_dir() + "/../.."
|
||||
|
||||
for package in packages:
|
||||
|
||||
if -1 != package.find("diskimage"):
|
||||
macos_dir = os.path.abspath(git_dir + "/desktop-apps/macos")
|
||||
update_dir = macos_dir + "/build/update"
|
||||
changes_dir = macos_dir + "/ONLYOFFICE/update/updates/ONLYOFFICE/changes"
|
||||
|
||||
if (package == "diskimage-x86_64"):
|
||||
lane = "release_x86_64"
|
||||
scheme = "ONLYOFFICE-x86_64"
|
||||
elif (package == "diskimage-v8-x86_64"):
|
||||
lane = "release_v8"
|
||||
scheme = "ONLYOFFICE-v8"
|
||||
elif (package == "diskimage-arm64"):
|
||||
lane = "release_arm"
|
||||
scheme = "ONLYOFFICE-arm"
|
||||
else:
|
||||
exit(1)
|
||||
|
||||
print("Build package " + scheme)
|
||||
|
||||
print("$ bundler exec fastlane " + lane + " skip_git_bump:true")
|
||||
base.cmd_in_dir(macos_dir, "bundler", ["exec", "fastlane", lane, "skip_git_bump:true"])
|
||||
|
||||
print("Build updates")
|
||||
|
||||
app_version = base.run_command("/usr/libexec/PlistBuddy -c 'print :CFBundleShortVersionString' " +
|
||||
macos_dir + "/build/ONLYOFFICE.app/Contents/Info.plist")['stdout']
|
||||
zip_filename = scheme + "-" + app_version
|
||||
macos_zip = macos_dir + "/build/" + zip_filename + ".zip"
|
||||
update_storage_dir = base.get_env("ARCHIVES_DIR") + "/" + scheme + "/_updates"
|
||||
|
||||
base.create_dir(update_dir)
|
||||
base.copy_dir_content(update_storage_dir, update_dir, ".zip")
|
||||
base.copy_dir_content(update_storage_dir, update_dir, ".html")
|
||||
base.copy_file(macos_zip, update_dir)
|
||||
|
||||
notes_src = changes_dir + "/" + app_version + "/ReleaseNotes.html"
|
||||
notes_dst = update_dir + "/" + zip_filename + ".html"
|
||||
cur_date = base.run_command("LC_ALL=en_US.UTF-8 date -u \"+%B %e, %Y\"")['stdout']
|
||||
if base.is_exist(notes_src):
|
||||
base.copy_file(notes_src, notes_dst)
|
||||
base.replaceInFileRE(notes_dst,
|
||||
r"(<span class=\"releasedate\">).+(</span>)", "\\1 - " + cur_date + "\\2")
|
||||
else:
|
||||
base.writeFile(notes_dst, "placeholder\n")
|
||||
|
||||
notes_src = changes_dir + "/" + app_version + "/ReleaseNotesRU.html"
|
||||
notes_dst = update_dir + "/" + zip_filename + ".ru.html"
|
||||
cur_date = base.run_command("LC_ALL=ru_RU.UTF-8 date -u \"+%e %B %Y\"")['stdout']
|
||||
if base.is_exist(notes_src):
|
||||
base.copy_file(notes_src, notes_dst)
|
||||
base.replaceInFileRE(notes_dst,
|
||||
r"(<span class=\"releasedate\">).+(</span>)", "\\1 - " + cur_date + "\\2")
|
||||
else:
|
||||
base.writeFile(notes_dst, "placeholder\n")
|
||||
|
||||
print("$ ./generate_appcast " + update_dir)
|
||||
base.cmd(macos_dir + "/Vendor/Sparkle/bin/generate_appcast", [update_dir])
|
||||
|
||||
print("Edit Sparkle appcast links")
|
||||
|
||||
sparkle_base_url = "https://download.onlyoffice.com/install/desktop/editors/mac"
|
||||
if (package == "diskimage-x86_64"): sparkle_base_url += "/x86_64"
|
||||
elif (package == "diskimage-v8-x86_64"): sparkle_base_url += "/v8"
|
||||
elif (package == "diskimage-arm64"): sparkle_base_url += "/arm"
|
||||
|
||||
base.replaceInFileRE(update_dir + "/onlyoffice.xml",
|
||||
r"(<sparkle:releaseNotesLink>)(?:.+ONLYOFFICE-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
|
||||
"\\1" + sparkle_base_url + "/updates/changes/\\2/ReleaseNotes.html\\3")
|
||||
base.replaceInFileRE(update_dir + "/onlyoffice.xml",
|
||||
r"(<sparkle:releaseNotesLink xml:lang=\"ru\">)(?:ONLYOFFICE-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
|
||||
"\\1" + sparkle_base_url + "/updates/changes/\\2/ReleaseNotesRU.html\\3")
|
||||
base.replaceInFileRE(update_dir + "/onlyoffice.xml",
|
||||
r"(url=\")(?:.+/)(ONLYOFFICE.+\")", "\\1" + sparkle_base_url + "/updates/\\2")
|
||||
|
||||
print("Delete unnecessary files")
|
||||
|
||||
for file in os.listdir(update_dir):
|
||||
if (-1 == file.find(app_version)) and (file.endswith(".zip") or file.endswith(".html")):
|
||||
base.delete_file(update_dir + "/" + file)
|
||||
|
||||
return
|
||||
176
scripts/sdkjs_common/generate_builder_intarface.py
Normal file
176
scripts/sdkjs_common/generate_builder_intarface.py
Normal file
@ -0,0 +1,176 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import shutil
|
||||
|
||||
def readFile(path):
|
||||
with open(path, "r") as file:
|
||||
filedata = file.read()
|
||||
return filedata
|
||||
|
||||
def writeFile(path, content):
|
||||
if (os.path.isfile(path)):
|
||||
os.remove(path)
|
||||
|
||||
with open(path, "w") as file:
|
||||
file.write(content)
|
||||
return
|
||||
|
||||
class EditorApi(object):
|
||||
def __init__(self):
|
||||
self.records = []
|
||||
self.init = False
|
||||
self.folder = "word"
|
||||
self.type = "CDE"
|
||||
self.numfile = 0
|
||||
self.files = []
|
||||
return
|
||||
|
||||
def initFiles(self, type, files):
|
||||
self.folder = type
|
||||
if "word" == self.folder:
|
||||
self.type = "CDE"
|
||||
elif "slide" == self.folder:
|
||||
self.type = "CPE"
|
||||
else:
|
||||
self.type = "CSE"
|
||||
self.files = files
|
||||
return
|
||||
|
||||
def getReturnValue(self, description):
|
||||
paramStart = description.find("@returns {")
|
||||
if -1 == paramStart:
|
||||
return "{}"
|
||||
paramEnd = description.find("}", paramStart)
|
||||
retParam = description[paramStart + 10:paramEnd]
|
||||
isArray = False
|
||||
if -1 != retParam.find("[]"):
|
||||
isArray = True
|
||||
retParam = retParam.replace("[]", "")
|
||||
retType = retParam.replace("|", " ").split(" ")[0]
|
||||
retTypeLower = retType.lower()
|
||||
retValue = ""
|
||||
if -1 != retType.find("\""):
|
||||
retValue = "\"\""
|
||||
elif "bool" == retTypeLower:
|
||||
retValue = "true"
|
||||
elif "string" == retTypeLower:
|
||||
retValue = "\"\""
|
||||
elif "number" == retTypeLower:
|
||||
retValue = "0"
|
||||
elif "undefined" == retTypeLower:
|
||||
retValue = "undefined"
|
||||
elif "null" == retTypeLower:
|
||||
retValue = "null"
|
||||
else:
|
||||
retValue = "new " + retType + "()"
|
||||
if isArray:
|
||||
retValue = "[" + retValue + "]"
|
||||
return "{ return " + retValue + "; }"
|
||||
|
||||
def check_record(self, recordData):
|
||||
rec = recordData
|
||||
rec = rec.replace("\t", "")
|
||||
rec = rec.replace('\n ', '\n')
|
||||
indexEndDecoration = rec.find("*/")
|
||||
decoration = "/**" + rec[0:indexEndDecoration + 2]
|
||||
decoration = decoration.replace("Api\n", "ApiInterface\n")
|
||||
decoration = decoration.replace("Api ", "ApiInterface ")
|
||||
decoration = decoration.replace("{Api}", "{ApiInterface}")
|
||||
decoration = decoration.replace("@return ", "@returns ")
|
||||
decoration = decoration.replace("@returns {?", "@returns {")
|
||||
if -1 != decoration.find("@name ApiInterface"):
|
||||
self.append_record(decoration, "var ApiInterface = function() {};\nvar Api = new ApiInterface();\n", True)
|
||||
return
|
||||
code = rec[indexEndDecoration + 2:]
|
||||
code = code.strip("\t\n\r ")
|
||||
lines = code.split("\n")
|
||||
codeCorrect = ""
|
||||
sFuncName = ""
|
||||
is_found_function = False
|
||||
addon_for_func = "{}"
|
||||
if -1 != decoration.find("@return"):
|
||||
addon_for_func = "{ return null; }"
|
||||
for line in lines:
|
||||
line = line.strip("\t\n\r ")
|
||||
line = line.replace("{", "")
|
||||
line = line.replace("}", "")
|
||||
lineWithoutSpaces = line.replace(" ", "")
|
||||
if not is_found_function and 0 == line.find("function "):
|
||||
codeCorrect += (line + addon_for_func + "\n")
|
||||
is_found_function = True
|
||||
if not is_found_function and -1 != line.find(".prototype."):
|
||||
codeCorrect += (line + self.getReturnValue(decoration) + ";\n")
|
||||
is_found_function = True
|
||||
if -1 != lineWithoutSpaces.find(".prototype="):
|
||||
codeCorrect += (line + "\n")
|
||||
if -1 != line.find(".prototype.constructor"):
|
||||
codeCorrect += (line + "\n")
|
||||
codeCorrect = codeCorrect.replace("Api.prototype", "ApiInterface.prototype")
|
||||
self.append_record(decoration, codeCorrect)
|
||||
return
|
||||
|
||||
def append_record(self, decoration, code, init=False):
|
||||
if init:
|
||||
if not self.init:
|
||||
self.init = True
|
||||
self.records.append(decoration + "\n" + code + "\n\n")
|
||||
return
|
||||
# check on private
|
||||
if -1 != code.find(".prototype.private_"):
|
||||
return
|
||||
# add records only for current editor
|
||||
index_type_editors = decoration.find("@typeofeditors")
|
||||
if -1 != index_type_editors:
|
||||
index_type_editors_end = decoration.find("]", index_type_editors)
|
||||
if -1 != index_type_editors_end:
|
||||
editors_support = decoration[index_type_editors:index_type_editors_end]
|
||||
if -1 == editors_support.find(self.type):
|
||||
return
|
||||
# optimizations for first file
|
||||
if 0 == self.numfile:
|
||||
self.records.append(decoration + "\n" + code + "\n")
|
||||
return
|
||||
# check override js classes
|
||||
if 0 == code.find("function "):
|
||||
index_end_name = code.find("(")
|
||||
function_name = code[9:index_end_name].strip(" ")
|
||||
for rec in range(len(self.records)):
|
||||
if -1 != self.records[rec].find("function " + function_name + "("):
|
||||
self.records[rec] = ""
|
||||
elif -1 != self.records[rec].find("function " + function_name + " ("):
|
||||
self.records[rec] = ""
|
||||
elif -1 != self.records[rec].find("\n" + function_name + ".prototype."):
|
||||
self.records[rec] = ""
|
||||
|
||||
self.records.append(decoration + "\n" + code + "\n")
|
||||
return
|
||||
|
||||
def generate(self):
|
||||
for file in self.files:
|
||||
file_content = readFile(file)
|
||||
arrRecords = file_content.split("/**")
|
||||
arrRecords = arrRecords[1:-1]
|
||||
for record in arrRecords:
|
||||
self.check_record(record)
|
||||
self.numfile += 1
|
||||
correctContent = ''.join(self.records)
|
||||
correctContent += "\n"
|
||||
os.mkdir('deploy/api_builder/' + self.folder)
|
||||
writeFile("deploy/api_builder/" + self.folder + "/api.js", correctContent)
|
||||
return
|
||||
|
||||
def convert_to_interface(arrFiles, sEditorType):
|
||||
editor = EditorApi()
|
||||
editor.initFiles(sEditorType, arrFiles)
|
||||
editor.generate()
|
||||
return
|
||||
|
||||
old_cur = os.getcwd()
|
||||
os.chdir("../../../sdkjs")
|
||||
if True == os.path.isdir('deploy/api_builder'):
|
||||
shutil.rmtree('deploy/api_builder', ignore_errors=True)
|
||||
os.mkdir('deploy/api_builder')
|
||||
convert_to_interface(["word/apiBuilder.js"], "word")
|
||||
convert_to_interface(["word/apiBuilder.js", "slide/apiBuilder.js"], "slide")
|
||||
convert_to_interface(["word/apiBuilder.js", "slide/apiBuilder.js", "cell/apiBuilder.js"], "cell")
|
||||
os.chdir(old_cur)
|
||||
8
scripts/update_js.py
Normal file
8
scripts/update_js.py
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import config
|
||||
import base
|
||||
import build_js
|
||||
|
||||
config.parse()
|
||||
build_js.make()
|
||||
@ -17,6 +17,9 @@ def get_branch_name(directory):
|
||||
return current_branch
|
||||
|
||||
def install_deps():
|
||||
if base.is_file("./packages_complete"):
|
||||
return
|
||||
|
||||
# dependencies
|
||||
packages = ["apt-transport-https",
|
||||
"autoconf2.13",
|
||||
@ -51,27 +54,52 @@ def install_deps():
|
||||
base.cmd("sudo", ["apt-get", "install", "-y"] + packages)
|
||||
|
||||
# nodejs
|
||||
if not base.is_file("./node_js_setup_10.x"):
|
||||
base.cmd("sudo", ["apt-get", "install", "-y", "nodejs"])
|
||||
nodejs_cur = 0
|
||||
try:
|
||||
nodejs_version = base.run_command('node -v')['stdout']
|
||||
nodejs_cur_version_major = int(nodejs_version.split('.')[0][1:])
|
||||
nodejs_cur_version_minor = int(nodejs_version.split('.')[1])
|
||||
nodejs_cur = nodejs_cur_version_major * 1000 + nodejs_cur_version_minor
|
||||
print("Installed Node.js version: " + str(nodejs_cur_version_major) + "." + str(nodejs_cur_version_minor))
|
||||
except:
|
||||
nodejs_cur = 1
|
||||
if (nodejs_cur < 10020):
|
||||
print("Node.js version cannot be less 10.20")
|
||||
print("Reinstall")
|
||||
if (base.is_dir("./node_js_setup_10.x")):
|
||||
base.delete_dir("./node_js_setup_10.x")
|
||||
base.cmd("sudo", ["apt-get", "remove", "--purge", "-y", "nodejs"])
|
||||
base.download("https://deb.nodesource.com/setup_10.x", "./node_js_setup_10.x")
|
||||
base.cmd('curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -')
|
||||
base.cmd("sudo", ["bash", "./node_js_setup_10.x"])
|
||||
base.cmd("sudo", ["apt-get", "install", "-y", "nodejs"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "npm"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "grunt-cli"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "pkg"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "npm@6"])
|
||||
else:
|
||||
print("OK")
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "npm", "yarn"], True)
|
||||
base.cmd("sudo", ["npm", "install", "-g", "grunt-cli"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "pkg"])
|
||||
|
||||
# java
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "software-properties-common"])
|
||||
base.cmd("sudo", ["add-apt-repository", "-y", "ppa:openjdk-r/ppa"])
|
||||
base.cmd("sudo", ["apt-get", "update"])
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-8-jdk"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "java"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "javac"])
|
||||
java_error = base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-11-jdk"], True)
|
||||
if (0 != java_error):
|
||||
java_error = base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-8-jdk"], True)
|
||||
if (0 != java_error):
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "software-properties-common"])
|
||||
base.cmd("sudo", ["add-apt-repository", "-y", "ppa:openjdk-r/ppa"])
|
||||
base.cmd("sudo", ["apt-get", "update"])
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-8-jdk"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "java"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "javac"])
|
||||
|
||||
base.writeFile("./packages_complete", "complete")
|
||||
return
|
||||
|
||||
def install_qt():
|
||||
# qt
|
||||
if not base.is_file("./qt_source_5.9.9.tar.xz"):
|
||||
base.download("http://download.qt.io/official_releases/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz", "./qt_source_5.9.9.tar.xz")
|
||||
base.download("https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz", "./qt_source_5.9.9.tar.xz")
|
||||
|
||||
if not base.is_dir("./qt-everywhere-opensource-src-5.9.9"):
|
||||
base.cmd("tar", ["-xf", "./qt_source_5.9.9.tar.xz"])
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
--- index.js
|
||||
+++ index.js
|
||||
@@ -101,18 +101,11 @@
|
||||
|
||||
function nodeNC(port, input) {
|
||||
const src = nodeNetCatSrc(port, input);
|
||||
- if (src.length < 1000) {
|
||||
- return spawnSync(process.execPath, ['-e', src], {
|
||||
- windowsHide: true,
|
||||
- maxBuffer: Infinity,
|
||||
- });
|
||||
- } else {
|
||||
return spawnSync(process.execPath, [], {
|
||||
input: src,
|
||||
windowsHide: true,
|
||||
maxBuffer: Infinity,
|
||||
});
|
||||
- }
|
||||
}
|
||||
|
||||
function test(fn, port) {
|
||||
Reference in New Issue
Block a user