From 49abfdf84a1b752d967b70d2d0a7480a60d4d637 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Tue, 5 Apr 2022 12:07:46 +0300 Subject: [PATCH 1/5] fix docxf templates --- products/ASC.Files/Server/ASC.Files.csproj | 174 ++++++++++++++++++++- 1 file changed, 168 insertions(+), 6 deletions(-) diff --git a/products/ASC.Files/Server/ASC.Files.csproj b/products/ASC.Files/Server/ASC.Files.csproj index ee4c730114..4f2c62bef6 100644 --- a/products/ASC.Files/Server/ASC.Files.csproj +++ b/products/ASC.Files/Server/ASC.Files.csproj @@ -32,9 +32,15 @@ Always + + Always + Always + + Always + Always @@ -50,9 +56,15 @@ Always + + Always + Always + + Always + Always @@ -68,9 +80,15 @@ Always + + Always + Always + + Always + Always @@ -86,9 +104,15 @@ Always + + Always + Always + + Always + Always @@ -104,9 +128,15 @@ Always + + Always + Always + + Always + Always @@ -122,9 +152,15 @@ Always + + Always + Always + + Always + Always @@ -140,9 +176,15 @@ Always + + Always + Always + + Always + Always @@ -158,9 +200,15 @@ Always + + Always + Always + + Always + Always @@ -176,9 +224,15 @@ Always + + Always + Always + + Always + Always @@ -194,9 +248,15 @@ Always + + Always + Always + + Always + Always @@ -212,9 +272,15 @@ Always + + Always + Always + + Always + Always @@ -230,9 +296,15 @@ Always + + Always + Always + + Always + Always @@ -248,9 +320,15 @@ Always + + Always + Always + + Always + Always @@ -266,9 +344,15 @@ Always + + Always + Always + + Always + Always @@ -284,9 +368,15 @@ Always + + Always + Always + + Always + Always @@ -302,9 +392,15 @@ Always + + Always + Always + + Always + Always @@ -320,9 +416,15 @@ Always + + Always + Always + + Always + Always @@ -338,9 +440,15 @@ Always + + Always + Always + + Always + Always @@ -356,9 +464,15 @@ Always + + Always + Always + + Always + Always @@ -374,9 +488,15 @@ Always + + Always + Always + + Always + Always @@ -389,12 +509,42 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always + + Always + Always + + Always + Always @@ -408,29 +558,41 @@ Always - PreserveNewest + Always + + + Always - PreserveNewest + Always + + + Always - PreserveNewest + Always - PreserveNewest + Always - PreserveNewest + Always - PreserveNewest + Always Always + + Always + Always + + Always + Always From 5220e96b7e5c218c0e2783b1f93f7f04bf281c60 Mon Sep 17 00:00:00 2001 From: Eugene Kozyrev <67453079+EugeneKozyrev@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:17:26 +0300 Subject: [PATCH 2/5] Add elasticsearch connection check (#606) --- build/install/win/AppServer.aip | 70 +++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/build/install/win/AppServer.aip b/build/install/win/AppServer.aip index b6ff919de0..66777e5387 100644 --- a/build/install/win/AppServer.aip +++ b/build/install/win/AppServer.aip @@ -22,6 +22,10 @@ + + + + @@ -231,6 +235,7 @@ + @@ -243,6 +248,21 @@ + + + + + + + + + + + + + + + @@ -280,11 +300,11 @@ - - + + - + @@ -305,23 +325,40 @@ - - + + - - + + - - + + - - - - + + + + + + + + + + + + + + + + + + + + + @@ -331,6 +368,8 @@ + + @@ -388,9 +427,14 @@ + + + + + From a502c4ee52cfbce1a52582f9daa644e11dc93a33 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Thu, 7 Apr 2022 08:41:58 +0300 Subject: [PATCH 3/5] IPRestrictionsRepository: fixed saving data --- common/ASC.IPSecurity/IPRestrictionsRepository.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/common/ASC.IPSecurity/IPRestrictionsRepository.cs b/common/ASC.IPSecurity/IPRestrictionsRepository.cs index 419aafcffa..c4cc851059 100644 --- a/common/ASC.IPSecurity/IPRestrictionsRepository.cs +++ b/common/ASC.IPSecurity/IPRestrictionsRepository.cs @@ -75,6 +75,7 @@ namespace ASC.IPSecurity }); TenantDbContext.TenantIpRestrictions.AddRange(ipsList); + TenantDbContext.SaveChanges(); tx.Commit(); return ips.ToList(); From 4012a9b713b4f7d4354e08fcda982d7cf8967fde Mon Sep 17 00:00:00 2001 From: Eugene Kozyrev <67453079+EugeneKozyrev@users.noreply.github.com> Date: Fri, 8 Apr 2022 13:04:51 +0300 Subject: [PATCH 4/5] Add ZooKeeper and Kafka connection check on Windows installation (#610) * Add zookeeper/kafka connection check * Edit build script --- build/install/win/Apache Kafka.aip | 43 ++++- build/install/win/Apache ZooKeeper.aip | 43 ++++- build/install/win/AppServer.aip | 153 ++++++++++++++---- .../C#/Utils/CustomAction.config | 7 + .../CustomActions/C#/Utils/CustomAction.cs | 20 +++ .../C#/Utils/Properties/AssemblyInfo.cs | 34 ++++ .../win/CustomActions/C#/Utils/Utils.csproj | 53 ++++++ build/install/win/build-batch.bat | 10 ++ 8 files changed, 323 insertions(+), 40 deletions(-) create mode 100644 build/install/win/CustomActions/C#/Utils/CustomAction.config create mode 100644 build/install/win/CustomActions/C#/Utils/CustomAction.cs create mode 100644 build/install/win/CustomActions/C#/Utils/Properties/AssemblyInfo.cs create mode 100644 build/install/win/CustomActions/C#/Utils/Utils.csproj diff --git a/build/install/win/Apache Kafka.aip b/build/install/win/Apache Kafka.aip index 58d6315394..117fdc8e45 100644 --- a/build/install/win/Apache Kafka.aip +++ b/build/install/win/Apache Kafka.aip @@ -1,11 +1,15 @@ - + + + - + + + @@ -33,6 +37,8 @@ + + @@ -128,6 +134,7 @@ + @@ -157,6 +164,8 @@ + + @@ -171,7 +180,7 @@ - + @@ -191,8 +200,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/install/win/Apache ZooKeeper.aip b/build/install/win/Apache ZooKeeper.aip index 264faa65a4..dd628c7f37 100644 --- a/build/install/win/Apache ZooKeeper.aip +++ b/build/install/win/Apache ZooKeeper.aip @@ -1,10 +1,14 @@ - + + + - + + + @@ -29,6 +33,8 @@ + + @@ -99,6 +105,7 @@ + @@ -116,6 +123,8 @@ + + @@ -126,7 +135,7 @@ - + @@ -144,8 +153,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/install/win/AppServer.aip b/build/install/win/AppServer.aip index 66777e5387..24380fca8b 100644 --- a/build/install/win/AppServer.aip +++ b/build/install/win/AppServer.aip @@ -28,6 +28,10 @@ + + + + @@ -74,6 +78,10 @@ + + + + @@ -243,6 +251,7 @@ + @@ -254,9 +263,9 @@ - + - + @@ -265,7 +274,23 @@ + + + + + + + + + + + + + + + + @@ -297,14 +322,29 @@ + + + + + + + + + + + + + + + - - + + - + @@ -325,40 +365,75 @@ - - + + - + - - + + - - - + + + - + - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -369,18 +444,22 @@ - - - - - + + + + + + + + + @@ -427,13 +506,19 @@ - + + + + + + + @@ -654,10 +739,10 @@ - - - - + + + + @@ -665,7 +750,7 @@ - + diff --git a/build/install/win/CustomActions/C#/Utils/CustomAction.config b/build/install/win/CustomActions/C#/Utils/CustomAction.config new file mode 100644 index 0000000000..07a5c9baa3 --- /dev/null +++ b/build/install/win/CustomActions/C#/Utils/CustomAction.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build/install/win/CustomActions/C#/Utils/CustomAction.cs b/build/install/win/CustomActions/C#/Utils/CustomAction.cs new file mode 100644 index 0000000000..45b43184c3 --- /dev/null +++ b/build/install/win/CustomActions/C#/Utils/CustomAction.cs @@ -0,0 +1,20 @@ +using System; +using System.Net.Sockets; +using Microsoft.Deployment.WindowsInstaller; + +namespace Utils +{ + public class CustomActions + { + [CustomAction] + public static ActionResult CheckTCPAvailability(Session session) + { + string HOST = session.CustomActionData["HOST"]; + string PORT = session.CustomActionData["PORT"]; + string OUTPUT = session.CustomActionData["OUTPUT"]; + var success = new TcpClient().BeginConnect(HOST, Convert.ToInt32(PORT), null, null).AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(1)); + session[OUTPUT] = success.ToString(); + return ActionResult.Success; + } + } +} diff --git a/build/install/win/CustomActions/C#/Utils/Properties/AssemblyInfo.cs b/build/install/win/CustomActions/C#/Utils/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1c22b2f432 --- /dev/null +++ b/build/install/win/CustomActions/C#/Utils/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Utils")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Utils")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("31f44d45-4371-4b33-a846-2e3b78131469")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/build/install/win/CustomActions/C#/Utils/Utils.csproj b/build/install/win/CustomActions/C#/Utils/Utils.csproj new file mode 100644 index 0000000000..2506c1d8be --- /dev/null +++ b/build/install/win/CustomActions/C#/Utils/Utils.csproj @@ -0,0 +1,53 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {F149436D-C079-4011-88D2-B45167C81595} + Library + Properties + Utils + Utils + v4.5 + 512 + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/build/install/win/build-batch.bat b/build/install/win/build-batch.bat index e3bbbf6f2d..1ef7d11794 100644 --- a/build/install/win/build-batch.bat +++ b/build/install/win/build-batch.bat @@ -1,3 +1,6 @@ +REM echo ######## Set variables ######## +set "msbuild4="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"" + REM echo ######## Extracting and preparing files to build ######## %sevenzip% x build\install\win\nginx-1.21.1.zip -o"build\install\win\Files" -y xcopy "build\install\win\Files\nginx-1.21.1" "build\install\win\Files\nginx" /s /y /b /i @@ -25,6 +28,12 @@ copy "build\install\win\kafka-zookeeper\zookeeper\conf\zoo_sample.cfg" "build\in del /f /q "build\install\win\kafka-zookeeper\zookeeper\conf\zoo_sample.cfg" rmdir build\install\win\publish /s /q +REM echo ######## Build Utils ######## +%msbuild4% build\install\win\CustomActions\C#\Utils\Utils.csproj +copy build\install\win\CustomActions\C#\Utils\bin\Debug\Utils.CA.dll build\install\win\Utils.CA.dll /y +rmdir build\install\win\CustomActions\C#\Utils\bin /s /q +rmdir build\install\win\CustomActions\C#\Utils\obj /s /q + REM echo ######## Edit zookeeper/kafka cfg and proprties files ######## %sed% -i "s/\(dataDir\).*/\1=.\/..\/zookeeper\/Data/g" build/install/win/kafka-zookeeper/zookeeper/conf/zoo.cfg %sed% -i "s/\(log.dirs\)=.*/\1=kafka-logs/g" build/install/win/kafka-zookeeper/kafka/config/server.properties @@ -74,4 +83,5 @@ REM echo ######## Build MySQL Server Installer ######## iscc "build\install\win\MySQL Server Installer Runner.iss" REM echo ######## Build AppServer package ######## +%AdvancedInstaller% /edit build\install\win\AppServer.aip /SetVersion %BUILD_VERSION%.%BUILD_NUMBER% %AdvancedInstaller% /rebuild build\install\win\AppServer.aip From 542df3d84788410a8a0498213a2b25d93635c66c Mon Sep 17 00:00:00 2001 From: Eugene Kozyrev <67453079+EugeneKozyrev@users.noreply.github.com> Date: Fri, 8 Apr 2022 16:04:09 +0300 Subject: [PATCH 5/5] Change project language (#612) --- build/install/win/AppServer.aip | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/build/install/win/AppServer.aip b/build/install/win/AppServer.aip index 24380fca8b..0cf77b63e8 100644 --- a/build/install/win/AppServer.aip +++ b/build/install/win/AppServer.aip @@ -1,9 +1,9 @@ - + - + @@ -40,8 +40,8 @@ - - + + @@ -184,11 +184,11 @@ - + - + @@ -221,22 +221,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -612,12 +612,12 @@ - - - - - - + + + + + +