InnoSetup创建了两个相同的文件夹

时间:2013-09-10 14:30:30

标签: inno-setup

我想将游戏放入:C:\ Program Files(x86)\ test \ Gone Home \, 但InnoSetup创建以下目录:C:\ Program Files(x86)\ test \ Gone Home \ Gone Home

因此,我的图标不起作用。

当我使用“添加文件,添加文件夹,添加目录”时,我得到相同的结果。 我正在使用Inno Script Studio。

- 如果带有正确图标的.exe不在基本目录中,例如C:\ Program Files(x86)\ test \ Gone Home \ binaries ...我在ICONS部分需要更改什么?< / p>

会是这样的吗?:

Name: {commondesktop}\{#AppName}; Filename: {app}\binaries\{#AppExec}; WorkingDir: {app}; 

到目前为止,这是我的代码:

#define AppName "Gone Home"
#define AppPublisher "test"
#define AppVersion "1.0.0.0"
#define AppExec "GoneHome.exe"
#define SetupName "Setup"  
#define SetupOut "Output"

[Setup]
AppName={#AppName}
AppPublisher={#AppPublisher}
AppVersion={#AppVersion}
AppComments={#AppName}
DefaultDirName={pf}\{#AppPublisher}\{#AppName}
DefaultGroupName={#AppName}     
OutputBaseFilename={#SetupName}
OutputDir={#SetupOut}
InternalCompressLevel=none
DiskSpanning=True
DiskSliceSize=1566000000
SlicesPerDisk=3

[Icons]
Name: {group}\Uninstall {#AppName}; Filename: {app}\unins000.exe; WorkingDir: {app};
Name: {group}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; 
Name: {commondesktop}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; 

[Languages]
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"

[Dirs]
Name: "{app}\Gone Home\GoneHome_Data"
Name: "{app}\Gone Home\GoneHome_Data\Managed"
Name: "{app}\Gone Home\GoneHome_Data\Mono"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\1.0"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\Browsers"
Name: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\mconfig"
Name: "{app}\Gone Home\GoneHome_Data\Plugins"
Name: "{app}\Gone Home\GoneHome_Data\Resources"

[Files]
Source: "C:\Program Files (x86)\Gone Home\Attributions.txt"; DestDir: "{app}\Gone Home"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome.exe"; DestDir: "{app}\Gone Home"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\Localization-howto.txt"; DestDir: "{app}\Gone Home"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\uninstall.exe"; DestDir: "{app}\Gone Home"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\level0"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\mainData"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\output_log.txt"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\PlayerConnectionConfigFile"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\resources.assets"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\ScreenSelector.bmp"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\sharedassets0.assets"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\sharedassets1.assets"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Thumbs.db"; DestDir: "{app}\Gone Home\GoneHome_Data"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Assembly-CSharp-firstpass.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Assembly-CSharp.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Assembly-UnityScript-firstpass.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Assembly-UnityScript.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Boo.Lang.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\Mono.Security.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\mscorlib.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\System.Core.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\System.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\System.Xml.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\UnityEngine.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\UnityScript.Lang.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Managed\uScriptRuntime.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Managed"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\mono.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\browscap.ini"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\config"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\1.0\DefaultWsdlHelpGenerator.aspx"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\1.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\1.0\machine.config"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\1.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\DefaultWsdlHelpGenerator.aspx"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\machine.config"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\settings.map"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\web.config"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\Browsers\Compat.browser"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\2.0\Browsers"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Mono\etc\mono\mconfig\config.xml"; DestDir: "{app}\Gone Home\GoneHome_Data\Mono\etc\mono\mconfig"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Plugins\steam_api.dll"; DestDir: "{app}\Gone Home\GoneHome_Data\Plugins"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Gone Home\GoneHome_Data\Resources\unity default resources"; DestDir: "{app}\Gone Home\GoneHome_Data\Resources"; Flags: ignoreversion

1 个答案:

答案 0 :(得分:2)

您已定义Dafault文件夹(代码为{app})至DefaultDirName={pf}\{#AppPublisher}\{#AppName},其中{#AppName}Gone Home但稍后您将DestDir设置为{ {1}}。

您应该将DestDir设置为{app}\Gone Home,在您的情况下为{app}

关于单独的ICO文件,您只需添加C:\Program Files (x86)\test\Gone Home之类的内容 - 您应该将图标指向那里。

您也不必为要复制的每个文件都写单行。您可以使用通配符IconFileName: "{app}\MySpecialAppIcon.ico"以及标记*。这会将所有文件和目录复制到目标目录。

reateallsubdirs recursesubdirs