@@ -48,6 +48,8 @@ Private Const SEARCHSTRING_CODELIB_BEGIN As String = "<codelib>"
4848Private Const SEARCHSTRING_CODELIB_END As String = "</codelib>"
4949Private Const SEARCHSTRING_FILE_BEGIN As String = "<file>"
5050Private Const SEARCHSTRING_FILE_END As String = "</file>"
51+ Private Const SEARCHSTRING_PACKAGE_BEGIN As String = "<package>"
52+ Private Const SEARCHSTRING_PACKAGE_END As String = "</package>"
5153Private Const SEARCHSTRING_LICENSE_BEGIN As String = "<license>"
5254Private Const SEARCHSTRING_LICENSE_END As String = "</license>"
5355Private Const SEARCHSTRING_DESCRIPTION_BEGIN As String = "<description>"
@@ -692,7 +694,7 @@ Public Function GetRepositoryFullPath(ByVal ReleativPath As String) As String
692694
693695End Function
694696
695- Private Function DownLoadFromGitHub (ByVal ReleativPath As String , ByRef RepPath As String ) As Boolean
697+ Private Function DownLoadFromGitHub (ByRef ReleativPath As String , ByRef RepPath As String ) As Boolean
696698' %GITHUB%/owner/repo@branch/Path
697699
698700 Dim FullFilePath As String
@@ -789,6 +791,8 @@ Private Sub ImportFile(ByRef ImportFile As Object, ByRef ImportMode As CodeLibIm
789791 ImportAccessObject acForm, m_CLI, ImportFile, ImportMode
790792 Case CodeLibElementType.clet_Report
791793 ImportAccessObject acReport, m_CLI, ImportFile, ImportMode
794+ Case CodeLibElementType.clet_Package
795+ ' don't import package file
792796 Case Else
793797 ' eventuell Fehler auslösen?
794798 End Select
@@ -1388,8 +1392,11 @@ Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputF
13881392 'Read CODELIB block
13891393 CheckString = FindSubString(CheckString, SEARCHSTRING_CODELIB_BEGIN, SEARCHSTRING_CODELIB_END)
13901394 If Len(CheckString) > 0 Then
1391- GetCodeLibInfoRepositoryFile CodeLibInf, CheckString
1392- GetCodeLibInfoRepositoryFileReplacement CodeLibInf, CheckString
1395+ GetCodeLibInfoPackage CodeLibInf, CheckString
1396+ If CodeLibInf.Type <> clet_Package Then
1397+ GetCodeLibInfoRepositoryFile CodeLibInf, CheckString
1398+ GetCodeLibInfoRepositoryFileReplacement CodeLibInf, CheckString
1399+ End If
13931400 GetCodeLibInfoLicenseFile CodeLibInf, CheckString
13941401 If FindDependency Then GetCodeLibInfoDependency CodeLibInf, CheckString
13951402 GetCodeLibInfoReferences CodeLibInf, CheckString
@@ -1400,6 +1407,15 @@ Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputF
14001407
14011408End Sub
14021409
1410+ Private Sub GetCodeLibInfoPackage (ByRef CodeLibInf As CodeLibInfo , ByRef SourceString As String )
1411+ Dim PackageName As String
1412+ PackageName = Trim(FindSubString(SourceString, SEARCHSTRING_PACKAGE_BEGIN, SEARCHSTRING_PACKAGE_END))
1413+ If Len(PackageName) > 0 Then
1414+ CodeLibInf.Name = PackageName
1415+ CodeLibInf.Type = clet_Package
1416+ End If
1417+ End Sub
1418+
14031419Private Sub GetCodeLibInfoRepositoryFile (ByRef CodeLibInf As CodeLibInfo , ByRef SourceString As String )
14041420 CodeLibInf.RepositoryFile = Replace(FindSubString(SourceString, SEARCHSTRING_FILE_BEGIN, SEARCHSTRING_FILE_END), "\" , "/" )
14051421End Sub
0 commit comments