如何仅将一个文件与此 ISPP 宏一起使用登录一次



我不确定我做对了:

; We use the preprocessor to compare the DLL versions.
; This results in a smaller setup executable.
; See: https://stackoverflow.com/a/49647793/2287576
#pragma parseroption -p-
#define FileEntry(Source, DestPath) 
    "Source: "" + Source + ""; DestDir: "" + DestPath + ""; Flags: ignoreversionn"
#define ProcessFile(RootPath, Path, AlternativePath, DestPath, FindResult, FindHandle) 
    FindResult ? 
        Local[0] = FindGetFileName(FindHandle), 
        Local[1] = AddBackslash(Path) + Local[0], 
        Local[2] = AddBackslash(AlternativePath) + Local[0], 
        Local[3] = AddBackslash(RootPath) + Local[1], 
        Local[4] = AddBackslash(RootPath) + Local[2], 
        Local[5] = 
           FileExists(Local[4]) && 
           (GetFileVersion (Local[3]) == GetFileVersion (Local[4])), 
        FileEntry((Local[5] ? Local[2] : Local[1]), DestPath) + 
        ProcessFile(RootPath, Path, AlternativePath, DestPath, 
            FindNext(FindHandle), FindHandle) 
    : ""
#define ProcessFolderWithAlternativeSource(RootPath, Path, AlternativePath, DestPath) 
    Local[0] = FindFirst(AddBackslash(AddBackslash(RootPath) + Path) + "*.dll", 0), 
    ProcessFile(RootPath, Path, AlternativePath, DestPath, Local[0], Local[0])
#pragma parseroption -p+
#emit ProcessFolderWithAlternativeSource( 
    SetupSetting("SourceDir"), "OutlookCalIFConsole", ".", "{app}OutlookCalIFConsole")
Source: "OutlookCalIFConsoleOutlookCalIFConsole.exe"; DestDir: "{app}OutlookCalIFConsole"; Flags: ignoreversion sign
Source: "OutlookCalIFConsoleOutlookCalIFConsole.exe.config"; DestDir: "{app}OutlookCalIFConsole"; Flags: ignoreversion
; MSATools GMail Library
#emit ProcessFolderWithAlternativeSource( 
    SetupSetting("SourceDir"), "MSAToolsGMailClassLibrary", ".", "{app}MSAToolsGMailClassLibrary")

新的代码位在这里:

; MSATools GMail Library
#emit ProcessFolderWithAlternativeSource( 
    SetupSetting("SourceDir"), "MSAToolsGMailClassLibrary", ".", "{app}MSAToolsGMailClassLibrary")

我不知道我是否需要parseoption电话?

另外,我有一个问题,这个文件:

MSAToolsGMailClassLibrary.dll

还需要signonce标志。但是MSAToolsGMailClassLibrary文件夹中的所有其他 dll 文件都没有。

我们该怎么做呢?

相应地修改FileEntry宏:

#define FileEntry(Source, DestPath) 
  "Source: "" + Source + ""; DestDir: "" + DestPath + ""; Flags: ignoreversion " + 
  (SameText(ExtractFileName(Source), "MSAToolsGMailClassLibrary.dll") ? "signonce" : "") + 
  "n"

(未经测试(

最新更新