jj addons folder

This commit is contained in:
JenneJ
2016-08-17 14:04:22 +02:00
parent 9aeb386a25
commit f0ce937585
5 changed files with 74 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports System.IO
Public Class ClassInit
Public Sub New()
@@ -36,6 +37,43 @@ Public Class ClassInit
End Function
Public Sub InitAddons()
Try
Dim CurrentDir As String = My.Application.Info.DirectoryPath
Dim Sql As String = "SELECT PATH_ADDONS from TBPMO_KONFIGURATION WHERE GUID = 1"
Dim AddonPath As String = ClassDatabase.Execute_Scalar(Sql)
Dim Dev_AddonPath As String = System.IO.Path.GetFullPath(System.IO.Path.Combine(CurrentDir, "..\..\..\..\app"))
If AddonPath Is Nothing OrElse AddonPath = "" Then
' Addon Pfad in der Datenbank ist leer
Dim path = System.IO.Path.Combine(CurrentDir, "Addons")
Dim AddonDir As New DirectoryInfo(path)
If AddonDir.Exists Then
AddonPath = path
Else
AddonPath = Dev_AddonPath
End If
Else
' Addon Pfad steht in der Datenbank
Dim path = AddonPath
Dim AddonDir As New DirectoryInfo(path)
If (AddonDir.Exists) Then
AddonPath = path
Else
AddonPath = Dev_AddonPath
End If
End If
Sql = String.Format("UPDATE TBPMO_KONFIGURATION SET PATH_ADDONS = '{0}' WHERE GUID = 1", AddonPath)
ClassDatabase.Execute_non_Query(Sql)
Catch ex As Exception
MsgBox("Unexpected Error in InitAddons:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Public Sub InitBasics2()
Try
Dim configResult As Boolean

View File

@@ -340,9 +340,19 @@
frm.Show()
End Sub
Public Sub OpenRightsmanager()
Dim path = ClassDatabase.Execute_Scalar("SELECT PATH_ADDONS FROm TBPMO_KONFIGURATION WHERE GUID = 1")
Dim startInfo As New ProcessStartInfo(path & "\RecordOrganizer_RightManager.exe")
Dim path As String = ClassDatabase.Execute_Scalar("SELECT PATH_ADDONS FROm TBPMO_KONFIGURATION WHERE GUID = 1")
Dim ProductionPath As String = System.IO.Path.Combine(path, "RightManager", "RecordOrganizer_RightManager.exe")
Dim DevelPath As String = System.IO.Path.Combine(path, "RecordOrganizer_RightManager\bin\Debug", "RecordOrganizer_RightManager.exe")
Dim startInfo As New ProcessStartInfo()
startInfo.Arguments = """" & MyConnectionString & """"
If System.IO.File.Exists(ProductionPath) Then
startInfo.FileName = ProductionPath
Else
startInfo.FileName = DevelPath
End If
Process.Start(startInfo)
End Sub
Public Sub OpenWindream_Files()

View File

@@ -4,7 +4,7 @@ Public NotInheritable Class frmSplash
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
Private InitSteps As Integer = 5
Private InitSteps As Integer = 6
Private bw As New BackgroundWorker()
Private mainForm As Form
@@ -81,9 +81,14 @@ Public NotInheritable Class frmSplash
ERROR_INIT = "INVALID USER"
End If
System.Threading.Thread.Sleep(300)
bw.ReportProgress(CalcProgress(5), "Initializing Addons")
Init.InitAddons()
System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(5), "Initializing Frontend")
bw.ReportProgress(CalcProgress(6), "Initializing Frontend")
' InitInterface wurde in frmMain integriert
'Init.InitInterface(mainForm)

View File

@@ -63,7 +63,19 @@
<Directory Id="DD" Name="Digital Data">
<!-- Das Installationsverzeichnis -->
<Directory Id="INSTALLDIR" Name="Record Organizer">
<Directory Id="INSTALLDIR" Name="Record Organizer">
<Directory Id="ADDONDIR" Name="Addons">
<Directory Id="RIGHTMANAGERDIR" Name="RightManager">
<Component Id="RecordOrganizer_RightManager" Guid="BD73A9BB-89FD-4F4C-85B8-F31C97296745">
<File Id="RecordOrganizer_RightManager.exe" Name="RecordOrganizer_RightManager.exe" Source="RecordOrganizer_RightManager.exe" />
<File Id="DD_Rights.dll" Name="DD_Rights.dll" Source="DD_Rights.dll" />
<File Id="Interop.WINDREAMLib.dll" Name="Interop.WINDREAMLib.dll" Source="Interop.WINDREAMLib.dll" />
</Component>
</Directory>
</Directory>
<!-- Die DD-Record-Organiser.exe und Shortcuts für Desktop und Startmenü -->
<Component Id="MainExecutable" Guid="9CC5D446-F056-4A09-995D-9DF53A7F0E38">
@@ -239,6 +251,7 @@
<ComponentRef Id="Oracle" />
<ComponentRef Id="Commandline" />
<ComponentRef Id="ERPConnectLibs" />
<ComponentRef Id="RecordOrganizer_RightManager"/>
</Feature>
<!-- Legt das Standard-Installationsverzeichnis fest-->

View File

@@ -17,7 +17,9 @@
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
<LinkerAdditionalOptions>-b "$(SolutionDir)DD-Record-Organiser\bin\Debug" -b "$(SolutionDir)DD-Record-Organiser\bin\Release" -cultures:de-DE,en-GB,en-US</LinkerAdditionalOptions>
<LinkerAdditionalOptions>-b "$(SolutionDir)DD-Record-Organiser\bin\$(Configuration)" -b "$(SolutionDir)RecordOrganizer_RightManager\bin\$(Configuration)" -cultures:de-DE,en-GB,en-US</LinkerAdditionalOptions>
<CompilerAdditionalOptions>
</CompilerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>