Skip to content

Commit

Permalink
removed log statements. Added a script to sign the dll file
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Jul 29, 2024
1 parent 23ade4b commit 5ffec4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pdfsam-basic/src/msi/CA/AddLine/AddLine/CustomAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@ public static ActionResult AddLine(Session session)
{
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);
session.Log("Added -Dorg.pdfsam.default.checkforupdate=" + session.CustomActionData["updates"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.donate.notification=" + session.CustomActionData["donate"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.donate.notification=" + session.CustomActionData["donate"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.locale=" + session.CustomActionData["locale"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.locale=" + session.CustomActionData["locale"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.checkfornews=" + session.CustomActionData["news"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.checkfornews=" + session.CustomActionData["news"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.play.sounds=" + session.CustomActionData["sounds"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.play.sounds=" + session.CustomActionData["sounds"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.fetch.premium.modules=" + session.CustomActionData["premium"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.fetch.premium.modules=" + session.CustomActionData["premium"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.compression=" + session.CustomActionData["compression"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.compression=" + session.CustomActionData["compression"]);
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.output.overwrite=" + session.CustomActionData["overwrite"] + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.output.overwrite=" + session.CustomActionData["overwrite"]);
if (session.CustomActionData.ContainsKey("prefix")) {
string prefix = session.CustomActionData["prefix"];
if (!string.IsNullOrEmpty(prefix))
{
File.AppendAllText(path, "java-options=-Dorg.pdfsam.default.prefix=" + prefix + Environment.NewLine);
session.Log("Added -Dorg.pdfsam.default.prefix=" + prefix);
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions pdfsam-basic/src/msi/SignDll.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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"
if %ERRORLEVEL% NEQ 0 goto error
ECHO "Dll signed"

:error
set ERROR_CODE=%ERRORLEVEL%
exit /B %ERROR_CODE%

0 comments on commit 5ffec4c

Please sign in to comment.