본문 바로가기

Windows/MFC

cab 생성시 동일 파일명 오류 해결 법

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=117453&wa=wsignin1.0


결론부터 이야기 하자면 -_ -파일명 바꾸라는데 -_ - 그지같은 ms.....


Rename the different xyz.resources.dll files, adjust the xyz.inf file and start the cabwiz.exe app.

1) Copy the different xyz.resources.dll and rename the files
Example:
yourproject\en\xyz.resources.dll to yourproject\en\xyz.resources_en.dll
yourproject\de\xyz.resources.dll to yourproject\de\xyz.resources_de.dll
yourproject\sma-NO\xyz.resources.dll to yourproject\sma-NO\xyz.resources_sma.dll

2) Adjust the sections [SourceDiskFiles] and [Files.CommonXY] in the xyz.inf file
Example:

[SourceDisksFiles]
...
"xyz.resources_de.dll"=14
"xyz.resources_sma.dll"=16
"xyz.resources_en.dll"=17
...

[Files.Common14]
"xyz.resources.dll","xyz.resources_de.dll",,0

[Files.Common16]
"xyz.resources.dll","xyz.resources_sma.dll",,0

[Files.Common17]
"xyz.resources.dll","xyz.resources_en.dll",,0

3) Start the cabwiz.exe
Example:
cabwiz yourpath/xyz.inf /dest youroutputpath /err CabWiz.log

4) Test the CAB file

2008-06-30 오전 10:18에 John Sibly이(가) 게시
I came up with a similar workaround to Michael Koster, except that I managed to get it done automatically when you build the solution using custom build steps.

To start with, I added a custom build step right after the resources were created, making the copies of the resource dlls like this:
copy "$(TargetDir)\de\xyz.resources.dll" "$(TargetDir)\de\xyz.resources.de.dll"

In my installer project to generate the CAB file, I referenced the names of the copied files, rather than the originals
e.g. \de\xyz.resources.de.dll

I then created a dummy project that gets built last in the build order, after the Cab file has already been build once. This was a C++ project with the Configuration type set to Utility (so it doesn't actually output anything). In the dummy project I ran some VBScript as a pre-build step to update the inf file as Michael did, replacing the entries such as:
"xyz.resources.de.dll","xyz.resources.de.dll",,0
with
"xyz.resources.dll","xyz.resources.de.dll",,0

Then as a post build step in the dummy project, I ran
cabwiz $(TargetDir)/xyz.inf
to rebuild the Cab file again, with the correct output filenames.

Again - I was really hoping that this would have been fixed in Visual Studio 2008. Lets hope Microsoft releases a hotfix for it soon.
2009-02-10 오전 10:34에 Munendra이(가) 게시
Hi anybody found the solution of this ???

'Windows > MFC' 카테고리의 다른 글

How to: Register Customized Messaging Rules Clients  (0) 2013.10.02
Vibrate for Omnia2  (0) 2013.10.02
vibrate api  (0) 2013.10.02
vibrate for omnia2  (0) 2013.10.02
vibrate with omnia  (0) 2013.10.02