At the moment Windows only
TO GITHUB
USER MANUAL
How to try it :
Code : Tout sélectionner
; ******************************************************************************
; AUTHOR : MicrodevWeb
; MODULE : Pb Onglet
; PROCESS : load package
; ******************************************************************************
EnableExplicit
Procedure loadPackage()
Protected zipName.s = "PACKAGE.zip"
If MessageRequester("Download Package","Do you agree to download the tree view package form github?",#PB_MessageRequester_YesNo) = #PB_MessageRequester_No
End
EndIf
If Not InitNetwork()
MessageRequester("Network error","Cannot connect to internet",#PB_MessageRequester_Error)
End
EndIf
If Not ReceiveHTTPFile("https://github.com/microdevweb/PB-ONGLET/archive/master.zip",zipName)
MessageRequester("Download error","Cannot download the package",#PB_MessageRequester_Error)
End
EndIf
#PACKER = 0
CreateDirectory("ONGLET")
CreateDirectory("ONGLET/CLASSES")
CreateDirectory("ONGLET/CLASSES/IMG")
CreateDirectory("EXAMPLES")
CreateDirectory("EXAMPLES/IMG")
UseZipPacker()
OpenPack(#PACKER,zipName)
If ExaminePack(#PACKER)
While NextPackEntry(#PACKER)
Protected dirName.s = StringField(PackEntryName(#PACKER),2,"/")
If PackEntryType(#PACKER) = #PB_Packer_File
Protected fileName.s = RemoveString(PackEntryName(#PACKER),"PB-ONGLET-master/")
If Not UncompressPackFile(#PACKER,fileName)
MessageRequester("Download error","Cannot unzip file "+fileName,#PB_MessageRequester_Error)
End
EndIf
EndIf
Wend
EndIf
ClosePack(#PACKER)
DeleteFile(zipName)
EndProcedure
loadPackage()