Skip to content

Commit

Permalink
Signed custom action dll
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Aug 20, 2024
1 parent 78dba7d commit 03ad602
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
Binary file modified pdfsam-basic/src/msi/AddLine.CA.dll
Binary file not shown.
13 changes: 13 additions & 0 deletions pdfsam-basic/src/msi/CA/AddLine/AddLine/AddLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
</PropertyGroup>
<ItemGroup>
<Compile Include="CustomAction.cs" />
<Content Include="CustomAction.config" />
Expand All @@ -61,4 +67,11 @@
-->
<Import Project="$(WixCATargetsPath)" Condition=" '$(WixCATargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets" Condition=" '$(WixCATargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets') " />
<PropertyGroup>
<PostBuildEvent>del /f AddLine.CA.dll
"signtool.exe" sign /v /debug /fd sha256 /td sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /sha1 "%25SIGN_CERT_FINGERPRINT%25" "C:\repos\pdfsam\pdfsam-basic\src\msi\CA\AddLine\AddLine\bin\Release\AddLine.dll"
"%25WIX%25SDK\MakeSfxCA.exe" "C:\repos\pdfsam\pdfsam-basic\src\msi\CA\AddLine\AddLine\bin\Release\AddLine.CA.dll" "%25WIX%25SDK\x86\SfxCA.dll" "C:\repos\pdfsam\pdfsam-basic\src\msi\CA\AddLine\AddLine\bin\Release\AddLine.dll" "C:\repos\pdfsam\pdfsam-basic\src\msi\CA\AddLine\AddLine\CustomAction.config" "%25WIX%25SDK\Microsoft.Deployment.WindowsInstaller.dll"
"signtool.exe" sign /v /debug /fd sha256 /td sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /sha1 "%25SIGN_CERT_FINGERPRINT%25" "C:\repos\pdfsam\pdfsam-basic\src\msi\CA\AddLine\AddLine\bin\Release\AddLine.CA.dll"
</PostBuildEvent>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion pdfsam-basic/src/msi/CA/AddLine/AddLine/CustomAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static ActionResult AddLine(Session session)
string path = session.CustomActionData["folder"] + "app/pdfsam.cfg";
if (File.Exists(@path))
{
session.Log("AddLine to existing " + session.CustomActionData["folder"] + "app/pdfsam.cfg");
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.checkforupdate=" + session.CustomActionData["updates"] + Environment.NewLine);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.donate.notification=" + session.CustomActionData["donate"] + Environment.NewLine);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.locale=" + session.CustomActionData["locale"] + Environment.NewLine);
Expand Down
4 changes: 2 additions & 2 deletions pdfsam-basic/src/msi/SignDll.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ECHO OFF

IF NOT EXIST "AddLine.CA.dll" GOTO error
attrib -r "AddLine.dll"
"signtool.exe" sign /v /debug /fd sha256 /td sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /sha1 "%SIGN_CERT_FINGERPRINT%" "AddLine.dll"
attrib -r "AddLine.CA.dll"
"signtool.exe" sign /v /debug /fd sha256 /td sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /sha1 "%SIGN_CERT_FINGERPRINT%" "AddLine.CA.dll"
if %ERRORLEVEL% NEQ 0 goto error
ECHO "Dll signed"

Expand Down

0 comments on commit 03ad602

Please sign in to comment.