Inno Setup: pack folder with all subfolders

后端 未结 2 512
抹茶落季
抹茶落季 2021-02-02 05:51

I have this line in .iss file:

Source: \"..\\Tcl\\*\"; DestDir: \"{app}\\Tcl\"; Flags: ignoreversion

which packs folder Tcl<

相关标签:
2条回答
  • 2021-02-02 06:20

    Yes, there is. Simply include the recursesubdirs flag to your [Files] section entry. The help says about this flag the following:

    Instructs the compiler or Setup to also search for the Source filename/wildcard in subdirectories under the Source directory.

    So, all you should do is modify your [Files] section entry this way:

    [Files]
    Source: "..\Tcl\*"; DestDir: "{app}\Tcl"; Flags: ignoreversion recursesubdirs
    
    0 讨论(0)
  • 2021-02-02 06:27

    You can also use the Inno Wizard, but you'll need to correct the script afterwards if you would like those files to stay in the folder they're imported from, because the Wizard will put them in the app default folder.

    The wizard wil generate:

     [Files]
     Source: "..\Tcl\*"; DestDir: "{app}; Flags: ignoreversion recursesubdirs
    

    If you need to maintain the folder structure you'll need:

     [Files]
     Source: "..\Tcl\*"; DestDir: "{app}\Tcl"; Flags: ignoreversion recursesubdirs
    

    Inno Wizard Update as of 5.6.1 (08/14/2018)
    The Inno Setup Script Wizard now has the option to specify a subfolder. On the Application Files step of the wizard, use the Add Folder... button, then after you select the folder you would like to add, make sure it is selected in the list and then click Edit... and under the Destination Subfolder textbox, specify where you would like the previously selected folder contents to go.

    0 讨论(0)
提交回复
热议问题