[英]InstallShield and ConfuserEx
我想使用ConfuserEx混淆我的源代碼,所以我創建了一個ConfuserEx項目文件,如下所示:
<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
<rule pattern="true" inherit="false">
<protection id="rename" />
<protection id="ctrl flow" />
<protection id="ref proxy" />
<protection id="anti debug" />
<protection id="anti dump" />
<protection id="constants" />
<protection id="resources" />
<protection id="anti tamper" />
</rule>
<module path="MainApplication\bin\Release\MainApplication.exe" />
<module path="MainApplication\bin\Release\Component.Hardware.dll" />
<module path="MainApplication\bin\Release\Component.Log.dll" />
<module path="MainApplication\bin\Release\Component.Service.dll" />
<module path="MainApplication\bin\Release\Component.Software.dll" />
<module path="MainApplication\bin\Release\AsynchronousSocket.dll" />
<module path="MainApplication\bin\Release\Instrumentation.dll" />
</project>
由於我想通過設置部署我的應用程序,因此我創建了MainApplication-Project的InstallShield設置。 我選擇主要輸出。
在我在Visual Studio中的Postbuild-Event中,我使用crproj文件作為參數調用Confuser.CLI.exe。 但是,只有MainApplication.exe
修改了MainApplication.exe
和AsynchronousSocket.dll + Instrumentation.dll
。 4組件。*。dll文件不是。 我不得不說所有組件都是不同的項目。 所以我的項目解決方案結構如下所示:
MyProject
MyProject.MainApplication
MyProject.Component.Hardware
MyProject.Component.Software
MyProject.Component.Log
MyProject.Component.Service
MyProject.AsynchronousSocket
MyProject.Instrumentation
MyProject.Setup
MyProject.sln
MyProject.crpoj
我的猜測是我使用了InstallShield使用的錯誤程序集。 我還嘗試在MyProject.Component.Service\\bin\\Release
和MyProject.Component.Service\\obj\\Release
獲取程序集,但這些選項都不起作用。 我不認為使用MainApplication\\obj\\Release
有效的,因為只有MainApplication.exe
位於。
任何人都可以告訴我InstallShield從哪里獲取主要輸出或我錯過了其他什么?
一個可能的解決方案是多個crproj文件,每個二進制文件一個,並在EACH項目的后期構建步驟中指定項目特定的crproj文件。 MainApplication.crproj
<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
<rule pattern="true" inherit="false">
<protection id="rename" />
<protection id="ctrl flow" />
<protection id="ref proxy" />
<protection id="anti debug" />
<protection id="anti dump" />
<protection id="constants" />
<protection id="resources" />
<protection id="anti tamper" />
</rule>
<module path="MainApplication\bin\Release\MainApplication.exe" />
</project>
Component.Hardware.dll.crproj
<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
<rule pattern="true" inherit="false">
<protection id="rename" />
<protection id="ctrl flow" />
<protection id="ref proxy" />
<protection id="anti debug" />
<protection id="anti dump" />
<protection id="constants" />
<protection id="resources" />
<protection id="anti tamper" />
</rule>
<module path="MainApplication\bin\Release\Component.Hardware.dll" />
</project>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.