MS New Version

This commit is contained in:
2021-04-23 12:08:10 +02:00
parent 08219ec327
commit a3d2226cbf
23 changed files with 510 additions and 99 deletions

21
SetupWIXVS19/Config.wxi Normal file
View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<!-- Der Name der Haupt-EXE -->
<?define ProgramName="WIDigConsoleApp"?>
<!-- Der Volle Name des Programms -->
<?define ProductName="Windream Indexer von Digital Data"?>
<!-- Der Hersteller des Programms -->
<?define Manufacturer="Digital Data"?>
<!-- Kurze Beschreibung des Programms (optional) -->
<?define Description="Beschreibung des Programms"?>
<!-- Kurzer Kommentar zum Programm (optional) -->
<?define Comments="Kommentar wie Copyright-Hinweis"?>
<!--
UPGRADE CODE
Sorgt dafür, dass Programm-Updates mit dem Installer
die alte Version ersetzen. Darf sich nicht mehr ändern,
wenn einmal festgelegt.
-->
<?define UpgradeCode="b5f2b6f9-c768-49f9-8440-06579af5203e"?>
</Include>

192
SetupWIXVS19/Product.wxs Normal file
View File

@@ -0,0 +1,192 @@
<?include Config.wxi?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="$(var.ProductName)" Language="1031" Codepage="1252" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package
Id="*"
Keywords="Installer"
Description="$(var.Description)"
Comments="$(var.Comments)"
Manufacturer="$(var.Manufacturer)"
InstallerVersion="100"
Languages="1031"
Compressed="yes"
SummaryCodepage="1252"
InstallScope="perMachine"
/>
<Media Id='1' Cabinet='$(var.ProgramName).cab' EmbedCab='yes' DiskPrompt='$(var.ProgramName)' />
<Property Id='DiskPrompt' Value="$(var.ProgramName) Install" />
<MajorUpgrade
AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="Eine neuere Version von [ProductName] ist bereits installiert. Das Setup wird beendet."
/>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!-- Legt das Icon fest -->
<Icon Id="AppIcon.exe" SourceFile="$(var.ProgramName).exe" />
<!-- Zeige Icon in Systemsteuerung > Programme entfernen -->
<Property Id="ARPPRODUCTICON" Value="AppIcon" />
<!-- Legt die Verzeichnisstruktur fest -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="DDDIR" Name="$(var.Manufacturer)">
<Directory Id="INSTALLDIR" Name="$(var.ProductName)"/>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
</Directory>
<Directory Id="DesktopFolder" />
</Directory>
<!-- Verknüpfung für Startmenü -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut_StartMenu" Guid="8e116ea7-41c4-4e83-af7c-997f8cb7432d">
<Shortcut Id="ApplicationStartMenuShortcut_StartMenu"
Name="$(var.ProductName)"
Target="[INSTALLDIR]WIDIG.exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_StartMenu" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<!-- Verknüpfung für Desktop -->
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcut_Desktop" Guid="9100d46d-1576-484a-b467-bc10ffdb21bb">
<Shortcut Id="ApplicationStartMenuShortcut_Desktop"
Name="$(var.ProductName)"
Target="[INSTALLDIR]WIDIG.exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_Desktop" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="MainApplicationExe" Guid="195612c2-f0c0-472a-a83e-935bf13ce295">
<File Id="MainApplicationExe" Name="WIDIG.exe" KeyPath="no" Checksum="yes">
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
</File>
<File Id="MainApplicationExeConfig" Name="WIDIG.exe.config" KeyPath="no" Checksum="yes" />
<File Id="ConsoleApplicationExe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="yes"></File>
<File Id="ConsoleApplicationExeConfig" Name="$(var.ProgramName).exe.config" KeyPath="no" Checksum="yes"></File>
</Component>
<Component Id="DevExpressLibs" Guid="a17fa11f-d78f-464e-930e-5fad7927ce4e">
<File Id="DevExpress.Data.v19.2.dll" Name="DevExpress.Data.v19.2.dll" KeyPath="yes" Checksum="yes"/>
<File Id="DevExpress.Pdf.v19.2.Core.dll" Name="DevExpress.Pdf.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Printing.v19.2.Core.dll" Name="DevExpress.Printing.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Sparkline.v19.2.Core.dll" Name="DevExpress.Sparkline.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Utils.v19.2.dll" Name="DevExpress.Utils.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraBars.v19.2.dll" Name="DevExpress.XtraBars.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraEditors.v19.2.dll" Name="DevExpress.XtraEditors.v19.2.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="DigitalDataLibs" Guid="940298ca-6934-4e7a-a45b-1246b23622a6">
<File Id="DigitalData.Modules.Config.dll" Name="DigitalData.Modules.Config.dll" KeyPath="yes" Checksum="yes"/>
<File Id="DigitalData.Modules.Filesystem.dll" Name="DigitalData.Modules.Filesystem.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Language.dll" Name="DigitalData.Modules.Language.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Logging.dll" Name="DigitalData.Modules.Logging.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Windream.dll" Name="DigitalData.Modules.Windream.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="MiscLibs" Guid="6a621556-dac9-48e2-b50c-624191d26845">
<File Id="Interop.WINDREAMLib.dll" Name="Interop.WINDREAMLib.dll" KeyPath="yes" Checksum="yes"/>
<File Id="NLog.dll" Name="NLog.dll" KeyPath="no" Checksum="yes"/>
<File Id="protobufnet.dll" Name="protobuf-net.dll" KeyPath="no" Checksum="yes"/>
</Component>
<!-- Für weitere Dateien hier Component Elemente anlegen!! -->
<!--
<Component Id="FirmaXYLib" Guid="PUT-GUID-HERE">
<File Id="FirmaXYLib" Name="FirmaXYLib.dll" KeyPath="yes" Checksum="yes"/>
</Component>
-->
<Component Id="RegistryKeys" Guid="aeebea13-8ad6-4f3d-ac4a-ecea4151dfb0">
<RegistryKey Root="HKLM" Key="SOFTWARE">
<RegistryKey Key="[Manufacturer]">
<RegistryKey Key="[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Id="REGKEYINSTALLDIR">
<RegistryValue Type="string" Value="[INSTALLDIR]" Name="Path" />
</RegistryKey>
</RegistryKey>
</RegistryKey>
<util:RemoveFolderEx Id="RemoveApplicationFolder" On="uninstall" Property="APPLICATIONFOLDER" />
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="MainApplicationExe" />
<ComponentRef Id="RegistryKeys" />
<ComponentRef Id="DevExpressLibs" />
<ComponentRef Id="DigitalDataLibs" />
<ComponentRef Id="MiscLibs" />
<!-- Weitere Komponenten hier hinzufügen! -->
</Feature>
<!--
Diese Features können mit einem Parameter beim Aufruf des Installers deaktiviert werden
-->
<Feature Id="DesktopShortcut" Title="Desktop Shortcut">
<Condition Level="0">DISABLE_DESKTOP_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_Desktop"/>
</Feature>
<Feature Id="StartmenuShortcut" Title="Startmenu Shortcut">
<Condition Level="0">DISABLE_STARTMENU_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_StartMenu" />
</Feature>
<!-- Legt das Standard-Installationsverzeichnis fest-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="_BrowseProperty" Value="INSTALLDIR" />
<!-- Konfiguriert die Reihenfolge der Installer-Dialoge -->
<UI>
<UIRef Id="WixUI_FeatureTree"/>
<UIRef Id="WixUI_ErrorProgressText" />
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Next"
Event="NewDialog"
Value="FeaturesDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="ChangeFolder"
Event="NewDialog"
Value="BrowseDlg"
Order="2">1</Publish>
<Publish Dialog="FeaturesDlg"
Control="Back"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
</UI>
</Product>
</Wix>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>3c1b87f6-cde9-49af-81bb-f697d8bc7d0e</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>SetupWIXVS19</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
<Cultures>de-DE</Cultures>
<LinkerAdditionalOptions>
-b "$(SolutionDir)WIDigConsoleApp\bin\$(Configuration)"
-b "$(SolutionDir)WIDigForm\bin\$(Configuration)"
</LinkerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="Config.wxi" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<Target Name="BeforeBuild">
<!-- Get the programs assembly version from the .exe file -->
<GetAssemblyIdentity AssemblyFiles="..\WIDigConsoleApp\bin\$(Configuration)\WIDigConsoleApp.exe">
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
</GetAssemblyIdentity>
<!-- Store the assembly version number in ProductVersion preprocessor variable -->
<CreateProperty Value="$(DefineConstants);ProductVersion=%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="DefineConstants" />
</CreateProperty>
<!-- Name the .msi file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(SolutionName)-$(Platform)-%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="TargetName" />
</CreateProperty>
<!-- Name the .wixpdb file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(TargetName)$(TargetPdbExt)">
<Output TaskParameter="Value" PropertyName="TargetPdbName" />
</CreateProperty>
</Target>
</Project>

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb

View File

@@ -0,0 +1,19 @@
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\WIDigConsoleApp.exe
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\WIDigConsoleApp.exe.config
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Data.v19.2.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Pdf.v19.2.Core.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Printing.v19.2.Core.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Sparkline.v19.2.Core.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Utils.v19.2.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.XtraBars.v19.2.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.XtraEditors.v19.2.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Config.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Filesystem.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Language.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Logging.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Windream.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\Interop.WINDREAMLib.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\WIDIG.exe
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\WIDIG.exe.config
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\NLog.dll
E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\protobuf-net.dll

View File

@@ -0,0 +1,2 @@
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb

View File

@@ -0,0 +1,6 @@
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi
E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb
obj\Debug\Product.wixobj
obj\Debug\SetupWIXVS19.wixproj.BindContentsFileListde-DE.txt
obj\Debug\SetupWIXVS19.wixproj.BindOutputsFileListde-DE.txt
obj\Debug\SetupWIXVS19.wixproj.BindBuiltOutputsFileListde-DE.txt

View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2018
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigConsoleApp", "WIDigConsoleApp\WIDigConsoleApp.vbproj", "{B146A4E7-FD28-4F57-9BE0-C4178A258623}"
EndProject
@@ -9,6 +9,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigForm", "WIDigForm\WIDi
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIX", "SetupWIX\SetupWIX.wixproj", "{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIXVS19", "SetupWIXVS19\SetupWIXVS19.wixproj", "{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -39,6 +41,12 @@ Global
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|Any CPU.ActiveCfg = Release|x86
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.ActiveCfg = Release|x86
{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.Build.0 = Release|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|Any CPU.ActiveCfg = Debug|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.ActiveCfg = Debug|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.Build.0 = Debug|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|Any CPU.ActiveCfg = Release|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.ActiveCfg = Release|x86
{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="WIDigConsoleApp.My.MySettings.MyECM_ConnectionString"
connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>

View File

@@ -3,15 +3,18 @@ Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Windream
Imports DigitalData.Modules.Config
Imports System.IO
Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Database
Module Module1
Private _ArgumentLength As Integer
Public _database As MSSQLServer
Public oRegExArg As String
Public Function Main(args As String()) As Integer
Try
' Console.WriteLine("Starting up WIDig...")
Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath,
opath & "\Digital Data\WIDigDat\Log",
Nothing,
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing,
"Digital Data",
"WIDigCons")
@@ -26,27 +29,36 @@ Module Module1
System.Console.WriteLine($"Starting up WIDig...")
If Connect2Windream(oUserPW) = True Then
System.Console.WriteLine($"Windream initialized!")
Dim oArguments As String() = Environment.GetCommandLineArgs()
If ParseArgs(args) = True Then
System.Console.WriteLine($"Parsed all arguments!")
If StreamIndexFile() = True Then
oErrorImport = False
If InitDatabase() = True Then
Load_DB_DAta()
'Dim oArguments As String() = Environment.GetCommandLineArgs()
If ParseArgs(args) = True Then
System.Console.WriteLine($"Parsed all arguments!")
If StreamIndexFile() = True Then
oErrorImport = False
Else
System.Console.WriteLine($"###Error in StreamIndexFile!####")
oErrorImport = True
End If
Else
System.Console.WriteLine($"###Error in StreamIndexFile!####")
oErrorImport = True
System.Console.WriteLine($"###Error in ParseArgs!####")
System.Console.WriteLine($"### Error in ParseArgs ####")
System.Console.WriteLine(oErrorMessage)
System.Console.WriteLine("### For more information check the log! Press any key to exit! ####")
System.Console.WriteLine($"####################")
Console.ReadKey()
End If
Else
System.Console.WriteLine($"###Error in ParseArgs!####")
System.Console.WriteLine($"### Error in ParseArgs ####")
System.Console.WriteLine(oErrorMessage)
System.Console.WriteLine("### For more information check the log! Press any key to exit! ####")
System.Console.WriteLine($"####################")
Console.ReadKey()
oErrorMessage = "Could not initialize DB"
End If
Else
oErrorMessage = "Could not initialize windream"
End If
If oErrorParse = True Or oErrorImport = True Then
System.Console.WriteLine(oErrorMessage)
System.Console.WriteLine("### For more information check the log! Press any key to exit! ####")
@@ -69,10 +81,39 @@ Module Module1
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, System.AppDomain.CurrentDomain.BaseDirectory, oCommonAppDataPath)
System.Console.WriteLine($"Config loaded!")
LOGGER.Info("Config loaded")
'Settings_Load()
End Sub
Public Function InitDatabase() As Boolean
If My.Settings.MyECM_ConnectionString = String.Empty Then
Return False
End If
Try
_database = New MSSQLServer(LOGCONFIG, My.Settings.MyECM_ConnectionString)
If _database.DBInitialized = True Then
Return True
Else
Return False
End If
Catch ex As Exception
LOGGER.Error(ex)
Return False
End Try
End Function
Public Function Load_DB_DAta()
Try
Dim oSql = "SELECT [REGEX] FROM [TBDD_FUNCTION_REGEX] WHERE FUNCTION_NAME = 'WM-INDEXER-INDEX_GROUP'"
oRegExArg = _database.GetScalarValue(oSql, 120)
If oRegExArg.Length = 0 Then
oRegExArg = 0
End If
Catch ex As Exception
LOGGER.Error(ex)
Return False
End Try
End Function
Private Function Connect2Windream(oPW As String)
Try
WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain)
@@ -104,6 +145,8 @@ Module Module1
End Try
End Function
Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False)
Dim oINDEXInfoStarted As Boolean = False
Dim oINDEXInfotemp As String = ""
Try
If pArguments.Length <= 3 Then
_ArgumentLength = pArguments.Length
@@ -166,16 +209,22 @@ Module Module1
WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype)
End If
ElseIf oArg.StartsWith("-index@") Then
Dim oINDEXInfotemp = oArg
oINDEXInfotemp = oINDEXInfotemp.Replace("-index@{", "")
oINDEXInfotemp = oINDEXInfotemp.Replace("}", "")
Dim oSplit() = oINDEXInfotemp.ToString.Split(";")
LOGGER.Debug($" [{oSplit.Length}] Indices transmitted...")
oIndexArr = oSplit
oINDEXInfotemp = oArg
oINDEXInfoStarted = True
oINDEXInfotemp = oINDEXInfotemp.Replace("-index@", "")
Else
If oINDEXInfoStarted Then
oINDEXInfotemp &= " " & oArg
End If
End If
ocount += 1
Next
Dim oIndexparts As String() = oINDEXInfotemp.Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries)
LOGGER.Info($" [{oIndexparts.Length}] Indices transmitted...")
oIndexArr = oIndexparts
Return True
Catch ex As Exception
LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message)
@@ -205,28 +254,45 @@ Module Module1
If oResult = True Then
LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
For Each oIndex2 As String In oIndexArr
Dim oIndexInfo() = oIndex2.Split("=")
Dim oIndexInfo() = oIndex2.Split("={")
Dim oIndexName = oIndexInfo(0)
Dim oIndexvalue = oIndexInfo(1)
If WMIndex_exists(oIndexName) = True Then
LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]")
If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then
LOGGER.Info($"Index could not be set...")
If WINDREAM.RemoveFile(oTargetPath) = True Then
LOGGER.Info($"File deleted after error!")
End If
oResult = False
Exit For
End If
Else
LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!")
If WINDREAM.RemoveFile(oTargetPath) = True Then
LOGGER.Info($"File deleted after error!")
End If
oResult = False
Exit For
End If
Dim oIndexvalue
Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase)
' ' Match the regular expression pattern against a text string.
Dim m As Match = r.Match(oIndex2)
Do While m.Success
' oClearedBodyText = oClearedBodyText.Replace(m.Value, "")
'Dim g As Group = m.Groups(1)
Dim g1 As Group = m.Groups(2)
Dim g2 As Group = m.Groups(3)
If Not IsNothing(g2.Value) Then
oIndexvalue = g2.Value
Console.WriteLine($"Indexvalue: {oIndexvalue}")
End If
If Len(oIndexvalue) > 0 Then
If WMIndex_exists(oIndexName) = True Then
LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]")
If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then
LOGGER.Info($"Index could not be set...")
If WINDREAM.RemoveFile(oTargetPath) = True Then
LOGGER.Info($"File deleted after error!")
End If
oResult = False
Exit For
End If
Else
LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!")
If WINDREAM.RemoveFile(oTargetPath) = True Then
LOGGER.Info($"File deleted after error!")
End If
oResult = False
Exit For
End If
End If
m = m.NextMatch()
Loop
Next
If oResult = True Then
LOGGER.Info("Import finished!")

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyVersion("1.2.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -1,10 +1,10 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </auto-generated>
'------------------------------------------------------------------------------
@@ -13,57 +13,68 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;P"& _
"assword=dd")> _
Public ReadOnly Property MyECM_ConnectionString() As String
Get
Return CType(Me("MyECM_ConnectionString"),String)
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.WIDigConsoleApp.My.MySettings
Get
Return Global.WIDigConsoleApp.My.MySettings.Default

View File

@@ -1,7 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="MyECM_ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;Password=dd</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -50,10 +50,15 @@
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Windream">
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Windream, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll</HintPath>
</Reference>
<Reference Include="NLog">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>-Mode%40IMPV -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40{"Integer 23"=4711%3b"String 38"=WeDigNoWIDig%3b"Boolean 04"=false}</StartArguments>
<StartArguments>-Mode%40IMPV -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Integer 24={0815}#~#Vektor_Text1={ValueX~#~ValueY}</StartArguments>
</PropertyGroup>
</Project>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyVersion("1.2.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -359,10 +359,9 @@ Partial Class frmMain
Me.TextBox1.Size = New System.Drawing.Size(292, 220)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "-Mode@IMPV -Source@E:\Importfiles\Test.pdf -Target@""W:\Import\Testfile.pdf"" -WMOT" &
"@""IhrObjekttyp"" -index@{""Integer 23""=4711;""String 38""=""Text mit Freizeichen"";""Bo" &
"olean 04""=false}"
"@""IhrObjekttyp"" -index@Integer 24={0815}#~#Vektor_Text1={ValueX~#~ValueY}"
'
'Form1
'frmMain
'
Me.Appearance.Options.UseFont = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -374,7 +373,7 @@ Partial Class frmMain
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.RibbonControl1)
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Name = "Form1"
Me.Name = "frmMain"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "WindreamImporter Digital Data (WiDig)"

View File

@@ -260,7 +260,7 @@ Zielpfad inklusive Dateiname und Extension
-WMOT:
Windream Objekttyp
-index
Indexierungslogik
Indexierungsabfolge
</value>
</data>
</root>