PureBasic

Forums PureBasic
Nous sommes le Mer 13/Nov/2019 13:53

Heures au format UTC + 1 heure




Poster un nouveau sujet Répondre au sujet  [ 8 messages ] 
Auteur Message
 Sujet du message: multiPB
MessagePosté: Dim 11/Déc/2016 15:20 
Hors ligne

Inscription: Mar 09/Déc/2014 20:02
Messages: 74
MultiPB 1.3.2
oct 2017
by zaphod

Pour Windows.
Testé sur Windows 10 pro 64/32.
Compilé avec Purebasic 5.61 64/32.

Permet d'afficher les différentes versions installées de purebasic et spiderbasic.
Permet de lancer la version souhaitée.
Permet de configurer les compilateurs référencés dans l'IDE.
Permet de désinstaller avec son desinstalleur une ancienne version.

Utilisation :
Séléctionner le disque ou purebasic/spiderbasic est(sont) installé(s) et cliquer sur Update.
Tout le disque est scanné pour retrouver les différentes installations.
Le bouton devient Cancel pendant la recherche et permet d'arrêter.
Double cliquer dans la liste pour lancer la version désirée.

Le coche indique les versions référencées dans les options de compilation de l'ide.
Pour modifier bouton droit dans la liste pour afficher le menu contextuel "Update IDE compilers list".
Aucune version de PB ne doit être en cours d'execution.
Le fichier original Purebasic.prefs est sauvegardé sous forme Purebasic.prefs.bak

Pour désinstaller une ancienne version, menu contextuel "Unsinstall PB version".

Le programme enregistre un fichier prefs avec sa position, taille, le disque, la ligne de commande et la liste.
N'écrit rien dans le registre.
Fonctionne sur clé USB.

Le source :

Code:
;
;Dev with PureBasic 5.61 x64/x86
;tested on windows 10 pro x64/x86
;oct 2017
;zaphod
;
EnableExplicit
;
UseMD5Fingerprint()
;{- Enumerations / DataSections
;{ Windows
Enumeration
  #Window_mpb 
EndEnumeration
;}
Enumeration
  #menu_mpb
  #menu_popup_mpb
EndEnumeration

Enumeration
  #menu_mpb_infos
  #menu_mpb_aide
  #menu_mpb_exit
  #pop_updide_mpb
  #pop_delpb_mpb
EndEnumeration

Enumeration
#statusbar_mpb 
EndEnumeration

;{ Gadgets
Enumeration
  #mpb_String_0
  #mpb_Button_2
  #mpb_expcombo0
  #mpb_ListIcon_3
  #mpb_frame0
  #mpb_cont1
  #mpb_check1
EndEnumeration

Enumeration
  #mpb_ima0 
  #mpb_ima1
EndEnumeration

;}
;}
Procedure.s GetSpecialFolderLocation(folder)
  Protected pid, path.s

  If SHGetSpecialFolderLocation_(#Null, folder, @pid) = #S_OK
    path = Space(#MAX_PATH)
    If ( SHGetPathFromIDList_(pid, @path) = #True ) And ( Right(path, 1) <> "\" )
      path + "\"
    EndIf
  EndIf

  ProcedureReturn path

EndProcedure


;Macro MyVersion()
;   FileGetVersion(ProgramFilename(), "FileVersion")
;EndMacro
Procedure.s binarytype(fn.s)
  Protected c,s.s,i
  ;
  If ReadFile(0,fn,#PB_Ascii  )
    ;FileSeek(0,$3c)
    For i=1 To 255
      c= ReadCharacter(0,#PB_Ascii)
      If c<>0
        s+Str(c)+" "
        EndIf
      Next
      CloseFile(0)
      ;
    If FindString(s,"80 69 100 134")>0
      ProcedureReturn "x64"
    EndIf
    If FindString(s,"80 69 76 1")
      ProcedureReturn "x86"
    EndIf
       
  EndIf
 
EndProcedure

CompilerIf #PB_Compiler_Unicode
   Import "version.lib"
     CompilerIf #PB_Compiler_Processor= #PB_Processor_x64
     GetFileVersionInfoSize( *lptstrFilename, *lpdwHandle ) As "GetFileVersionInfoSizeW"
     GetFileVersionInfo( *lptstrFilename, dwHandle, dwLen, *lpData) As "GetFileVersionInfoW"
     VerQueryValue( *pBlock, *lpSubBlock, *lplpBuffer, *puLen) As "VerQueryValueW"
      CompilerElse
     GetFileVersionInfoSize( *lptstrFilename, *lpdwHandle ) As "_GetFileVersionInfoSizeW@8"
     GetFileVersionInfo( *lptstrFilename, dwHandle, dwLen, *lpData) As "_GetFileVersionInfoW@16"
     VerQueryValue( *pBlock, *lpSubBlock, *lplpBuffer, *puLen) As "_VerQueryValueW@16"
     CompilerEndIf
   EndImport
CompilerElse ; ascii
   Import "version.lib"
     GetFileVersionInfoSize( *lptstrFilename, *lpdwHandle ) As "GetFileVersionInfoSizeA"
     GetFileVersionInfo( *lptstrFilename, dwHandle, dwLen, *lpData) As "GetFileVersionInfoA"
     VerQueryValue( *pBlock, *lpSubBlock, *lplpBuffer, *puLen) As "VerQueryValueA"
   EndImport
CompilerEndIf

Structure LANGANDCODEPAGE
  wLanguage.w
  wCodePage.w
EndStructure

Global cFileGetVersionReturn.s
ProcedureDLL.s FileGetVersion( filename$,cGetWhat$ = "FileVersion" )
   Protected.i handle,i,j
   Protected *lpData, *lplpBuffer, puLen, *stringbuffer, Bytes
   Protected cReturn.s = ""
   Protected infosize = GetFileVersionInfoSize( @filename$, @handle)
   Protected *readptr.LANGANDCODEPAGE
   Protected langandcodepage$, SubBlock$
   
   Dim Stringname$(12)
   
   Restore FileVersionElementsByName
   For i=1 To 12
     Read$ Stringname$(i)
   Next
      If infosize
        *lpData = AllocateMemory(infosize)
        If GetFileVersionInfo( @filename$, 0, infosize, *lpdata)
          If VerQueryValue( *lpdata, @"\VarFileInfo\Translation", @*lplpBuffer, @puLen)
            *readptr = *lplpBuffer
            For i=0 To puLen/SizeOf(LANGANDCODEPAGE) - 1
              langandcodepage$ = RSet(Hex(*readptr\wLanguage),4,"0") + RSet(Hex(*readptr\wCodePage), 4, "0")
              For j=1 To 12
                SubBlock$ ="\\StringFileInfo\\" + langandcodepage$ + "\\" + Stringname$(j)
                If VerQueryValue( *lpdata, @SubBlock$, @*stringbuffer, @Bytes) And Bytes
                  ; Debug Stringname$(j)+": "+PeekS(*stringbuffer, Bytes)
                   If LCase(Stringname$(j)) = LCase(cGetWhat$)
                      cReturn = PeekS(*stringbuffer, Bytes)
                      Break
                   EndIf
                EndIf
              Next
              *readptr + SizeOf(LANGANDCODEPAGE)
            Next
          EndIf
        ;Else
        ;  OutputDebugString_( "No version information available (A): "+filename$)
        EndIf
        FreeMemory(*lpData)
      ;Else
      ;   OutputDebugString_( "No version information available (B): "+ filename$)
      EndIf
      cFileGetVersionReturn=cReturn
     
      ProcedureReturn cFileGetVersionReturn
EndProcedure

DataSection
  FileVersionElementsByName:
  Data.s "Comments",        "InternalName",     "ProductName"
  Data.s "CompanyName",     "LegalCopyright",   "ProductVersion"
  Data.s "FileDescription", "LegalTrademarks",  "PrivateBuild"
  Data.s "FileVersion",     "OriginalFilename", "SpecialBuild"
  ;
  mulpb:
  IncludeBinary "mulpb2.ico"
  mulpb2:
  IncludeBinary "mulpb4.ico"
EndDataSection

;Pattern$ = "Executables (*.exe)|*.exe;|Dynamic Link Library (*.dll)|*.dll;|All files (*.*)|*.*"
;Filename$ = OpenFileRequester("Please choose file to load", "", Pattern$, 0)

;Debug "HERE: "+FileGetVersion( filename$ )
;
; Procedure SearchDrives()
;   Protected AllDriveNames.s, Size, Count, i, *pAllDriveNames
;   ;ClearList(Drives())
;   Size = GetLogicalDriveStrings_(0, @AllDriveNames)
;   AllDriveNames = Space(Size)
;   Size = GetLogicalDriveStrings_(Size, @AllDriveNames)
;   *pAllDriveNames = @AllDriveNames
;   Count = Size / 4
;   For i = 1 To Count
;     Debug LCase(PeekS(*pAllDriveNames, 3))
;     ;AddElement(Drives())
;     ;Drives()\DriveLetter = LCase(PeekS(*pAllDriveNames, 3))
;     *pAllDriveNames + (4 * SizeOf(Character))
;     ;Drives()\NameOfVolume = Space(#MAX_PATH)
;     ;Drives()\DriveType = GetDriveType_(@Drives()\DriveLetter)
;     ;If Drives()\DriveType = #DRIVE_FIXED
;     ;  GetVolumeInformation_(Drives()\DriveLetter, Drives()\NameOfVolume, #MAX_PATH, 0, 0, 0, 0, 0)
;     ;EndIf
;   Next
; EndProcedure

Global dirlevel.b, dirflag.b,files,curs

Procedure ScanPath(Path.s)
  Protected dir.l, name.s, s.s;, files
  Dirlevel = Dirlevel + 1
  ;
  SetCursor_(curs)
  If WindowEvent()=#PB_Event_Gadget
    If EventGadget()=#mpb_Button_2
      dirflag=1       
    EndIf
  EndIf
  dir = ExamineDirectory(#PB_Any, Path, "")
  If dir
    While NextDirectoryEntry(dir)
      If dirflag
        Break
      EndIf
      name = DirectoryEntryName(dir)
      If DirectoryEntryType(dir) = #PB_DirectoryEntry_File     
        files + 1       
        If LCase(name)="purebasic.exe" ;Or LCase(name)="spiderbasic.exe"
          s=FileGetVersion(path+name,"ProductVersion")
          If s<>""
            AddGadgetItem(#mpb_ListIcon_3,-1,s+Chr(10)+binarytype(path+name)+Chr(10)+ReplaceString(path,"\\","\"),ImageID(#mpb_ima0))       
          EndIf
        ElseIf LCase(name)="spiderbasic.exe"
          AddGadgetItem(#mpb_ListIcon_3,-1,FileGetVersion(path+name,"ProductVersion")+Chr(10)+binarytype(path+name)+Chr(10)+path,ImageID(#mpb_ima1))
        EndIf
       
        ;;;;AddGadgetItem(0, -1, name + "  -  " + Str(DirectoryEntrySize(dir)) ,0 , Dirlevel )
      EndIf
    Wend
    FinishDirectory(dir)
  EndIf
 
  dir = ExamineDirectory(#PB_Any, Path, "")
  If dir
    While NextDirectoryEntry(dir)
      If dirflag       
        Break
      EndIf
      name = DirectoryEntryName(dir)
      If name <> "." And name <> ".." And DirectoryEntryType(dir) = #PB_DirectoryEntry_Directory
        ;    AddGadgetItem(0, -1, name ,0 , Dirlevel)
        ;files +
        StatusBarText(#statusbar_mpb, 0, #TAB$+Str(files)+" Files")
        ScanPath(Path + name + "\")
      EndIf
    Wend
    FinishDirectory(dir)
  EndIf
  Dirlevel = Dirlevel - 1
  ; ProcedureReturn files
EndProcedure



; Procedure ProcessFolder(directory.s)
;    Protected directoryID,d.s
;    directoryID = ExamineDirectory(#PB_Any,directory,"*.*")
;    While NextDirectoryEntry(directoryID)
;       If DirectoryEntryType(directoryID) = #PB_DirectoryEntry_File
;          ;Debug directory+DirectoryEntryName(directoryID)
;         d=DirectoryEntryName(directoryid)
;         If LCase(d)="purebasic.exe"
;           ; le code de traitement des fichiers va là.
;             AddGadgetItem(#ListIcon_3,-1,FileGetVersion(directory+d,"ProductVersion")+"-"+binarytype(directory+d)+Chr(10)+directory)
;           EndIf
;       Else
;          If DirectoryEntryName(directoryID) <> "." And DirectoryEntryName(directoryID) <> ".."
;             ProcessFolder(directory+DirectoryEntryName(directoryID)+"\")
;          EndIf
;       EndIf
;     Wend
;     FinishDirectory(directoryID)
; EndProcedure

Procedure mpb_lprefs()
  Protected s.s,i.i,p.rect,v.s
  s=GetPathPart(ProgramFilename())+GetFilePart(ProgramFilename(),#PB_FileSystem_NoExtension)+".prefs"  ;"myapps.ini"
  ;
  OpenPreferences(s)
    PreferenceGroup("user")
    p\left=ReadPreferenceInteger("left",0)
    p\top=ReadPreferenceInteger("top",0)
    p\right=ReadPreferenceInteger("width",0)
    p\bottom=ReadPreferenceInteger("height",0)
   
    If p\left+p\top+p\right+p\bottom>0
      ResizeWindow(#Window_mpb,p\left,p\top,p\right,p\bottom)
    EndIf
    ;
    s=ReadPreferenceString("drive","")
    If s<>""
      SetGadgetText(#mpb_expcombo0,s)
    EndIf
    s=ReadPreferenceString("command","")
    If s<>""
      SetGadgetText(#mpb_String_0,s)
    EndIf
    ;
    If ReadPreferenceInteger("autoclose",0)
      SetGadgetState(#mpb_check1,#PB_Checkbox_Checked)
    EndIf
    ;
    PreferenceGroup("list")
    ExaminePreferenceKeys()
  While  NextPreferenceKey()
    s=PreferenceKeyValue()
    If FileSize(StringField(s,3,"|"))<>-1
    ;  v=StringField(s,3,"|")
    ;  s=ReplaceString(s,v,GetPathPart(v))
      s=ReplaceString(s,"|",Chr(10))
    If FindString(LCase(s),"purebasic")
      AddGadgetItem(#mpb_ListIcon_3,-1,s,ImageID(#mpb_ima0))   
    Else
      AddGadgetItem(#mpb_ListIcon_3,-1,s,ImageID(#mpb_ima1))
    EndIf
    EndIf
  Wend
  StatusBarText(#statusbar_mpb, 0, #TAB$+Str(CountGadgetItems(#mpb_ListIcon_3))+" Files")
  ;
  ClosePreferences()     
EndProcedure


Procedure mpb_sprefs()
  Protected s.s,i.i
  s=GetPathPart(ProgramFilename())+GetFilePart(ProgramFilename(),#PB_FileSystem_NoExtension)+".prefs"
  ;
  If OpenPreferences(s)=0
    CreatePreferences(s)
  EndIf
  PreferenceGroup("user")
  If GetWindowState(#Window_mpb)<> #PB_Window_Normal 
  SetWindowState(#Window_mpb,#PB_Window_Normal)
  EndIf
  WritePreferenceInteger("left",WindowX(#Window_mpb))
  WritePreferenceInteger("top",WindowY(#Window_mpb))
  WritePreferenceInteger("width",WindowWidth(#Window_mpb))
  WritePreferenceInteger("height",WindowHeight(#Window_mpb))
  ;
  WritePreferenceString("drive",GetGadgetText(#mpb_expcombo0))
  WritePreferenceString("command",GetGadgetText(#mpb_String_0))
  If GetGadgetState(#mpb_check1)=#PB_Checkbox_Checked
    WritePreferenceInteger("autoclose",1)
  Else
    WritePreferenceInteger("autoclose",0)
  EndIf
  ;
  RemovePreferenceGroup("list")
  ;
  PreferenceGroup("list")
  For i=0 To CountGadgetItems(#mpb_ListIcon_3)-1
  WritePreferenceString(Str(i),GetGadgetItemText(#mpb_ListIcon_3,i,0)+"|"+GetGadgetItemText(#mpb_ListIcon_3,i,1)+"|"+GetGadgetItemText(#mpb_ListIcon_3,i,2))
  Next
  ;
  ClosePreferences()       
EndProcedure

;ProcessFolder(#PB_Compiler_Home+"Examples\")
;

Procedure mpb_SizeWindowHandler()
  ResizeGadget(#mpb_frame0, #PB_Ignore, #PB_Ignore, WindowWidth(#Window_mpb)-10, #PB_Ignore)
  ResizeGadget(#mpb_String_0, #PB_Ignore, #PB_Ignore, WindowWidth(#Window_mpb)-20, #PB_Ignore)
  ResizeGadget(#mpb_ListIcon_3, #PB_Ignore, #PB_Ignore, WindowWidth(#Window_mpb)-10, WindowHeight(#window_mpb)-136)
  EndProcedure

Procedure OpenWindow_Window_mpb()
  If OpenWindow(#Window_mpb, 430, 205, 400, 347,"MultiPB",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered|#PB_Window_Invisible)
     If CreateImageMenu(#Menu_mpb, WindowID(#Window_mpb),#PB_Menu_ModernLook)
      MenuTitle("Options")
      MenuItem(#Menu_mpb_Infos, "Infos")
      MenuBar()
      MenuItem(#menu_mpb_aide, "Help")
      MenuBar()
      MenuItem(#Menu_mpb_exit, "&Quit"+Chr(9)+"Ctrl+Q")     
    EndIf
    ;
     If CreatePopupImageMenu(#menu_popup_mpb, #PB_Menu_ModernLook) ; La création du menu contextuel commence...
      ;MenuTitle("Projet")        ; Décommenter pour voir la différence
       MenuItem(#pop_updide_mpb,"Update IDE compilers list")
       MenuBar()
       MenuItem(#pop_delpb_mpb,"Uninstall PB version")
    EndIf
    ;
    If CreateStatusBar(#statusbar_mpb, WindowID(#Window_mpb))
      AddStatusBarField(110)
    EndIf
    ContainerGadget(#mpb_cont1,130,2,100,18)
    CheckBoxGadget(#mpb_check1,1,1,80,17,"Autoclose")
    CloseGadgetList()
    SetParent_(GadgetID(#mpb_cont1),StatusBarID(#statusbar_mpb))
    ;
    FrameGadget(#mpb_frame0, 5,  10, 390, 45, "Command Line")
    StringGadget(#mpb_String_0, 10, 25, 380, 22, "")
    ;
    ;ButtonGadget(#Button_1, 10, 60, 30, 25, "...")
    ButtonGadget(#mpb_Button_2, 200, 59, 80, 27, "Update")
    GadgetToolTip(#mpb_Button_2,"Refresh PB list")
    ExplorerComboGadget(#mpb_expcombo0, 10, 60, 150, 25, "C:" , #PB_Explorer_DrivesOnly   )
   
    ListIconGadget(#mpb_ListIcon_3, 5, 90, 390, 200, "PB/SB", 250, #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_CheckBoxes)
    AddGadgetColumn(#mpb_ListIcon_3, 1, "Exe", 30)
    AddGadgetColumn(#mpb_ListIcon_3, 2, "Path", 300)
    BindEvent(#PB_Event_SizeWindow, @mpb_SizeWindowHandler(),#Window_mpb)
    ;
    CatchImage(#mpb_ima0,?mulpb)
    CatchImage(#mpb_ima1,?mulpb2)
    ;
    WindowBounds(#Window_mpb,300,200,#PB_Ignore,#PB_Ignore)
    ;     SendMessage_(GadgetID(#ListIcon_3), #LVM_SETCOLUMNWIDTH, 0, #LVSCW_AUTOSIZE_USEHEADER)
  EndIf

EndProcedure

Procedure mpb_readpbprefs()
  Protected fn.s,k.s,v.s,i,j
  Dim v.s(1)
  fn=GetSpecialFolderLocation(#CSIDL_APPDATA)+"PureBasic\PureBasic.prefs"
  If FileSize(fn)<>-1
   OpenPreferences(Fn)
   PreferenceGroup("MoreCompilers")
   ExaminePreferenceKeys()
   i=0
   While  NextPreferenceKey()
     k=PreferenceKeyName()
     If FindString(k,"Version")
       v(i)=PreferenceKeyValue()
       i+1
       ReDim v(i+1)
     EndIf
     
   Wend 
   ClosePreferences()
   ;
   For i=0 To CountGadgetItems(#mpb_ListIcon_3)-1
     For j=0 To ArraySize(v())-1
       If GetGadgetItemText(#mpb_ListIcon_3,i,0)=v(j)
        SetGadgetItemState(#mpb_ListIcon_3,i,#PB_ListIcon_Checked)
       EndIf       
       Next       
   Next
   
  EndIf
 
EndProcedure

Procedure mpb_savepbprefs()
  Protected fn.s,v.s,i,j
  Dim v.s(1)
  fn=GetSpecialFolderLocation(#CSIDL_APPDATA)+"PureBasic\PureBasic.prefs"
  If FileSize(fn)<>-1
    ;
    If FileSize(fn+".bak")=-1
      CopyFile(fn,fn+".bak")
    EndIf
   ;     
   MessageRequester("Update Purebasic.prefs","If PureBasic is running, stop it !",#PB_MessageRequester_Ok)
   ;         
   OpenPreferences(Fn)
   ;RemovePreferenceGroup("MoreCompilers")
   PreferenceGroup("MoreCompilers")   
   j=ReadPreferenceInteger("Count",0)
   For i=1 To j
     RemovePreferenceKey("Compiler"+Str(i)+"_Exe")
     RemovePreferenceKey("Compiler"+Str(i)+"_Md5")
     RemovePreferenceKey("Compiler"+Str(i)+"_Version")
   Next 
   ;
   j=1
   For i=0 To CountGadgetItems(#mpb_ListIcon_3)-1
   If GetGadgetItemState(#mpb_ListIcon_3,i)>=#PB_ListIcon_Checked
   If FindString(GetGadgetItemText(#mpb_ListIcon_3,i,0),"spiderbasic",1,#PB_String_NoCase)=0 
   WritePreferenceInteger("Count",j)
   v=GetGadgetItemText(#mpb_ListIcon_3,i,2)+"\Compilers\pbcompiler.exe"
   v=ReplaceString(v,"\\","\")
   WritePreferenceString("Compiler"+Str(j)+"_Exe",v)
   WritePreferenceString("Compiler"+Str(j)+"_Md5",FileFingerprint(v,#PB_Cipher_MD5))
   WritePreferenceString("Compiler"+Str(j)+"_Version",GetGadgetItemText(#mpb_ListIcon_3,i,0))
   j+1
   EndIf
  EndIf
Next
   ;
  ; PreferenceComment("")   
   ClosePreferences()
   ;   
  EndIf 
EndProcedure


;-debut
Define fi.s
;fi=GetPathPart(ProgramFilename())+"focustrainer_x64.exe"
OpenWindow_Window_mpb()
mpb_lprefs()
HideWindow(#Window_mpb,#False)
mpb_readpbprefs()
;{- Event loop
Repeat
  Select WaitWindowEvent()
    ; ///////////////////
    Case #PB_Event_Gadget
      Select EventGadget()
        Case #mpb_Button_2
          SetGadgetText(#mpb_Button_2,"Cancel")
          ClearGadgetItems(#mpb_ListIcon_3)
          files=0
          ;SetClassLong_(WindowID(#Window_0),#GCL_HCURSOR,0)
          curs=LoadCursor_(0,#IDC_WAIT)         
          scanpath(GetGadgetText(#mpb_expcombo0)+"\")
          ;DestroyCursor_(curs)
          SetCursor_(LoadCursor_(0,#IDC_ARROW))
          mpb_readpbprefs()
          StatusBarText(#statusbar_mpb, 0, #TAB$+Str(CountGadgetItems(#mpb_ListIcon_3))+" Files")
          dirflag=0
          SetGadgetText(#mpb_Button_2,"Update")
         
        Case #mpb_ListIcon_3
          If EventType()=#PB_EventType_LeftDoubleClick 
            fi=GetGadgetItemText(#mpb_ListIcon_3,GetGadgetState(#mpb_ListIcon_3),2)
            If FindString(LCase(GetGadgetItemText(#mpb_ListIcon_3,GetGadgetState(#mpb_ListIcon_3),0)),"purebasic")
              RunProgram(#DQUOTE$+fi+"purebasic.exe"+#DQUOTE$,#DQUOTE$+GetGadgetText(#mpb_String_0)+#DQUOTE$,#DQUOTE$+fi+#DQUOTE$)
            Else
              RunProgram(#DQUOTE$+fi+"spiderbasic.exe"+#DQUOTE$,#DQUOTE$+GetGadgetText(#mpb_String_0)+#DQUOTE$,#DQUOTE$+fi+#DQUOTE$)
            EndIf 
            ;
            If GetGadgetState(#mpb_check1)=#PB_Checkbox_Checked
             mpb_sprefs()
             CloseWindow(#Window_mpb)
              Break
            EndIf
           
        ElseIf EventType()=#PB_EventType_RightClick 
          If GetGadgetState(#mpb_ListIcon_3)=-1
            DisableMenuItem(#menu_popup_mpb,#pop_delpb_mpb,#True)
          Else
            DisableMenuItem(#menu_popup_mpb,#pop_delpb_mpb,#False)
            EndIf
          DisplayPopupMenu(#menu_popup_mpb,WindowID(#Window_mpb))
        EndIf
      EndSelect
      ; ////////////////////////
    Case #PB_Event_Menu
      Select EventMenu()
        Case #pop_updide_mpb
          mpb_savepbprefs()
        Case #pop_delpb_mpb
          fi=GetGadgetItemText(#mpb_ListIcon_3,GetGadgetState(#mpb_ListIcon_3),2)
          If FileSize(fi)=-2
            If FileSize(fi+"unins000.exe")<>-1
            If MessageRequester("Uninstall PB","Uninstall : "+GetGadgetItemText(#mpb_ListIcon_3,GetGadgetState(#mpb_ListIcon_3),0)+" ?",#PB_MessageRequester_YesNo)=#PB_MessageRequester_Yes
              RunProgram(#DQUOTE$+fi+"unins000.exe"+#DQUOTE$)
              RemoveGadgetItem(#mpb_ListIcon_3,GetGadgetState(#mpb_ListIcon_3))
              ;DeleteDirectory(fi,"*.*",#PB_FileSystem_Recursive)
              EndIf
            EndIf
            EndIf
        Case #menu_mpb_infos
          fi="MultiPB - 1.3.2"
          CompilerIf #PB_Compiler_Processor= #PB_Processor_x64
            fi+" - x64"
          CompilerElse
            fi+" - x86"
            CompilerEndIf
          fi+#CRLF$+"by zaphod @2017"+#CRLF$
          fi+#CRLF$+"PureBasic/SpiderBasic multi version launcher"+#CRLF$
          fi+#CRLF$+"OpenSource"
          MessageRequester("MultiPB Infos",fi,#MB_ICONINFORMATION)
        Case #menu_mpb_aide
          fi="Checkmark show referenced version in PB ide compilation options."
          fi+#CRLF$+"Call contextual menu (right button) for change ide compilers list 'Update IDE compilers List'."
          fi+#CRLF$+"Close running PB ide for successfull change."
          fi+#CRLF$+"Original file 'Purebasic.prefs' is saved as 'Purebasic.prefs.bak'"
          MessageRequester("MultiPB Help",fi,#MB_ICONINFORMATION)
        Case #menu_mpb_exit
          mpb_sprefs()
          CloseWindow(#Window_mpb)
          Break
      EndSelect
     
    Case #PB_Event_CloseWindow
      Select EventWindow()
        Case #Window_mpb
          mpb_sprefs()
          CloseWindow(#Window_mpb)
          Break
      EndSelect
  EndSelect
ForEver
;
;}


Pour générer la première icone compiler :

Code:
UseLZMAPacker()
DataSection
datas:
Data.l $5D,$60000004,$51F77F02,$BD0851BF,$7EFB2638,$846B4755,$9821D4F,$CE54DD4A,$41C5EA88,$E73480AF
Data.l $25BAAD34,$22CDD569,$E56F86A8,$4C30391,$61A24959,$8EB3200D,$8E744DC5,$95B6D435,$F7CC13AA,$7CEDA5E5
Data.l $DB5BEC89,$2B775C44,$C6E680F1,$FB1632DB,$608A7D0B,$59AB75D7,$E3BB09BE,$FE9AAF36,$682EAD1F,$E578AB0
Data.l $BF89889A,$D4201217,$7D03C706,$12F9E808,$8A8C9271,$15C3BC20,$AA79BC42,$9DA019EF,$DDBC06E3,$7C235C2B
Data.l $CE5F9C57,$6D3351A5,$4A866F44,$8A4D4F39,$D36EA8D5,$74C879A6,$57FD14FF,$3FDF3EA8,$D46F309C,$B37CD091
Data.l $30B4C511,$A176775B,$58A4D8DA,$B8FB4DD8,$D7C0BEB3,$45B18ED6,$11E48064,$7AA2CC69,$B3A9D161,$23A69580
Data.l $45DBBD5C,$435B6020,$9AC4E20D,$DD6AB9B7,$62576FF1,$1C3AB9FE,$415D6AC8,$4DFE2C41,$25230BB4,$3299B481
Data.l $8ED5E648,$C317281A,$D5CD1856,$AF1F2F77,$F81C3A15,$13EB91C9,$DB193AFC,$C87A6C17,$31D6B496,$665272BF
Data.l $D440DD09,$2E1D8782,$F4B760BF,$3186153B,$71974D64,$78B35475,$A513CF79,$5CE836DD,$77D9A64D,$7740233D
Data.l $F073CEA8,$CDB13E71,$3B24E19C,$F9110D62,$7A204C34,$6B95E60A,$9EDA97E,$6B900883,$5015C252,$13FFB739
Data.l $15727008,$C3DF8556,$461C5252,$B5F5DFBF,$2F2494C2,$A6F40ECB,$763D9EA5,$9B7C8689,$839C6D38,$6356A430
Data.l $83D48734,$AEF438F7,$414B3B,$AB45E8B8,$5EE9209F,$2A2AED5D,$17E6D456,$AED376E,$3AF265C4,$6210C3CD
Data.l $33917F09,$1AF7B3A1,$2E5E4608,$385C2FD,$F41D11AD,$6D306C36,$37495BEF,$1A539271,$6421363E,$4255BEB4
Data.l $56FC7A7,$8D229C14,$51F7AA1,$FAA02CF0,$AA6904CA,$5A597B10,$3077E467,$25F421F0,$D5C02EFD,$CCF717D4
Data.l $589F7676,$C3AC9B27,$EF58DA18,$107099ED,$47C12F63,$99ED05D8,$72627E05,$7C820A2F,$199E7A3F,$7E0BE96F
Data.l $4689C4A6,$BFB7AD62,$BEDDAA67,$2DECA08A,$2294E7C8,$36CBF389,$A5D41B01,$7F9320F7,$6B47CC95,$4D1DFA0A
Data.l $C717AFD3,$6352FED7,$99E41EF2,$47DB629F,$1452BE68,$2F6132F,$2F2204C1,$3E43D766,$8820D74C,$5997665D
Data.l $72F8332B,$4BF13BBB,$F7BE0D54,$6845A00D,$A0A3F988,$CD0AC4D7,$86C12D95,$552C7B4F,$5C20D8F3,$D493F701
Data.l $D6BA017B,$13266B91,$AA12D6BC,$1E6F1D66,$D56CD3DB,$414C7AA4,$A260D03E,$1A5BF4D7,$9F0F28C8,$A1F3056D
Data.l $C138945B,$BB94863F,$A40F64A5,$EAFDD010,$5F717ABA,$B15D08A,$685965B,$FFAAF4A7,$3B0C5BF0,$E7CEAD16
Data.l $EB9C6396,$DED0286A,$8B3EAD56,$D0653,$7001BFD3,$83AB16A2,$282C6FE0,$93AF6E17,$7E8C6E78,$37FFD0C4
Data.l $A2E2B7BF,$AA65B18,$E786BD3F,$942C9F1F,$D3BBE52C,$CA4F1641,$1B76BE42,$28F6F07C,$FD49FE7D,$C3D8B370
Data.l $CEFD1EC5,$34A793D1,$61DA7137,$9CA4FAE1,$B49A541A,$9B1C5C17,$7F8EE649,$53D06E72,$1A5D53C5,$47F50320
Data.l $10CEC572,$CFF11D2C,$BC69D1F,$EBBCD399,$D69C2B63,$D66CA318,$161E66E8,$CA4229ED,$6D120B98,$77D4BDDD
Data.l $F02E9B37,$AE04C30A,$959C1382,$1B785DEF,$4E3DA6E3,$B16D0D56,$8F241121,$7C055F44,$3D5517E5,$98377C41
Data.l $DC1526D7,$465D7D9B,$2CBE47E8,$BD2665D,$DC4B8662,$DA03C537,$30CC8855,$19E4DA01,$AC849CC3,$B37FF805
Data.l $A1E19BEA,$5B91026F,$C46542CD,$F69EF67D,$6EE5A3FD,$CFEAAF72,$16085E4,$31013D79,$B3D4CDF0,$4A36918C
Data.l $76408875,$2641A733,$6C62EE41,$DB6160B0,$81AE6A70,$C2D2205A,$7B15F4A5,$E2D9E0F4,$5D63E7D,$4BD46AF0
Data.l $CFCE1FC0,$ACB4F55B,$FF659753,$56120A87,$3823040D,$3D8629F5,$30B64175,$59FA77AE,$1BC2B12E,$F1C4A96
Data.l $7ACAC4CF,$5B521375,$A7AC76A8,$83B76058,$28E7660B,$75C734F2,$D1153772,$64B62C7B,$7A48A764,$ACFC9962
Data.l $DE4F3A06,$BA676CC8,$1FF352D3,$663F53C8,$BA8175D9,$19531D43,$BE709DEF,$7F94B357,$8C1297DC,$F0D1D5D2
Data.l $3D4BC750,$2693FCC8,$B2825490,$8F8FB73,$94FEE0DC,$1639D2A9,$D302B9F6,$D070C91B,$3788274C,$E61B4080
Data.l $83295053,$DD75BD1,$DCE4E943,$9926A641,$A1808370,$5F931EA7,$35AB8A51,$4C24910B,$29727396,$B9FBFFAA
Data.l $46B047E,$206DE72F,$BCBA7F21,$CA28138B,$142183,$4B41A866,$BEFDB77D,$9A30B72B,$FF843340,$A5943704
Data.l $8EBEED88,$3A87E2FA,$FE82D3D5,$489B7F69,$5C21959D,$72D47F05,$A33CFAFC,$2C117689,$865D200D,$369495F6
Data.l $71E24180,$F6E9E80,$5C20A9BD,$C5F1F640,$4F3706A2,$FAC42DA4,$3C6C1A2B,$7ADE4D77,$20BF9CF9,$B60686BB
Data.l $489A0A0E,$9F4E21DF,$F35CD0C4,$C8F927FC,$A5FEA34A,$AFE6F130,$A8E1173E,$93A82CB4,$4679D175,$76023187
Data.l $9AABA21,$7DE55257,$76CE79B,$AF3C39C0,$A9C7590D,$E8E406A3,$FD4344E6,$EA33892A,$7176C7A9,$4D5D04FF
Data.l $315C2809,$95089DB3,$3FB9A805,$B69D569D,$A8A78112,$E716223F,$D72999E8,$8A42F2EE,$86EFEC7E,$CDD55EAF
Data.l $A7B90212,$B86D2BA3,$DF254369,$1E7E64F9,$D1FDDC00,$A3042AA9,$4198EB69,$388700CD,$7842F032,$A709B9B9
Data.l $F8ED2A79,$EEB9F267,$AC9603AB,$9912B5AA,$6FFEFAAE,$28D795FD,$1CF73900,$DE8C37D5,$82F29F34,$39ABD169
Data.l $846E92F4,$C3E4E2A0,$FC374202,$2D4C2CB7,$EA24D42E,$B3167B56,$8514668C,$A6817451,$AEDB0221,$37F02226
Data.l $3E4C53E2,$339C9167,$25BF670E,$6FC3278A,$24A2876D,$2F003144,$1C91EFD5,$65A2B3FA,$A3D84F30,$809C75E4
Data.l $E92D2A74,$3CCA83A1,$42455BDD,$CCC517FE,$B6FBD122,$3332C559,$96FDD47E,$BA1570C1,$9815412C,$1DD9E68E
Data.l $FF9E23B1,$D79BDB30,$9CF3D536,$872B1FAF,$98CD7288,$C9446203,$E187C90E,$A0A079C4,$1E19E15A,$F096C2D2
Data.l $948C706B,$58EB8A1E,$F3CD3D23,$958C7003,$9645EABF,$E29FDE63,$73F2A9F3,$6DC31168,$510D1036,$777303E0
Data.l $B08E0131,$4F94CFC0,$7B90C9A9,$CD1D82B8,$527D5C61,$6DB321C5,$D8556C97,$C6B230DF,$4321F624,$7F578243
Data.l $33AB88AE,$1FF9CABB,$705B9A2D,$D7C18716,$9894690D,$36BCF9E7,$7E4DB689,$2B179E3D,$4F1284BC,$CDF315AB
Data.l $F99F07D5,$7506B834,$B231A3F0,$F9CFCA9,$6A77953,$267C2AFD,$ED93D328,$21468262,$3C47150D,$E5A15F81
Data.l $28C60010,$F123F483,$7A35402C,$C2B4E80B,$759A59C3,$968B4A6C,$76597BA5,$8570024A,$BF2DB4E5,$7EB93833
Data.l $B84CEE19,$368C051C,$1B653E76,$34848084,$CB69772D,$652436B6,$28DB9968,$CE1A6679,$241836DF,$651F3F24
Data.l $D886C3B7,$75266735,$7CD4A4F6,$A0E49FCA,$C1EDF2BC,$DF9FBBB3,$66B23D78,$7163F49E,$28AFEAB3,$A84793CD
Data.l $6D651588,$D4A36316,$DA14269C,$23477A36,$3CAF2581,$CF196685,$2FE62A55,$F04B7799,$380AC281,$5AF8C1FF
Data.l $A7F8B06E,$E1F70C14,$2D497D3,$51F235FC,$4F11441C,$5D2F5EB8,$A4358C1,$ED71A3AA,$1A45B873,$A5992E1D
Data.l $DBF28DD8,$2E799A76,$3DBA73FB,$892E4D2B,$390B8F54,$ED792956,$7817352E,$98EE4918,$1FB010F7,$766B9731
Data.l $AF5C185B,$8DB9109B,$22844517,$5E736D14,$555335BB,$D1DFFE34,$23A43A14,$AD3AA5DC,$5CB968B0,$45108B72
Data.l $B346B544,$860D983,$92A9E409,$A617A648,$EBF85543,$4D15E46A,$1C966A28,$9193F883,$3C828CEB,$73744EEF
Data.l $8DAD24D2,$7800A1FC,$FAAB74E9,$C1F529D3,$5E910331,$A33FE9D3,$F063971C,$4B033B66,$8D0C3BBD,$BEE38FA7
Data.l $8C360FA5,$5ED2139C,$D7B0ED69,$23DEDBCF,$F12FADDD,$A2E04905,$B048E1C9,$8F0B6CC4,$75712370,$70AFFF75
Data.l $ADAAC6FE,$3FDF2CE1,$B811040E,$3F143AC5,$871B84D3,$FDA63B4C,$C808B1EE,$A7F47171,$E4CE227C,$3F129278
Data.l $6AA5DC90,$5648D974,$C8D7206E,$D877F338,$9CEC86B4,$414FF544,$77D9CA90,$8D1FE83B,$DC5FC89A,$7A8483E5
Data.l $E3E02233,$61A70E25,$45D64BD2,$F5F1A62B,$F4D96090,$75AE02CD,$DFE716D5,$50DF281A,$A9C475DF,$C145D205
Data.l $E678E779,$3479CBB4,$E6E67419,$6571BE6,$9A866C4,$E0C65DFF,$6F710723,$6A8B7F8,$39A106D1,$2B33C22A
Data.l $956D4C5E,$1CE88837,$8FB53737,$28B7F280,$1BF14894,$1BE43E2,$A12D5E0B,$78827C2D,$554779E1,$D06CCFA4
Data.l $ABCA88EC,$547F9F07,$AE46AD47,$1FC1160D,$27366E68,$A03DD565,$869E07FE,$2355131,$5883E666,$5E4FB560
Data.l $D439454F,$B306C798,$7EB2D27A,$A756A684,$279895FD,$581DE6D0,$74FB5350,$47B1AD69,$707E13B3,$4FF3DD66
Data.l $367B02EA,$8DFABF40,$BAF50B3,$88D89215,$22823373,$7A830F5B,$EA26265A,$4A74311E,$BAF4594C,$4BB818CF
Data.l $D8F2E3CC,$7B3452D9,$FD5A13F5,$75F29720,$27C35228,$24A02C8F,$C2C231C5,$E528F03A,$ED33C33D,$DA43BACD
Data.l $8D3C5C2,$9395856C,$B107000C,$BD6FD886,$6545E687,$EC6CF468,$1B012FD4,$8DDCA18B,$22AB453D,$7C7E5D9D
Data.l $C61EB9C4,$FD49E8A1,$450C46A2,$F2964A19,$EEB1A268,$9D7AB091,$37C883E2,$9408FEE8,$6A7D25F5,$6EB28A68
Data.l $CEAE98FD,$3407E0DB,$1F6E59BC,$595BE779,$D01CF483,$98F02C4B,$7C115B95,$A291AC70,$ECC58FA6,$DCF4D47
Data.l $1F794EFA,$689B998E,$F2BE3CC1,$F0A03396,$48FDFF21,$550C
EndDataSection
titre$="mulpb2.ico"
*pak=AllocateMemory(2862)
For i=0 To 2861 Step 4
Read.l d
PokeL(*pak+i,d)
Next
*unpak=AllocateMemory(13222)
UncompressMemory(*pak,2862,*unpak,13222,#PB_PackerPlugin_Lzma)
If CreateFile(1,titre$)
WriteData(1,*unpak,13222)
CloseFile(1)
EndIf
FreeMemory(*pak)
FreeMemory(*unpak)


Pour la deuxième icône compiler :

Code:
UseLZMAPacker()
DataSection
datas:
Data.l $5D,$60000004,$242C9004,$AA999B0B,$8CA2E25E,$99945E1,$9B05A092,$91FF17AB,$3576874D,$990F7E91
Data.l $4E276066,$4BDB7661,$91F34D33,$7B92F9D8,$DC8450D8,$3A13A1C3,$AD0A9F09,$793DB348,$24862C33,$48177B23
Data.l $BD096F72,$18EABAF8,$40773CC6,$28F557CC,$4F456EEB,$E387CE33,$92F7050C,$504F9B14,$1F6B97EE,$6F318C3D
Data.l $BA69E523,$B9D31D02,$CC1888F1,$9378B21B,$F2DE2EE9,$248FAF67,$B4C679FD,$9DA6A04A,$4151A981,$8E160451
Data.l $C0C73286,$4C1EAA6A,$31F575A2,$2443CB15,$60723ED1,$C95D98A4,$F448A2E0,$C44C78DE,$54740203,$F9AEF53E
Data.l $4B5FEB,$6D2A4355,$B63D0D90,$BEEA142C,$444CB3E1,$4D0E68CD,$78E10565,$A3F556A2,$991988C2,$29AC3B15
Data.l $D7021463,$848C5B42,$76672C3C,$7AA9C72E,$221CF501,$D9A82B7E,$7D303DB3,$51F52F2,$1E79B476,$A5BCD895
Data.l $EE57094F,$2730D761,$F029499E,$BB3D526D,$4257D9BF,$3C50A380,$1B571018,$929D3390,$E5C685C7,$EC37C7F9
Data.l $F7B4B7BC,$740552B7,$A096FEBD,$8709419F,$756CB25B,$B1E708FC,$E50AA2A9,$10AA573D,$A62ABB6E,$4D86F798
Data.l $57385880,$4F76401F,$CDCBB8DB,$6CBC97E9,$E5E946FC,$EE256BA9,$64FB3B5D,$BFC9B99A,$E79F2248,$3CE8B937
Data.l $DA839C8B,$9C307D7B,$7825CF6A,$7759612D,$BA6FC3C2,$32582D34,$E7AA4359,$B0D91F4F,$2CE6E872,$ED956940
Data.l $F0801C56,$D95E7F8F,$976DA75B,$4C9D3D35,$B0CC3AB0,$13317FF1,$8756C5B6,$8B64FAA1,$7E670139,$20ABD294
Data.l $9576B4E6,$135400C9,$CA807F66,$5EF35BE9,$21D8D0B,$B0D37890,$ECB45FFE,$AFC07262,$BB3D0833,$CE0C9FF5
Data.l $3ED7CA69,$C589AA4,$BA5A2605,$52A1FD67,$16EA8777,$8209FE7E,$3BB1E0D5,$EBAC77DF,$3649AF01,$69D38613
Data.l $A7BB7A66,$BFEE5734,$E54F2DC,$522840C7,$C45E8B96,$965BAF1D,$AEE2F1AB,$C721B4DD,$A2BF181E,$9045034E
Data.l $DB9B4F3,$C06D2554,$F9A4DE5E,$AA23387B,$C1F9DDF,$DE21804C,$D56E5A12,$517D48B5,$E72A3462,$97D96174
Data.l $3A3A6757,$3E4F3F8A,$DC6643BE,$8A10556E,$C4EA4E72,$472F7AF6,$54D7A863,$8035A6C0,$ED4352CC,$30803A06
Data.l $59A0B7C,$E2EF5D90,$79BF15E4,$94EE7ECE,$CA5AF072,$D4528051,$430D4E0D,$882007E4,$F6A26BF1,$A3DF85AE
Data.l $DC6ADB3D,$DBA356F5,$BC2586D9,$5985F7F1,$C7C79DD4,$16C964AB,$1ED0716C,$24385DD0,$D38915E9,$73AC5EA1
Data.l $80A696E6,$8CB966EB,$7A4BEB4F,$6551DC9B,$E733198C,$EBFF8E66,$BE6A48B4,$472B3065,$235F9FD0,$291FF05B
Data.l $EAAE7335,$F6B9F1D8,$3AA55F32,$F81D0909,$A007F252,$8190B4F0,$DFAC8235,$A17F6D3C,$32E0DDDB,$A4F0E7F2
Data.l $F2B890B8,$A32C4DD,$9BBC370B,$C99ACB11,$666CD6,$C9DC5A58,$FC7F641A,$9A86BAE2,$89E88088,$5B7B9BBE
Data.l $ECAD4C74,$FBEDA401,$11B74ACD,$6FE38A2E,$27827145,$CDE36CAF,$9CAA664E,$529CDE7,$22F109EB,$7417C1BE
Data.l $A5F984E5,$C61DD02C,$7BC7D6AE,$71BC6739,$9D2347E8,$EBEBE5E8,$61EBC072,$61D96F16,$88A91814,$7CF2A205
Data.l $70D2E116,$F6EF6642,$4C6C5CF7,$A59AC65C,$B41C87A,$372B4B66,$1FD24E26,$F645C16A,$C8231D46,$6808ACBD
Data.l $C5513A0A,$88C35C52,$4ACD4467,$FCB543F3,$DE7386DD,$9B2FF865,$5AF04C9C,$7B03CCEC,$E6EF1581,$82A9421
Data.l $16BD4053,$A3AE7552,$E080B71B,$5D48ADCD,$8EE2BB64,$30AC3971,$E0ECCEB3,$9614E722,$B3A32E6F,$2854B3E0
Data.l $A090D83B,$65A26254,$A32C35B,$79A92F9E,$56036F91,$A2A0E09B,$122F1AD6,$1BFFD80B,$B23ECDB1,$6868F92B
Data.l $4B6FB966,$FC95E96F,$B7BB8821,$6969DB76,$6BC26D22,$A829D31F,$D1FCD42E,$527EF2F2,$8374D554,$75E0D807
Data.l $7377E06,$74FCDC1D,$16821B78,$DE5B773E,$C9ABDF32,$F2FA6B7E,$A7E2DB5,$3E99EF1C,$DB839F78,$D839895D
Data.l $4CB80510,$9ECD1FE2,$6E257AFE,$6B99F3A3,$95C265CF,$FF72AD47,$E81D8478,$76F42A27,$1319E840,$5D675D21
Data.l $6DD3357F,$8DA63E77,$854F1AEB,$4C41C6D5,$1E142A2,$D2AE9CEE,$B88C600F,$3755888F,$6AA97F10,$BDF37514
Data.l $CF46EC14,$22B4BAD7,$726495A0,$480D8F34,$34A8B650,$565930E6,$428A8ECF,$5E9E12FD,$2B2FD937,$2280DA55
Data.l $CEB61F9E,$EF4E9A13,$66389643,$40FF66D6,$9716755C,$9ADCDAFC,$D70753F5,$F3B4DFE,$5F4879A8,$A385F70D
Data.l $94BE742F,$9FC89FA3,$27C9657D,$9F2F702D,$844BFDC7,$2E
EndDataSection
titre$="mulpb4.ico"
*pak=AllocateMemory(1381)
For i=0 To 1380 Step 4
Read.l d
PokeL(*pak+i,d)
Next
*unpak=AllocateMemory(4286)
UncompressMemory(*pak,1381,*unpak,4286,#PB_PackerPlugin_Lzma)
If CreateFile(1,titre$)
WriteData(1,*unpak,4286)
CloseFile(1)
EndIf
FreeMemory(*pak)
FreeMemory(*unpak)


Dernière édition par zaphod_b le Sam 14/Oct/2017 18:24, édité 4 fois.

Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Dim 11/Déc/2016 15:30 
Hors ligne
Avatar de l’utilisateur

Inscription: Sam 31/Juil/2004 22:32
Messages: 1140
C'est cool, mais je préfère utiliser la dernière version de l'IDE, je me contente de changer le compilo si j'ai besoin d'une version précise.


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Dim 11/Déc/2016 15:43 
Hors ligne
Avatar de l’utilisateur

Inscription: Dim 13/Déc/2015 11:05
Messages: 649
Localisation: Allez, cherche...
Petite astuce avec Dropbox, zaphod : Si tu modifie manuellement le lien en changeant le "?dl=0" à la fin par un "?dl=1", tu as un lien de téléchargement direct (sans redirection chez Dropbox) :P

Moi aussi je préfére utiliser la derniére version de l'IDe, j'ai tous mes compilos répertoriés dans les paramétres et il me suffit de modifier les options de compilation pour passer de l'un a l'autre :)

_________________
"Le bug se situe entre la chaise et le clavier"
Votre expert national en bogage et segfaults.

CPU : AMD A8 Quad core - RAM 8Gb - HDD 2To
  • Windows 10 x64 - PB 5.61 x64
  • Linux Ubuntu 16.04 LTS x64 (dual boot) - PB pas encore réinstallé


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Dim 11/Déc/2016 17:00 
Hors ligne
Avatar de l’utilisateur

Inscription: Dim 02/Oct/2011 16:17
Messages: 2202
Localisation: 50200 Coutances
N'empêche que c'est franchement génial, car Tailbite ne fonctionne pas sur toutes les versions et c'est une manœuvre bien pratique.

_________________
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce GT 640 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 5.62, 5.70 LTS
Un homme doit être poli, mais il doit aussi être libre !


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Dim 18/Déc/2016 15:17 
Hors ligne

Inscription: Mar 09/Déc/2014 20:02
Messages: 74
Salut à tous,

Version 1.1 de multiPB avec quelques améliorations.
Voir le premier post mis à jour.

J'ai mis dl=1 comme suggéré par Sherman.

Image


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Dim 18/Déc/2016 15:32 
Hors ligne
Avatar de l’utilisateur

Inscription: Dim 09/Oct/2005 16:51
Messages: 8779
Salut,
Je trouve que le terme OS prête à confusion. On est sur un OS x64 ou x86 et les versions de PB peuvent être en x64 et x86.

_________________
~~~~Règles du forum ~~~~
.: Ar-S :. Tour + portable W10 x64 PB 5.4x / 5.6x
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
RESIZER GOLD : Mon logiciel de redimensionnement par lot 100% PB


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Sam 14/Oct/2017 18:16 
Hors ligne

Inscription: Mar 09/Déc/2014 20:02
Messages: 74
Salut à tous,

MultiPB 1.3.2 avec son code source (voir 1er post).
Il permet de gérer plusieurs versions de PureBasic.
Il est en anglais, désolé.

Si ça peut servir à qqun... on sait jamais... des fois... sur un malentendu... :wink:


Haut
 Profil  
Répondre en citant le message  
 Sujet du message: Re: multiPB
MessagePosté: Lun 16/Oct/2017 13:39 
Hors ligne
Avatar de l’utilisateur

Inscription: Sam 23/Sep/2006 18:32
Messages: 6658
Localisation: Isere
J'avais loupé ce POST 8O :oops:
Comme quoi, c'est toujours bon les MAJ :D

Je ne sais pas si je l'utiliserais, car on a tous nos habitudes (bonnes ou mauvaises) depuis le temps :wink:
Cool la création d'icones....ça m'a plu 8O

En tout cas, je te remercie du partage 8)

_________________
ImageLe bonheur est une route...
Pas une destination

PureBasic Forum Officiel - Site PureBasic


Haut
 Profil  
Répondre en citant le message  
Afficher les messages postés depuis:  Trier par  
Poster un nouveau sujet Répondre au sujet  [ 8 messages ] 

Heures au format UTC + 1 heure


Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 3 invités


Vous ne pouvez pas poster de nouveaux sujets
Vous ne pouvez pas répondre aux sujets
Vous ne pouvez pas éditer vos messages
Vous ne pouvez pas supprimer vos messages

Rechercher:
Aller à:  

 


Powered by phpBB © 2008 phpBB Group | Traduction par: phpBB-fr.com
subSilver+ theme by Canver Software, sponsor Sanal Modifiye