Partage
  • Partager sur Facebook
  • Partager sur Twitter

Inno Setup

le script recopie le contenu des dossiers

    11 janvier 2022 à 16:27:47

    Bonjour,

    J'utilise Inno Setup pour empaqueter une base Access. ça s'est presque bien passé sauf que le script généré a extrait le contenu des dossiers DOC et ICO et copié à la racine.

    voici le script:

    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
    
    #define MyAppName "The Hunter DB"
    #define MyAppVersion "1.2"
    #define MyAppPublisher "Maximages"
    #define MyAppURL "https://www.maximages.fr"
    #define MyAppExeName "TheHunterDB.mde"
    #define MyAppAssocName MyAppName + " File"
    #define MyAppAssocExt ".myp"
    #define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
    
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{0A2B87D5-288D-4966-AE6E-A10D0367CA65}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={autopf}\{#MyAppName}
    ChangesAssociations=yes
    DisableProgramGroupPage=yes
    LicenseFile=C:\Users\alain\MesDocuments\Access\TheHunter_inno\GPL.txt
    InfoBeforeFile=C:\Users\alain\MesDocuments\Access\TheHunter_inno\Texte_début.txt
    ; Uncomment the following line to run in non administrative install mode (install for current user only.)
    ;PrivilegesRequired=lowest
    OutputDir=C:\Users\alain\MesDocuments\Access\TheHunter_inno
    OutputBaseFilename=Setup
    SetupIconFile=C:\Users\alain\MesDocuments\Access\TheHunter_inno\iconebureau.ico
    Compression=lzma
    SolidCompression=yes
    WizardStyle=modern
    
    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    
    [Files]
    Source: "C:\Users\alain\MesDocuments\Access\TheHunterDB\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\alain\MesDocuments\Access\TheHunterDB\TheHunterDB.bmp"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\alain\MesDocuments\Access\TheHunterDB\Doc\*"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\alain\MesDocuments\Access\TheHunterDB\ico\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    [Registry]
    Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
    Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
    Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
    Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
    Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""
    
    [Icons]
    Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    
    [Run]
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
    
    

    Merci pour votre aide

    • Partager sur Facebook
    • Partager sur Twitter
      7 mars 2022 à 11:24:57

      Salut,

      Tu as de la chance, j'ai eu le même problème la semaine dernière!

      Si j'ai bien compris, tu veux copier les dossier DOC et ICO ainsi que leur contenu dans le répertoire cible.

      Il faut pour cela ajouter à la main le répertoire dans la commende DestDir, par exemple :

      Source: "C:\Users\alain\MesDocuments\Access\TheHunterDB\ico\*"; DestDir: "{app}\ico"; Flags: ignoreversion recursesubdirs createallsubdirs
      ça devrait fonctionner !
      • Partager sur Facebook
      • Partager sur Twitter

      Inno Setup

      × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
      • Editeur
      • Markdown