我不确定我这样做是否正确:
; 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: ignoreversion\n"
#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: "OutlookCalIFConsole\OutlookCalIFConsole.exe"; DestDir: "{app}\OutlookCalIFConsole"; Flags: ignoreversion sign
Source: "OutlookCalIFConsole\OutlookCalIFConsole.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文件都没有。
我们该怎么做呢?
发布于 2019-06-14 03:41:47
相应地修改FileEntry宏:
#define FileEntry(Source, DestPath) \
"Source: \"" + Source + "\"; DestDir: \"" + DestPath + "\"; Flags: ignoreversion " + \
(SameText(ExtractFileName(Source), "MSAToolsGMailClassLibrary.dll") ? "signonce" : "") + \
"\n"(未测试)
https://stackoverflow.com/questions/56585864
复制相似问题