Kundendatenblatt, SDLUpdater,

This commit is contained in:
2024-08-28 10:19:56 +02:00
parent 0e5a40bbd8
commit b7becf3153
9 changed files with 161 additions and 214 deletions

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
</startup>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source = |SQL/CE|" />
<add name="DefaultConnection" connectionString="Data Source = |SQL/CE|"/>
</connectionStrings>
</configuration>
</configuration>

View File

@@ -14,8 +14,8 @@ Option Explicit On
Namespace My
'HINWEIS: Diese Datei wird automatisch generiert. Ändern Sie sie nicht direkt. Zum Ändern
' oder bei in dieser Datei auftretenden Buildfehlern wechseln Sie zum Projekt-Designer.
'HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten
' oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer.
' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
'

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,21 +15,21 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.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 "Funktion zum automatischen Speichern von My.Settings"
#Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
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)
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If

View File

@@ -11,8 +11,9 @@
<AssemblyName>SDLUPDATER</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@@ -25,7 +26,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@@ -95,6 +95,7 @@
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>

View File

@@ -1,5 +1,7 @@
Public Class UPDATERfrm
Imports VERAG_PROG_ALLGEMEIN
Public Class UPDATERfrm
Dim CopyIncremental = True
Private Sub UPDATERfrm_Load(sender As Object, e As EventArgs) Handles Me.Load
End Sub
@@ -17,15 +19,26 @@
' Dim F As String = "\\192.168.0.90\f\Programme\SDL\" 'DEVELOPER
' Dim F As String = "\\172.16.0.99\Daten\Programme\SDL\" ' ATILLA
Public Sub Main()
Dim PARAM = ""
Dim parameter() As String = Environment.GetCommandLineArgs().ToArray
If (parameter.Count - 1) >= 1 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
PARAM = parameter(1)
End If
If PARAM = "full" Then
CopyIncremental = False
End If
'Falls Settings existiert, wird der Pfad daraus verwendet.
F = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory & "SDLUPDATER_Settings.txt")
If Not System.IO.Directory.Exists(F) Then
MsgBox("ERROR_UPDATE_05: Es konnte keine Verbindung mit dem F:\ Laufwerk hergestellt werden." & vbNewLine & "Wenn Sie eine Remote-Sitzung verwenden, melden Sie sich mit dieser erneut an.", MsgBoxStyle.Critical, "ERROR")
Environment.Exit(0)
End If
writeLine(richtextbox, "3 Sekunden warten, um sicherzustellen, dass das Programm beendet wurde...")
writeLine(RichTextBox, "3 Sekunden warten, um sicherzustellen, dass das Programm beendet wurde...")
Threading.Thread.Sleep(3000) 'Falls Programm gerade am Beenden
writeLine(richtextbox, "Starte Update...")
writeLine(RichTextBox, "Starte Update...")
' If Not My.Computer.FileSystem.DirectoryExists(F) Then
'MsgBox("ERROR_UPDATE_02: Update-Daten existieren nicht.", MsgBoxStyle.Critical, "ERROR")
' Else
@@ -37,16 +50,22 @@
MsgBox("ERROR_UPDATE_06: SDL.exe konnte nicht gelöscht werden. Das Programm wird evtl. noch ausgeführt.", MsgBoxStyle.Critical, "ERROR")
Environment.Exit(0)
End If
delFiles()
FileCopier()
If CopyIncremental Then 'CopyIncremental
cProgrammeUpdate.copyProgramLIST(F, AppDomain.CurrentDomain.BaseDirectory, {"SDLUPDATER", "NOT_DEL_"})
Else
delFiles()
FileCopier()
End If
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "SDL.exe") Then
MsgBox("ERROR_UPDATE_03: SDL.exe konnte nicht gestartet werden.", MsgBoxStyle.Critical, "ERROR")
End If
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp") Then
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp") Then '
System.IO.File.Create(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp")
End If
writeLine(richtextbox, "Erfolgreich abgeschlossen...")
writeLine(RichTextBox, "Erfolgreich abgeschlossen...")
Process.Start("SDL.exe")
Environment.Exit(0)
End If
@@ -196,13 +215,13 @@
' Quelldatei
' Using nutzen
fsmsource = New IO.FileStream(SourceFile.FullName, _
IO.FileMode.Open, _
fsmsource = New IO.FileStream(SourceFile.FullName,
IO.FileMode.Open,
IO.FileAccess.Read, IO.FileShare.Read)
' Zieldatei
fsmtarget = New IO.FileStream(IO.Path.Combine(TargetDir, _
SourceFile.Name), _
fsmtarget = New IO.FileStream(IO.Path.Combine(TargetDir,
SourceFile.Name),
IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
' Daten nach und nach einlesen und im Zielstream wieder