├── .gitignore
├── .gitmodules
├── LICENSE.txt
├── Makefile
├── README.md
├── apt-rpm
├── bin
│ └── documentserver-configure.sh.m4
├── package.spec.m4
├── requires.spec
└── vars.spec
├── branding
├── common
│ └── documentserver
│ │ └── license
│ │ ├── onlyoffice-documentserver-de
│ │ └── LICENSE.txt
│ │ ├── onlyoffice-documentserver-ee
│ │ └── LICENSE.txt
│ │ ├── onlyoffice-documentserver-ie
│ │ └── LICENSE.txt
│ │ ├── onlyoffice-documentserver
│ │ └── LICENSE.txt
│ │ └── wrap-lic.sh
├── exe
│ └── data
│ │ ├── dialogicon.bmp
│ │ ├── dialogpicture.bmp
│ │ └── icon.ico
└── variables.m4
├── common
├── documentserver-example
│ ├── nginx
│ │ └── includes
│ │ │ └── ds-example.conf.m4
│ ├── supervisor
│ │ ├── ds-example.conf.m4
│ │ └── ds.conf.m4
│ └── welcome
│ │ ├── css
│ │ ├── favicon.ico
│ │ ├── footer_github.svg
│ │ ├── footer_help.svg
│ │ ├── logo.svg
│ │ └── stylesheet.css
│ │ ├── docker.html
│ │ ├── linux-rpm.html
│ │ ├── linux.html
│ │ └── win.html
└── documentserver
│ ├── bin
│ ├── documentserver-generate-allfonts.bat
│ ├── documentserver-generate-allfonts.sh.m4
│ ├── documentserver-letsencrypt.sh.m4
│ ├── documentserver-log-rotate.bat
│ ├── documentserver-prepare4shutdown.bat
│ ├── documentserver-prepare4shutdown.ps1
│ ├── documentserver-prepare4shutdown.sh.m4
│ ├── documentserver-static-gzip.sh.m4
│ └── documentserver-update-securelink.sh.m4
│ ├── home
│ └── npm
│ │ └── package.json
│ ├── logrotate
│ └── ds.conf.m4
│ ├── nginx
│ ├── ds-ssl.conf.tmpl.m4
│ ├── ds.conf.tmpl.m4
│ └── includes
│ │ ├── ds-common.conf.m4
│ │ ├── ds-docservice.conf.m4
│ │ ├── ds-letsencrypt.conf.m4
│ │ └── http-common.conf.m4
│ └── supervisor
│ ├── ds-converter.conf.m4
│ ├── ds-docservice.conf.m4
│ ├── ds-metrics.conf.m4
│ └── ds.conf.m4
├── deb
└── debian
│ ├── changelog.m4
│ ├── compat
│ ├── config.m4
│ ├── control.m4
│ ├── copyright.m4
│ ├── package.install.m4
│ ├── package.links.m4
│ ├── postinst.m4
│ ├── postrm.m4
│ ├── prerm
│ ├── rules
│ ├── source
│ └── format
│ ├── templates.m4
│ └── triggers
├── exe
├── common.iss
├── example.iss
├── license
│ ├── 3rd-Party.txt
│ ├── nginx.license
│ ├── nssm.license
│ └── postgresql.license
├── local
│ └── local.json
├── nginx
│ └── nginx.conf
├── package.iss.m4
└── scripts
│ ├── isxdl
│ ├── chinese.ini
│ ├── czech.ini
│ ├── dutch.ini
│ ├── english.ini
│ ├── french.ini
│ ├── french2.ini
│ ├── french3.ini
│ ├── german.ini
│ ├── isxdl.iss
│ ├── italian.ini
│ ├── japanese.ini
│ ├── korean.ini
│ ├── norwegian.ini
│ ├── polish.ini
│ ├── portugues.ini
│ ├── portuguese.ini
│ ├── russian.ini
│ ├── spanish.ini
│ └── swedish.ini
│ ├── lang
│ ├── chinese.iss
│ ├── dutch.iss
│ ├── english.iss
│ ├── french.iss
│ ├── german.iss
│ ├── italian.iss
│ ├── japanese.iss
│ ├── polish.iss
│ └── russian.iss
│ ├── products.iss
│ ├── products.pas
│ ├── products
│ ├── directxruntime.iss
│ ├── dotnetfx11.iss
│ ├── dotnetfx11lp.iss
│ ├── dotnetfx11sp1.iss
│ ├── dotnetfx20.iss
│ ├── dotnetfx20lp.iss
│ ├── dotnetfx20sp1.iss
│ ├── dotnetfx20sp1lp.iss
│ ├── dotnetfx20sp2.iss
│ ├── dotnetfx20sp2lp.iss
│ ├── dotnetfx35.iss
│ ├── dotnetfx35lp.iss
│ ├── dotnetfx35sp1.iss
│ ├── dotnetfx35sp1lp.iss
│ ├── dotnetfx40client.iss
│ ├── dotnetfx40full.iss
│ ├── dotnetfx45.iss
│ ├── dotnetfx46.iss
│ ├── dotnetfx47.iss
│ ├── dotnetfxversion.iss
│ ├── fileversion.iss
│ ├── ie6.iss
│ ├── iis.iss
│ ├── jet4sp8.iss
│ ├── kb835732.iss
│ ├── mdac28.iss
│ ├── msi20.iss
│ ├── msi31.iss
│ ├── msi45.iss
│ ├── msiproduct.iss
│ ├── nodejs10x.iss
│ ├── nodejs4x.iss
│ ├── nodejs6x.iss
│ ├── nodejs8x.iss
│ ├── postgresql.iss
│ ├── rabbitmq.iss
│ ├── redis.iss
│ ├── sql2005express.iss
│ ├── sql2008express.iss
│ ├── sqlcompact35sp2.iss
│ ├── stringversion.iss
│ ├── vcredist2005.iss
│ ├── vcredist2008.iss
│ ├── vcredist2010.iss
│ ├── vcredist2012.iss
│ ├── vcredist2013.iss
│ ├── vcredist2015.iss
│ ├── vcredist2017.iss
│ ├── wic.iss
│ └── winversion.iss
│ └── service.pas
└── rpm
├── bin
└── documentserver-configure.sh.m4
├── common.spec
├── package.spec.m4
├── requires.spec
└── vars.spec
/.gitignore:
--------------------------------------------------------------------------------
1 | *.deb
2 | *.ddeb
3 | *.buildinfo
4 | *.dll
5 | *.changes
6 | /documentserver
7 | /documentserver-example
8 | repo
9 | repo-rpm
10 | apt-rpm/builddir
11 | /apt-rpm/*documentserver*.spec
12 | rpm/builddir
13 | common/documentserver*/**/*.conf
14 | common/documentserver*/nginx/*.tmpl
15 | /common/documentserver/bin/*.sh
16 | common/documentserver/config
17 | common/documentserver/home
18 | common/documentserver-example/config
19 | common/documentserver-example/home
20 | common/fonts
21 | /deb/debian/changelog
22 | /deb/debian/config
23 | /deb/debian/control
24 | /deb/debian/copyright
25 | /deb/debian/*-documentserver*/
26 | /deb/debian/*.debhelper*
27 | /deb/debian/*.substvars
28 | /deb/debian/*.install
29 | /deb/debian/*.links
30 | /deb/debian/files
31 | /deb/debian/postinst
32 | /deb/debian/postrm
33 | /deb/debian/templates
34 | /exe/*documentserver*.iss
35 | /pgsql
36 | /rpm/*documentserver*.spec
37 | *rpm/bin/*.sh
38 | .gitignore
39 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/.gitmodules
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # document-server-package
2 |
3 | ## Overview
4 |
5 | ONLYOFFICE Document Server is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
6 |
7 | ONLYOFFICE Docs can be used as a part of [ONLYOFFICE Workspace](#onlyoffice-workspace) or with third-party sync&share solutions (e.g. Nextcloud, ownCloud, Seafile) to enable collaborative editing within their interface.
8 |
9 | It has three editions - [Community, Enterprise, and Developer](#onlyoffice-docs-editions).
10 |
11 | ## Project information
12 |
13 | Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDS)
14 |
15 | Code repository: [https://github.com/ONLYOFFICE/DocumentServer](https://github.com/ONLYOFFICE/DocumentServer "https://github.com/ONLYOFFICE/DocumentServer")
16 |
17 | License: [GNU AGPL v3.0](https://onlyo.co/38YZGJh)
18 |
19 | ONLYOFFICE Docs on official website: [http://www.onlyoffice.com/office-suite.aspx](http://www.onlyoffice.com/office-suite.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDS)
20 |
21 | ONLYOFFICE Workspace on official website: [https://www.onlyoffice.com/workspace.aspx](https://www.onlyoffice.com/workspace.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDS)
22 |
23 | List of available integrations: [http://www.onlyoffice.com/all-connectors.aspx](http://www.onlyoffice.com/all-connectors.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDS)
24 |
25 | ## User Feedback and Support
26 |
27 | If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
28 |
29 | [1]: https://forum.onlyoffice.com
30 | [2]: https://github.com/ONLYOFFICE/DocumentServer
31 | [3]: http://stackoverflow.com/questions/tagged/onlyoffice
--------------------------------------------------------------------------------
/apt-rpm/package.spec.m4:
--------------------------------------------------------------------------------
1 | License: AGPL
2 |
3 | ifelse('M4_DS_EXAMPLE_ENABLE', '1',
4 | %define example 1,)
5 |
6 | %include requires.spec
7 | %include vars.spec
8 | %include ../rpm/common.spec
9 |
--------------------------------------------------------------------------------
/apt-rpm/requires.spec:
--------------------------------------------------------------------------------
1 | Requires: nginx >= 1.3.13, postgresql >= 9.1, curl, wget, supervisor >= 3.0b2, libstdc++ >= 4.8.4, libcurl, libxml2, zlib, libXScrnSaver, libatk, libgtk+3, xorg-xvfb, libXtst, GConf, libalsa, pwgen, libselinux-utils, policycoreutils, ca-certificates
2 |
--------------------------------------------------------------------------------
/apt-rpm/vars.spec:
--------------------------------------------------------------------------------
1 | %define nginx_user _nginx
2 | %define semanage /usr/sbin/semanage
3 | %define setsebool /usr/sbin/setsebool
4 | %define getenforce /usr/sbin/getenforce
5 | %define nginx_conf_d sites-enabled.d
6 |
--------------------------------------------------------------------------------
/branding/common/documentserver/license/wrap-lic.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | find . -name LICENSE.txt -exec sh -c 'fold -s -w80 {} > {}.tmp && mv {}.tmp {} && sed "s,[“”],\",g" -i {}' \;
3 |
--------------------------------------------------------------------------------
/branding/exe/data/dialogicon.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/branding/exe/data/dialogicon.bmp
--------------------------------------------------------------------------------
/branding/exe/data/dialogpicture.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/branding/exe/data/dialogpicture.bmp
--------------------------------------------------------------------------------
/branding/exe/data/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/branding/exe/data/icon.ico
--------------------------------------------------------------------------------
/branding/variables.m4:
--------------------------------------------------------------------------------
1 | define(`DEB[Summary]', `Online editors for text documents, spreadsheets, and presentations')dnl
2 | define(`DEB[Description]', ` Document Server is an open-source office suite that includes
3 | collaborative online editors for text documents, spreadsheets,
4 | and presentations.')dnl
5 | define(`RPM[Summary]', `Online editors for text documents, spreadsheets, and presentations')dnl
6 | define(`RPM[Description]', `Document Server is an open-source office suite that includes\
7 | collaborative online editors for text documents, spreadsheets,\
8 | and presentations.')dnl
--------------------------------------------------------------------------------
/common/documentserver-example/nginx/includes/ds-example.conf.m4:
--------------------------------------------------------------------------------
1 | location ~ ^(\/welcome\/.*)$ {
2 | expires 365d;
3 | alias M4_DS_EXAMLE$1;
4 | index M4_PLATFORM.html;
5 | }
6 |
7 | location /example/ {
8 | proxy_pass http://example/;
9 |
10 | proxy_set_header Host $the_host/example;
11 | proxy_set_header X-Forwarded-Proto $the_scheme;
12 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/common/documentserver-example/supervisor/ds-example.conf.m4:
--------------------------------------------------------------------------------
1 | [program:example]
2 | command=/var/www/M4_DS_PREFIX-example/example
3 | directory=/var/www/M4_DS_PREFIX-example/
4 | user=ds
5 | environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/M4_DS_PREFIX-example,NODE_DISABLE_COLORS=1
6 | stdout_logfile=/var/log/M4_DS_PREFIX-example/out.log
7 | stdout_logfile_backups=0
8 | stdout_logfile_maxbytes=0
9 | stderr_logfile=/var/log/M4_DS_PREFIX-example/err.log
10 | stderr_logfile_backups=0
11 | stderr_logfile_maxbytes=0
12 | autostart=false
13 | autorestart=true
14 | redirect_stderr=true
15 |
--------------------------------------------------------------------------------
/common/documentserver-example/supervisor/ds.conf.m4:
--------------------------------------------------------------------------------
1 | [group:ds]
2 | programs=docservice,converter,metrics,example
3 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/css/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/common/documentserver-example/welcome/css/favicon.ico
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/css/footer_github.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/css/footer_help.svg:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/css/logo.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/css/stylesheet.css:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * (c) Copyright Ascensio System SIA 2021
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | html {
20 | height: 100%;
21 | width: 100%;
22 | }
23 |
24 | body {
25 | background: #fff;
26 | color: #333333;
27 | font-family: 'Open Sans', sans-serif;
28 | font-size: 12px;
29 | font-weight: normal;
30 | height: 100%;
31 | margin: 0;
32 | padding: 0;
33 | text-decoration: none;
34 | }
35 |
36 | div {
37 | margin: 0;
38 | padding: 0;
39 | }
40 |
41 | a, a:hover, a:visited {
42 | color: #FF6F3D;
43 | }
44 |
45 | a:hover {
46 | text-decoration: none;
47 | }
48 |
49 | .black-block {
50 | background: #333333;
51 | color: #FFFFFF;
52 | }
53 |
54 | .black-block .content-block {
55 | background-image: url(../css/footer_help.svg), url(../css/footer_github.svg);
56 | background-position: 0 64px, 100% 100px;
57 | background-repeat: no-repeat;
58 | box-sizing: border-box;
59 | padding-left: 96px;
60 | }
61 |
62 | .black-block p {
63 | color: #C4C4C4;
64 | max-width: 736px;
65 | }
66 |
67 | .button {
68 | background: #FF6F3D;
69 | border-radius: 3px;
70 | color: #FFFFFF;
71 | display: inline-block;
72 | font-weight: 600;
73 | line-height: 133%;
74 | letter-spacing: 0.04em;
75 | margin-top: 24px;
76 | padding: 16px 40px;
77 | text-align: center;
78 | text-transform: uppercase;
79 | }
80 |
81 | .button:hover {
82 | background: #ff7a4b;
83 | }
84 |
85 | .content-block {
86 | margin: 0 auto;
87 | padding: 64px 0;
88 | width: 1120px;
89 | }
90 |
91 | .content-block p {
92 | font-size: 16px;
93 | line-height: 160%;
94 | margin: 0;
95 | padding-bottom: 24px;
96 | }
97 |
98 | .content-block pre~p {
99 | margin-top: 24px;
100 | }
101 |
102 | .content-block p.p-small {
103 | font-size: 14px;
104 | }
105 |
106 | .features-list{
107 | font-size: 14px;
108 | }
109 |
110 | h1, h2, h3, h6 {
111 | margin: 0;
112 | padding: 0;
113 | }
114 |
115 | h1 {
116 | font-weight: 700;
117 | font-size: 24px;
118 | letter-spacing: -0.02em;
119 | line-height: 133%;
120 | padding-bottom: 24px;
121 | }
122 |
123 | h2 {
124 | font-weight: 700;
125 | font-size: 18px;
126 | line-height: 133%;
127 | letter-spacing: -0.02em;
128 | padding-bottom: 16px;
129 | }
130 |
131 | h3 {
132 | font-weight: 700;
133 | font-size: 14px;
134 | line-height: 133%;
135 | }
136 |
137 | h6 {
138 | font-weight: normal;
139 | font-size: 18px;
140 | line-height: 160%;
141 | }
142 |
143 | header {
144 | background: #333333;
145 | height: 48px;
146 | margin: 0 auto;
147 | width: auto;
148 | }
149 |
150 | header img {
151 | margin: 10px 0 22px 32px;
152 | }
153 |
154 | .gray-block {
155 | background: #F5F5F5;
156 | }
157 |
158 | .gray-block .content-block {
159 | padding-bottom: 56px;
160 | }
161 |
162 | .links-block {
163 | font-size: 14px;
164 | font-weight: 600;
165 | padding: 8px 0;
166 | }
167 |
168 | .links-block a {
169 | font-size: 14px;
170 | font-weight: normal;
171 | line-height: 160%;
172 | margin: 0 6px 0 2px;
173 | }
174 |
175 | .links-block a:first-child {
176 | margin-left: 0;
177 | }
178 |
179 | .orange-text {
180 | color: #FF6F3D;
181 | }
182 |
183 | pre {
184 | border: 1px solid #666666;
185 | background-color: #F9F9F9;
186 | border-radius: 3px;
187 | color: #666666;
188 | display: block;
189 | font-family: 'Open Sans', Monaco, Andale Mono, Courier New, monospace;
190 | font-weight: normal;
191 | font-size: 14px;
192 | line-height: 160%;
193 | margin: 8px 0 0;
194 | padding: 16px;
195 | white-space: pre-wrap;
196 | word-wrap: break-word;
197 | }
198 |
199 | pre~h3 {
200 | padding-top: 40px;
201 | }
202 |
203 | footer {
204 | color: #AAAAAA;
205 | font-size: 13px;
206 | line-height: 160%;
207 | margin: 0;
208 | padding: 0;
209 | width: auto;
210 | }
211 |
212 | @media screen and (max-width: 1199px) {
213 | .black-block p {
214 | width: 55vw;
215 | }
216 | .content-block {
217 | width: 90.6vw;
218 | }
219 | header img {
220 | margin-left: 4.8vw;
221 | }
222 | }
223 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/docker.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
24 |
25 | ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}}
26 |
27 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}} installed
39 |
To edit office documents and collaborate, integrate ONLYOFFICE Docs into your sync&share app.
40 |
Integration options
41 |
46 |
47 |
48 |
49 |
50 |
Testing before integration
51 |
Use the integrated test example, a simple doc management system, to check if the editors are running correctly.
52 |
Start test example:
53 |
sudo docker exec $(sudo docker ps -q) sudo supervisorctl start ds:example
54 |
Add it to the autostart:
55 |
sudo docker exec $(sudo docker ps -q) sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf
56 |
If you already installed test example, access it here:
57 |
58 | GO TO TEST EXAMPLE
59 |
60 |
61 |
62 |
63 |
64 |
Getting help
65 |
66 | For free Community version, create issues on GitHub or use our forum.
67 |
68 | For commercial versions, contact us here.
69 |
70 |
ONLYOFFICE Docs editions
71 |
Want to know what else we’ve got?
72 | Compare editions
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/linux-rpm.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
24 |
25 | ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}}
26 |
27 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}} installed
39 |
To edit office documents and collaborate, integrate ONLYOFFICE Docs into your sync&share app.
40 |
Integration options
41 |
46 |
47 |
48 |
49 |
50 |
Testing before integration
51 |
Use the integrated test example, a simple doc management system, to check if the editors are running correctly.
52 |
Start test example:
53 |
sudo supervisorctl start ds:example
54 |
Add it to the autostart:
55 |
sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisord.d/ds-example.ini
56 |
If you already installed test example, access it here:
57 |
58 | GO TO TEST EXAMPLE
59 |
60 |
61 |
62 |
63 |
64 |
Getting help
65 |
66 | For free Community version, create issues on GitHub or use our forum.
67 |
68 | For commercial versions, contact us here.
69 |
70 |
ONLYOFFICE Docs editions
71 |
Want to know what else we’ve got?
72 | Compare editions
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/linux.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
24 |
25 | ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}}
26 |
27 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}} installed
39 |
To edit office documents and collaborate, integrate ONLYOFFICE Docs into your sync&share app.
40 |
Integration options
41 |
46 |
47 |
48 |
49 |
50 |
Testing before integration
51 |
Use the integrated test example, a simple doc management system, to check if the editors are running correctly.
52 |
Start test example:
53 |
sudo supervisorctl start ds:example
54 |
Add it to the autostart:
55 |
sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf
56 |
If you already installed test example, access it here:
57 |
58 | GO TO TEST EXAMPLE
59 |
60 |
61 |
62 |
63 |
64 |
Getting help
65 |
66 | For free Community version, create issues on GitHub or use our forum.
67 |
68 | For commercial versions, contact us here.
69 |
70 |
ONLYOFFICE Docs editions
71 |
Want to know what else we’ve got?
72 | Compare editions
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/common/documentserver-example/welcome/win.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
24 |
25 | ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}}
26 |
27 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
ONLYOFFICE Docs {{OFFICIAL_PRODUCT_NAME}} installed
39 |
To edit office documents and collaborate, integrate ONLYOFFICE Docs into your sync&share app.
40 |
Integration options
41 |
46 |
47 |
48 |
49 |
50 |
Testing before integration
51 |
Use the integrated test example, a simple doc management system, to check if the editors are running correctly.
52 |
Start test example:
53 |
net start DsExampleSvc
54 |
Add it to the autostart:
55 |
sc config DsExampleSvc start=auto
56 |
If you already installed test example, access it here:
57 |
58 | GO TO TEST EXAMPLE
59 |
60 |
61 |
62 |
63 |
64 |
Getting help
65 |
66 | For free Community version, create issues on GitHub or use our forum.
67 |
68 | For commercial versions, contact us here.
69 |
70 |
ONLYOFFICE Docs editions
71 |
Want to know what else we’ve got?
72 | Compare editions
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/common/documentserver/bin/documentserver-generate-allfonts.bat:
--------------------------------------------------------------------------------
1 | @ECHO off
2 |
3 | SET ONLYOFFICE_DATA_CONTAINER=false
4 | IF NOT "%1"=="" (
5 | SET ONLYOFFICE_DATA_CONTAINER=%1
6 | )
7 | rem Setup path env to enable to load the dlls
8 | set PATH=%~dp0\..\server\FileConverter\bin;%PATH%
9 |
10 | rem Start generate AllFonts.js, font thumbnails and font_selection.bin
11 | ECHO | SET /p="Generating AllFonts.js, please wait..."
12 |
13 | "%~dp0\..\server\tools\allfontsgen.exe" ^
14 | --input="%~dp0\..\core-fonts" ^
15 | --allfonts-web="%~dp0\..\sdkjs\common\AllFonts.js" ^
16 | --allfonts="%~dp0\..\server\FileConverter\bin\AllFonts.js" ^
17 | --images="%~dp0\..\sdkjs\common\Images" ^
18 | --selection="%~dp0\..\server\FileConverter\bin\font_selection.bin" ^
19 | --output-web="%~dp0\..\fonts" ^
20 | --use-system="true"
21 |
22 | ECHO Done
23 |
24 | ECHO | SET /p="Generating presentation themes, please wait..."
25 | "%~dp0\..\server\tools\allthemesgen.exe" ^
26 | --converter-dir="%~dp0\..\server\FileConverter\bin" ^
27 | --src="%~dp0\..\sdkjs\slide\themes" ^
28 | --output="%~dp0\..\sdkjs\common\Images"
29 |
30 | "%~dp0\..\server\tools\allthemesgen.exe" ^
31 | --converter-dir="%~dp0\..\server\FileConverter\bin" ^
32 | --src="%~dp0\..\sdkjs\slide\themes" ^
33 | --output="%~dp0\..\sdkjs\common\Images" ^
34 | --postfix="ios" ^
35 | --params="280,224"
36 |
37 | "%~dp0\..\server\tools\allthemesgen.exe" ^
38 | --converter-dir="%~dp0\..\server\FileConverter\bin" ^
39 | --src="%~dp0\..\sdkjs\slide\themes" ^
40 | --output="%~dp0\..\sdkjs\common\Images" ^
41 | --postfix="android" ^
42 | --params="280,224"
43 |
44 | ECHO Done
45 |
46 | rem Restart web-site and converter
47 | IF NOT "%ONLYOFFICE_DATA_CONTAINER%"=="true" (
48 | net stop DsDocServiceSvc
49 | net start DsDocServiceSvc
50 |
51 | net stop DsConverterSvc
52 | net start DsConverterSvc
53 | )
54 |
--------------------------------------------------------------------------------
/common/documentserver/bin/documentserver-generate-allfonts.sh.m4:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ONLYOFFICE_DATA_CONTAINER=false
4 | if [ "$1" != "" ]; then
5 | ONLYOFFICE_DATA_CONTAINER=$1
6 | fi
7 |
8 | DIR="/var/www/M4_DS_PREFIX"
9 |
10 | #Start generate AllFonts.js, font thumbnails and font_selection.bin
11 | echo -n Generating AllFonts.js, please wait...
12 |
13 |
14 | "$DIR/server/tools/allfontsgen"\
15 | --input="$DIR/core-fonts"\
16 | --allfonts-web="$DIR/sdkjs/common/AllFonts.js"\
17 | --allfonts="$DIR/server/FileConverter/bin/AllFonts.js"\
18 | --images="$DIR/sdkjs/common/Images"\
19 | --selection="$DIR/server/FileConverter/bin/font_selection.bin"\
20 | --output-web="$DIR/fonts"\
21 | --use-system="true"
22 |
23 | chown -R ds:ds "$DIR/sdkjs"
24 | chown -R ds:ds "$DIR/server/FileConverter/bin"
25 | chown -R ds:ds "$DIR/fonts"
26 |
27 | echo Done
28 |
29 | echo -n Generating presentation themes, please wait...
30 | "$DIR/server/tools/allthemesgen"\
31 | --converter-dir="$DIR/server/FileConverter/bin"\
32 | --src="$DIR/sdkjs/slide/themes"\
33 | --output="$DIR/sdkjs/common/Images"
34 |
35 | "$DIR/server/tools/allthemesgen"\
36 | --converter-dir="$DIR/server/FileConverter/bin"\
37 | --src="$DIR/sdkjs/slide/themes"\
38 | --output="$DIR/sdkjs/common/Images"\
39 | --postfix="ios"\
40 | --params="280,224"
41 |
42 | "$DIR/server/tools/allthemesgen"\
43 | --converter-dir="$DIR/server/FileConverter/bin"\
44 | --src="$DIR/sdkjs/slide/themes"\
45 | --output="$DIR/sdkjs/common/Images"\
46 | --postfix="android"\
47 | --params="280,224"
48 |
49 | echo Done
50 |
51 | #Remove gzipped fonts
52 | rm -f $DIR/fonts/*.gz $DIR/sdkjs/common/AllFonts.js.gz
53 |
54 | #Restart web-site and converter
55 | if [ "$ONLYOFFICE_DATA_CONTAINER" != "true" ]; then
56 | supervisorctl restart ds:docservice
57 | supervisorctl restart ds:converter
58 | fi
59 |
--------------------------------------------------------------------------------
/common/documentserver/bin/documentserver-letsencrypt.sh.m4:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | LETSENCRYPT_ROOT_DIR="/etc/letsencrypt/live";
4 | ROOT_DIR="M4_DS_ROOT/letsencrypt";
5 | NGINX_CONF_DIR="/etc/M4_DS_PREFIX/nginx";
6 |
7 | if [ "$#" -ge "2" ]; then
8 | LETS_ENCRYPT_MAIL=$1
9 | LETS_ENCRYPT_DOMAIN=$2
10 |
11 | SSL_CERT="${LETSENCRYPT_ROOT_DIR}/${LETS_ENCRYPT_DOMAIN}/fullchain.pem";
12 | SSL_KEY="${LETSENCRYPT_ROOT_DIR}/${LETS_ENCRYPT_DOMAIN}/privkey.pem";
13 |
14 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 |
16 | mkdir -p ${ROOT_DIR}
17 |
18 | echo certbot certonly --expand --webroot -w ${ROOT_DIR} --noninteractive --agree-tos --email $LETS_ENCRYPT_MAIL -d $LETS_ENCRYPT_DOMAIN > /var/log/le-start.log
19 |
20 | certbot certonly --expand --webroot -w ${ROOT_DIR} --noninteractive --agree-tos --email $LETS_ENCRYPT_MAIL -d $LETS_ENCRYPT_DOMAIN > /var/log/le-new.log
21 |
22 | if [ -f ${SSL_CERT} -a -f ${SSL_KEY} ]; then
23 | if [ -f ${NGINX_CONF_DIR}/ds-ssl.conf.tmpl ]; then
24 | cp -f ${NGINX_CONF_DIR}/ds-ssl.conf.tmpl ${NGINX_CONF_DIR}/ds.conf
25 | sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERT}"',' -i ${NGINX_CONF_DIR}/ds.conf
26 | sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY}"',' -i ${NGINX_CONF_DIR}/ds.conf
27 | fi
28 | fi
29 |
30 | service nginx reload
31 |
32 | cat > ${DIR}/letsencrypt_cron.sh <> /var/log/le-renew.log
34 | service nginx reload
35 | END
36 |
37 | chmod a+x ${DIR}/letsencrypt_cron.sh
38 |
39 | cat > /etc/cron.d/letsencrypt < /dev/null
13 | fi
14 | endscript
15 | }
16 |
17 | /var/log/M4_DS_PREFIX/**/*.log
18 | /var/log/M4_DS_PREFIX-example/*.log {
19 | daily
20 | missingok
21 | rotate 30
22 | compress
23 | dateext
24 | delaycompress
25 | notifempty
26 | nocreate
27 | sharedscripts
28 | postrotate
29 | if systemctl is-active supervisor -q; then
30 | systemctl restart supervisor > /dev/null
31 | elif systemctl is-active supervisord -q; then
32 | systemctl restart supervisord > /dev/null
33 | fi
34 | endscript
35 | }
36 |
--------------------------------------------------------------------------------
/common/documentserver/nginx/ds-ssl.conf.tmpl.m4:
--------------------------------------------------------------------------------
1 | include M4_NGINX_CONF/http-common.conf;
2 |
3 | ## Normal HTTP host
4 | server {
5 | listen 0.0.0.0:80;
6 | listen [::]:80 default_server;
7 | server_name _;
8 | server_tokens off;
9 |
10 | ## Redirects all traffic to the HTTPS host
11 | root /nowhere; ## root doesn't have to be a valid path since we are redirecting
12 | rewrite ^ https://$host$request_uri? permanent;
13 | }
14 |
15 | #HTTP host for internal services
16 | server {
17 | listen 127.0.0.1:80;
18 | listen [::1]:80;
19 | server_name localhost;
20 | server_tokens off;
21 |
22 | include M4_NGINX_CONF/ds-common.conf;
23 | include M4_NGINX_CONF/ds-docservice.conf;
24 | }
25 |
26 | ## HTTPS host
27 | server {
28 | listen 0.0.0.0:443 ssl;
29 | listen [::]:443 ssl default_server;
30 | server_tokens off;
31 | root /usr/share/nginx/html;
32 |
33 | ## Strong SSL Security
34 | ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
35 | ssl on;
36 | ssl_certificate {{SSL_CERTIFICATE_PATH}};
37 | ssl_certificate_key {{SSL_KEY_PATH}};
38 | # Uncomment string below and specify the path to the file with the password if you use encrypted certificate key
39 | # ssl_password_file {{SSL_PASSWORD_PATH}};
40 | ssl_verify_client off;
41 |
42 | ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
43 |
44 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
45 | ssl_session_cache builtin:1000 shared:SSL:10m;
46 |
47 | ssl_prefer_server_ciphers on;
48 |
49 | add_header Strict-Transport-Security max-age=31536000;
50 | # add_header X-Frame-Options SAMEORIGIN;
51 | add_header X-Content-Type-Options nosniff;
52 |
53 | ## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL.
54 | ## Replace with your ssl_trusted_certificate. For more info see:
55 | ## - https://medium.com/devops-programming/4445f4862461
56 | ## - https://www.ruby-forum.com/topic/4419319
57 | ## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
58 | # ssl_stapling on;
59 | # ssl_stapling_verify on;
60 | # ssl_trusted_certificate /etc/nginx/ssl/stapling.trusted.crt;
61 | # resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired
62 | # resolver_timeout 10s;
63 |
64 | ## [Optional] Generate a stronger DHE parameter:
65 | ## cd /etc/ssl/certs
66 | ## sudo openssl dhparam -out dhparam.pem 4096
67 | ##
68 | # ssl_dhparam /etc/ssl/certs/dhparam.pem;
69 |
70 | include M4_NGINX_CONF/ds-*.conf;
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/common/documentserver/nginx/ds.conf.tmpl.m4:
--------------------------------------------------------------------------------
1 | include M4_NGINX_CONF/http-common.conf;
2 | server {
3 | listen 0.0.0.0:80;
4 | listen [::]:80 default_server;
5 | server_tokens off;
6 |
7 | include M4_NGINX_CONF/ds-*.conf;
8 | }
--------------------------------------------------------------------------------
/common/documentserver/nginx/includes/ds-common.conf.m4:
--------------------------------------------------------------------------------
1 | ## Increase this if you want to upload large attachments
2 | client_max_body_size 100m;
3 |
4 | gzip on;
5 | gzip_vary on;
6 | gzip_types text/plain
7 | text/xml
8 | text/css
9 | text/csv
10 | font/ttf
11 | application/xml
12 | application/javascript
13 | application/x-javascript
14 | application/json
15 | application/octet-stream
16 | application/x-font-ttf
17 | application/rtf
18 | application/wasm;
19 |
20 | access_log off;
21 | error_log M4_NGINX_LOG/nginx.error.log;
22 |
--------------------------------------------------------------------------------
/common/documentserver/nginx/includes/ds-docservice.conf.m4:
--------------------------------------------------------------------------------
1 | #welcome page
2 | rewrite ^/$ $the_scheme://$the_host/welcome/ redirect;
3 |
4 | #support old version
5 | rewrite ^\/OfficeWeb(\/apps\/.*)$ $the_scheme://$the_host/M4_PACKAGE_VERSION/web-apps$1 redirect;
6 |
7 | #script caching protection
8 | rewrite ^(\/web-apps\/apps\/(?!api\/).*)$ $the_scheme://$the_host/M4_PACKAGE_VERSION$1 redirect;
9 |
10 | #disable caching for api.js
11 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps\/apps\/api\/documents\/api\.js)$ {
12 | expires -1;
13 | # gzip_static on;
14 | alias M4_DS_ROOT/$2;
15 | }
16 |
17 | #suppress logging the unsupported locale error in web-apps
18 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps)(\/.*\.json)$ {
19 | expires 365d;
20 | error_log M4_DEV_NULL crit;
21 | # gzip_static on;
22 | alias M4_DS_ROOT/$2$3;
23 | }
24 |
25 | #suppress logging the unsupported locale error in plugins
26 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(sdkjs-plugins)(\/.*\.json)$ {
27 | expires 365d;
28 | error_log M4_DEV_NULL crit;
29 | # gzip_static on;
30 | alias M4_DS_ROOT/$2$3;
31 | }
32 |
33 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps|sdkjs|sdkjs-plugins|fonts)(\/.*)$ {
34 | expires 365d;
35 | # gzip_static on;
36 | alias M4_DS_ROOT/$2$3;
37 | }
38 |
39 | location ~* ^(\/cache\/files.*)(\/.*) {
40 | alias M4_DS_FILES/App_Data$1;
41 | add_header Content-Disposition "attachment; filename*=UTF-8''$arg_filename";
42 |
43 | set $secret_string verysecretstring;
44 | secure_link $arg_md5,$arg_expires;
45 | secure_link_md5 "$secure_link_expires$uri$secret_string";
46 |
47 | if ($secure_link = "") {
48 | return 403;
49 | }
50 |
51 | if ($secure_link = "0") {
52 | return 410;
53 | }
54 | }
55 |
56 | # Allow internal service only from 127.0.0.1
57 | location ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(info|internal)(\/.*)$ {
58 | allow 127.0.0.1;
59 | deny all;
60 | proxy_pass http://docservice/$2$3;
61 | }
62 |
63 | location / {
64 | proxy_pass http://docservice;
65 | }
66 |
67 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?(\/doc\/.*) {
68 | proxy_pass http://docservice$2;
69 | proxy_http_version 1.1;
70 | }
71 |
72 | location /M4_PACKAGE_VERSION/ {
73 | proxy_pass http://docservice/;
74 | }
75 |
76 | location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(dictionaries)(\/.*)$ {
77 | expires 365d;
78 | alias M4_DS_ROOT/$2$3;
79 | }
80 |
81 |
--------------------------------------------------------------------------------
/common/documentserver/nginx/includes/ds-letsencrypt.conf.m4:
--------------------------------------------------------------------------------
1 | location ~ /.well-known/acme-challenge {
2 | root M4_DS_ROOT/letsencrypt/;
3 | allow all;
4 | }
5 |
--------------------------------------------------------------------------------
/common/documentserver/nginx/includes/http-common.conf.m4:
--------------------------------------------------------------------------------
1 | upstream docservice {
2 | server localhost:8000 max_fails=0 fail_timeout=0s;
3 | }
4 |
5 | upstream example {
6 | server localhost:3000;
7 | }
8 |
9 | map $http_host $this_host {
10 | "" $host;
11 | default $http_host;
12 | }
13 |
14 | map $http_x_forwarded_proto $the_scheme {
15 | default $http_x_forwarded_proto;
16 | "" $scheme;
17 | }
18 |
19 | map $http_x_forwarded_host $the_host {
20 | default $http_x_forwarded_host;
21 | "" $this_host;
22 | }
23 |
24 | map $http_upgrade $proxy_connection {
25 | default upgrade;
26 | "" close;
27 | }
28 |
29 | proxy_set_header Host $http_host;
30 | proxy_set_header Upgrade $http_upgrade;
31 | proxy_set_header Connection $proxy_connection;
32 | proxy_set_header X-Forwarded-Host $the_host;
33 | proxy_set_header X-Forwarded-Proto $the_scheme;
34 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35 |
--------------------------------------------------------------------------------
/common/documentserver/supervisor/ds-converter.conf.m4:
--------------------------------------------------------------------------------
1 | [program:converter]
2 | command=/var/www/M4_DS_PREFIX/server/FileConverter/converter
3 | directory=/var/www/M4_DS_PREFIX/server/FileConverter
4 | user=ds
5 | environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/M4_DS_PREFIX,NODE_DISABLE_COLORS=1,APPLICATION_NAME=M4_COMPANY_NAME
6 | stdout_logfile=/var/log/M4_DS_PREFIX/converter/out.log
7 | stdout_logfile_backups=0
8 | stdout_logfile_maxbytes=0
9 | stderr_logfile=/var/log/M4_DS_PREFIX/converter/err.log
10 | stderr_logfile_backups=0
11 | stderr_logfile_maxbytes=0
12 | autostart=true
13 | autorestart=true
14 |
--------------------------------------------------------------------------------
/common/documentserver/supervisor/ds-docservice.conf.m4:
--------------------------------------------------------------------------------
1 | [program:docservice]
2 | command=/var/www/M4_DS_PREFIX/server/DocService/docservice
3 | directory=/var/www/M4_DS_PREFIX/server/DocService
4 | user=ds
5 | environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/M4_DS_PREFIX,NODE_DISABLE_COLORS=1
6 | stdout_logfile=/var/log/M4_DS_PREFIX/docservice/out.log
7 | stdout_logfile_backups=0
8 | stdout_logfile_maxbytes=0
9 | stderr_logfile=/var/log/M4_DS_PREFIX/docservice/err.log
10 | stderr_logfile_backups=0
11 | stderr_logfile_maxbytes=0
12 | autostart=true
13 | autorestart=true
14 |
--------------------------------------------------------------------------------
/common/documentserver/supervisor/ds-metrics.conf.m4:
--------------------------------------------------------------------------------
1 | [program:metrics]
2 | command=/var/www/M4_DS_PREFIX/server/Metrics/metrics ./config/config.js
3 | directory=/var/www/M4_DS_PREFIX/server/Metrics
4 | user=ds
5 | environment=NODE_DISABLE_COLORS=1
6 | stdout_logfile=/var/log/M4_DS_PREFIX/metrics/out.log
7 | stdout_logfile_backups=0
8 | stdout_logfile_maxbytes=0
9 | stderr_logfile=/var/log/M4_DS_PREFIX/metrics/err.log
10 | stderr_logfile_backups=0
11 | stderr_logfile_maxbytes=0
12 | autostart=true
13 | autorestart=true
14 |
--------------------------------------------------------------------------------
/common/documentserver/supervisor/ds.conf.m4:
--------------------------------------------------------------------------------
1 | [group:ds]
2 | programs=docservice,converter,metrics
3 |
--------------------------------------------------------------------------------
/deb/debian/changelog.m4:
--------------------------------------------------------------------------------
1 | M4_PACKAGE_NAME (M4_PACKAGE_VERSION) stable; urgency=low
2 |
3 | * Change details
4 |
5 | -- M4_PUBLISHER_NAME Tue, 28 Apr 2015 09:50:00 +0000
6 |
--------------------------------------------------------------------------------
/deb/debian/compat:
--------------------------------------------------------------------------------
1 | 9
2 |
--------------------------------------------------------------------------------
/deb/debian/config.m4:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | . /usr/share/debconf/confmodule
6 |
7 | DB_TYPE=""
8 | DB_HOST=""
9 | DB_PORT=""
10 | DB_NAME=""
11 | DB_USER=""
12 | DB_PWD=""
13 |
14 | db_fset M4_ONLYOFFICE_VALUE/db-type seen true
15 | db_fset M4_ONLYOFFICE_VALUE/cluster-mode seen true
16 | db_fset M4_ONLYOFFICE_VALUE/ds-port seen true
17 | db_fset M4_ONLYOFFICE_VALUE/docservice-port seen true
18 | db_fset M4_ONLYOFFICE_VALUE/example-port seen true
19 | db_fset M4_ONLYOFFICE_VALUE/jwt-enabled seen true
20 | db_fset M4_ONLYOFFICE_VALUE/jwt-secret seen true
21 | db_fset M4_ONLYOFFICE_VALUE/jwt-header seen true
22 |
23 | db_input medium M4_ONLYOFFICE_VALUE/db-type || true
24 | db_input medium M4_ONLYOFFICE_VALUE/db-host || true
25 | db_input medium M4_ONLYOFFICE_VALUE/db-port || true
26 | db_input medium M4_ONLYOFFICE_VALUE/db-name || true
27 | db_input medium M4_ONLYOFFICE_VALUE/db-user || true
28 | db_go
29 |
30 | db_input critical M4_ONLYOFFICE_VALUE/db-pwd || true
31 | db_go
32 |
33 | db_input medium M4_ONLYOFFICE_VALUE/rabbitmq-host || true
34 | db_input medium M4_ONLYOFFICE_VALUE/rabbitmq-user || true
35 | db_input medium M4_ONLYOFFICE_VALUE/rabbitmq-pwd || true
36 |
37 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
38 | db_input medium M4_ONLYOFFICE_VALUE/redis-host || true
39 | ,)dnl
40 | db_go
41 |
42 | db_get M4_ONLYOFFICE_VALUE/db-type
43 | DB_TYPE="$RET"
44 |
45 | db_get M4_ONLYOFFICE_VALUE/db-host
46 | DB_HOST="$RET"
47 |
48 | db_get M4_ONLYOFFICE_VALUE/db-port
49 | DB_PORT="$RET"
50 |
51 | db_get M4_ONLYOFFICE_VALUE/db-name
52 | DB_NAME="$RET"
53 |
54 | db_get M4_ONLYOFFICE_VALUE/db-user
55 | DB_USER="$RET"
56 |
57 | db_get M4_ONLYOFFICE_VALUE/db-pwd
58 | DB_PWD="$RET"
59 |
60 | exit 0
61 |
--------------------------------------------------------------------------------
/deb/debian/control.m4:
--------------------------------------------------------------------------------
1 | include(variables.m4)
2 | Source: M4_PACKAGE_NAME
3 | Section: web
4 | Priority: optional
5 | Maintainer: M4_PUBLISHER_NAME
6 | Build-Depends: debhelper (>= 8.0.0)
7 |
8 | Package: M4_PACKAGE_NAME
9 | Architecture: amd64
10 | Depends: ${shlibs:Depends}, ${misc:Depends},
11 | adduser,
12 | ca-certificates,
13 | coreutils,
14 | curl,
15 | libasound2,
16 | libcairo2,
17 | libcurl3 | libcurl4,
18 | libcurl3-gnutls,
19 | libgconf-2-4,
20 | libgtk-3-0,
21 | libstdc++6 (>= 4.8.4),
22 | libxml2,
23 | libxss1,
24 | libxtst6,
25 | logrotate,
26 | mysql-client | mariadb-client,
27 | nginx-extras (>= 1.3.13),
28 | postgresql-client (>= 9.1),
29 | pwgen,
30 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
31 | ` redis-tools,'
32 | ,)dnl
33 | supervisor(>= 3.0b2),
34 | xvfb,
35 | zlib1g
36 | Recommends: ttf-mscorefonts-installer
37 | Description: defn(`DEB[Summary]')
38 | defn(`DEB[Description]')
39 |
--------------------------------------------------------------------------------
/deb/debian/copyright.m4:
--------------------------------------------------------------------------------
1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 | Upstream-Name: M4_PUBLISHER_NAME
3 | Upstream-Contact: M4_PUBLISHER_NAME
4 | Source: M4_PUBLISHER_URL
5 |
6 | Files: *
7 | Copyright: (c) Copyright M4_PUBLISHER_NAME, 2020
8 |
9 | ifdef(COMMERCIAL, License: Commercial,
10 | License: AGPLv3
11 | This program is a free software product. You can redistribute it and/or
12 | modify it under the terms of the GNU Affero General Public License (AGPL)
13 | version 3 as published by the Free Software Foundation. In accordance with
14 | Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
15 | that Ascensio System SIA expressly excludes the warranty of non-infringement
16 | of any third-party rights.
17 |
18 | This program is distributed WITHOUT ANY WARRANTY; without even the implied
19 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
20 | details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
21 |
22 | You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
23 | EU, LV-1021.
24 |
25 | The interactive user interfaces in modified source and object code versions
26 | of the Program must display Appropriate Legal Notices, as required under
27 | Section 5 of the GNU AGPL version 3.
28 |
29 | Pursuant to Section 7(b) of the License you must retain the original Product
30 | logo when distributing the program. Pursuant to Section 7(e) we decline to
31 | grant you any rights under trademark law for use of our trademarks.
32 |
33 | All the Product's GUI elements, including illustrations and icon sets, as
34 | well as technical writing content are licensed under the terms of the
35 | Creative Commons Attribution-ShareAlike 4.0 International. See the License
36 | terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
37 | )
38 |
--------------------------------------------------------------------------------
/deb/debian/package.install.m4:
--------------------------------------------------------------------------------
1 | ../common/documentserver/bin/*.sh usr/bin/
2 | ../common/documentserver/config/* etc/M4_DS_PREFIX/
3 | ../common/documentserver/home/* var/www/M4_DS_PREFIX/
4 | ../common/documentserver/nginx/*.conf etc/M4_DS_PREFIX/nginx/
5 | ../common/documentserver/nginx/*.tmpl etc/M4_DS_PREFIX/nginx/
6 | ../common/documentserver/nginx/includes/*.conf etc/M4_DS_PREFIX/nginx/includes/
7 |
8 | ../common/documentserver/supervisor/*.conf etc/M4_DS_PREFIX/supervisor/
9 |
10 | ifelse('M4_DS_EXAMPLE_ENABLE', '1',
11 | ../common/documentserver-example/supervisor/*.conf etc/M4_DS_PREFIX-example/supervisor/,)
12 |
13 | ../common/documentserver/logrotate/*.conf etc/M4_DS_PREFIX/logrotate/
14 |
15 | ifelse('M4_DS_EXAMPLE_ENABLE', '1',
16 | ../common/documentserver-example/config/* etc/M4_DS_PREFIX-example/
17 | ../common/documentserver-example/home/* var/www/M4_DS_PREFIX-example/
18 | ../common/documentserver-example/nginx/includes/*.conf etc/M4_DS_PREFIX-example/nginx/includes/,)
--------------------------------------------------------------------------------
/deb/debian/package.links.m4:
--------------------------------------------------------------------------------
1 | etc/M4_DS_PREFIX/logrotate/ds.conf etc/logrotate.d/ds.conf
2 |
3 | etc/M4_DS_PREFIX/nginx/includes/ds-common.conf etc/nginx/includes/ds-common.conf
4 | etc/M4_DS_PREFIX/nginx/includes/ds-docservice.conf etc/nginx/includes/ds-docservice.conf
5 | etc/M4_DS_PREFIX/nginx/includes/ds-letsencrypt.conf etc/nginx/includes/ds-letsencrypt.conf
6 | etc/M4_DS_PREFIX/nginx/includes/http-common.conf etc/nginx/includes/http-common.conf
7 |
8 | etc/M4_DS_PREFIX/supervisor/ds-converter.conf etc/supervisor/conf.d/ds-converter.conf
9 | etc/M4_DS_PREFIX/supervisor/ds-docservice.conf etc/supervisor/conf.d/ds-docservice.conf
10 | etc/M4_DS_PREFIX/supervisor/ds-metrics.conf etc/supervisor/conf.d/ds-metrics.conf
11 |
12 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libDjVuFile.so lib/libDjVuFile.so
13 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libdoctrenderer.so lib/libdoctrenderer.so
14 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libgraphics.so lib/libgraphics.so
15 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libHtmlFile.so lib/libHtmlFile.so
16 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libHtmlRenderer.so lib/libHtmlRenderer.so
17 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libkernel.so lib/libkernel.so
18 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libkernel_network.so lib/libkernel_network.so
19 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libPdfReader.so lib/libPdfReader.so
20 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libPdfWriter.so lib/libPdfWriter.so
21 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libXpsFile.so lib/libXpsFile.so
22 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libUnicodeConverter.so lib/libUnicodeConverter.so
23 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libicudata.so.58 lib/libicudata.so.58
24 | var/www/M4_DS_PREFIX/server/FileConverter/bin/libicuuc.so.58 lib/libicuuc.so.58
25 |
26 | ifelse('M4_DS_EXAMPLE_ENABLE','1',
27 | etc/M4_DS_PREFIX-example/nginx/includes/ds-example.conf etc/nginx/includes/ds-example.conf
28 | etc/M4_DS_PREFIX-example/supervisor/ds-example.conf etc/supervisor/conf.d/ds-example.conf
29 | etc/M4_DS_PREFIX-example/supervisor/ds.conf etc/supervisor/conf.d/ds.conf
30 | ,
31 | etc/M4_DS_PREFIX/supervisor/ds.conf etc/supervisor/conf.d/ds.conf)
--------------------------------------------------------------------------------
/deb/debian/postinst.m4:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # postinst script for M4_ONLYOFFICE_VALUE
3 | #
4 | # see: dh_installdeb(1)
5 |
6 | set -e
7 |
8 | # summary of how this script can be called:
9 | # * `configure'
10 | # * `abort-upgrade'
11 | # * `abort-remove' `in-favour'
12 | #
13 | # * `abort-remove'
14 | # * `abort-deconfigure' `in-favour'
15 | # `removing'
16 | #
17 | # for details, see http://www.debian.org/doc/debian-policy/ or
18 | # the debian-policy package
19 |
20 | . /usr/share/debconf/confmodule
21 |
22 | DIR="/var/www/M4_DS_PREFIX"
23 | LOG_DIR="/var/log/M4_DS_PREFIX"
24 | APP_DIR="/var/lib/M4_DS_PREFIX"
25 | CONF_DIR="/etc/M4_DS_PREFIX"
26 | LOCAL_CONFIG=${CONF_DIR}/local.json
27 | EXAMPLE_CONFIG=${CONF_DIR}-example/local.json
28 | JSON_BIN="$DIR/npm/json"
29 | JSON="$JSON_BIN -I -q -f $LOCAL_CONFIG"
30 | JSON_EXAMPLE="$JSON_BIN -I -q -f ${EXAMPLE_CONFIG}"
31 |
32 | OLD_VERSION="$2"
33 |
34 | DB_TYPE=""
35 | DB_HOST=""
36 | DB_PORT=""
37 | DB_USER=""
38 | DB_PWD=""
39 | DB_NAME=""
40 |
41 | RABBITMQ_HOST=""
42 | RABBITMQ_USER=""
43 | RABBITMQ_PWD=""
44 |
45 | REDIS_HOST=""
46 |
47 | CLUSTER_MODE=""
48 |
49 | create_local_configs(){
50 | for i in $LOCAL_CONFIG $EXAMPLE_CONFIG; do
51 | if [ -d $(dirname ${i}) -a ! -f ${i} ]; then
52 | echo {} > ${i}
53 | fi
54 | done
55 | }
56 |
57 | read_saved_params(){
58 | db_get M4_ONLYOFFICE_VALUE/db-type || true
59 | DB_TYPE="$RET"
60 | db_get M4_ONLYOFFICE_VALUE/db-host || true
61 | DB_HOST="$RET"
62 | db_get M4_ONLYOFFICE_VALUE/db-port || true
63 | DB_PORT="$RET"
64 | db_get M4_ONLYOFFICE_VALUE/db-user || true
65 | DB_USER="$RET"
66 | db_get M4_ONLYOFFICE_VALUE/db-pwd || true
67 | DB_PWD="$RET"
68 | db_get M4_ONLYOFFICE_VALUE/db-name || true
69 | DB_NAME="$RET"
70 |
71 | db_get M4_ONLYOFFICE_VALUE/rabbitmq-host || true
72 | RABBITMQ_HOST="$RET"
73 | db_get M4_ONLYOFFICE_VALUE/rabbitmq-user || true
74 | RABBITMQ_USER="$RET"
75 | db_get M4_ONLYOFFICE_VALUE/rabbitmq-pwd || true
76 | RABBITMQ_PWD="$RET"
77 |
78 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
79 | ` db_get M4_ONLYOFFICE_VALUE/redis-host || true
80 | REDIS_HOST="$RET"
81 |
82 | ',)dnl
83 | db_get M4_ONLYOFFICE_VALUE/cluster-mode || true
84 | CLUSTER_MODE="$RET"
85 |
86 | db_get M4_ONLYOFFICE_VALUE/jwt-enabled || true
87 | JWT_ENABLED="$RET"
88 | db_get M4_ONLYOFFICE_VALUE/jwt-secret || true
89 | JWT_SECRET="$RET"
90 | db_get M4_ONLYOFFICE_VALUE/jwt-header || true
91 | JWT_HEADER="$RET"
92 | }
93 |
94 | install_db() {
95 | case $DB_TYPE in
96 | "postgres")
97 | install_postges
98 | ;;
99 | "mariadb"|"mysql")
100 | install_mysql
101 | ;;
102 | *)
103 | echo "ERROR: unknown database type"
104 | exit 1
105 | ;;
106 | esac
107 | }
108 |
109 | install_postges() {
110 | if [ -n "$DB_PWD" ]; then
111 | export PGPASSWORD="$DB_PWD"
112 | fi
113 | PSQL="psql -q -h$DB_HOST -p${DB_PORT:="5432"} -d$DB_NAME -U$DB_USER -w"
114 | # test postgresql connection
115 | set +e
116 | $PSQL -c ";" &>/dev/null
117 | ERRCODE=$?
118 | if [ $ERRCODE -ne 0 ]; then
119 | service postgresql start &>/dev/null
120 | $PSQL -c ";" &>/dev/null || \
121 | { echo "ERROR: can't connect to postgressql database"; exit 1; }
122 | fi
123 | set -e
124 | if [ ! $CLUSTER_MODE = true ]; then
125 | $PSQL -f "$DIR/server/schema/postgresql/removetbl.sql" \
126 | >/dev/null 2>&1
127 | fi
128 | $PSQL -f "$DIR/server/schema/postgresql/createdb.sql" \
129 | >/dev/null 2>&1
130 | }
131 |
132 | install_mysql() {
133 | CONNECTION_PARAMS="-h$DB_HOST -P${DB_PORT:="3306"} -u$DB_USER -p$DB_PWD -w"
134 | MYSQL="mysql -q $CONNECTION_PARAMS"
135 | # test mysql connection
136 | set +e
137 | $MYSQL -e ";" &>/dev/null
138 | ERRCODE=$?
139 | if [ $ERRCODE -ne 0 ]; then
140 | service mysql start &>/dev/null
141 | $MYSQL -e ";" &>/dev/null || \
142 | { echo "ERROR: can't connect to mysql database"; exit 1; }
143 | fi
144 | set -e
145 | if ! $MYSQL -e "SHOW DATABASES;" | cut -d\| -f 1 | grep -qw $DB_NAME; then
146 | $MYSQL -e \
147 | "CREATE DATABASE IF NOT EXISTS $DB_NAME \
148 | DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;" \
149 | >/dev/null 2>&1
150 | fi
151 | if [ ! $CLUSTER_MODE = true ]; then
152 | $MYSQL $DB_NAME < "$DIR/server/schema/mysql/removetbl.sql" >/dev/null 2>&1
153 | fi
154 | $MYSQL $DB_NAME < "$DIR/server/schema/mysql/createdb.sql" >/dev/null 2>&1
155 | }
156 |
157 | save_db_params(){
158 | $JSON -e "if(this.services===undefined)this.services={};"
159 | $JSON -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
160 | $JSON -e "if(this.services.CoAuthoring.sql===undefined)this.services.CoAuthoring.sql={};" >/dev/null 2>&1
161 | $JSON -e "this.services.CoAuthoring.sql.type = '$DB_TYPE'"
162 | $JSON -e "this.services.CoAuthoring.sql.dbHost = '$DB_HOST'"
163 | $JSON -e "this.services.CoAuthoring.sql.dbPort = '$DB_PORT'"
164 | $JSON -e "this.services.CoAuthoring.sql.dbName = '$DB_NAME'"
165 | $JSON -e "this.services.CoAuthoring.sql.dbUser = '$DB_USER'"
166 | $JSON -e "this.services.CoAuthoring.sql.dbPass = '$DB_PWD'"
167 | }
168 |
169 | save_rabbitmq_params(){
170 | $JSON -e "if(this.rabbitmq===undefined)this.rabbitmq={};"
171 | $JSON -e "this.rabbitmq.url = 'amqp://$RABBITMQ_USER:$RABBITMQ_PWD@$RABBITMQ_HOST'"
172 | }
173 |
174 | save_redis_params(){
175 | $JSON -e "if(this.services===undefined)this.services={};"
176 | $JSON -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
177 | $JSON -e "if(this.services.CoAuthoring.redis===undefined)this.services.CoAuthoring.redis={};"
178 | $JSON -e "this.services.CoAuthoring.redis.host = '$REDIS_HOST'"
179 | }
180 |
181 | save_jwt_params(){
182 | ${JSON} -e "if(this.services===undefined)this.services={};"
183 | ${JSON} -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
184 | ${JSON} -e "if(this.services.CoAuthoring.token===undefined)this.services.CoAuthoring.token={};"
185 |
186 | if [ "${JWT_ENABLED}" = "true" ] || [ "${JWT_ENABLED}" = "false" ]; then
187 | ${JSON} -e "if(this.services.CoAuthoring.token.enable===undefined)this.services.CoAuthoring.token.enable={};"
188 | ${JSON} -e "if(this.services.CoAuthoring.token.enable.request===undefined)this.services.CoAuthoring.token.enable.request={};"
189 | ${JSON} -e "this.services.CoAuthoring.token.enable.browser = ${JWT_ENABLED}"
190 | ${JSON} -e "this.services.CoAuthoring.token.enable.request.inbox = ${JWT_ENABLED}"
191 | ${JSON} -e "this.services.CoAuthoring.token.enable.request.outbox = ${JWT_ENABLED}"
192 | fi
193 |
194 | ${JSON} -e "if(this.services.CoAuthoring.secret===undefined)this.services.CoAuthoring.secret={};"
195 |
196 | ${JSON} -e "if(this.services.CoAuthoring.secret.inbox===undefined)this.services.CoAuthoring.secret.inbox={};"
197 | ${JSON} -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'"
198 |
199 | ${JSON} -e "if(this.services.CoAuthoring.secret.outbox===undefined)this.services.CoAuthoring.secret.outbox={};"
200 | ${JSON} -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'"
201 |
202 | ${JSON} -e "if(this.services.CoAuthoring.secret.session===undefined)this.services.CoAuthoring.secret.session={};"
203 | ${JSON} -e "this.services.CoAuthoring.secret.session.string = '${JWT_SECRET}'"
204 |
205 | ${JSON} -e "if(this.services.CoAuthoring.token.inbox===undefined)this.services.CoAuthoring.token.inbox={};"
206 | ${JSON} -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'"
207 |
208 | ${JSON} -e "if(this.services.CoAuthoring.token.outbox===undefined)this.services.CoAuthoring.token.outbox={};"
209 | ${JSON} -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'"
210 |
211 | if [ -f "${EXAMPLE_CONFIG}" ]; then
212 | ${JSON_EXAMPLE} -e "if(this.server===undefined)this.server={};"
213 | ${JSON_EXAMPLE} -e "if(this.server.token===undefined)this.server.token={};"
214 |
215 | if [ "${JWT_ENABLED}" = "true" ] || [ "${JWT_ENABLED}" = "false" ]; then
216 | ${JSON_EXAMPLE} -e "this.server.token.enable = ${JWT_ENABLED}"
217 | fi
218 | ${JSON_EXAMPLE} -e "this.server.token.secret = '${JWT_SECRET}'"
219 | ${JSON_EXAMPLE} -e "this.server.token.authorizationHeader = '${JWT_HEADER}'"
220 | fi
221 | }
222 |
223 | setup_nginx(){
224 | DS_CONF=$CONF_DIR/nginx/ds.conf
225 |
226 | db_get M4_ONLYOFFICE_VALUE/ds-port || true
227 | DS_PORT="$RET"
228 |
229 | # db_get M4_ONLYOFFICE_VALUE/docservice-port || true
230 | # DOCSERVICE_PORT="$RET"
231 |
232 | # db_get M4_ONLYOFFICE_VALUE/example-port || true
233 | # EXAMPLE_PORT="$RET"
234 |
235 | # setup ds port
236 | sed 's/\(listen .*:\)\([0-9]\{2,5\}\b\)\( default_server\)\?\(;\)/\1'${DS_PORT}'\3\4/' -i $DS_CONF
237 |
238 | # check if ipv6 supported otherwise remove it from nginx config
239 | if [ ! -f /proc/net/if_inet6 ]; then
240 | sed '/listen\s\+\[::[0-9]*\].\+/d' -i $DS_CONF
241 | fi
242 |
243 | # install nginx config
244 | if [ -d /etc/nginx/conf.d ] && [ -e /etc/nginx/conf.d/onlyoffice-documentserver.conf ]; then
245 | mv /etc/nginx/conf.d/onlyoffice-documentserver.conf /etc/nginx/conf.d/onlyoffice-documentserver.conf.old
246 | fi
247 |
248 | if [ -d /etc/nginx/conf.d ] && [ ! -e /etc/nginx/conf.d/ds.conf ]; then
249 | ln -s $DS_CONF /etc/nginx/conf.d/ds.conf
250 | fi
251 |
252 | # sed 's/{{DOCSERVICE_PORT}}/'${DOCSERVICE_PORT}'/' -i $OO_CONF
253 | # sed 's/{{EXAMPLE_PORT}}/'${EXAMPLE_PORT}'/' -i $OO_CONF
254 |
255 | rm -f /etc/nginx/sites-enabled/default
256 |
257 | }
258 |
259 | case "$1" in
260 | configure)
261 | adduser --quiet --home "$DIR" --system --group ds
262 |
263 | # add nginx user to M4_ONLYOFFICE_VALUE group to allow access nginx to M4_ONLYOFFICE_VALUE log dir
264 | adduser --quiet www-data ds
265 |
266 | create_local_configs
267 | read_saved_params
268 | install_db
269 | save_db_params
270 | save_rabbitmq_params
271 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
272 | ` save_redis_params
273 | ',)dnl
274 | save_jwt_params
275 |
276 | # configure ngninx for M4_ONLYOFFICE_VALUE
277 | setup_nginx
278 |
279 | # modify permissions for M4_ONLYOFFICE_VALUE files and folders
280 | mkdir -p "$LOG_DIR/docservice"
281 | mkdir -p "$LOG_DIR-example"
282 | mkdir -p "$LOG_DIR/converter"
283 | mkdir -p "$LOG_DIR/metrics"
284 |
285 | mkdir -p "$APP_DIR/App_Data"
286 | mkdir -p "$APP_DIR/App_Data/cache/files"
287 | mkdir -p "$APP_DIR/App_Data/docbuilder"
288 | mkdir -p "$APP_DIR-example/files"
289 |
290 | mkdir -p "$DIR/../Data" #!
291 | mkdir -p "$DIR/fonts"
292 | chown ds:ds -R "$DIR"
293 |
294 | #setup logrotate config rights
295 | chmod 644 ${CONF_DIR}/logrotate/*
296 | chown root:root ${CONF_DIR}/logrotate/*
297 |
298 | # generate allfonts.js and thumbnail
299 | documentserver-generate-allfonts.sh true
300 |
301 | chown ds:ds -R "$LOG_DIR"
302 | chown ds:ds -R "$APP_DIR"
303 | chown ds:ds -R "$APP_DIR-example"
304 |
305 | # call db_stop to prevent installation hang
306 | db_stop
307 |
308 | # restart dependent services
309 | service supervisor restart >/dev/null 2>&1
310 | service nginx restart >/dev/null 2>&1
311 |
312 | echo "Congratulations, the M4_COMPANY_NAME M4_PRODUCT_NAME has been installed successfully!"
313 | ;;
314 |
315 | abort-upgrade|abort-remove|abort-deconfigure)
316 | ;;
317 |
318 | triggered)
319 | documentserver-generate-allfonts.sh true
320 | ;;
321 |
322 | *)
323 | echo "postinst called with unknown argument \`$1'" >&2
324 | exit 1
325 | ;;
326 | esac
327 |
328 | # dh_installdeb will replace this with shell code automatically
329 | # generated by other debhelper scripts.
330 |
331 | #DEBHELPER#
332 |
333 | exit 0
334 |
--------------------------------------------------------------------------------
/deb/debian/postrm.m4:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # postrm script for M4_ONLYOFFICE_VALUE
3 | #
4 | # see: dh_installdeb(1)
5 |
6 | set -e
7 |
8 | # summary of how this script can be called:
9 | # * `remove'
10 | # * `purge'
11 | # * `upgrade'
12 | # * `failed-upgrade'
13 | # * `abort-install'
14 | # * `abort-install'
15 | # * `abort-upgrade'
16 | # * `disappear'
17 | #
18 | # for details, see http://www.debian.org/doc/debian-policy/ or
19 | # the debian-policy package
20 |
21 | if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
22 | . /usr/share/debconf/confmodule
23 | fi
24 |
25 | remove_postgres() {
26 | CONNECTION_PARAMS="-h$DB_HOST -p${DB_PORT:="5432"} -U$DB_USER -w"
27 | if [ -n $DB_PWD ]; then
28 | export PGPASSWORD="$DB_PWD"
29 | fi
30 | psql $CONNECTION_PARAMS $DB_NAME -t -c "DROP SCHEMA IF EXISTS public CASCADE;" &>/dev/null || \
31 | { echo "WARNING: can't delete M4_ONLYOFFICE_VALUE database tables" >&2; }
32 | }
33 |
34 | remove_mysql() {
35 | CONNECTION_PARAMS="-h$DB_HOST -P${DB_PORT:="3306"} -u$DB_USER -p$DB_PWD -w"
36 | MYSQL="mysql -q $CONNECTION_PARAMS"
37 | $MYSQL -e \
38 | "DROP DATABASE IF EXISTS $DB_NAME;" &>/dev/null || \
39 | { echo "WARNING: can't delete M4_ONLYOFFICE_VALUE database" >&2; }
40 | }
41 |
42 | clean_ds_files() {
43 | DIR="/var/www/M4_DS_PREFIX"
44 | LOG_DIR="/var/log/M4_DS_PREFIX"
45 | APP_DIR="/var/lib/M4_DS_PREFIX"
46 | rm -f $DIR/sdkjs/common/AllFonts.js
47 | rm -f $DIR/sdkjs/common/Images/fonts_thumbnail*
48 | rm -f $DIR/sdkjs/*/sdk-all.cache
49 | rm -f $DIR/server/FileConverter/bin/font_selection.bin
50 | rm -f $DIR/server/FileConverter/bin/AllFonts.js
51 | rm -fr $DIR/fonts
52 |
53 | if [ -d /etc/nginx/conf.d/ ] && [ -e /etc/nginx/conf.d/ds.conf ]; then
54 | rm -f /etc/nginx/conf.d/ds.conf
55 | fi
56 |
57 | supervisorctl update >/dev/null 2>&1
58 | service nginx reload >/dev/null 2>&1
59 | }
60 |
61 | case "$1" in
62 | purge)
63 | # purge logs
64 | if [ -d $LOG_DIR ]; then
65 | rm -rf $LOG_DIR
66 | fi
67 |
68 | # purge files
69 | if [ -d $APP_DIR ]; then
70 | rm -rf $APP_DIR
71 | fi
72 |
73 | db_input high M4_ONLYOFFICE_VALUE/remove-db || true
74 | db_go
75 | db_get M4_ONLYOFFICE_VALUE/remove-db
76 | if [ "$RET" = "true" ]; then
77 | db_get M4_ONLYOFFICE_VALUE/db-type
78 | DB_TYPE="$RET"
79 | db_get M4_ONLYOFFICE_VALUE/db-host
80 | DB_HOST="$RET"
81 | db_get M4_ONLYOFFICE_VALUE/db-port
82 | DB_PORT="$RET"
83 | db_get M4_ONLYOFFICE_VALUE/db-user
84 | DB_USER="$RET"
85 | db_get M4_ONLYOFFICE_VALUE/db-pwd
86 | DB_PWD="$RET"
87 | db_get M4_ONLYOFFICE_VALUE/db-name
88 | DB_NAME="$RET"
89 | case $DB_TYPE in
90 | "postgres")
91 | remove_postgres
92 | ;;
93 | "mariadb"|"mysql")
94 | remove_mysql
95 | ;;
96 | *)
97 | echo "ERROR: unknown database type"
98 | exit 1
99 | ;;
100 | esac
101 | fi
102 |
103 | clean_ds_files
104 | ;;
105 |
106 | remove|upgrade)
107 | clean_ds_files
108 | ;;
109 |
110 | failed-upgrade|abort-install|abort-upgrade|disappear)
111 | :
112 | ;;
113 |
114 | *)
115 | echo "postrm called with unknown argument \`$1'" >&2
116 | exit 1
117 | ;;
118 | esac
119 |
120 | # dh_installdeb will replace this with shell code automatically
121 | # generated by other debhelper scripts.
122 |
123 | #DEBHELPER#
124 |
125 | exit 0
126 |
--------------------------------------------------------------------------------
/deb/debian/prerm:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # prerm script for #PACKAGE#
3 | #
4 | # see: dh_installdeb(1)
5 |
6 | set -e
7 |
8 | # summary of how this script can be called:
9 | # * `remove'
10 | # * `upgrade'
11 | # * `failed-upgrade'
12 | # * `remove' `in-favour'
13 | # * `deconfigure' `in-favour'
14 | # `removing'
15 | #
16 | # for details, see http://www.debian.org/doc/debian-policy/ or
17 | # the debian-policy package
18 |
19 |
20 | case "$1" in
21 | remove|upgrade|deconfigure)
22 | documentserver-prepare4shutdown.sh || true
23 | DS_COUNT=$(supervisorctl avail | grep ds | wc -l)
24 | if [ $DS_COUNT -gt 0 ]; then
25 | echo "Stopping documentserver services..."
26 | supervisorctl stop ds:*
27 | fi
28 | ;;
29 |
30 | failed-upgrade)
31 | ;;
32 |
33 | *)
34 | echo "prerm called with unknown argument \`$1'" >&2
35 | exit 1
36 | ;;
37 | esac
38 |
39 | # dh_installdeb will replace this with shell code automatically
40 | # generated by other debhelper scripts.
41 |
42 | #DEBHELPER#
43 |
44 | exit 0
45 |
--------------------------------------------------------------------------------
/deb/debian/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # -*- makefile -*-
3 |
4 | # Uncomment this to turn on verbose mode.
5 | #export DH_VERBOSE=1
6 |
7 | %:
8 | dh $@
9 |
10 | override_dh_shlibdeps:
11 | # dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
12 |
13 | override_dh_strip:
14 | dh_strip -Xdocservice -Xconverter -Xmetrics -Xexample -Xjson
15 |
16 | override_dh_builddeb:
17 | dh_builddeb --destdir=.
18 |
--------------------------------------------------------------------------------
/deb/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (quilt)
2 |
--------------------------------------------------------------------------------
/deb/debian/templates.m4:
--------------------------------------------------------------------------------
1 | Template: M4_ONLYOFFICE_VALUE/db-type
2 | Type: select
3 | Choices: postgres, mariadb, mysql
4 | Default: postgres
5 | Description: Choose database type:
6 |
7 | Template: M4_ONLYOFFICE_VALUE/db-host
8 | Type: string
9 | Default: localhost
10 | Description: Database host:
11 |
12 | Template: M4_ONLYOFFICE_VALUE/db-port
13 | Type: string
14 | Description: Database port:
15 | Leave the field blank to use the default value.
16 |
17 | Template: M4_ONLYOFFICE_VALUE/db-user
18 | Type: string
19 | Default: M4_ONLYOFFICE_VALUE
20 | Description: Database user:
21 |
22 | Template: M4_ONLYOFFICE_VALUE/db-pwd
23 | Type: password
24 | Default: M4_ONLYOFFICE_VALUE
25 | Description: Database password:
26 |
27 | Template: M4_ONLYOFFICE_VALUE/db-name
28 | Type: string
29 | Default: M4_ONLYOFFICE_VALUE
30 | Description: Database name:
31 |
32 | Template: M4_ONLYOFFICE_VALUE/remove-db
33 | Type: boolean
34 | Default: false
35 | Description: Remove database?
36 | This operation will remove the database which contain all ONLYOFFICE data. It is recommended to take backup before removing the database.
37 |
38 | Template: M4_ONLYOFFICE_VALUE/cluster-mode
39 | Type: boolean
40 | Default: false
41 | Description: Use cluster mode?
42 | Type true if M4_PRODUCT_NAME will use in cluster mode.
43 |
44 | Template: M4_ONLYOFFICE_VALUE/ds-port
45 | Type: string
46 | Default: 80
47 | Description: M4_PRODUCT_NAME listening port:
48 |
49 | Template: M4_ONLYOFFICE_VALUE/docservice-port
50 | Type: string
51 | Default: 8000
52 | Description: M4_PRODUCT_NAME docservice listening port:
53 |
54 | Template: M4_ONLYOFFICE_VALUE/example-port
55 | Type: string
56 | Default: 3000
57 | Description: M4_PRODUCT_NAME example listening port:
58 |
59 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
60 | Template: M4_ONLYOFFICE_VALUE/redis-host
61 | Type: string
62 | Default: localhost
63 | Description: Redis host:
64 |
65 | ,)dnl
66 | Template: M4_ONLYOFFICE_VALUE/rabbitmq-host
67 | Type: string
68 | Default: localhost
69 | Description: RabbitMQ host:
70 |
71 | Template: M4_ONLYOFFICE_VALUE/rabbitmq-user
72 | Type: string
73 | Default: guest
74 | Description: RabbitMQ user:
75 |
76 | Template: M4_ONLYOFFICE_VALUE/rabbitmq-pwd
77 | Type: password
78 | Default: guest
79 | Description: RabbitMQ password:
80 |
81 | Template: M4_ONLYOFFICE_VALUE/jwt-enabled
82 | Type: boolean
83 | Default: false
84 | Description: Enable jwt for M4_PRODUCT_NAME?
85 |
86 | Template: M4_ONLYOFFICE_VALUE/jwt-secret
87 | Type: string
88 | Default: secret
89 | Description: Jwt secret:
90 |
91 | Template: M4_ONLYOFFICE_VALUE/jwt-header
92 | Type: string
93 | Default: Authorization
94 | Description: Jwt authorization header:
95 |
--------------------------------------------------------------------------------
/deb/debian/triggers:
--------------------------------------------------------------------------------
1 | interest-noawait /usr/share/fonts
2 | interest-noawait /usr/share/ghostscript/fonts
3 | interest-noawait /usr/share/texmf/fonts
4 |
--------------------------------------------------------------------------------
/exe/example.iss:
--------------------------------------------------------------------------------
1 | #define EXAMPLE_SRV 'DsExampleSvc'
2 | #define EXAMPLE_SRV_DISPLAY str(sAppName + " Example")
3 | #define EXAMPLE_SRV_DESCR str(sAppName + " Example Service")
4 | #define EXAMPLE_SRV_DIR '{app}\example'
5 | #define EXAMPLE_SRV_LOG_DIR '{app}\Log\example'
6 |
7 | #define NODE_EXAMPLE_SRV_ENV 'NODE_ENV=production-windows NODE_CONFIG_DIR=""{app}\example\config"" NODE_DISABLE_COLORS=1'
8 |
9 | #define JSON_EXAMPLE_PARAMS '-I -q -f ""{app}\example\config\local.json""'
10 |
11 | [CustomMessages]
12 | OpenDemo=Open {#sAppName} demo
13 | OpenWelcome=Open {#sAppName} welcome page
14 |
15 | [Files]
16 | Source: ..\common\documentserver-example\home\*; DestDir: {app}\example; Flags: ignoreversion recursesubdirs
17 | Source: ..\common\documentserver-example\config\*; DestDir: {app}\example\config; Flags: ignoreversion recursesubdirs; Permissions: users-readexec
18 | Source: local\local.json; DestDir: {app}\example\config; Flags: onlyifdoesntexist uninsneveruninstall
19 | Source: ..\common\documentserver-example\nginx\*; DestDir: {#NGINX_SRV_DIR}\conf; Flags: ignoreversion recursesubdirs
20 |
21 | [Dirs]
22 | Name: "{app}\example\files"; Permissions: users-modify
23 | Name: "{#EXAMPLE_SRV_LOG_DIR}"; Permissions: users-modify
24 |
25 | [Icons]
26 | Name: "{group}\{cm:OpenDemo}"; Filename: "http://localhost:{code:GetDefaultPort}/example"
27 |
28 | [Registry]
29 | Root: HKLM; Subkey: "{#sAppRegPath}"; ValueType: "string"; ValueName: "{#REG_EXAMPLE_PORT}"; ValueData: "{code:GetExamplePort}"; Check: not IsStringEmpty(ExpandConstant('{param:EXAMPLE_PORT}'));
30 |
31 | [Run]
32 | Filename: "{#JSON}"; Parameters: "{#JSON_EXAMPLE_PARAMS} -e ""if(this.server===undefined)this.server={{token:{{}};"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
33 |
34 | Filename: "{#JSON}"; Parameters: "{#JSON_EXAMPLE_PARAMS} -e ""this.server.port = '{code:GetExamplePort}'"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
35 |
36 | Filename: "{#JSON}"; Parameters: "{#JSON_EXAMPLE_PARAMS} -e ""this.server.token.enable = {code:GetJwtEnabled}"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
37 | Filename: "{#JSON}"; Parameters: "{#JSON_EXAMPLE_PARAMS} -e ""this.server.token.secret = '{code:GetJwtSecret}'"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
38 | Filename: "{#JSON}"; Parameters: "{#JSON_EXAMPLE_PARAMS} -e ""this.server.token.authorizationHeader = '{code:GetJwtHeader}'"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
39 |
40 | Filename: "{#NSSM}"; Parameters: "install {#EXAMPLE_SRV} ""{#EXAMPLE_SRV_DIR}\example.exe"""; Flags: runhidden; StatusMsg: "{cm:InstallSrv,{#EXAMPLE_SRV}}"
41 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} DisplayName {#EXAMPLE_SRV_DISPLAY}"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
42 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} Description {#EXAMPLE_SRV_DESCR}"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
43 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppDirectory {#EXAMPLE_SRV_DIR}"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
44 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppEnvironmentExtra {#NODE_EXAMPLE_SRV_ENV}"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
45 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppRotateFiles 1"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
46 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppRotateOnline 1"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
47 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppRotateBytes {#LOG_ROTATE_BYTES}"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
48 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppStdout {#EXAMPLE_SRV_LOG_DIR}\out.log"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
49 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} AppStderr {#EXAMPLE_SRV_LOG_DIR}\error.log"; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
50 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} ObjectName ""{#LOCAL_SERVICE}"" """" "; Flags: runhidden; StatusMsg: "{cm:CfgSrv,{#EXAMPLE_SRV}}"
51 | Filename: "{#NSSM}"; Parameters: "set {#EXAMPLE_SRV} Start SERVICE_DEMAND_START"; Flags: runhidden; StatusMsg: "{cm:StartSrv,{#EXAMPLE_SRV}}"
52 |
53 | Filename: "{sys}\netsh.exe"; Parameters: "firewall add allowedprogram ""{#EXAMPLE_SRV_DIR}\example.exe"" ""{#EXAMPLE_SRV_DESCR}"" ENABLE ALL"; Flags: runhidden; StatusMsg: "{cm:FireWallExt}"
54 |
55 | Filename: "http://localhost:{code:GetDefaultPort}/welcome"; Description: "{cm:OpenWelcome}"; Flags: postinstall shellexec skipifsilent
56 |
57 | [UninstallRun]
58 | Filename: "{#NSSM}"; Parameters: "stop {#EXAMPLE_SRV}"; Flags: runhidden
59 | Filename: "{#NSSM}"; Parameters: "remove {#EXAMPLE_SRV} confirm"; Flags: runhidden
60 |
61 | Filename: {sys}\netsh.exe; Parameters: "firewall delete allowedprogram program=""{#EXAMPLE_SRV_DIR}\example.exe"""; Flags: runhidden
62 |
63 |
--------------------------------------------------------------------------------
/exe/license/3rd-Party.txt:
--------------------------------------------------------------------------------
1 | 20. Nginx - Nginx is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.
2 |
3 | URL: http://nginx.org/
4 | License: BSD-like license
5 | License File: license/nginx.license
6 |
7 |
8 | 21. PostgreSql - PostgreSQL Database Management System
9 |
10 | URL: https://www.postgresql.org
11 | License: PostgreSQL License, similar to the BSD or MIT licenses.
12 | License File: license/postgresql.license
13 |
14 | 22. NSSM - NSSM is a service helper program similar to srvany and cygrunsrv.
15 |
16 | URL: http://nssm.cc
17 | License: NSSM is public domain.
18 | License File: license/nssm.license
19 |
--------------------------------------------------------------------------------
/exe/license/nginx.license:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2002-2016 Igor Sysoev
3 | * Copyright (C) 2011-2016 Nginx, Inc.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted provided that the following conditions
8 | * are met:
9 | * 1. Redistributions of source code must retain the above copyright
10 | * notice, this list of conditions and the following disclaimer.
11 | * 2. Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in the
13 | * documentation and/or other materials provided with the distribution.
14 | *
15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 | * SUCH DAMAGE.
26 | */
27 |
--------------------------------------------------------------------------------
/exe/license/nssm.license:
--------------------------------------------------------------------------------
1 | Iain Patterson
2 | NSSM is public domain. You may unconditionally use it and/or its source code
3 | for any purpose you wish.
4 |
--------------------------------------------------------------------------------
/exe/license/postgresql.license:
--------------------------------------------------------------------------------
1 | Portions Copyright (c) 1996-2016, The PostgreSQL Global Development Group
2 |
3 | Portions Copyright (c) 1994, The Regents of the University of California
4 |
5 | Permission to use, copy, modify, and distribute this software and its
6 | documentation for any purpose, without fee, and without a written agreement
7 | is hereby granted, provided that the above copyright notice and this
8 | paragraph and the following two paragraphs appear in all copies.
9 |
10 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
11 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
12 | LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
13 | EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
14 | SUCH DAMAGE.
15 |
16 | THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 | FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
19 | "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE
20 | MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
21 |
--------------------------------------------------------------------------------
/exe/local/local.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/exe/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 |
2 | #user nobody;
3 | worker_processes 1;
4 |
5 | #error_log logs/error.log;
6 | #error_log logs/error.log notice;
7 | #error_log logs/error.log info;
8 |
9 | #pid logs/nginx.pid;
10 |
11 |
12 | events {
13 | worker_connections 1024;
14 | }
15 |
16 |
17 | http {
18 | include mime.types;
19 | default_type application/octet-stream;
20 |
21 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 | # '$status $body_bytes_sent "$http_referer" '
23 | # '"$http_user_agent" "$http_x_forwarded_for"';
24 |
25 | #access_log logs/access.log main;
26 |
27 | sendfile on;
28 | #tcp_nopush on;
29 |
30 | #keepalive_timeout 0;
31 | keepalive_timeout 65;
32 |
33 | include ds.conf;
34 | }
35 |
--------------------------------------------------------------------------------
/exe/package.iss.m4:
--------------------------------------------------------------------------------
1 | changecom(`;',)
2 | #define sCompanyName 'M4_COMPANY_NAME'
3 | #define sProductName 'M4_PRODUCT_NAME'
4 | #define sPublisherName 'M4_PUBLISHER_NAME'
5 | #define sPublisherUrl 'M4_PUBLISHER_URL'
6 | #define sSupportUrl 'M4_SUPPORT_URL'
7 |
8 | #define sBrandingFolder 'esyscmd(echo -n $(cygpath -a -w M4_BRANDING_DIR))'
9 | #define sDbDefValue 'M4_ONLYOFFICE_VALUE'
10 |
11 | #include "common.iss"
12 |
13 | ifelse('M4_DS_EXAMPLE_ENABLE', '1',
14 | #include "example.iss"
15 | ,)
16 |
17 |
--------------------------------------------------------------------------------
/exe/scripts/isxdl/chinese.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/chinese.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/czech.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/czech.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/dutch.ini:
--------------------------------------------------------------------------------
1 | [strings]
2 | ; Algemeen
3 | 100=Bestand downloaden
4 | 101=Wilt u de download annuleren?
5 | 102=1% (%2 van %3)
6 | 103=%1 KB
7 | 104=%1 KB van %2 KB (%3%)
8 |
9 | ; Status informatie
10 | 110=Bestandsinformatie ophalen ...
11 | 111=omgeleid naar %1
12 | 112=Verzoek verzenden ...
13 | 113=oplossen %1
14 | 114=Verbonden met 1%
15 | 115=Het ontvangen ...
16 | 116=Verbinden met %1
17 |
18 | ; foutmeldingen
19 | 120=Fout bij het verbinden met Internet. \n\n%1
20 | 121=Fout bij het openen van %1.\n\nDe server terug statuscode %2.
21 | 122=Fout bij het lezen URL.\n\n%1
22 | 123=Fout bij het schrijven bestand %1.\n\n%2
23 | 124=Fout bij openen bestand %1.\n\n%2
24 | 125='%1' is een ongeldige URL.
25 | 126=Fout bij openen %1.\n\n%2
26 | 127=Fout bij het verzenden verzoek.\n\n%1
27 | 128=Niet ondersteund protocol. Alleen HTTP en FTP-protocollen worden ondersteund.
28 | 129=Kan geen verbinding maken %1.\n\n%2
29 | 130=Kan de status code opvragen.\n\n%1
30 | 131=Fout bij het aanvragen van het bestand.\n\n%1
31 |
32 | ; anders
33 | 144=Over ...
34 | 146=Download
35 | 147=Setup is nu het downloaden van extra bestanden naar uw computer.
36 |
37 | ; etiket
38 | 160=Bestand:
39 | 161=Speed:
40 | 162=Status:
41 | 163=Verstreken tijd:
42 | 164=Resterende tijd:
43 | 165=Huidige File:
44 | 166=Algemeen Voortgang:
45 | 167=Annuleren
46 | 168=OK
47 | 169=gebruikersnaam en wachtwoord
48 | 170=Gebruikersnaam:
49 | 171=Wachtwoord:
50 |
--------------------------------------------------------------------------------
/exe/scripts/isxdl/english.ini:
--------------------------------------------------------------------------------
1 | [strings]
2 | ; General
3 | 100=File download
4 | 101=Do you want to cancel the download?
5 | 102=%1 (%2 of %3)
6 | 103=%1 KB
7 | 104=%1 KB of %2 KB (%3%)
8 |
9 | ; Status information
10 | 110=Getting file information...
11 | 111=Redirecting to %1
12 | 112=Sending request...
13 | 113=Resolving %1
14 | 114=Connected to %1
15 | 115=Receiving...
16 | 116=Connecting to %1
17 |
18 | ; Error messages
19 | 120=Error connecting to the internet.\n\n%1
20 | 121=Error opening %1.\n\nThe server returned status code %2.
21 | 122=Error reading URL.\n\n%1
22 | 123=Error writing file %1.\n\n%2
23 | 124=Error opening file %1.\n\n%2
24 | 125='%1' is an invalid URL.
25 | 126=Error opening %1.\n\n%2
26 | 127=Error sending request.\n\n%1
27 | 128=Unsupported protocol. Only HTTP and FTP protocols are supported.
28 | 129=Failed to connect to %1.\n\n%2
29 | 130=Failed to query status code.\n\n%1
30 | 131=Error requesting file.\n\n%1
31 |
32 | ; Other
33 | 144=About...
34 | 146=Download
35 | 147=Setup is now downloading additional files to your computer.
36 |
37 | ; labels
38 | 160=File:
39 | 161=Speed:
40 | 162=Status:
41 | 163=Elapsed Time:
42 | 164=Remaining Time:
43 | 165=Current File:
44 | 166=Overall Progress:
45 | 167=Cancel
46 | 168=OK
47 | 169=User Name and Password
48 | 170=User Name:
49 | 171=Password:
50 |
--------------------------------------------------------------------------------
/exe/scripts/isxdl/french.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/french.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/french2.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/french2.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/french3.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/french3.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/german.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/german.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/isxdl.iss:
--------------------------------------------------------------------------------
1 | [Files]
2 | Source: "scripts\isxdl\isxdl.dll"; Flags: dontcopy
3 |
4 | [Code]
5 | procedure isxdl_AddFile(URL, Filename: PAnsiChar);
6 | external 'isxdl_AddFile@files:isxdl.dll stdcall';
7 |
8 | function isxdl_DownloadFiles(hWnd: Integer): Integer;
9 | external 'isxdl_DownloadFiles@files:isxdl.dll stdcall';
10 |
11 | function isxdl_SetOption(Option, Value: PAnsiChar): Integer;
12 | external 'isxdl_SetOption@files:isxdl.dll stdcall';
13 |
14 | [Setup]
15 |
--------------------------------------------------------------------------------
/exe/scripts/isxdl/italian.ini:
--------------------------------------------------------------------------------
1 | [strings]
2 | ; Generale
3 | 100=Download del file
4 | 101=Vuoi annullare il download?
5 | 102=%1 (%2 di %3)
6 | 103=%1 KB
7 | 104=%1 KB di %2 KB (%3%)
8 |
9 | ; informazioni di stato
10 | 110=Ottenere informazioni sul file ...
11 | 111=reindirizzamento a %1
12 | 112=Invio richiesta...
13 | 113=Risoluzione %1
14 | 114=Connesso al %1
15 | 115=Ricezione...
16 | 116=Collegamento a %1
17 |
18 | ; Messaggio di errore
19 | 120=Errore di connessione a Internet.\n\n%1
20 | 121=Errore di apertura %1.\n\nIl server ha restituito codice di stato %2.
21 | 122=Errore di lettura del URL.\n\n%1
22 | 123=Errore scrittura del file %1.\n\n%2
23 | 124=Errore apertura del file %1.\n\n%2
24 | 125='%1' è un URL non valido.
25 | 126=Errore d'apertura %1.\n\n%2
26 | 127=Errore d'invio richiesta.\n\n%1
27 | 128=Protocollo non supportato. Sono supportati solo i protocolli HTTP e FTP.
28 | 129=Connessione non riuscita a %1.\n\n%2
29 | 130=Impossibile eseguire la query codice di stato.\n\n%1
30 | 131=Errore file di richiedente.\n\n%1
31 |
32 | ; Altro
33 | 144=A proposito di ...
34 | 146=Download
35 | 147=L'installazione è ora scaricando i file aggiuntive al computer.
36 |
37 | ; etichette
38 | 160=File:
39 | 161=Velocità:
40 | 162=Stato:
41 | 163=Tempo trascorso:
42 | 164=Tempo rimanente:
43 | 165=File corrente:
44 | 166=Avanzamento generale:
45 | 167=Annulla
46 | 168=OK
47 | 169=Nome utente e password
48 | 170=Nome Utente:
49 | 171=Password:
50 |
--------------------------------------------------------------------------------
/exe/scripts/isxdl/japanese.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/japanese.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/korean.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/korean.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/norwegian.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/norwegian.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/polish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/polish.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/portugues.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/portugues.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/portuguese.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/portuguese.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/russian.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/russian.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/spanish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/spanish.ini
--------------------------------------------------------------------------------
/exe/scripts/isxdl/swedish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/isxdl/swedish.ini
--------------------------------------------------------------------------------
/exe/scripts/lang/chinese.iss:
--------------------------------------------------------------------------------
1 | [Languages]
2 | Name: "chs"; MessagesFile: "compiler:Default.isl"
3 |
4 | [CustomMessages]
5 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
6 | chs.lcid=2052
7 | chs.depdownload_msg=安装程序需要下列依赖组建才能继续运行:%n%n%1%n要现在下载并安装吗?
8 | chs.depdownload_memo_title=下载依赖组建
9 | chs.depinstall_memo_title=安装依赖组建
10 | chs.depinstall_title=安装依赖组建
11 | chs.depinstall_description=安装程序正在安装所需的依赖组建,请稍后。
12 | chs.depinstall_status=正在安装 %1...
13 | chs.depinstall_missing=必须安装 %1 之后才能继续本安装程序。请先安装 %1,然后在重新运行本安装程序。
14 | chs.depinstall_error=安装依赖组建时出错。请重新启动计算机并再次运行安装程序,或手动安装下列依赖组建:%n
15 |
16 | chs.isxdl_langfile=chinese.ini
17 |
18 | [Files]
19 | Source: "scripts\isxdl\chinese.ini"; Flags: dontcopy
20 |
--------------------------------------------------------------------------------
/exe/scripts/lang/dutch.iss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/lang/dutch.iss
--------------------------------------------------------------------------------
/exe/scripts/lang/english.iss:
--------------------------------------------------------------------------------
1 | [Languages]
2 | Name: "en"; MessagesFile: "compiler:Default.isl"
3 |
4 | [CustomMessages]
5 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
6 | en.lcid=1033
7 | en.depdownload_msg=The following applications are required before setup can continue:%n%n%1%nDownload and install now?
8 | en.depdownload_memo_title=Download dependencies
9 | en.depinstall_memo_title=Install dependencies
10 | en.depinstall_title=Installing dependencies
11 | en.depinstall_description=Please wait while Setup installs dependencies on your computer.
12 | en.depinstall_status=Installing %1...
13 | en.depinstall_missing=%1 must be installed before setup can continue. Please install %1 and run Setup again.
14 | en.depinstall_error=An error occured while installing the dependencies. Please restart the computer and run the setup again or install the following dependencies manually:%n
15 |
16 | en.isxdl_langfile=
17 |
18 | [Files]
19 |
--------------------------------------------------------------------------------
/exe/scripts/lang/french.iss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/lang/french.iss
--------------------------------------------------------------------------------
/exe/scripts/lang/german.iss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/lang/german.iss
--------------------------------------------------------------------------------
/exe/scripts/lang/italian.iss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/btactic-oo/document-server-package/c021bd1b60a203cc947904ef6ee327379b7f379d/exe/scripts/lang/italian.iss
--------------------------------------------------------------------------------
/exe/scripts/lang/japanese.iss:
--------------------------------------------------------------------------------
1 | [Languages]
2 | Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
3 |
4 | [CustomMessages]
5 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
6 | ja.lcid=1041
7 | ja.depdownload_msg=処理を継続する前に次のアプリケーションが必要です:%n%n%1%nダウンロード後インストールしてよろしいですか?
8 | ja.depdownload_memo_title=ダウンロードする依存ファイル
9 | ja.depinstall_memo_title=インストールする依存ファイル
10 | ja.depinstall_title=依存ファイルのインストール
11 | ja.depinstall_description=セットアップが依存ファイルをインストールするまでお待ちください
12 | ja.depinstall_status=インストール中 %1...
13 | ja.depinstall_missing=セットアップを継続するために %1 をインストールする必要があります. %1 をインストールし、再度セットアップを実行してください.
14 | ja.depinstall_error=依存ファイルのインストール中にエラーが発生しました. コンピューターを再起動しセットアップを再度実行するか、依存ファイルを手動でインストールしてください:%n
15 |
16 | ja.isxdl_langfile=japanese.ini
17 |
18 | [Files]
19 | Source: "scripts\isxdl\japanese.ini"; Flags: dontcopy
20 |
--------------------------------------------------------------------------------
/exe/scripts/lang/polish.iss:
--------------------------------------------------------------------------------
1 | [Languages]
2 | Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
3 |
4 | [CustomMessages]
5 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
6 | pl.lcid=1045
7 | pl.depdownload_msg=Poniższe aplikacje są wymagane przed instalacją aby móc kontynuować:%n%n%1%nCzy pobrać je i zainstalować teraz?
8 | pl.depdownload_memo_title=Pobierz zależności
9 | pl.depinstall_memo_title=Zainstaluj zależności
10 | pl.depinstall_title=Instalowanie zależności
11 | pl.depinstall_description=Instalator instaluje zależności na komputerze, proszę czekać.
12 | pl.depinstall_status=Instalowanie %1....
13 | pl.depinstall_missing=%1 musi być zainstalowany przed instalacją, aby mogła ona być kontynuowana. Zainstaluj %1 i ponownie uruchom program instalacyjny.
14 | pl.depinstall_error=Wystąpił błąd podczas instalowania zależności. Uruchom ponownie komputer, a następnie ponownie uruchom program instalacyjny lub ręcznie zainstaluj następujące programy:%n
15 |
16 | pl.isxdl_langfile=polish.ini
17 |
18 | [Files]
19 | Source: "scripts\isxdl\polish.ini"; Flags: dontcopy
20 |
--------------------------------------------------------------------------------
/exe/scripts/lang/russian.iss:
--------------------------------------------------------------------------------
1 | [Languages]
2 | Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
3 |
4 | [CustomMessages]
5 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
6 | ru.lcid=1049
7 | ru.depdownload_msg=Для продолжения установки требуются следующие приложения:%n%n%1%nСкачать и установить их сейчас?
8 | ru.depdownload_memo_title=Загрузить зависимости
9 | ru.depinstall_memo_title=Установить зависимости
10 | ru.depinstall_title=Установка зависимостей
11 | ru.depinstall_description=Пожалуйста, подождите, пока зависимости будут установлены.
12 | ru.depinstall_status=Установка %1...
13 | ru.depinstall_missing=%1 должен быть установлен прежде чем установка может быть продолжена. Пожалуйста, установите %1 и повторите установку.
14 | ru.depinstall_error=В процессе установки зависимостей произошла ошибка. Пожалуйста, перезапустите компьютер и повторите установку, либо установите следующие зависимости вручную:%n
15 |
16 | ru.isxdl_langfile=russian.ini
17 |
18 | [Files]
19 | Source: "scripts\isxdl\russian.ini"; Flags: dontcopy
20 |
--------------------------------------------------------------------------------
/exe/scripts/products.iss:
--------------------------------------------------------------------------------
1 | #include "isxdl\isxdl.iss"
2 |
3 | [Code]
4 | #include "products.pas"
5 |
6 | [Setup]
7 |
--------------------------------------------------------------------------------
/exe/scripts/products.pas:
--------------------------------------------------------------------------------
1 | {
2 | --- TYPES AND VARIABLES ---
3 | }
4 | type
5 | TProduct = record
6 | File: String;
7 | Title: String;
8 | Parameters: String;
9 | ForceSuccess : boolean;
10 | InstallClean : boolean;
11 | MustRebootAfter : boolean;
12 | end;
13 |
14 | InstallResult = (InstallSuccessful, InstallRebootRequired, InstallError);
15 |
16 | var
17 | installMemo, downloadMessage: string;
18 | products: array of TProduct;
19 | delayedReboot, isForcedX86: boolean;
20 | DependencyPage: TOutputProgressWizardPage;
21 |
22 | procedure AddProduct(filename, parameters, title, size, url: string; forceSuccess, installClean, mustRebootAfter : boolean);
23 | {
24 | Adds a product to the list of products to download.
25 | Parameters:
26 | filename: the file name under which to save the file
27 | parameters: the parameters with which to run the file
28 | title: the product title
29 | size: the file size
30 | url: the URL to download from
31 | forceSuccess: whether to continue in case of setup failure
32 | installClean: whether the product needs a reboot before installing
33 | mustRebootAfter: whether the product needs a reboot after installing
34 | }
35 | var
36 | path: string;
37 | i: Integer;
38 | begin
39 | installMemo := installMemo + '%1' + title + #13;
40 |
41 | path := ExpandConstant('{src}{\}') + CustomMessage('DependenciesDir') + '\' + filename;
42 | if not FileExists(path) then begin
43 | path := ExpandConstant('{tmp}{\}') + filename;
44 |
45 | if not FileExists(path) then begin
46 | isxdl_AddFile(url, path);
47 |
48 | downloadMessage := downloadMessage + '%1' + title + ' (' + size + ')' + #13;
49 | end;
50 | end;
51 |
52 | i := GetArrayLength(products);
53 | SetArrayLength(products, i + 1);
54 | products[i].File := path;
55 | products[i].Title := title;
56 | products[i].Parameters := parameters;
57 | products[i].ForceSuccess := forceSuccess;
58 | products[i].InstallClean := installClean;
59 | products[i].MustRebootAfter := mustRebootAfter;
60 | end;
61 |
62 | function SmartExec(product : TProduct; var resultcode : Integer): boolean;
63 | {
64 | Executes a product and returns the exit code.
65 | Parameters:
66 | product: the product to install
67 | resultcode: the exit code
68 | }
69 | begin
70 | if (LowerCase(Copy(product.File, Length(product.File) - 2, 3)) = 'exe') then begin
71 | Result := Exec(product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
72 | end else begin
73 | Result := ShellExec('', product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
74 | end;
75 | end;
76 |
77 | function PendingReboot: boolean;
78 | {
79 | Checks whether the machine has a pending reboot.
80 | }
81 | var names: String;
82 | begin
83 | if (RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'PendingFileRenameOperations', names)) then begin
84 | Result := true;
85 | end else if ((RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'SetupExecute', names)) and (names <> '')) then begin
86 | Result := true;
87 | end else begin
88 | Result := false;
89 | end;
90 | end;
91 |
92 | function InstallProducts: InstallResult;
93 | {
94 | Installs the downloaded products
95 | }
96 | var
97 | resultCode, i, productCount, finishCount: Integer;
98 | begin
99 | Result := InstallSuccessful;
100 | productCount := GetArrayLength(products);
101 |
102 | if productCount > 0 then begin
103 | DependencyPage := CreateOutputProgressPage(CustomMessage('depinstall_title'), CustomMessage('depinstall_description'));
104 | DependencyPage.Show;
105 |
106 | for i := 0 to productCount - 1 do begin
107 | if (products[i].InstallClean and (delayedReboot or PendingReboot())) then begin
108 | Result := InstallRebootRequired;
109 | break;
110 | end;
111 |
112 | DependencyPage.SetText(FmtMessage(CustomMessage('depinstall_status'), [products[i].Title]), '');
113 | DependencyPage.SetProgress(i, productCount);
114 |
115 | while true do begin
116 | // set 0 as used code for shown error if SmartExec fails
117 | resultCode := 0;
118 | if SmartExec(products[i], resultCode) then begin
119 | // setup executed; resultCode contains the exit code
120 | if (products[i].MustRebootAfter) then begin
121 | // delay reboot after install if we installed the last dependency anyways
122 | if (i = productCount - 1) then begin
123 | delayedReboot := true;
124 | end else begin
125 | Result := InstallRebootRequired;
126 | end;
127 | break;
128 | end else if (resultCode = 0) or (products[i].ForceSuccess) then begin
129 | finishCount := finishCount + 1;
130 | break;
131 | end else if (resultCode = 3010) then begin
132 | // Windows Installer resultCode 3010: ERROR_SUCCESS_REBOOT_REQUIRED
133 | delayedReboot := true;
134 | finishCount := finishCount + 1;
135 | break;
136 | end;
137 | end;
138 |
139 | case MsgBox(FmtMessage(SetupMessage(msgErrorFunctionFailed), [products[i].Title, IntToStr(resultCode)]), mbError, MB_ABORTRETRYIGNORE) of
140 | IDABORT: begin
141 | Result := InstallError;
142 | break;
143 | end;
144 | IDIGNORE: begin
145 | break;
146 | end;
147 | end;
148 | end;
149 |
150 | if Result <> InstallSuccessful then begin
151 | break;
152 | end;
153 | end;
154 |
155 | // only leave not installed products for error message
156 | for i := 0 to productCount - finishCount - 1 do begin
157 | products[i] := products[i+finishCount];
158 | end;
159 | SetArrayLength(products, productCount - finishCount);
160 |
161 | DependencyPage.Hide;
162 | end;
163 | end;
164 |
165 | {
166 | --------------------
167 | INNO EVENT FUNCTIONS
168 | --------------------
169 | }
170 |
171 | function PrepareToInstall(var NeedsRestart: boolean): String;
172 | {
173 | Before the "preparing to install" page.
174 | See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
175 | }
176 | var
177 | i: Integer;
178 | s: string;
179 | begin
180 | delayedReboot := false;
181 |
182 | case InstallProducts() of
183 | InstallError: begin
184 | s := CustomMessage('depinstall_error');
185 |
186 | for i := 0 to GetArrayLength(products) - 1 do begin
187 | s := s + #13 + ' ' + products[i].Title;
188 | end;
189 |
190 | Result := s;
191 | end;
192 | InstallRebootRequired: begin
193 | Result := products[0].Title;
194 | NeedsRestart := true;
195 |
196 | // write into the registry that the installer needs to be executed again after restart
197 | RegWriteStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce', 'InstallBootstrap', ExpandConstant('{srcexe}'));
198 | end;
199 | end;
200 | end;
201 |
202 | function NeedRestart : boolean;
203 | {
204 | Checks whether a restart is needed at the end of install
205 | See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
206 | }
207 | begin
208 | Result := delayedReboot;
209 | end;
210 |
211 | function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
212 | {
213 | Just before the "ready" page.
214 | See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
215 | }
216 | var
217 | s: string;
218 | begin
219 | if downloadMessage <> '' then
220 | s := s + CustomMessage('depdownload_memo_title') + ':' + NewLine + FmtMessage(downloadMessage, [Space]) + NewLine;
221 | if installMemo <> '' then
222 | s := s + CustomMessage('depinstall_memo_title') + ':' + NewLine + FmtMessage(installMemo, [Space]) + NewLine;
223 |
224 | if MemoDirInfo <> '' then
225 | s := s + MemoDirInfo + NewLine + NewLine;
226 | if MemoGroupInfo <> '' then
227 | s := s + MemoGroupInfo + NewLine + NewLine;
228 | if MemoTasksInfo <> '' then
229 | s := s + MemoTasksInfo;
230 |
231 | Result := s
232 | end;
233 |
234 | function NextButtonClick(CurPageID: Integer): boolean;
235 | {
236 | At each "next" button click
237 | See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
238 | }
239 | begin
240 | Result := true;
241 |
242 | if CurPageID = wpReady then begin
243 | if downloadMessage <> '' then begin
244 | // change isxdl language only if it is not english because isxdl default language is already english
245 | if (ActiveLanguage() <> 'en') then begin
246 | ExtractTemporaryFile(CustomMessage('isxdl_langfile'));
247 | isxdl_SetOption('language', ExpandConstant('{tmp}{\}') + CustomMessage('isxdl_langfile'));
248 | end;
249 | //isxdl_SetOption('title', FmtMessage(SetupMessage(msgSetupWindowTitle), [CustomMessage('appname')]));
250 |
251 | //if SuppressibleMsgBox(FmtMessage(CustomMessage('depdownload_msg'), [FmtMessage(downloadMessage, [''])]), mbConfirmation, MB_YESNO, IDYES) = IDNO then
252 | // Result := false
253 | //else if
254 | if isxdl_DownloadFiles(StrToInt(ExpandConstant('{wizardhwnd}'))) = 0 then
255 | Result := false;
256 | end;
257 | end;
258 | end;
259 |
260 | {
261 | -----------------------------
262 | ARCHITECTURE HELPER FUNCTIONS
263 | -----------------------------
264 | }
265 |
266 | function IsX86: boolean;
267 | {
268 | Gets whether the computer is x86 (32 bits).
269 | }
270 | begin
271 | Result := isForcedX86 or (ProcessorArchitecture = paX86) or (ProcessorArchitecture = paUnknown);
272 | end;
273 |
274 | function IsX64: boolean;
275 | {
276 | Gets whether the computer is x64 (64 bits).
277 | }
278 | begin
279 | Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paX64);
280 | end;
281 |
282 | function IsIA64: boolean;
283 | {
284 | Gets whether the computer is IA64 (Itanium 64 bits).
285 | }
286 | begin
287 | Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paIA64);
288 | end;
289 |
290 | function GetString(x86, x64, ia64: String): String;
291 | {
292 | Gets a string depending on the computer architecture.
293 | Parameters:
294 | x86: the string if the computer is x86
295 | x64: the string if the computer is x64
296 | ia64: the string if the computer is IA64
297 | }
298 | begin
299 | if IsX64() and (x64 <> '') then begin
300 | Result := x64;
301 | end else if IsIA64() and (ia64 <> '') then begin
302 | Result := ia64;
303 | end else begin
304 | Result := x86;
305 | end;
306 | end;
307 |
308 | function GetArchitectureString(): String;
309 | {
310 | Gets the "standard" architecture suffix string.
311 | Returns either _x64, _ia64 or nothing.
312 | }
313 | begin
314 | if IsX64() then begin
315 | Result := '_x64';
316 | end else if IsIA64() then begin
317 | Result := '_ia64';
318 | end else begin
319 | Result := '';
320 | end;
321 | end;
322 |
323 | procedure SetForceX86(value: boolean);
324 | {
325 | Forces the setup to use X86 products
326 | }
327 | begin
328 | isForcedX86 := value;
329 | end;
330 |
--------------------------------------------------------------------------------
/exe/scripts/products/directxruntime.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Vista, Windows XP Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-US/download/details.aspx?id=35
3 |
4 | [CustomMessages]
5 | en.directxruntime_title=DirectX End-User Runtime
6 | de.directxruntime_title=DirectX Endbenutzer Runtime
7 |
8 | directxruntime_size=1 MB - 95.6 MB
9 |
10 | [Files]
11 | ;includes dxwebsetup.exe in setup executable so that we don't need to download it
12 | Source: "src\dxwebsetup.exe"; Flags: dontcopy
13 |
14 | [Code]
15 | const
16 | directxruntime_url = 'http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe';
17 |
18 | procedure directxruntime();
19 | begin
20 | ExtractTemporaryFile('dxwebsetup.exe');
21 |
22 | AddProduct('dxwebsetup.exe',
23 | '/Q',
24 | CustomMessage('directxruntime_title'),
25 | CustomMessage('directxruntime_size'),
26 | directxruntime_url,
27 | true, false, false);
28 | end;
29 |
30 | [Setup]
31 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx11.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000; Windows Server 2003 Service Pack 1 for Itanium-based Systems; Windows Server 2003 x64 editions; Windows Server 2008 Datacenter; Windows Server 2008 Enterprise; Windows Server 2008 for Itanium-based Systems; Windows Server 2008 Standard; Windows Vista Business; Windows Vista Enterprise; Windows Vista Home Basic; Windows Vista Home Premium; Windows Vista Starter; Windows Vista Ultimate; Windows XP; Windows XP Professional x64 Edition; Windows NT 4.0 Service Pack 6a
2 | ; requires internet explorer 5.0.1 or higher
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3
4 |
5 | [CustomMessages]
6 | dotnetfx11_title=.NET Framework 1.1
7 |
8 | dotnetfx11_size=23.1 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx11_url = 'http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe';
13 |
14 | procedure dotnetfx11();
15 | begin
16 | if (IsX86() and not netfxinstalled(NetFx11, '')) then
17 | AddProduct('dotnetfx11.exe',
18 | '/q:a /c:"install /qb /l"',
19 | CustomMessage('dotnetfx11_title'),
20 | CustomMessage('dotnetfx11_size'),
21 | dotnetfx11_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx11lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | de.dotnetfx11lp_title=.NET Framework 1.1 Sprachpaket: Deutsch
3 |
4 | dotnetfx11lp_size=1.4 MB
5 |
6 | dotnetfx11lp_url=
7 | de.dotnetfx11lp_url=http://download.microsoft.com/download/6/8/2/6821e687-526a-4ef8-9a67-9a402ec5ac9e/langpack.exe
8 |
9 | [Code]
10 | procedure dotnetfx11lp();
11 | begin
12 | if (CustomMessage('dotnetfx11lp_url') <> '') then begin
13 | if (IsX86() and not netfxinstalled(NetFx11, CustomMessage('lcid'))) then
14 | AddProduct('dotnetfx11' + ActiveLanguage() + '.exe',
15 | '/q:a /c:"inst.exe /qb /l"',
16 | CustomMessage('dotnetfx11lp_title'),
17 | CustomMessage('dotnetfx11lp_size'),
18 | CustomMessage('dotnetfx11lp_url'),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx11sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires TabletPC, Windows 2000, Windows 2000 Advanced Server, Windows 2000 Professional Edition , Windows 2000 Server, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows Server 2003 Service Pack 1 for Itanium-based Systems, Windows Server 2003 x64 editions, Windows Server 2003, Datacenter Edition for 64-Bit Itanium-Based Systems, Windows Server 2003, Datacenter x64 Edition, Windows Server 2003, Enterprise Edition for Itanium-based Systems, Windows Server 2003, Enterprise x64 Edition, Windows Server 2003, Standard x64 Edition, Windows Server 2008 Datacenter, Windows Server 2008 Enterprise, Windows Server 2008 for Itanium-based Systems, Windows Server 2008 Standard, Windows Vista Business, Windows Vista Business 64-bit edition, Windows Vista Enterprise, Windows Vista Enterprise 64-bit edition, Windows Vista Home Basic, Windows Vista Home Basic 64-bit edition, Windows Vista Home Premium, Windows Vista Home Premium 64-bit edition, Windows Vista Starter, Windows Vista Ultimate, Windows Vista Ultimate 64-bit edition, Windows XP, Windows XP Home Edition , Windows XP Media Center Edition, Windows XP Professional Edition , Windows XP Professional x64 Edition , Windows XP Service Pack 1, Windows XP Service Pack 2
2 | ; requires internet explorer 5.0.1 or higher
3 | ; http://www.microsoft.com/downloads/details.aspx?familyid=A8F5654F-088E-40B2-BBDB-A83353618B38
4 |
5 | [CustomMessages]
6 | dotnetfx11sp1_title=.NET Framework 1.1 Service Pack 1
7 |
8 | dotnetfx11sp1_size=10.5 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx11sp1_url = 'http://download.microsoft.com/download/8/b/4/8b4addd8-e957-4dea-bdb8-c4e00af5b94b/NDP1.1sp1-KB867460-X86.exe';
13 |
14 | procedure dotnetfx11sp1();
15 | begin
16 | if (IsX86() and (netfxspversion(NetFx11, '') < 1)) then
17 | AddProduct('dotnetfx11sp1.exe',
18 | '/q',
19 | CustomMessage('dotnetfx11sp1_title'),
20 | CustomMessage('dotnetfx11sp1_size'),
21 | dotnetfx11sp1_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 3, Windows 98, Windows 98 Second Edition, Windows ME, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires internet explorer 5.0.1 or higher
3 | ; requires windows installer 2.0 on windows 98, ME
4 | ; requires Windows Installer 3.1 on windows 2000 or higher
5 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5
6 |
7 | [CustomMessages]
8 | dotnetfx20_title=.NET Framework 2.0
9 |
10 | dotnetfx20_size=23 MB
11 |
12 | [Code]
13 | const
14 | dotnetfx20_url = 'http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe';
15 | dotnetfx20_url_x64 = 'http://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe';
16 | dotnetfx20_url_ia64 = 'http://download.microsoft.com/download/f/8/6/f86148a4-e8f7-4d08-a484-b4107f238728/NetFx64.exe';
17 |
18 | procedure dotnetfx20();
19 | begin
20 | if (not netfxinstalled(NetFx20, '')) then
21 | AddProduct('dotnetfx20' + GetArchitectureString() + '.exe',
22 | '/passive /norestart /lang:ENU',
23 | CustomMessage('dotnetfx20_title'),
24 | CustomMessage('dotnetfx20_size'),
25 | GetString(dotnetfx20_url, dotnetfx20_url_x64, dotnetfx20_url_ia64),
26 | false, false, false);
27 | end;
28 |
29 | [Setup]
30 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?familyid=92E0E1CE-8693-4480-84FA-7D85EEF59016
2 |
3 | [CustomMessages]
4 | de.dotnetfx20lp_title=.NET Framework 2.0 Sprachpaket: Deutsch
5 |
6 | dotnetfx20lp_size=1.8 MB
7 |
8 | dotnetfx20lp_url=
9 | de.dotnetfx20lp_url=http://download.microsoft.com/download/2/9/7/29768238-56c3-4ea6-abba-4c5246f2bc81/langpack.exe
10 | de.dotnetfx20lp_url_x64=http://download.microsoft.com/download/2/e/f/2ef250ba-a868-4074-a4c9-249004866f87/langpack.exe
11 | de.dotnetfx20lp_url_ia64=http://download.microsoft.com/download/8/9/8/898c5670-5e74-41c4-82fc-68dd837af627/langpack.exe
12 |
13 | [Code]
14 | procedure dotnetfx20lp();
15 | begin
16 | if (CustomMessage('dotnetfx20lp_url') <> '') then begin
17 | if (not netfxinstalled(NetFx20, CustomMessage('lcid'))) then
18 | AddProduct('dotnetfx20' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
19 | '/passive /norestart /lang:ENU',
20 | CustomMessage('dotnetfx20lp_title'),
21 | CustomMessage('dotnetfx20lp_size'),
22 | CustomMessage('dotnetfx20lp_url' + GetArchitectureString()),
23 | false, false, false);
24 | end;
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 4, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires KB 835732 on Windows 2000 Service Pack 4
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=79bc3b77-e02c-4ad3-aacf-a7633f706ba5
4 |
5 | [CustomMessages]
6 | dotnetfx20sp1_title=.NET Framework 2.0 Service Pack 1
7 |
8 | dotnetfx20sp1_size=23.6 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx20sp1_url = 'http://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe';
13 | dotnetfx20sp1_url_x64 = 'http://download.microsoft.com/download/9/8/6/98610406-c2b7-45a4-bdc3-9db1b1c5f7e2/NetFx20SP1_x64.exe';
14 | dotnetfx20sp1_url_ia64 = 'http://download.microsoft.com/download/c/9/7/c97d534b-8a55-495d-ab06-ad56f4b7f155/NetFx20SP1_ia64.exe';
15 |
16 | procedure dotnetfx20sp1();
17 | begin
18 | if (netfxspversion(NetFx20, '') < 1) then
19 | AddProduct('dotnetfx20sp1' + GetArchitectureString() + '.exe',
20 | '/passive /norestart /lang:ENU',
21 | CustomMessage('dotnetfx20sp1_title'),
22 | CustomMessage('dotnetfx20sp1_size'),
23 | GetString(dotnetfx20sp1_url, dotnetfx20sp1_url_x64, dotnetfx20sp1_url_ia64),
24 | false, false, false);
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20sp1lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=1cc39ffe-a2aa-4548-91b3-855a2de99304
2 |
3 | [CustomMessages]
4 | de.dotnetfx20sp1lp_title=.NET Framework 2.0 SP1 Sprachpaket: Deutsch
5 |
6 | dotnetfx20sp1lp_size=3.4 MB
7 |
8 | dotnetfx20sp1lp_url=
9 | de.dotnetfx20sp1lp_url=http://download.microsoft.com/download/8/a/a/8aab7e6a-5e58-4e83-be99-f5fb49fe811e/NetFx20SP1_x86de.exe
10 | de.dotnetfx20sp1lp_url_x64=http://download.microsoft.com/download/1/4/2/1425872f-c564-4ab2-8c9e-344afdaecd44/NetFx20SP1_x64de.exe
11 | de.dotnetfx20sp1lp_url_ia64=http://download.microsoft.com/download/a/0/b/a0bef431-19d8-433c-9f42-6e2824a8cb90/NetFx20SP1_ia64de.exe
12 |
13 | [Code]
14 | procedure dotnetfx20sp1lp();
15 | begin
16 | if (CustomMessage('dotnetfx20sp1lp_url') <> '') then begin
17 | if (netfxspversion(NetFx20, CustomMessage('lcid')) < 1) then
18 | AddProduct('dotnetfx20sp1' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
19 | '/passive /norestart /lang:ENU',
20 | CustomMessage('dotnetfx20sp1lp_title'),
21 | CustomMessage('dotnetfx20sp1lp_size'),
22 | CustomMessage('dotnetfx20sp1lp_url' + GetArchitectureString()),
23 | false, false, false);
24 | end;
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20sp2.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F
2 |
3 | [CustomMessages]
4 | dotnetfx20sp2_title=.NET Framework 2.0 Service Pack 2
5 |
6 | dotnetfx20sp2_size=24 MB - 52 MB
7 |
8 | [Code]
9 | const
10 | dotnetfx20sp2_url = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe';
11 | dotnetfx20sp2_url_x64 = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe';
12 | dotnetfx20sp2_url_ia64 = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_ia64.exe';
13 |
14 | procedure dotnetfx20sp2();
15 | begin
16 | if (netfxspversion(NetFx20, '') < 2) then
17 | AddProduct('dotnetfx20sp2' + GetArchitectureString() + '.exe',
18 | '/passive /norestart /lang:ENU',
19 | CustomMessage('dotnetfx20sp2_title'),
20 | CustomMessage('dotnetfx20sp2_size'),
21 | GetString(dotnetfx20sp2_url, dotnetfx20sp2_url_x64, dotnetfx20sp2_url_ia64),
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx20sp2lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=c69789e0-a4fa-4b2e-a6b5-3b3695825992
2 |
3 | [CustomMessages]
4 | de.dotnetfx20sp2lp_title=.NET Framework 2.0 SP2 Sprachpaket: Deutsch
5 |
6 | dotnetfx20sp2lp_size=3.4 MB
7 |
8 | dotnetfx20sp2lp_url=
9 | de.dotnetfx20sp2lp_url=http://download.microsoft.com/download/0/b/1/0b175c8e-34bd-46c0-bfcd-af8d33770c58/netfx20sp2_x86de.exe
10 | de.dotnetfx20sp2lp_url_x64=http://download.microsoft.com/download/4/e/c/4ec67a11-879d-4550-9c25-fd9ab4261b46/netfx20sp2_x64de.exe
11 | de.dotnetfx20sp2lp_url_ia64=http://download.microsoft.com/download/a/3/3/a3349a2d-36e4-4797-8297-4394e6fbd677/NetFx20SP2_ia64de.exe
12 |
13 | [Code]
14 | procedure dotnetfx20sp2lp();
15 | begin
16 | if (CustomMessage('dotnetfx20sp2lp_url') <> '') then begin
17 | if (netfxspversion(NetFx20, CustomMessage('lcid')) < 2) then
18 | AddProduct('dotnetfx20sp2' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
19 | '/lang:enu /passive /norestart"',
20 | CustomMessage('dotnetfx20sp2lp_title'),
21 | CustomMessage('dotnetfx20sp2lp_size'),
22 | CustomMessage('dotnetfx20sp2lp_url' + GetArchitectureString()),
23 | false, false, false);
24 | end;
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx35.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003 Service Pack 1, Windows Server 2008, Windows Vista, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.1
3 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
4 | ; http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6
5 |
6 | [CustomMessages]
7 | dotnetfx35_title=.NET Framework 3.5
8 |
9 | dotnetfx35_size=3 MB - 197 MB
10 |
11 | [Code]
12 | const
13 | dotnetfx35_url = 'http://download.microsoft.com/download/7/0/3/703455ee-a747-4cc8-bd3e-98a615c3aedb/dotNetFx35setup.exe';
14 |
15 | procedure dotnetfx35();
16 | begin
17 | if (netfxinstalled(NetFx35, '') = false) then
18 | AddProduct('dotnetfx35.exe',
19 | '/lang:enu /passive /norestart',
20 | CustomMessage('dotnetfx35_title'),
21 | CustomMessage('dotnetfx35_size'),
22 | dotnetfx35_url,
23 | false, false, false);
24 | end;
25 |
26 | [Setup]
27 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx35lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | de.dotnetfx35lp_title=.NET Framework 3.5 Sprachpaket: Deutsch
3 |
4 | dotnetfx35lp_size=13 MB - 51 MB
5 |
6 | dotnetfx35lp_url=
7 | de.dotnetfx35lp_url=http://download.microsoft.com/download/d/1/e/d1e617c3-c7f4-467e-a7de-af832450efd3/dotnetfx35langpack_x86de.exe
8 |
9 | [Code]
10 | procedure dotnetfx35lp();
11 | begin
12 | if (CustomMessage('dotnetfx35lp_url') <> '') then begin
13 | if (not netfxinstalled(NetFx35, CustomMessage('lcid'))) then
14 | AddProduct('dotnetfx35_' + ActiveLanguage() + '.exe',
15 | '/lang:enu /passive /norestart',
16 | CustomMessage('dotnetfx35lp_title'),
17 | CustomMessage('dotnetfx35lp_size'),
18 | CustomMessage('dotnetfx35lp_url'),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx35sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003 Service Pack 1, Windows Server 2008, Windows Vista, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.1
3 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
4 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7
5 |
6 | [CustomMessages]
7 | dotnetfx35sp1_title=.NET Framework 3.5 Service Pack 1
8 |
9 | dotnetfx35sp1_size=3 MB - 232 MB
10 |
11 | [Code]
12 | const
13 | dotnetfx35sp1_url = 'http://download.microsoft.com/download/0/6/1/061f001c-8752-4600-a198-53214c69b51f/dotnetfx35setup.exe';
14 |
15 | procedure dotnetfx35sp1();
16 | begin
17 | if (netfxspversion(NetFx35, '') < 1) then
18 | AddProduct('dotnetfx35sp1.exe',
19 | '/lang:enu /passive /norestart',
20 | CustomMessage('dotnetfx35sp1_title'),
21 | CustomMessage('dotnetfx35sp1_size'),
22 | dotnetfx35sp1_url,
23 | false, false, false);
24 | end;
25 |
26 | [Setup]
27 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx35sp1lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | de.dotnetfx35sp1lp_title=.NET Framework 3.5 SP1 Sprachpaket: Deutsch
3 |
4 | dotnetfx35sp1lp_size=22 MB - 98 MB
5 |
6 | dotnetfx35sp1lp_url=
7 | de.dotnetfx35sp1lp_url=http://download.microsoft.com/download/d/7/2/d728b7b9-454b-4b57-8270-45dac441b0ec/dotnetfx35langpack_x86de.exe
8 |
9 | [Code]
10 | procedure dotnetfx35sp1lp();
11 | begin
12 | if (CustomMessage('dotnetfx35sp1lp_url') <> '') then begin
13 | if (netfxspversion(NetFx35, CustomMessage('lcid')) < 1) then
14 | AddProduct('dotnetfx35sp1_' + ActiveLanguage() + '.exe',
15 | '/lang:enu /passive /norestart',
16 | CustomMessage('dotnetfx35sp1lp_title'),
17 | CustomMessage('dotnetfx35sp1lp_size'),
18 | CustomMessage('dotnetfx35sp1lp_url'),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx40client.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Vista Service Pack 1, Windows XP Service Pack 3
2 | ; requires Windows Installer 3.1
3 | ; requires Internet Explorer 5.01
4 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
5 | ; http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5765d7a8-7722-4888-a970-ac39b33fd8ab
6 |
7 | [CustomMessages]
8 | dotnetfx40client_title=.NET Framework 4.0 Client
9 |
10 | dotnetfx40client_size=3 MB - 197 MB
11 |
12 | [Code]
13 | const
14 | dotnetfx40client_url = 'http://download.microsoft.com/download/7/B/6/7B629E05-399A-4A92-B5BC-484C74B5124B/dotNetFx40_Client_setup.exe';
15 |
16 | procedure dotnetfx40client();
17 | begin
18 | if (not netfxinstalled(NetFx40Client, '')) then
19 | AddProduct('dotNetFx40_Client_setup.exe',
20 | '/lcid ' + CustomMessage('lcid') + ' /passive /norestart',
21 | CustomMessage('dotnetfx40client_title'),
22 | CustomMessage('dotnetfx40client_size'),
23 | dotnetfx40client_url,
24 | false, false, false);
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx40full.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Vista Service Pack 1, Windows XP Service Pack 3
2 | ; requires Windows Installer 3.1
3 | ; requires Internet Explorer 5.01
4 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
5 | ; http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992
6 |
7 | [CustomMessages]
8 | dotnetfx40full_title=.NET Framework 4.0 Full
9 |
10 | dotnetfx40full_size=3 MB - 197 MB
11 |
12 | [Code]
13 | const
14 | dotnetfx40full_url = 'http://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe';
15 |
16 | procedure dotnetfx40full();
17 | begin
18 | if (not netfxinstalled(NetFx40Full, '')) then
19 | AddProduct('dotNetFx40_Full_setup.exe',
20 | '/lcid ' + CustomMessage('lcid') + ' /passive /norestart',
21 | CustomMessage('dotnetfx40full_title'),
22 | CustomMessage('dotnetfx40full_size'),
23 | dotnetfx40full_url,
24 | false, false, false);
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx45.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2012 R2, Windows Vista Service Pack 2
2 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=42642
4 |
5 | [CustomMessages]
6 | dotnetfx45_title=.NET Framework 4.5.2
7 |
8 | dotnetfx45_size=1 MB - 68 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx45_url = 'http://download.microsoft.com/download/B/4/1/B4119C11-0423-477B-80EE-7A474314B347/NDP452-KB2901954-Web.exe';
13 |
14 | procedure dotnetfx45(minVersion: integer);
15 | begin
16 | if (not netfxinstalled(NetFx4x, '') or (netfxspversion(NetFx4x, '') < minVersion)) then
17 | AddProduct('dotnetfx45.exe',
18 | '/lcid ' + CustomMessage('lcid') + ' /passive /norestart',
19 | CustomMessage('dotnetfx45_title'),
20 | CustomMessage('dotnetfx45_size'),
21 | dotnetfx45_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx46.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2
2 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
3 | ; https://www.microsoft.com/en-US/download/details.aspx?id=53345
4 |
5 | [CustomMessages]
6 | dotnetfx46_title=.NET Framework 4.6.2
7 |
8 | dotnetfx46_size=1 MB - 59 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx46_url = 'http://download.microsoft.com/download/D/5/C/D5C98AB0-35CC-45D9-9BA5-B18256BA2AE6/NDP462-KB3151802-Web.exe';
13 |
14 | procedure dotnetfx46(minVersion: integer);
15 | begin
16 | if (not netfxinstalled(NetFx4x, '') or (netfxspversion(NetFx4x, '') < minVersion)) then
17 | AddProduct('dotnetfx46.exe',
18 | '/lcid ' + CustomMessage('lcid') + ' /passive /norestart',
19 | CustomMessage('dotnetfx46_title'),
20 | CustomMessage('dotnetfx46_size'),
21 | dotnetfx46_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfx47.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 10, Windows 7 Service Pack 1, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016
2 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
3 | ; https://www.microsoft.com/en-US/download/details.aspx?id=55170
4 |
5 | [CustomMessages]
6 | dotnetfx47_title=.NET Framework 4.7
7 |
8 | dotnetfx47_size=1 MB - 59 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx47_url = 'http://download.microsoft.com/download/A/E/A/AEAE0F3F-96E9-4711-AADA-5E35EF902306/NDP47-KB3186500-Web.exe';
13 |
14 | procedure dotnetfx47(minVersion: integer);
15 | begin
16 | if (not netfxinstalled(NetFx4x, '') or (netfxspversion(NetFx4x, '') < minVersion)) then
17 | AddProduct('dotnetfx47.exe',
18 | '/lcid ' + CustomMessage('lcid') + ' /passive /norestart',
19 | CustomMessage('dotnetfx47_title'),
20 | CustomMessage('dotnetfx47_size'),
21 | dotnetfx47_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/dotnetfxversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | type
3 | NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full, NetFx4x);
4 |
5 | const
6 | netfx11plus_reg = 'Software\Microsoft\NET Framework Setup\NDP\';
7 |
8 | function netfxinstalled(version: NetFXType; lcid: string): boolean;
9 | var
10 | regVersion: cardinal;
11 | regVersionString: string;
12 | begin
13 | if (lcid <> '') then
14 | lcid := '\' + lcid;
15 |
16 | if (version = NetFx10) then begin
17 | RegQueryStringValue(HKLM, 'Software\Microsoft\.NETFramework\Policy\v1.0\3705', 'Install', regVersionString);
18 | Result := regVersionString <> '';
19 | end else begin
20 | case version of
21 | NetFx11:
22 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'Install', regVersion);
23 | NetFx20:
24 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'Install', regVersion);
25 | NetFx30:
26 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0\Setup' + lcid, 'InstallSuccess', regVersion);
27 | NetFx35:
28 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'Install', regVersion);
29 | NetFx40Client:
30 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Install', regVersion);
31 | NetFx40Full:
32 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Install', regVersion);
33 | NetFx4x:
34 | begin
35 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion);
36 | Result := (regVersion >= 378389); // 4.5.0+
37 | Exit;
38 | end;
39 | end;
40 | Result := (regVersion <> 0);
41 | end;
42 | end;
43 |
44 | function netfxspversion(version: NetFXType; lcid: string): integer;
45 | var
46 | regVersion: cardinal;
47 | begin
48 | if (lcid <> '') then
49 | lcid := '\' + lcid;
50 |
51 | case version of
52 | NetFx10:
53 | // not supported
54 | regVersion := -1;
55 | NetFx11:
56 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'SP', regVersion)) then
57 | regVersion := -1;
58 | NetFx20:
59 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'SP', regVersion)) then
60 | regVersion := -1;
61 | NetFx30:
62 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0' + lcid, 'SP', regVersion)) then
63 | regVersion := -1;
64 | NetFx35:
65 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'SP', regVersion)) then
66 | regVersion := -1;
67 | NetFx40Client:
68 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Servicing', regVersion)) then
69 | regVersion := -1;
70 | NetFx40Full:
71 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Servicing', regVersion)) then
72 | regVersion := -1;
73 | NetFx4x:
74 | if (RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion)) then begin
75 | if (regVersion >= 461308) then
76 | regVersion := 71 // 4.7.1+
77 | else if (regVersion >= 460798) then
78 | regVersion := 70 // 4.7+
79 | else if (regVersion >= 394802) then
80 | regVersion := 62 // 4.6.2+
81 | else if (regVersion >= 394254) then
82 | regVersion := 61 // 4.6.1+
83 | else if (regVersion >= 393295) then
84 | regVersion := 60 // 4.6+
85 | else if (regVersion >= 379893) then
86 | regVersion := 52 // 4.5.2+
87 | else if (regVersion >= 378675) then
88 | regVersion := 51 // 4.5.1+
89 | else if (regVersion >= 378389) then
90 | regVersion := 50 // 4.5+
91 | else
92 | regVersion := -1;
93 | end;
94 | end;
95 | Result := regVersion;
96 | end;
97 |
98 | [Setup]
99 |
--------------------------------------------------------------------------------
/exe/scripts/products/fileversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | function GetFullVersion(VersionMS, VersionLS: cardinal): string;
3 | var
4 | version: string;
5 | begin
6 | version := IntToStr(word(VersionMS shr 16));
7 | version := version + '.' + IntToStr(word(VersionMS and not $ffff0000));
8 |
9 | version := version + '.' + IntToStr(word(VersionLS shr 16));
10 | version := version + '.' + IntToStr(word(VersionLS and not $ffff0000));
11 |
12 | Result := version;
13 | end;
14 |
15 | function fileversion(file: string): string;
16 | var
17 | versionMS, versionLS: cardinal;
18 | begin
19 | if GetVersionNumbers(file, versionMS, versionLS) then
20 | Result := GetFullVersion(versionMS, versionLS)
21 | else
22 | Result := '0';
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/ie6.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000; Windows 98; Windows ME; Windows NT; Windows XP Service Pack 1
2 | ; WARNING: express setup (downloads and installs the components depending on your OS)
3 | ; http://www.microsoft.com/downloads/details.aspx?familyid=1E1550CB-5E5D-48F5-B02B-20B602228DE6
4 |
5 | [CustomMessages]
6 | ie6_title=Internet Explorer 6
7 |
8 | ie6_size=1 MB - 77.5 MB
9 |
10 | [Code]
11 | const
12 | ie6_url = 'http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/ie6setup.exe';
13 |
14 | procedure ie6(minVersion: string);
15 | var
16 | version: string;
17 | begin
18 | RegQueryStringValue(HKLM, 'Software\Microsoft\Internet Explorer', 'Version', version);
19 | if (compareversion(version, minVersion) < 0) then
20 | AddProduct('ie6.exe',
21 | '/q:a /C:"setup /QNT"',
22 | CustomMessage('ie6_title'),
23 | CustomMessage('ie6_size'),
24 | ie6_url,
25 | false, false, false);
26 | end;
27 |
28 | [Setup]
29 |
--------------------------------------------------------------------------------
/exe/scripts/products/iis.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | iis_title=Internet Information Services (IIS)
3 |
4 | [Code]
5 | function iis(): boolean;
6 | begin
7 | if (not RegKeyExists(HKLM, 'SYSTEM\CurrentControlSet\Services\W3SVC\Security')) then
8 | MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [CustomMessage('iis_title')]), mbError, MB_OK)
9 | else
10 | Result := true;
11 | end;
12 |
13 | [Setup]
14 |
--------------------------------------------------------------------------------
/exe/scripts/products/jet4sp8.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | jet4sp8_title=Jet 4
5 |
6 | jet4sp8_size=3.7 MB
7 |
8 | [Code]
9 | const
10 | jet4sp8_url = 'http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9f6d-2fe191c51469/Jet40SP8_9xNT.exe';
11 |
12 | procedure jet4sp8(minVersion: string);
13 | begin
14 | // check for Jet4 Service Pack 8 installation
15 | if (compareversion(fileversion(ExpandConstant('{sys}{\}msjet40.dll')), minVersion) < 0) then
16 | AddProduct('jet4sp8.exe',
17 | '/q:a /c:"install /qb /l"',
18 | CustomMessage('jet4sp8_title'),
19 | CustomMessage('jet4sp8_size'),
20 | jet4sp8_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/kb835732.iss:
--------------------------------------------------------------------------------
1 | ; required by .NET Framework 2.0 Service Pack 1 on Windows 2000 Service Pack 2-4
2 | ; http://www.microsoft.com/technet/security/bulletin/ms04-011.mspx
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyId=0692C27E-F63A-414C-B3EB-D2342FBB6C00
4 |
5 | [CustomMessages]
6 | en.kb835732_title=Windows 2000 Security Update (KB835732)
7 | de.kb835732_title=Windows 2000 Sicherheitsupdate (KB835732)
8 |
9 | kb835732_size=6.8 MB
10 |
11 | [Code]
12 | const
13 | kb835732_url = 'http://download.microsoft.com/download/f/a/a/faa796aa-399d-437a-9284-c3536e9f2e6e/Windows2000-KB835732-x86-ENU.EXE';
14 |
15 | procedure kb835732();
16 | begin
17 | if (exactwinversion(5, 0) and (minwinspversion(5, 0, 2) and maxwinspversion(5, 0, 4))) then begin
18 | if (not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB835732\Filelist')) then
19 | AddProduct('kb835732.exe',
20 | '/passive /norestart',
21 | CustomMessage('kb835732_title'),
22 | CustomMessage('kb835732_size'),
23 | kb835732_url,
24 | false, false, false);
25 | end;
26 | end;
27 |
28 | [Setup]
29 |
--------------------------------------------------------------------------------
/exe/scripts/products/mdac28.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | mdac28_title=Microsoft Data Access Components 2.8
3 |
4 | mdac28_size=5.4 MB
5 |
6 | [Code]
7 | const
8 | mdac28_url = 'http://download.microsoft.com/download/c/d/f/cdfd58f1-3973-4c51-8851-49ae3777586f/MDAC_TYP.EXE';
9 |
10 | procedure mdac28(minVersion: string);
11 | var
12 | version: string;
13 | begin
14 | // check for MDAC installation
15 | RegQueryStringValue(HKLM, 'Software\Microsoft\DataAccess', 'FullInstallVer', version);
16 | if (compareversion(version, minVersion) < 0) then
17 | AddProduct('mdac28.exe',
18 | '/q:a /c:"install /qb /l"',
19 | CustomMessage('mdac28_title'),
20 | CustomMessage('mdac28_size'),
21 | mdac28_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/msi20.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi20_title=Windows Installer 2.0
3 |
4 | msi20_size=1.7 MB
5 |
6 | [Code]
7 | const
8 | msi20_url = 'http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe';
9 |
10 | procedure msi20(minVersion: string);
11 | begin
12 | // Check for required Windows Installer 2.0 on Windows 98 and ME
13 | if (IsX86() and maxwinversion(4, 9) and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then
14 | AddProduct('msi20.exe',
15 | '/q:a /c:"msiinst /delayrebootq"',
16 | CustomMessage('msi20_title'),
17 | CustomMessage('msi20_size'),
18 | msi20_url,
19 | false, false, false);
20 | end;
21 |
22 | [Setup]
23 |
--------------------------------------------------------------------------------
/exe/scripts/products/msi31.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi31_title=Windows Installer 3.1
3 |
4 | msi31_size=2.5 MB
5 |
6 | [Code]
7 | const
8 | msi31_url = 'http://download.microsoft.com/download/1/4/7/147ded26-931c-4daf-9095-ec7baf996f46/WindowsInstaller-KB893803-v2-x86.exe';
9 |
10 | procedure msi31(minVersion: string);
11 | begin
12 | // Check for required Windows Installer 3.0 on Windows 2000 or higher
13 | if (IsX86() and minwinversion(5, 0) and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then
14 | AddProduct('msi31.exe',
15 | '/passive /norestart',
16 | CustomMessage('msi31_title'),
17 | CustomMessage('msi31_size'),
18 | msi31_url,
19 | false, false, false);
20 | end;
21 |
22 | [Setup]
23 |
--------------------------------------------------------------------------------
/exe/scripts/products/msi45.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi45_title=Windows Installer 4.5
3 |
4 | msi45win60_size=1.7 MB
5 | msi45win52_size=3.0 MB
6 | msi45win51_size=3.2 MB
7 |
8 | [Code]
9 | const
10 | msi45win60_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x86.msu';
11 | msi45win52_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x86.exe';
12 | msi45win51_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe';
13 |
14 | procedure msi45(minVersion: string);
15 | begin
16 | if (IsX86() and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then begin
17 | if minwinversion(6, 0) then
18 | AddProduct('msi45_60.msu',
19 | '/quiet /norestart',
20 | CustomMessage('msi45_title'),
21 | CustomMessage('msi45win60_size'),
22 | msi45win60_url,
23 | false, false, false)
24 | else if minwinversion(5, 2) then
25 | AddProduct('msi45_52.exe',
26 | '/quiet /norestart',
27 | CustomMessage('msi45_title'),
28 | CustomMessage('msi45win52_size'),
29 | msi45win52_url,
30 | false, false, false)
31 | else if minwinversion(5, 1) then
32 | AddProduct('msi45_51.exe',
33 | '/quiet /norestart',
34 | CustomMessage('msi45_title'),
35 | CustomMessage('msi45win51_size'),
36 | msi45win51_url,
37 | false, false, false);
38 | end;
39 | end;
40 |
41 | [Setup]
42 |
--------------------------------------------------------------------------------
/exe/scripts/products/msiproduct.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | #ifdef UNICODE
3 | #define AW "W"
4 | #else
5 | #define AW "A"
6 | #endif
7 |
8 | type
9 | INSTALLSTATE = Longint;
10 | const
11 | INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function.
12 | INSTALLSTATE_UNKNOWN = -1; // The product is neither advertised or installed.
13 | INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed.
14 | INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
15 | INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
16 |
17 | function MsiQueryProductState(szProduct: string): INSTALLSTATE;
18 | external 'MsiQueryProductState{#AW}@msi.dll stdcall';
19 |
20 | function MsiEnumRelatedProducts(szUpgradeCode: string; nReserved: dword; nIndex: dword; szProductCode: string): integer;
21 | external 'MsiEnumRelatedProducts{#AW}@msi.dll stdcall';
22 |
23 | function MsiGetProductInfo(szProductCode: string; szProperty: string; szValue: string; var nvalueSize: dword): integer;
24 | external 'MsiGetProductInfo{#AW}@msi.dll stdcall';
25 |
26 | function msiproduct(productID: string): boolean;
27 | begin
28 | Result := MsiQueryProductState(productID) = INSTALLSTATE_DEFAULT;
29 | end;
30 |
31 | function msiproductupgrade(upgradeCode: string; minVersion: string): boolean;
32 | var
33 | productCode, version: string;
34 | valueSize: dword;
35 | begin
36 | SetLength(productCode, 39);
37 | Result := false;
38 |
39 | if (MsiEnumRelatedProducts(upgradeCode, 0, 0, productCode) = 0) then begin
40 | SetLength(version, 39);
41 | valueSize := Length(version);
42 |
43 | if (MsiGetProductInfo(productCode, 'VersionString', version, valueSize) = 0) then begin
44 | Result := compareversion(version, minVersion) >= 0;
45 | end;
46 | end;
47 | end;
48 |
49 | [Setup]
50 |
--------------------------------------------------------------------------------
/exe/scripts/products/nodejs10x.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | nodejs10x_title=Node.js
5 |
6 | nodejs10x_size=17.4 MB
7 |
8 | [Code]
9 | const
10 | nodejs10x_url = 'http://nodejs.org/dist/v10.17.0/node-v10.17.0-x64.msi';
11 |
12 | procedure nodejs10x(minVersion: string);
13 | begin
14 | //check for node 10.x installation
15 | if (compareversion(fileversion(ExpandConstant('{pf64}{\}nodejs{\}node.exe')), minVersion) < 0) then
16 | AddProduct('nodejs10x.msi',
17 | '/qb',
18 | CustomMessage('nodejs10x_title'),
19 | CustomMessage('nodejs10x_size'),
20 | nodejs10x_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/nodejs4x.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | nodejs4x_title=Node.js
5 |
6 | en.nodejs4x_size=10.5 MB
7 | ; de.nodejs4x_size=10,5 MB
8 |
9 | [Code]
10 | const
11 | nodejs4x_url = 'http://nodejs.org/dist/v4.6.1/node-v4.6.1-x86.msi';
12 |
13 | procedure nodejs4x(minVersion: string);
14 | begin
15 | //check for node 4.x installation
16 | if (compareversion(fileversion(ExpandConstant('{pf32}{\}nodejs{\}node.exe')), minVersion) < 0) then
17 | AddProduct('nodejs4x.msi',
18 | '/qb',
19 | CustomMessage('nodejs4x_title'),
20 | CustomMessage('nodejs4x_size'),
21 | nodejs4x_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/exe/scripts/products/nodejs6x.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | nodejs6x_title=Node.js
5 |
6 | nodejs6x_size=12.4 MB
7 |
8 | [Code]
9 | const
10 | nodejs6x_url = 'http://nodejs.org/dist/v6.11.3/node-v6.11.3-x64.msi';
11 |
12 | procedure nodejs6x(minVersion: string);
13 | begin
14 | //check for node 6.x installation
15 | if (compareversion(fileversion(ExpandConstant('{pf64}{\}nodejs{\}node.exe')), minVersion) < 0) then
16 | AddProduct('nodejs6x.msi',
17 | '/qb',
18 | CustomMessage('nodejs6x_title'),
19 | CustomMessage('nodejs6x_size'),
20 | nodejs6x_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/nodejs8x.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | nodejs8x_title=Node.js
5 |
6 | nodejs8x_size=15.8 MB
7 |
8 | [Code]
9 | const
10 | nodejs8x_url = 'http://nodejs.org/dist/v8.11.4/node-v8.11.4-x64.msi';
11 |
12 | procedure nodejs8x(minVersion: string);
13 | begin
14 | //check for node 8.x installation
15 | if (compareversion(fileversion(ExpandConstant('{pf64}{\}nodejs{\}node.exe')), minVersion) < 0) then
16 | AddProduct('nodejs8x.msi',
17 | '/qb',
18 | CustomMessage('nodejs8x_title'),
19 | CustomMessage('nodejs8x_size'),
20 | nodejs8x_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/postgresql.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | postgresql_title=PostgreSQL
5 |
6 | postgresql_size=62.0 MB
7 |
8 | [Code]
9 | const
10 | postgresql_url = 'http://get.enterprisedb.com/postgresql/postgresql-9.5.4-1-windows-x64.exe';
11 |
12 | procedure postgresql(minVersion: string);
13 | begin
14 | //check for postgresql binaries
15 | if (compareversion(fileversion(ExpandConstant('{pf64}{\}postgresql{\}9.5{\}bin{\}postgres.exe')), minVersion) < 0) then
16 | AddProduct('postgresql.exe',
17 | '--unattendedmodeui minimal',
18 | CustomMessage('postgresql_title'),
19 | CustomMessage('postgresql_size'),
20 | postgresql_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/rabbitmq.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | rabbitmq_title=RabbitMQ
5 |
6 | rabbitmq_size=5.3 MB
7 |
8 | [Code]
9 | const
10 | rabbitmq_url = 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5.exe';
11 |
12 | procedure rabbitmq(minVersion: string);
13 | begin
14 | //check for postgresql binaries
15 | if (FileExists(ExpandConstant('{pf64}{\}RabbitMQ Server{\}rabbitmq_server-3.6.5{\}sbin{\}rabbitmq-server.bat')) <> True ) then
16 | AddProduct('rabbitmq-server.exe',
17 | '',
18 | CustomMessage('rabbitmq_title'),
19 | CustomMessage('rabbitmq_size'),
20 | rabbitmq_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/redis.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | redis_title=PostgreSQL
5 |
6 | redis_size=5.9 MB
7 |
8 | [Code]
9 | const
10 | redis_url = 'http://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.msi';
11 |
12 | procedure redis(minVersion: string);
13 | begin
14 | //check for postgresql binaries
15 | if (FileExists(ExpandConstant('{pf64}{\}Redis{\}redis-server.exe')) <> True ) then
16 | AddProduct('redis.msi',
17 | '/qb',
18 | CustomMessage('redis_title'),
19 | CustomMessage('redis_size'),
20 | redis_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/exe/scripts/products/sql2005express.iss:
--------------------------------------------------------------------------------
1 | ; SQL Server Express is supported on x64 and EMT64 systems in Windows On Windows (WOW). SQL Server Express is not supported on IA64 systems
2 | ; requires Microsoft .NET Framework 2.0 or later
3 | ; SQLEXPR32.EXE is a smaller package that can be used to install SQL Server Express on 32-bit operating systems only. The larger SQLEXPR.EXE package supports installing onto both 32-bit and 64-bit (WOW install) operating systems. There is no other difference between these packages.
4 | ; http://www.microsoft.com/download/en/details.aspx?id=15291
5 |
6 | [CustomMessages]
7 | sql2005express_title=SQL Server 2005 Express SP3
8 |
9 | sql2005express_size=38.1 MB
10 | sql2005express_size_x64=58.1 MB
11 |
12 | [Code]
13 | const
14 | sql2005express_url = 'http://download.microsoft.com/download/4/B/E/4BED5810-C8C0-4697-BDC3-DBC114B8FF6D/SQLEXPR32_NLA.EXE';
15 | sql2005express_url_x64 = 'http://download.microsoft.com/download/4/B/E/4BED5810-C8C0-4697-BDC3-DBC114B8FF6D/SQLEXPR_NLA.EXE';
16 |
17 | procedure sql2005express();
18 | var
19 | version: string;
20 | begin
21 | // CHECK NOT FINISHED YET
22 | // RTM: 9.00.1399.06
23 | // Service Pack 1: 9.1.2047.00
24 | // Service Pack 2: 9.2.3042.00
25 | // TODO: Newer detection method required for SP3 and x64
26 | // Service Pack 3: 9.00.4035.00
27 | //RegQueryDWordValue(HKLM, 'Software\Microsoft\Microsoft SQL Server\90\DTS\Setup', 'Install', version);
28 | RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion', 'CurrentVersion', version);
29 | if (version < '9.00.4035') then begin
30 | if (not IsIA64()) then
31 | AddProduct('sql2005express' + GetArchitectureString() + '.exe',
32 | '/qb ADDLOCAL=ALL INSTANCENAME=SQLEXPRESS',
33 | CustomMessage('sql2005express_title'),
34 | CustomMessage('sql2005express_size' + GetArchitectureString()),
35 | GetString(sql2005express_url, sql2005express_url_x64, ''),
36 | false, false, false);
37 | end;
38 | end;
39 |
40 | [Setup]
41 |
--------------------------------------------------------------------------------
/exe/scripts/products/sql2008express.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP
2 | ; requires Microsoft .NET Framework 3.5 SP 1 or later
3 | ; requires Windows Installer 4.5 or later
4 | ; SQL Server Express is supported on x64 and EMT64 systems in Windows On Windows (WOW). SQL Server Express is not supported on IA64 systems
5 | ; SQLEXPR32.EXE is a smaller package that can be used to install SQL Server Express on 32-bit operating systems only. The larger SQLEXPR.EXE package supports installing onto both 32-bit and 64-bit (WOW install) operating systems. There is no other difference between these packages.
6 | ; http://www.microsoft.com/download/en/details.aspx?id=3743
7 |
8 | [CustomMessages]
9 | sql2008expressr2_title=SQL Server 2008 Express R2
10 |
11 | sql2008expressr2_size=58.2 MB
12 | sql2008expressr2_size_x64=74.1 MB
13 |
14 | [Code]
15 | const
16 | sql2008expressr2_url = 'http://download.microsoft.com/download/5/1/A/51A153F6-6B08-4F94-A7B2-BA1AD482BC75/SQLEXPR32_x86_ENU.exe';
17 | sql2008expressr2_url_x64 = 'http://download.microsoft.com/download/5/1/A/51A153F6-6B08-4F94-A7B2-BA1AD482BC75/SQLEXPR_x64_ENU.exe';
18 |
19 | procedure sql2008express();
20 | var
21 | version: string;
22 | begin
23 | // This check does not take into account that a full version of SQL Server could be installed,
24 | // making Express unnecessary.
25 | RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion', 'CurrentVersion', version);
26 | if (compareversion(version, '10.5') < 0) then begin
27 | if (not IsIA64()) then
28 | AddProduct('sql2008expressr2' + GetArchitectureString() + '.exe',
29 | '/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=Install /FEATURES=All /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSYSADMINACCOUNTS="builtin\administrators"',
30 | CustomMessage('sql2008expressr2_title'),
31 | CustomMessage('sql2008expressr2_size' + GetArchitectureString()),
32 | GetString(sql2008expressr2_url, sql2008expressr2_url_x64, ''),
33 | false, false, false);
34 | end;
35 | end;
36 |
37 | [Setup]
38 |
--------------------------------------------------------------------------------
/exe/scripts/products/sqlcompact35sp2.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | sqlcompact35sp2_title=SQL Server Compact 3.5 Service Pack 2
3 |
4 | sqlcompact35sp2_size=5.3 MB
5 |
6 | [Code]
7 | const
8 | sqlcompact35sp2_url = 'http://download.microsoft.com/download/E/C/1/EC1B2340-67A0-4B87-85F0-74D987A27160/SSCERuntime-ENU.exe';
9 |
10 | procedure sqlcompact35sp2();
11 | begin
12 | if (isX86() and not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5')) then
13 | AddProduct('sqlcompact35sp2.msi',
14 | '/qb',
15 | CustomMessage('sqlcompact35sp2_title'),
16 | CustomMessage('sqlcompact35sp2_size'),
17 | sqlcompact35sp2_url,
18 | false, false, false);
19 | end;
20 |
21 | [Setup]
22 |
--------------------------------------------------------------------------------
/exe/scripts/products/stringversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | function stringtoversion(var temp: String): Integer;
3 | var
4 | part: String;
5 | pos1: Integer;
6 |
7 | begin
8 | if (Length(temp) = 0) then begin
9 | Result := -1;
10 | Exit;
11 | end;
12 |
13 | pos1 := Pos('.', temp);
14 | if (pos1 = 0) then begin
15 | Result := StrToInt(temp);
16 | temp := '';
17 | end else begin
18 | part := Copy(temp, 1, pos1 - 1);
19 | temp := Copy(temp, pos1 + 1, Length(temp));
20 | Result := StrToInt(part);
21 | end;
22 | end;
23 |
24 | function compareinnerversion(var x, y: String): Integer;
25 | var
26 | num1, num2: Integer;
27 |
28 | begin
29 | num1 := stringtoversion(x);
30 | num2 := stringtoversion(y);
31 | if (num1 = -1) and (num2 = -1) then begin
32 | Result := 0;
33 | Exit;
34 | end;
35 |
36 | if (num1 < 0) then begin
37 | num1 := 0;
38 | end;
39 | if (num2 < 0) then begin
40 | num2 := 0;
41 | end;
42 |
43 | if (num1 < num2) then begin
44 | Result := -1;
45 | end else if (num1 > num2) then begin
46 | Result := 1;
47 | end else begin
48 | Result := compareinnerversion(x, y);
49 | end;
50 | end;
51 |
52 | function compareversion(versionA, versionB: String): Integer;
53 | var
54 | temp1, temp2: String;
55 |
56 | begin
57 | temp1 := versionA;
58 | temp2 := versionB;
59 | Result := compareinnerversion(temp1, temp2);
60 | end;
61 |
62 | [Setup]
63 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2005.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 3, Windows 98, Windows 98 Second Edition, Windows ME, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.0
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=3387
4 |
5 | [CustomMessages]
6 | vcredist2005_title=Visual C++ 2005 Redistributable
7 | vcredist2005_title_x64=Visual C++ 2005 64-Bit Redistributable
8 |
9 | vcredist2005_size=2.6 MB
10 | vcredist2005_size_x64=4.1 MB
11 |
12 | [Code]
13 | const
14 | vcredist2005_url = 'http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE';
15 | vcredist2005_url_x64 = 'http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE';
16 |
17 | vcredist2005_upgradecode = '{86C9D5AA-F00C-4921-B3F2-C60AF92E2844}';
18 | vcredist2005_upgradecode_x64 = '{A8D19029-8E5C-4E22-8011-48070F9E796E}';
19 |
20 | procedure vcredist2005(minVersion: string);
21 | begin
22 | if (not IsIA64()) then begin
23 | if (not msiproductupgrade(GetString(vcredist2005_upgradecode, vcredist2005_upgradecode_x64, ''), minVersion)) then
24 | AddProduct('vcredist2005' + GetArchitectureString() + '.exe',
25 | '/q:a /c:"install /qb /l',
26 | CustomMessage('vcredist2005_title' + GetArchitectureString()),
27 | CustomMessage('vcredist2005_size' + GetArchitectureString()),
28 | GetString(vcredist2005_url, vcredist2005_url_x64, ''),
29 | false, false, false);
30 | end;
31 | end;
32 |
33 | [Setup]
34 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2008.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 4, Windows Server 2003, Windows Vista, Windows XP
2 | ; requires Windows Installer 3.0
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=29
4 |
5 | [CustomMessages]
6 | vcredist2008_title=Visual C++ 2008 Redistributable
7 | vcredist2008_title_x64=Visual C++ 2008 64-Bit Redistributable
8 |
9 | vcredist2008_size=4.3 MB
10 | vcredist2008_size_x64=5.0 MB
11 |
12 | [Code]
13 | const
14 | vcredist2008_url = 'http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe';
15 | vcredist2008_url_x64 = 'http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe';
16 |
17 | vcredist2008_upgradecode = '{AA783A14-A7A3-3D33-95F0-9A351D530011}';
18 | vcredist2008_upgradecode_sp1mfc = '{DE2C306F-A067-38EF-B86C-03DE4B0312F9}';
19 | vcredist2008_upgradecode_sp1mfc_x64 = '{FDA45DDF-8E17-336F-A3ED-356B7B7C688A}';
20 |
21 | procedure vcredist2008(minVersion: string);
22 | begin
23 | if (not IsIA64()) then begin
24 | if (not msiproductupgrade(GetString(vcredist2008_upgradecode_sp1mfc, vcredist2008_upgradecode_sp1mfc_x64, ''), minVersion) and not msiproductupgrade(vcredist2008_upgradecode, minVersion)) then
25 | AddProduct('vcredist2008' + GetArchitectureString() + '.exe',
26 | '/q',
27 | CustomMessage('vcredist2008_title' + GetArchitectureString()),
28 | CustomMessage('vcredist2008_size' + GetArchitectureString()),
29 | GetString(vcredist2008_url, vcredist2008_url_x64, ''),
30 | false, false, false);
31 | end;
32 | end;
33 |
34 | [Setup]
35 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2010.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003 R2 (32-Bit x86), Windows Server 2003 Service Pack 2, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=5555
3 |
4 | [CustomMessages]
5 | vcredist2010_title=Visual C++ 2010 Redistributable
6 | vcredist2010_title_x64=Visual C++ 2010 64-Bit Redistributable
7 |
8 | vcredist2010_size=8.6 MB
9 | vcredist2010_size_x64=9.8 MB
10 |
11 | [Code]
12 | const
13 | vcredist2010_url = 'http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe';
14 | vcredist2010_url_x64 = 'http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe';
15 |
16 | vcredist2010_upgradecode = '{1F4F1D2A-D9DA-32CF-9909-48485DA06DD5}';
17 | vcredist2010_upgradecode_x64 = '{5B75F761-BAC8-33BC-A381-464DDDD813A3}';
18 |
19 | procedure vcredist2010(minVersion: string);
20 | begin
21 | if (not IsIA64()) then begin
22 | if (not msiproductupgrade(GetString(vcredist2010_upgradecode, vcredist2010_upgradecode_x64, ''), minVersion)) then
23 | AddProduct('vcredist2010' + GetArchitectureString() + '.exe',
24 | '/passive /norestart',
25 | CustomMessage('vcredist2010_title' + GetArchitectureString()),
26 | CustomMessage('vcredist2010_size' + GetArchitectureString()),
27 | GetString(vcredist2010_url, vcredist2010_url_x64, ''),
28 | false, false, false);
29 | end;
30 | end;
31 |
32 | [Setup]
33 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2012.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=30679
3 |
4 | [CustomMessages]
5 | vcredist2012_title=Visual C++ 2012 Redistributable
6 | vcredist2012_title_x64=Visual C++ 2012 64-Bit Redistributable
7 |
8 | vcredist2012_size=6.3 MB
9 | vcredist2012_size_x64=6.9 MB
10 |
11 | [Code]
12 | const
13 | vcredist2012_url = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe';
14 | vcredist2012_url_x64 = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe';
15 |
16 | vcredist2012_upgradecode = '{4121ED58-4BD9-3E7B-A8B5-9F8BAAE045B7}';
17 | vcredist2012_upgradecode_x64 = '{EFA6AFA1-738E-3E00-8101-FD03B86B29D1}';
18 |
19 | procedure vcredist2012(minVersion: string);
20 | begin
21 | if (not IsIA64()) then begin
22 | if (not msiproductupgrade(GetString(vcredist2012_upgradecode, vcredist2012_upgradecode_x64, ''), minVersion)) then
23 | AddProduct('vcredist2012' + GetArchitectureString() + '.exe',
24 | '/passive /norestart',
25 | CustomMessage('vcredist2012_title' + GetArchitectureString()),
26 | CustomMessage('vcredist2012_size' + GetArchitectureString()),
27 | GetString(vcredist2012_url, vcredist2012_url_x64, ''),
28 | false, false, false);
29 | end;
30 | end;
31 |
32 | [Setup]
33 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2013.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2012 R2, Windows Vista Service Pack 2, Windows XP
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=40784
3 |
4 | [CustomMessages]
5 | vcredist2013_title=Visual C++ 2013 Redistributable
6 | vcredist2013_title_x64=Visual C++ 2013 64-Bit Redistributable
7 |
8 | vcredist2013_size=6.2 MB
9 | vcredist2013_size_x64=6.9 MB
10 |
11 | [Code]
12 | const
13 | vcredist2013_url = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe';
14 | vcredist2013_url_x64 = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe';
15 |
16 | vcredist2013_upgradecode = '{B59F5BF1-67C8-3802-8E59-2CE551A39FC5}';
17 | vcredist2013_upgradecode_x64 = '{20400CF0-DE7C-327E-9AE4-F0F38D9085F8}';
18 |
19 | procedure vcredist2013(minVersion: string);
20 | begin
21 | if (not IsIA64()) then begin
22 | if (not msiproductupgrade(GetString(vcredist2013_upgradecode, vcredist2013_upgradecode_x64, ''), minVersion)) then
23 | AddProduct('vcredist2013' + GetArchitectureString() + '.exe',
24 | '/passive /norestart',
25 | CustomMessage('vcredist2013_title' + GetArchitectureString()),
26 | CustomMessage('vcredist2013_size' + GetArchitectureString()),
27 | GetString(vcredist2013_url, vcredist2013_url_x64, ''),
28 | false, false, false);
29 | end;
30 | end;
31 |
32 | [Setup]
33 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2015.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=48145
3 |
4 | [CustomMessages]
5 | vcredist2015_title=Visual C++ 2015 Redistributable
6 | vcredist2015_title_x64=Visual C++ 2015 64-Bit Redistributable
7 |
8 | vcredist2015_size=13.8 MB
9 | vcredist2015_size_x64=14.6 MB
10 |
11 | [Code]
12 | const
13 | vcredist2015_url = 'http://download.microsoft.com/download/d/e/c/dec58546-c2f5-40a7-b38e-4df8d60b9764/vc_redist.x86.exe';
14 | vcredist2015_url_x64 = 'http://download.microsoft.com/download/2/c/6/2c675af0-2155-4961-b32e-289d7addfcec/vc_redist.x64.exe';
15 |
16 | vcredist2015_upgradecode = '{65E5BD06-6392-3027-8C26-853107D3CF1A}';
17 | vcredist2015_upgradecode_x64 = '{36F68A90-239C-34DF-B58C-64B30153CE35}';
18 |
19 | procedure vcredist2015(minVersion: string);
20 | begin
21 | if (not IsIA64()) then begin
22 | if (not msiproductupgrade(GetString(vcredist2015_upgradecode, vcredist2015_upgradecode_x64, ''), minVersion)) then
23 | AddProduct('vcredist2015' + GetArchitectureString() + '.exe',
24 | '/passive /norestart',
25 | CustomMessage('vcredist2015_title' + GetArchitectureString()),
26 | CustomMessage('vcredist2015_size' + GetArchitectureString()),
27 | GetString(vcredist2015_url, vcredist2015_url_x64, ''),
28 | false, false, false);
29 | end;
30 | end;
31 |
32 | [Setup]
33 |
--------------------------------------------------------------------------------
/exe/scripts/products/vcredist2017.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.visualstudio.com/en-us/downloads/
3 |
4 | [CustomMessages]
5 | vcredist2017_title=Visual C++ 2017 Redistributable
6 | vcredist2017_title_x64=Visual C++ 2017 64-Bit Redistributable
7 |
8 | vcredist2017_size=13.7 MB
9 | vcredist2017_size_x64=14.5 MB
10 |
11 | [Code]
12 | const
13 | vcredist2017_url = 'http://download.microsoft.com/download/1/f/e/1febbdb2-aded-4e14-9063-39fb17e88444/vc_redist.x86.exe';
14 | vcredist2017_url_x64 = 'http://download.microsoft.com/download/3/b/f/3bf6e759-c555-4595-8973-86b7b4312927/vc_redist.x64.exe';
15 |
16 | vcredist2017_upgradecode = '{65E5BD06-6392-3027-8C26-853107D3CF1A}';
17 | vcredist2017_upgradecode_x64 = '{36F68A90-239C-34DF-B58C-64B30153CE35}';
18 |
19 | procedure vcredist2017(minVersion: string);
20 | begin
21 | if (not IsIA64()) then begin
22 | if (not msiproductupgrade(GetString(vcredist2017_upgradecode, vcredist2017_upgradecode_x64, ''), minVersion)) then
23 | AddProduct('vcredist2017' + GetArchitectureString() + '.exe',
24 | '/passive /norestart',
25 | CustomMessage('vcredist2017_title' + GetArchitectureString()),
26 | CustomMessage('vcredist2017_size' + GetArchitectureString()),
27 | GetString(vcredist2017_url, vcredist2017_url_x64, ''),
28 | false, false, false);
29 | end;
30 | end;
31 |
32 | [Setup]
33 |
--------------------------------------------------------------------------------
/exe/scripts/products/wic.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003, Windows Server 2003 R2 Datacenter Edition (32-Bit x86), Windows Server 2003 R2 Enterprise Edition (32-Bit x86), Windows Server 2003 R2 Standard Edition (32-bit x86), Windows XP Service Pack 2
2 |
3 | [CustomMessages]
4 | wic_title=Windows Imaging Component
5 |
6 | wic_size=1.2 MB
7 |
8 | [Code]
9 | const
10 | wic_url = 'http://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_';
11 | wic_url_x64 = 'http://download.microsoft.com/download/6/4/5/645fed5f-a6e7-44d9-9d10-fe83348796b0/wic_x64';
12 |
13 | function GetConvertedLanguageID(): string;
14 | begin
15 | Result := 'enu';
16 | case ActiveLanguage() of
17 | 'zh': // Chinese
18 | Result := 'chs';
19 | 'de': // German
20 | Result := 'deu';
21 | 'es': // Spanish
22 | Result := 'esn';
23 | 'fr': // French
24 | Result := 'fra';
25 | 'it': // Italian
26 | Result := 'ita';
27 | 'ja': // Japanese
28 | Result := 'jpn';
29 | 'nl': // Dutch
30 | Result := 'nld';
31 | 'pt': // Portuguese
32 | Result := 'ptb';
33 | 'ru': // Russian
34 | Result := 'rus';
35 | end;
36 | end;
37 |
38 | procedure wic();
39 | begin
40 | if (not IsIA64()) then begin
41 | // only needed on Windows XP SP2 or Windows Server 2003
42 | if ((exactwinversion(5, 1) and exactwinspversion(5, 1, 2)) or (exactwinversion(5, 2))) then begin
43 | if (not FileExists(GetEnv('windir') + '\system32\windowscodecs.dll')) then
44 | AddProduct('wic' + GetArchitectureString() + '_' + GetConvertedLanguageID() + '.exe',
45 | '/q',
46 | CustomMessage('wic_title'),
47 | CustomMessage('wic_size'),
48 | GetString(wic_url, wic_url_x64, '') + GetConvertedLanguageID() + '.exe',
49 | false, false, false);
50 | end;
51 | end;
52 | end;
53 |
54 | [Setup]
55 |
--------------------------------------------------------------------------------
/exe/scripts/products/winversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | var
3 | WindowsVersion: TWindowsVersion;
4 |
5 | procedure initwinversion();
6 | begin
7 | GetWindowsVersionEx(WindowsVersion);
8 | end;
9 |
10 | function exactwinversion(MajorVersion, MinorVersion: integer): boolean;
11 | begin
12 | Result := (WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor = MinorVersion);
13 | end;
14 |
15 | function minwinversion(MajorVersion, MinorVersion: integer): boolean;
16 | begin
17 | Result := (WindowsVersion.Major > MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor >= MinorVersion));
18 | end;
19 |
20 | function maxwinversion(MajorVersion, MinorVersion: integer): boolean;
21 | begin
22 | Result := (WindowsVersion.Major < MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor <= MinorVersion));
23 | end;
24 |
25 | function exactwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
26 | begin
27 | if exactwinversion(MajorVersion, MinorVersion) then
28 | Result := WindowsVersion.ServicePackMajor = SpVersion
29 | else
30 | Result := true;
31 | end;
32 |
33 | function minwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
34 | begin
35 | if exactwinversion(MajorVersion, MinorVersion) then
36 | Result := WindowsVersion.ServicePackMajor >= SpVersion
37 | else
38 | Result := true;
39 | end;
40 |
41 | function maxwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
42 | begin
43 | if exactwinversion(MajorVersion, MinorVersion) then
44 | Result := WindowsVersion.ServicePackMajor <= SpVersion
45 | else
46 | Result := true;
47 | end;
48 |
49 | [Setup]
50 |
--------------------------------------------------------------------------------
/exe/scripts/service.pas:
--------------------------------------------------------------------------------
1 | procedure Nssm(Command: String; SrvName: String; Param: String);
2 | var
3 | ResultCode: Integer;
4 | NssmParam: String;
5 | begin
6 | NssmParam := Command + ' ' + SrvName + ' ';
7 |
8 | if Param <> '' then
9 | NssmParam := NssmParam + ' ' + Param;
10 |
11 | Exec(
12 | ExpandConstant('{#NSSM}'),
13 | NssmParam,
14 | '',
15 | SW_HIDE,
16 | ewWaitUntilTerminated,
17 | ResultCode);
18 |
19 | Log('Run nssm ' + NssmParam + 'Returned code ' + IntToStr(ResultCode));
20 | end;
21 |
22 | procedure InstallSrv(SrvName: String; SrvExec: String; SrvDscr: String; RunDir: String; Env: String; StdOut: String; StdErr: String);
23 |
24 | begin
25 | Nssm('install', SrvName, SrvExec);
26 | if SrvDscr <> '' then
27 | Nssm('set', SrvName, 'Description ' + SrvDscr);
28 |
29 | if RunDir <> '' then
30 | Nssm('set', SrvName, 'AppDirectory ' + RunDir);
31 |
32 | if Env <> '' then
33 | Nssm('set', SrvName, 'AppEnvironmentExtra ' + Env);
34 |
35 | if StdOut <> '' then
36 | Nssm('set', SrvName, 'AppStdout ' + StdOut);
37 |
38 | if StdErr <> '' then
39 | Nssm('set', SrvName, 'AppStderr ' + StdErr);
40 | end;
41 |
42 | procedure StopSrv(SrvName: String);
43 |
44 | var ResultCode: Integer;
45 | begin
46 | Exec(
47 | 'sc',
48 | 'stop ' + SrvName,
49 | '',
50 | SW_HIDE,
51 | ewWaitUntilTerminated,
52 | ResultCode);
53 |
54 | Log('Stop service ' + SrvName + 'Returned code ' + IntToStr(ResultCode));
55 | end;
56 |
57 | procedure RemoveSrv(SrvName: String);
58 |
59 | begin
60 | StopSrv(SrvName);
61 | Nssm('remove', SrvName, 'confirm');
62 | end;
63 |
--------------------------------------------------------------------------------
/rpm/bin/documentserver-configure.sh.m4:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | DIR="/var/www/M4_DS_PREFIX"
4 | LOCAL_CONFIG="/etc/M4_DS_PREFIX/local.json"
5 | EXAMPLE_CONFIG="/etc/M4_DS_PREFIX-example/local.json"
6 | JSON_BIN="$DIR/npm/json"
7 | JSON="$JSON_BIN -I -q -f $LOCAL_CONFIG"
8 | JSON_EXAMPLE="$JSON_BIN -I -q -f $EXAMPLE_CONFIG"
9 |
10 | AMQP_SERVER_TYPE=${AMQP_SERVER_TYPE:-rabbitmq}
11 |
12 | MYSQL=""
13 | PSQL=""
14 | CREATEDB=""
15 | DB_TYPE=${DB_TYPE:-postgres}
16 | DB_PORT=""
17 | DS_PORT=${DS_PORT:-80}
18 | # DOCSERVICE_PORT=${DOCSERVICE_PORT:-8000}
19 | # EXAMPLE_PORT=${EXAMPLE_PORT:-3000}
20 |
21 | JWT_ENABLED=${JWT_ENABLED:-false}
22 | JWT_SECRET=${JWT_SECRET:-secret}
23 | JWT_HEADER=${JWT_HEADER:-Authorization}
24 |
25 | [ $(id -u) -ne 0 ] && { echo "Root privileges required"; exit 1; }
26 |
27 | create_local_configs(){
28 | for i in $LOCAL_CONFIG $EXAMPLE_CONFIG; do
29 | if [ ! -f ${i} ]; then
30 | install -m 640 -D /dev/null ${i}
31 | echo {} > ${i}
32 | fi
33 | done
34 | }
35 |
36 | tune_local_configs(){
37 | for i in $LOCAL_CONFIG $EXAMPLE_CONFIG; do
38 | if [ -f ${i} ]; then
39 | chown ds:ds -R ${i}
40 | fi
41 | done
42 | }
43 |
44 | restart_services() {
45 | [ -a /etc/nginx/conf.d/default.conf ] && \
46 | mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.old
47 |
48 | [ -a /etc/nginx/conf.d/onlyoffice-documentserver.conf ] && \
49 | mv /etc/nginx/conf.d/onlyoffice-documentserver.conf /etc/nginx/conf.d/onlyoffice-documentserver.conf.old
50 |
51 | echo -n "Restarting services... "
52 | for SVC in supervisord nginx
53 | do
54 | systemctl restart $SVC
55 | done
56 | echo "OK"
57 | }
58 |
59 | save_db_params(){
60 | $JSON -e "if(this.services===undefined)this.services={};"
61 | $JSON -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
62 | $JSON -e "if(this.services.CoAuthoring.sql===undefined)this.services.CoAuthoring.sql={};"
63 | $JSON -e "this.services.CoAuthoring.sql.dbHost = '$DB_HOST'"
64 | $JSON -e "this.services.CoAuthoring.sql.dbName= '$DB_NAME'"
65 | $JSON -e "this.services.CoAuthoring.sql.dbUser = '$DB_USER'"
66 | $JSON -e "this.services.CoAuthoring.sql.dbPass = '$DB_PWD'"
67 | $JSON -e "this.services.CoAuthoring.sql.type = '$DB_TYPE'"
68 | $JSON -e "this.services.CoAuthoring.sql.dbPort = '$DB_PORT'"
69 | }
70 |
71 | save_rabbitmq_params(){
72 | $JSON -e "if(this.queue===undefined)this.queue={};"
73 | $JSON -e "this.queue.type = 'rabbitmq'"
74 | $JSON -e "if(this.rabbitmq===undefined)this.rabbitmq={};"
75 | $JSON -e "this.rabbitmq.url = '${AMQP_SERVER_URL}'"
76 | }
77 |
78 | save_activemq_params(){
79 | $JSON -e "if(this.queue===undefined)this.queue={};"
80 | $JSON -e "this.queue.type = 'activemq'"
81 | $JSON -e "if(this.activemq===undefined)this.activemq={};"
82 | $JSON -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};"
83 |
84 | $JSON -e "this.activemq.connectOptions.host = '${AMQP_SERVER_HOST}'"
85 | if [ ! "${AMQP_SERVER_PORT}" == "" ]; then
86 | $JSON -e "this.activemq.connectOptions.port = '${AMQP_SERVER_PORT}'"
87 | else
88 | $JSON -e "delete this.activemq.connectOptions.port"
89 | fi
90 |
91 | if [ ! "${AMQP_SERVER_USER}" == "" ]; then
92 | $JSON -e "this.activemq.connectOptions.username = '${AMQP_SERVER_USER}'"
93 | else
94 | $JSON -e "delete this.activemq.connectOptions.username"
95 | fi
96 |
97 | if [ ! "${AMQP_SERVER_PWD}" == "" ]; then
98 | $JSON -e "this.activemq.connectOptions.password = '${AMQP_SERVER_PWD}'"
99 | else
100 | $JSON -e "delete this.activemq.connectOptions.password"
101 | fi
102 | }
103 |
104 | save_redis_params(){
105 | $JSON -e "if(this.services===undefined)this.services={};"
106 | $JSON -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
107 | $JSON -e "if(this.services.CoAuthoring.redis===undefined)this.services.CoAuthoring.redis={};"
108 | $JSON -e "this.services.CoAuthoring.redis.host = '$REDIS_HOST'"
109 | }
110 |
111 | save_jwt_params(){
112 | ${JSON} -e "if(this.services===undefined)this.services={};"
113 | ${JSON} -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
114 | ${JSON} -e "if(this.services.CoAuthoring.token===undefined)this.services.CoAuthoring.token={};"
115 |
116 | if [ "${JWT_ENABLED}" == "true" -o "${JWT_ENABLED}" == "false" ]; then
117 | ${JSON} -e "if(this.services.CoAuthoring.token.enable===undefined)this.services.CoAuthoring.token.enable={};"
118 | ${JSON} -e "if(this.services.CoAuthoring.token.enable.request===undefined)this.services.CoAuthoring.token.enable.request={};"
119 | ${JSON} -e "this.services.CoAuthoring.token.enable.browser = ${JWT_ENABLED}"
120 | ${JSON} -e "this.services.CoAuthoring.token.enable.request.inbox = ${JWT_ENABLED}"
121 | ${JSON} -e "this.services.CoAuthoring.token.enable.request.outbox = ${JWT_ENABLED}"
122 | fi
123 |
124 | ${JSON} -e "if(this.services.CoAuthoring.secret===undefined)this.services.CoAuthoring.secret={};"
125 |
126 | ${JSON} -e "if(this.services.CoAuthoring.secret.inbox===undefined)this.services.CoAuthoring.secret.inbox={};"
127 | ${JSON} -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'"
128 |
129 | ${JSON} -e "if(this.services.CoAuthoring.secret.outbox===undefined)this.services.CoAuthoring.secret.outbox={};"
130 | ${JSON} -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'"
131 |
132 | ${JSON} -e "if(this.services.CoAuthoring.secret.session===undefined)this.services.CoAuthoring.secret.session={};"
133 | ${JSON} -e "this.services.CoAuthoring.secret.session.string = '${JWT_SECRET}'"
134 |
135 | ${JSON} -e "if(this.services.CoAuthoring.token.inbox===undefined)this.services.CoAuthoring.token.inbox={};"
136 | ${JSON} -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'"
137 |
138 | ${JSON} -e "if(this.services.CoAuthoring.token.outbox===undefined)this.services.CoAuthoring.token.outbox={};"
139 | ${JSON} -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'"
140 |
141 | if [ -f "${EXAMPLE_CONFIG}" ]; then
142 | ${JSON_EXAMPLE} -e "if(this.server===undefined)this.server={};"
143 | ${JSON_EXAMPLE} -e "if(this.server.token===undefined)this.server.token={};"
144 |
145 | if [ "${JWT_ENABLED}" == "true" -o "${JWT_ENABLED}" == "false" ]; then
146 | ${JSON_EXAMPLE} -e "this.server.token.enable = ${JWT_ENABLED}"
147 | fi
148 | ${JSON_EXAMPLE} -e "this.server.token.secret = '${JWT_SECRET}'"
149 | ${JSON_EXAMPLE} -e "this.server.token.authorizationHeader = '${JWT_HEADER}'"
150 | fi
151 | }
152 |
153 | parse_amqp_url(){
154 | local amqp=${AMQP_SERVER_URL}
155 |
156 | # extract the protocol
157 | local proto="$(echo $amqp | grep :// | sed -e's,^\(.*://\).*,\1,g')"
158 | # remove the protocol
159 | local url="$(echo ${amqp/$proto/})"
160 |
161 | # extract the user and password (if any)
162 | local userpass="$(echo $url | grep @ | cut -d@ -f1)"
163 | local pass=$(echo $userpass | grep : | cut -d: -f2)
164 |
165 | local user
166 | if [ -n "$pass" ]; then
167 | user=$(echo $userpass | grep : | cut -d: -f1)
168 | else
169 | user=$userpass
170 | fi
171 |
172 | # extract the host
173 | local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)"
174 | # by request - try to extract the port
175 | local port="$(echo $hostport | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')"
176 |
177 | local host
178 | if [ -n "$port" ]; then
179 | host=$(echo $hostport | grep : | cut -d: -f1)
180 | else
181 | host=$hostport
182 | port="5672"
183 | fi
184 |
185 | # extract the path (if any)
186 | local path="$(echo $url | grep / | cut -d/ -f2-)"
187 |
188 | AMQP_SERVER_HOST=$host
189 | AMQP_SERVER_PORT=$port
190 | AMQP_SERVER_HOST_PORT_PATH=$hostport$path
191 | AMQP_SERVER_USER=$user
192 | AMQP_SERVER_PWD=$pass
193 | }
194 |
195 | input_db_params(){
196 | echo "Configuring database access... "
197 | read -e -p "Host: " -i "$DB_HOST" DB_HOST
198 | read -e -p "Database name: " -i "$DB_NAME" DB_NAME
199 | read -e -p "User: " -i "$DB_USER" DB_USER
200 | read -e -p "Password: " -s DB_PWD
201 | echo
202 | }
203 |
204 | input_redis_params(){
205 | echo "Configuring redis access... "
206 | read -e -p "Host: " -i "$REDIS_HOST" REDIS_HOST
207 | echo
208 | }
209 |
210 | input_amqp_params(){
211 | echo "Configuring AMQP access... "
212 | read -e -p "Host: " -i "$AMQP_SERVER_HOST_PORT_PATH" AMQP_SERVER_HOST_PORT_PATH
213 | read -e -p "User: " -i "$AMQP_SERVER_USER" AMQP_SERVER_USER
214 | read -e -p "Password: " -s AMQP_SERVER_PWD
215 | AMQP_SERVER_URL=amqp://$AMQP_SERVER_USER:$AMQP_SERVER_PWD@$AMQP_SERVER_HOST_PORT_PATH
216 | echo
217 | }
218 |
219 | execute_postgres_scripts(){
220 | echo -n "Installing PostgreSQL database... "
221 |
222 | if [ ! "$CLUSTER_MODE" = true ]; then
223 | $PSQL -f "$DIR/server/schema/postgresql/removetbl.sql" >/dev/null 2>&1
224 | fi
225 |
226 | $PSQL -f "$DIR/server/schema/postgresql/createdb.sql" >/dev/null 2>&1
227 | echo "OK"
228 | }
229 |
230 | establish_postgres_conn() {
231 | echo -n "Trying to establish PostgreSQL connection... "
232 |
233 | command -v psql >/dev/null 2>&1 || { echo "PostgreSQL client not found"; exit 1; }
234 |
235 | if [ -n "$DB_PWD" ]; then
236 | export PGPASSWORD=$DB_PWD
237 | fi
238 |
239 | PSQL="psql -q -h$DB_HOST -d$DB_NAME -U$DB_USER -w"
240 | $PSQL -c ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
241 |
242 | echo "OK"
243 | }
244 |
245 | execute_mysql_sqript(){
246 | echo -n "Installing MYSQL database... "
247 | $MYSQL -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET utf8 COLLATE 'utf8_general_ci';"
248 | $MYSQL "$DB_NAME" < "$DIR/server/schema/mysql/createdb.sql"
249 | echo "OK"
250 | }
251 |
252 | establish_mysql_conn(){
253 | echo -n "Trying to database MySQL connection... "
254 | command -v mysql >/dev/null 2>&1 || { echo "MySQL client not found"; exit 1; }
255 | MYSQL="mysql -h$DB_HOST -u$DB_USER"
256 | if [ -n "$DB_PWD" ]; then
257 | MYSQL="$MYSQL -p$DB_PWD"
258 | fi
259 |
260 | $MYSQL -e ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
261 |
262 | echo "OK"
263 | }
264 |
265 | execute_db_script(){
266 | case $DB_TYPE in
267 | postgres)
268 | DB_PORT=5432
269 | establish_postgres_conn || exit $?
270 | execute_postgres_scripts || exit $?
271 | ;;
272 | mysql)
273 | DB_PORT=3306
274 | establish_mysql_conn || exit $?
275 | execute_mysql_sqript || exit $?
276 | ;;
277 | *)
278 | echo "Incorrect DB_TYPE value! Possible value of DB_TYPE is 'postgres' or 'mysql'."
279 | exit 1
280 | esac
281 | }
282 |
283 | establish_redis_conn() {
284 | echo -n "Trying to establish redis connection... "
285 |
286 | exec {FD}<> /dev/tcp/$REDIS_HOST/6379 && exec {FD}>&-
287 |
288 | if [ "$?" != 0 ]; then
289 | echo "FAILURE";
290 | exit 1;
291 | fi
292 |
293 | echo "OK"
294 | }
295 |
296 | establish_amqp_conn() {
297 | echo -n "Trying to establish AMQP connection... "
298 |
299 | exec {FD}<> /dev/tcp/$AMQP_SERVER_HOST/$AMQP_SERVER_PORT && exec {FD}>&-
300 |
301 | if [ "$?" != 0 ]; then
302 | echo "FAILURE";
303 | exit 1;
304 | fi
305 |
306 | echo "OK"
307 | }
308 |
309 | save_amqp_params(){
310 | case $AMQP_SERVER_TYPE in
311 | activemq)
312 | save_activemq_params
313 | ;;
314 | rabbitmq)
315 | save_rabbitmq_params
316 | ;;
317 | *)
318 | echo "Incorrect AMQP_SERVER_TYPE value! Possible value of AMQP_SERVER_TYPE is 'activemq' or 'rabbitmq"
319 | exit 1
320 | ;;
321 | esac
322 | }
323 |
324 | setup_nginx(){
325 | NGINX_CONF_DIR=/etc/M4_DS_PREFIX/nginx
326 | DS_CONF_TMPL=$NGINX_CONF_DIR/ds.conf.tmpl
327 | DS_CONF=$NGINX_CONF_DIR/ds.conf
328 |
329 | cp -f ${DS_CONF_TMPL} ${DS_CONF}
330 | sed 's/\(listen .*:\)\([0-9]\{2,5\}\b\)\( default_server\)\?\(;\)/\1'${DS_PORT}'\3\4/' -i $DS_CONF
331 |
332 | # check if ipv6 supported otherwise remove it from nginx config
333 | if [ ! -f /proc/net/if_inet6 ]; then
334 | sed '/listen\s\+\[::[0-9]*\].\+/d' -i $DS_CONF
335 | fi
336 |
337 | # sed 's/{{DOCSERVICE_PORT}}/'${DOCSERVICE_PORT}'/' -i $OO_CONF
338 | # sed 's/{{EXAMPLE_PORT}}/'${EXAMPLE_PORT}'/' -i $OO_CONF
339 |
340 | # check whethere enabled
341 | shopt -s nocasematch
342 | PORTS=()
343 | case $(getenforce) in
344 | enforcing|permissive)
345 | PORTS+=('8000')
346 | PORTS+=('3000')
347 | setsebool -P httpd_can_network_connect on
348 | ;;
349 | disabled)
350 | :
351 | ;;
352 | esac
353 |
354 | # add selinux extentions
355 | for PORT in ${PORTS[@]}; do
356 | semanage port -a -t http_port_t -p tcp $PORT >/dev/null 2>&1 || \
357 | semanage port -m -t http_port_t -p tcp $PORT >/dev/null 2>&1 || \
358 | true
359 | done
360 | }
361 |
362 | create_local_configs
363 |
364 | input_db_params
365 | execute_db_script
366 |
367 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
368 | input_redis_params
369 | establish_redis_conn || exit $?
370 |
371 | ,)dnl
372 | input_amqp_params
373 | parse_amqp_url
374 | establish_amqp_conn || exit $?
375 |
376 | save_db_params
377 | save_amqp_params
378 | ifelse(eval(ifelse(M4_PRODUCT_NAME,documentserver-ee,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-ie,1,0)||ifelse(M4_PRODUCT_NAME,documentserver-de,1,0)),1,
379 | save_redis_params
380 | ,)dnl
381 | save_jwt_params
382 |
383 | tune_local_configs
384 |
385 | setup_nginx
386 |
387 | restart_services
388 |
--------------------------------------------------------------------------------
/rpm/common.spec:
--------------------------------------------------------------------------------
1 | %define __strip /bin/true
2 | Summary: %{_package_summary}
3 | Name: %{_package_name}
4 | Version: %{_product_version}
5 | Release: %{_build_number}
6 | Group: Applications/Internet
7 | URL: %{_publisher_url}
8 | Vendor: %{_publisher_name}
9 | Packager: %{_publisher_name} <%{_support_mail}>
10 | BuildArch: x86_64
11 | AutoReq: no
12 | AutoProv: no
13 |
14 | %description
15 | %{_package_description}
16 |
17 | %prep
18 | rm -rf "%{buildroot}"
19 |
20 | %build
21 |
22 | %install
23 |
24 | DOCUMENTSERVER_BIN=%{_builddir}/../../../common/documentserver/bin
25 | DOCUMENTSERVER_HOME=%{_builddir}/../../../common/documentserver/home
26 | DOCUMENTSERVER_CONFIG=%{_builddir}/../../../common/documentserver/config
27 |
28 | DOCUMENTSERVER_EXAMPLE_HOME=%{_builddir}/../../../common/documentserver-example/home
29 | DOCUMENTSERVER_EXAMPLE_CONFIG=%{_builddir}/../../../common/documentserver-example/config
30 |
31 | BIN_DIR=%{buildroot}%{_bindir}
32 | DATA_DIR=%{buildroot}%{_localstatedir}/lib/%{_ds_prefix}
33 | CONF_DIR=%{buildroot}%{_sysconfdir}/%{_ds_prefix}
34 | HOME_DIR=%{buildroot}%{_localstatedir}/www/%{_ds_prefix}
35 | LIB_DIR=%{buildroot}%{_libdir}
36 | LOG_DIR=%{buildroot}%{_localstatedir}/log/%{_ds_prefix}
37 |
38 | #install documentserver files
39 | mkdir -p "$HOME_DIR/"
40 | cp -r $DOCUMENTSERVER_HOME/* "$HOME_DIR/"
41 |
42 | #install documentserver libs
43 | mkdir -p "$LIB_DIR/"
44 | cp -r $DOCUMENTSERVER_HOME/server/FileConverter/bin/*.so* "$LIB_DIR/"
45 | rm $HOME_DIR/server/FileConverter/bin/*.so*
46 |
47 | #install documentserver bin
48 | mkdir -p "$BIN_DIR/"
49 | cp -r $DOCUMENTSERVER_BIN/*.sh "$BIN_DIR/"
50 | cp -r %{_builddir}/../../bin/*.sh "$BIN_DIR/"
51 |
52 | #install configs
53 | mkdir -p "$CONF_DIR/"
54 | cp -r $DOCUMENTSERVER_CONFIG/* "$CONF_DIR/"
55 |
56 | #make log dir
57 | mkdir -p "$LOG_DIR/docservice"
58 | mkdir -p "$LOG_DIR/converter"
59 | mkdir -p "$LOG_DIR/metrics"
60 |
61 | #make cache dir
62 | mkdir -p "$DATA_DIR/App_Data/cache/files"
63 | mkdir -p "$DATA_DIR/App_Data/docbuilder"
64 |
65 | #make exchange dir
66 | mkdir -p "%{buildroot}%{_localstatedir}/www/%{_ds_prefix}/../Data"
67 |
68 | #make exchange dir
69 | mkdir -p "$HOME_DIR/fonts"
70 |
71 | #install supervisor configs
72 | DS_SUPERVISOR_CONF=$CONF_DIR/supervisor/
73 | mkdir -p "$DS_SUPERVISOR_CONF"
74 | cp %{_builddir}/../../../common/documentserver/supervisor/*.conf "$DS_SUPERVISOR_CONF"
75 |
76 | # rename extention for supervisor config files
77 | rename 's/.conf$/.ini/' "$DS_SUPERVISOR_CONF"*
78 |
79 | #install nginx config
80 | DS_NGINX_CONF=$CONF_DIR/nginx/
81 | mkdir -p "$DS_NGINX_CONF"
82 | mkdir -p "$DS_NGINX_CONF/includes/"
83 |
84 | cp -r %{_builddir}/../../../common/documentserver/nginx/*.conf "$DS_NGINX_CONF"
85 | cp -r %{_builddir}/../../../common/documentserver/nginx/*.tmpl "$DS_NGINX_CONF"
86 | cp -r %{_builddir}/../../../common/documentserver/nginx/includes/*.conf "$DS_NGINX_CONF/includes/"
87 |
88 | mkdir -p "%{buildroot}%{_localstatedir}/cache/nginx/%{_ds_prefix}/"
89 |
90 | mkdir -p "%{buildroot}%{_sysconfdir}/nginx/includes/"
91 | mkdir -p "%{buildroot}%{_sysconfdir}/nginx/%{nginx_conf_d}/"
92 |
93 | #install logrotate config
94 | DS_LOGROTATE_CONF=$CONF_DIR/logrotate/
95 | mkdir -p "$DS_LOGROTATE_CONF"
96 | cp -r %{_builddir}/../../../common/documentserver/logrotate/*.conf "$DS_LOGROTATE_CONF"
97 | sed 's/\(service supervisor\)d\?/\1d/g' -i "$DS_LOGROTATE_CONF/ds.conf"
98 |
99 | %if %{defined example}
100 | #install documentserver example files
101 | mkdir -p "${HOME_DIR}-example/"
102 | cp -r $DOCUMENTSERVER_EXAMPLE_HOME/* "${HOME_DIR}-example/"
103 |
104 | #install dcoumentserver example configs
105 | mkdir -p "${CONF_DIR}-example/"
106 | cp -r $DOCUMENTSERVER_EXAMPLE_CONFIG/* "${CONF_DIR}-example/"
107 |
108 | #make log dir
109 | mkdir -p "${LOG_DIR}-example"
110 |
111 | # create data dir
112 | mkdir -p "${DATA_DIR}-example/files/"
113 |
114 | #install example supervisor configs
115 | DSE_SUPERVISOR_CONF=${CONF_DIR}-example/supervisor/
116 | mkdir -p "$DSE_SUPERVISOR_CONF"
117 | cp %{_builddir}/../../../common/documentserver-example/supervisor/*.conf "$DSE_SUPERVISOR_CONF"
118 |
119 | # rename extention for supervisor config files
120 | rename 's/.conf$/.ini/' "$DSE_SUPERVISOR_CONF"*
121 |
122 | #install nginx config
123 | DSE_NGINX_CONF=${CONF_DIR}-example/nginx/includes/
124 | mkdir -p "$DSE_NGINX_CONF"
125 | cp -r %{_builddir}/../../../common/documentserver-example/nginx/includes/*.conf "$DSE_NGINX_CONF"
126 | %endif
127 |
128 | # Make symlinks for nginx configs
129 | find \
130 | ${CONF_DIR}*/nginx/includes \
131 | -name *.conf \
132 | -exec sh -c '%__ln_s {} %{buildroot}%{_sysconfdir}/nginx/includes/$(basename {})' \;
133 |
134 | %__ln_s \
135 | $CONF_DIR/nginx/ds.conf \
136 | %{buildroot}%{_sysconfdir}/nginx/%{nginx_conf_d}/ds.conf
137 |
138 | mkdir -p "%{buildroot}%{_sysconfdir}/supervisord.d/"
139 |
140 | # Make symlinks for supervisor configs
141 | find \
142 | ${CONF_DIR}*/supervisor/ \
143 | -name *.ini \
144 | -not -name *spellchecker* \
145 | -exec sh -c '%__ln_s {} %{buildroot}%{_sysconfdir}/supervisord.d/$(basename {})' \;
146 |
147 | mkdir -p "%{buildroot}%{_sysconfdir}/logrotate.d/"
148 |
149 | # Make symlinks for logrotate configs
150 | find \
151 | $CONF_DIR/logrotate/ \
152 | -name *.conf \
153 | -exec sh -c '%__ln_s {} %{buildroot}%{_sysconfdir}/logrotate.d/$(basename {})' \;
154 |
155 | # Convert absolute links to relative links
156 | symlinks -c \
157 | %{buildroot}%{_sysconfdir}/nginx/%{nginx_conf_d} \
158 | %{buildroot}%{_sysconfdir}/nginx/includes \
159 | %{buildroot}%{_sysconfdir}/supervisord.d \
160 | %{buildroot}%{_sysconfdir}/logrotate.d
161 |
162 | %if %{defined example}
163 | # index.html for rpm
164 | sed 's/linux.html/linux-rpm.html/g' -i "$DSE_NGINX_CONF/ds-example.conf"
165 | %endif
166 |
167 | %clean
168 | rm -rf "%{buildroot}"
169 |
170 | %files
171 | %attr(-, ds, ds) %{_localstatedir}/www/%{_ds_prefix}*/*
172 | %config %attr(440, ds, ds) %{_sysconfdir}/%{_ds_prefix}*/*.json
173 | %config %attr(440, ds, ds) %{_sysconfdir}/%{_ds_prefix}*/log4js/*.json
174 |
175 | %config %attr(-, ds, ds) %{_sysconfdir}/%{_ds_prefix}*/nginx/includes/*
176 | %config %attr(-, ds, ds) %{_sysconfdir}/%{_ds_prefix}/nginx/*.tmpl
177 |
178 | %config(noreplace) %{_sysconfdir}/%{_ds_prefix}/nginx/ds.conf
179 |
180 | %config %attr(644, root, root) %{_sysconfdir}/%{_ds_prefix}/logrotate/*
181 | %config %attr(-, ds, ds) %{_sysconfdir}/%{_ds_prefix}*/supervisor*/*
182 |
183 | %attr(-, root, root) %{_libdir}/*.so*
184 | %attr(-, root, root) %{_bindir}/documentserver-*.sh
185 | %attr(-, root, root) %{_sysconfdir}/logrotate.d/*
186 | %attr(-, root, root) %{_sysconfdir}/nginx/*
187 | %attr(-, root, root) %{_sysconfdir}/supervisord.d/*
188 |
189 | %dir
190 | %attr(-, %{nginx_user}, %{nginx_user}) %{_localstatedir}/cache/nginx/%{_ds_prefix}
191 | %attr(755, ds, ds) %{_localstatedir}/log/%{_ds_prefix}
192 |
193 | %attr(-, ds, ds) %{_localstatedir}/lib/%{_ds_prefix}
194 | %attr(755, -, -) %{_localstatedir}/www/%{_ds_prefix}/../Data
195 |
196 | %if %{defined example}
197 | %attr(-, ds, ds) %{_localstatedir}/log/%{_ds_prefix}-example
198 | %attr(-, ds, ds) %{_localstatedir}/lib/%{_ds_prefix}-example
199 | %endif
200 |
201 | %pre
202 | # add group and user for onlyoffice app
203 | getent group ds >/dev/null || groupadd -r ds
204 | getent passwd ds >/dev/null || useradd -r -g ds -d %{_localstatedir}/www/%{_ds_prefix}/ -s /sbin/nologin ds
205 | # add nginx user to onlyoffice group to allow access nginx to onlyoffice log dir
206 | usermod -a -G ds %{nginx_user}
207 |
208 | case "$1" in
209 | 1)
210 | # Initial installation
211 | ;;
212 | 2)
213 | # Upgrade
214 | # disconnect all users and stop running services
215 | documentserver-prepare4shutdown.sh || true
216 | for i in ds onlyoffice-documentserver; do
217 | if [ $(supervisorctl avail | grep ${i} | wc -l) -gt 0 ]; then
218 | echo "Stopping documentserver services..."
219 | supervisorctl stop ${i}:*
220 | fi
221 | done
222 | ;;
223 | esac
224 | exit 0
225 |
226 | %post
227 | # Make symlink to libcurl-gnutls
228 | ln -sf %{_libdir}/libcurl.so.4 %{_libdir}/libcurl-gnutls.so.4
229 |
230 | chown -R ds:ds %{_localstatedir}/lib/%{_ds_prefix}
231 |
232 | %if %{defined example}
233 | chown -R ds:ds %{_localstatedir}/lib/%{_ds_prefix}-example
234 | %endif
235 |
236 | IS_UPGRADE="false"
237 |
238 | case "$1" in
239 | 1)
240 | # Initial installation
241 | ;;
242 | 2)
243 | # Upgrade database
244 | IS_UPGRADE="true"
245 | ;;
246 | esac
247 |
248 | if [ "$IS_UPGRADE" = "true" ]; then
249 | DIR="/var/www/%{_ds_prefix}"
250 | LOCAL_CONFIG="/etc/%{_ds_prefix}/local.json"
251 | JSON_BIN="$DIR/npm/json"
252 | JSON="$JSON_BIN -f $LOCAL_CONFIG"
253 |
254 | #load_db_params
255 | DB_HOST=$($JSON services.CoAuthoring.sql.dbHost)
256 | DB_NAME=$($JSON services.CoAuthoring.sql.dbName)
257 | DB_USER=$($JSON services.CoAuthoring.sql.dbUser)
258 | DB_PWD=$($JSON services.CoAuthoring.sql.dbPass)
259 | DB_TYPE=$($JSON services.CoAuthoring.sql.type)
260 | DB_PORT=$($JSON services.CoAuthoring.sql.dbPort)
261 |
262 | case $DB_TYPE in
263 | postgres)
264 | echo -n "Trying to establish PostgreSQL connection... "
265 | command -v psql >/dev/null 2>&1 || { echo "PostgreSQL client not found"; exit 1; }
266 | CONNECTION_PARAMS="-h$DB_HOST -U$DB_USER -w"
267 | if [ -n "$DB_PWD" ]; then
268 | export PGPASSWORD=$DB_PWD
269 | fi
270 | PSQL="psql -q $CONNECTION_PARAMS"
271 | $PSQL -c ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
272 | echo "OK"
273 |
274 | echo -n "Updating PostgreSQL database... "
275 | $PSQL -d "$DB_NAME" -f "$DIR/server/schema/postgresql/removetbl.sql" >/dev/null 2>&1
276 | $PSQL -d "$DB_NAME" -f "$DIR/server/schema/postgresql/createdb.sql" >/dev/null 2>&1
277 | echo "OK"
278 | ;;
279 |
280 | mysql)
281 | echo -n "Trying to database MySQL connection... "
282 | command -v mysql >/dev/null 2>&1 || { echo "MySQL client not found"; exit 1; }
283 | MYSQL="mysql -h$DB_HOST -u$DB_USER"
284 | if [ -n "$DB_PWD" ]; then
285 | MYSQL="$MYSQL -p$DB_PWD"
286 | fi
287 | $MYSQL -e ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
288 | echo "OK"
289 |
290 | echo -n "Updating MYSQL database... "
291 | $MYSQL "$DB_NAME" < "$DIR/server/schema/mysql/removetbl.sql"
292 | $MYSQL "$DB_NAME" < "$DIR/server/schema/mysql/createdb.sql"
293 | echo "OK"
294 | ;;
295 |
296 | *)
297 | echo "Incorrect DB_TYPE value! Possible value of DB_TYPE is 'postgres' or 'mysql'."
298 | exit 1
299 | esac
300 | fi
301 |
302 | # generate allfonts.js and thumbnail
303 | documentserver-generate-allfonts.sh true
304 |
305 | # check whethere enabled
306 | shopt -s nocasematch
307 | PORTS=()
308 | case $(%{getenforce}) in
309 | enforcing|permissive)
310 | PORTS+=('8000')
311 | PORTS+=('3000')
312 | %{setsebool} -P httpd_can_network_connect on
313 | ;;
314 | disabled)
315 | :
316 | ;;
317 | esac
318 |
319 | # add selinux extentions
320 | for PORT in ${PORTS[@]}; do
321 | %{semanage} port -a -t http_port_t -p tcp $PORT >/dev/null 2>&1 || \
322 | %{semanage} port -m -t http_port_t -p tcp $PORT >/dev/null 2>&1 || \
323 | true
324 | done
325 |
326 | # restart dependent services
327 | if systemctl is-active --quiet supervisord; then
328 | systemctl restart supervisord >/dev/null 2>&1
329 | fi
330 |
331 | if systemctl is-active --quiet nginx; then
332 | systemctl reload nginx >/dev/null 2>&1
333 | fi
334 |
335 | # check msttcore-fonts-installer
336 | rpm -qa | grep msttcore-fonts-installer > msttcore-fonts-out
337 | OUTFILESIZE=$(stat -c%s "msttcore-fonts-out")
338 | MAXOUTSIZE=1
339 | if [ "$OUTFILESIZE" -le "$MAXOUTSIZE" ]
340 | then
341 | echo "The package msttcore-fonts-installer not found"
342 | echo "You can install it with the commands:"
343 | echo " # yum install cabextract xorg-x11-font-utils"
344 | echo " # rpm -i https://deac-ams.dl.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm"
345 | fi
346 |
347 | %transfiletriggerin -- /usr/share/fonts /usr/share/ghostscript/fonts /usr/share/texmf/fonts
348 | %{_bindir}/documentserver-generate-allfonts.sh true
349 |
350 | %transfiletriggerun -- /usr/share/fonts /usr/share/ghostscript/fonts /usr/share/texmf/fonts
351 | %{_bindir}/documentserver-generate-allfonts.sh true
352 |
353 | %preun
354 | case "$1" in
355 | 0)
356 | # Uninstall
357 | # disconnect all users and stop running services
358 | documentserver-prepare4shutdown.sh
359 | if systemctl is-active --quiet supervisord; then
360 | supervisorctl stop ds:*
361 | fi
362 | ;;
363 | 1)
364 | # Upgrade
365 | :
366 | ;;
367 | esac
368 |
369 | %postun
370 | DIR="%{_localstatedir}/www/%{_ds_prefix}"
371 |
372 | # remove v8 cache
373 | rm -f $DIR/sdkjs/*/sdk-all.cache
374 |
375 | case "$1" in
376 | 0)
377 | # Uninstall
378 | rm -f $DIR/sdkjs/common/AllFonts.js
379 | rm -f $DIR/sdkjs/common/Images/fonts_thumbnail*
380 | rm -f $DIR/sdkjs/*/sdk-all.cache
381 | rm -f $DIR/server/FileConverter/bin/font_selection.bin
382 | rm -f $DIR/server/FileConverter/bin/AllFonts.js
383 | rm -f $DIR/fonts/*
384 | ;;
385 | 1)
386 | # Upgrade
387 | :
388 | ;;
389 | esac
390 |
391 | if systemctl is-active --quiet supervisord; then
392 | supervisorctl update >/dev/null 2>&1
393 | fi
394 |
395 | if systemctl is-active --quiet nginx; then
396 | systemctl reload nginx >/dev/null 2>&1
397 | fi
398 |
399 | %changelog
400 |
--------------------------------------------------------------------------------
/rpm/package.spec.m4:
--------------------------------------------------------------------------------
1 | include(variables.m4)
2 | License: AGPL
3 |
4 | ifelse('M4_DS_EXAMPLE_ENABLE', '1',
5 | %define example 1,)
6 | %define _package_summary defn(`RPM[Summary]')
7 | %define _package_description defn(`RPM[Description]')
8 |
9 | %include requires.spec
10 | %include vars.spec
11 | %include common.spec
12 |
--------------------------------------------------------------------------------
/rpm/requires.spec:
--------------------------------------------------------------------------------
1 | Requires: nginx >= 1.3.13, postgresql >= 9.1, curl, wget, supervisor >= 3.0b2, libstdc++ >= 4.8.4, libcurl, libxml2, zlib, libXScrnSaver, atk, gtk3, xorg-x11-server-Xvfb, libXtst, GConf2, alsa-lib, pwgen, libselinux-utils, liberation-mono-fonts, logrotate, ca-certificates
2 |
--------------------------------------------------------------------------------
/rpm/vars.spec:
--------------------------------------------------------------------------------
1 | %define nginx_user nginx
2 | %define semanage semanage
3 | %define setsebool setsebool
4 | %define getenforce getenforce
5 | %define nginx_conf_d conf.d
6 |
--------------------------------------------------------------------------------