clawsoftware / clawPDF

Open Source Virtual (Network) Printer for Windows that allows you to create PDFs, OCR text, and print images, with advanced features usually available only in enterprise solutions.
https://github.com/clawsoftware/clawPDF
GNU Affero General Public License v3.0
729 stars 156 forks source link

[WiKi] How to Build clawPDF MSI yourself? #135

Open hansaliyad1 opened 6 months ago

hansaliyad1 commented 6 months ago

I am not sure if this is the correct way to do it, but it works. I was exploring this repo for the past two days to figure out how to build my clawPDF fork but did not find an answer. This is for anyone who is looking to build their own clawPDF fork. Feel free to correct me if this is not the correct way to build this project.

Before we build our MSI, we need to add our own code signing certificate or remove the existing code signing certificate configuration. We have to do this for the clawPDF, clawPDF.Bridge, clawPDF.Core, clawPDF.Mail, clawPDF.Settings, clawPDF.Shared, clawPDF.Utilities, ftplib, PDFProcessing, and SetupHelper projects. Right-click on each of these projects, click on "Properties", click on "Signing", and then under "Sign the assembly", either uncheck it or add your own code signing certificate.

Now, how do we build our MSI?

  1. Set the Build Configuration to Release -> Any CPU -> clawPDF.
  2. Right-click on the solution "clawPDF" and then click on "Build Solution".
  3. Change the Build Configuration to Release -> Win32 -> clawPDF.
  4. Right-click on the project "PrinterMonitor" and then click on "Build".
  5. Change the Build Configuration to Release -> ARM64 -> clawPDF.
  6. Right-click on the project "PrinterMonitor" and then click on "Build".
  7. Right-click on the project "clawPDF_setup" and then click on "Build".
  8. You should now find your built MSI under "{PROJECT_DIR}\clawPDF\src\clawPDF_setup\Release".

If anyone has any questions, please feel free to comment below. Thank you!

hansaliyad1 commented 5 months ago

signClawPDF.pfx is a certificate that is used by clawsoftware to sign and release the clawPDF program. Like I mention in my post, we need to add our own code signing certificate or remove the existing code signing certificate configuration. We have to do this for the clawPDF, clawPDF.Bridge, clawPDF.Core, clawPDF.Mail, clawPDF.Settings, clawPDF.Shared, clawPDF.Utilities, ftplib, PDFProcessing, and SetupHelper projects. Right-click on each of these projects, click on "Properties", click on "Signing", and then under "Sign the assembly", either uncheck it or add your own code signing certificate.

From: akzkorosh @.> Date: Thursday, May 30, 2024 at 6:09 PM To: clawsoftware/clawPDF @.> Cc: Dharmang Hansaliya @.>, Author @.> Subject: Re: [clawsoftware/clawPDF] [WiKi] How to Build clawPDF MSI yourself? (Issue #135)

Thank you very much for your guidelines. Do you have any idea about resolving issue with that missing signClawPDF.pfx

— Reply to this email directly, view it on GitHubhttps://github.com/clawsoftware/clawPDF/issues/135#issuecomment-2140935797, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACKTOP45A4TNPL6JCPTIS4DZE6PS7AVCNFSM6AAAAABHYVTUW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBQHEZTKNZZG4. You are receiving this because you authored the thread.Message ID: @.***>

hueldoeu commented 5 months ago

what kind of software do you use? visual studio?

hansaliyad1 commented 5 months ago

@hueldoeu Yes, I use Visual Studio to build the project. Sometimes, I also use Jetbrains Rider but you cannot build this project using that.

Luolinxiong commented 4 months ago

You need to add some procedure with the Visual Studio 2022 Update and clawPDF update.

  1. Add procedure after step 6 : Change the Build Configuration to Release -> x64 -> clawPDF.
  2. Right-click on the project "PrinterMonitor" and then click on "Build". If you build filed after step 7,you need to observe the error information because you must omission some project to build (like clawPDF.Bridge, clawPDF.Core, clawPDF.Mail, clawPDF.Settings, clawPDF.Shared, clawPDF.Utilities, ftplib, PDFProcessing, and SetupHelper projects)
  3. Right-click on the project according to your error information and then click on "Build".
  4. Again right-click on the project "clawPDF_setup" and then click on "Build". You will find it is success to have a msi/exe
Luolinxiong commented 4 weeks ago

There are some thing was changed with the update of Visual Studio 2022, you have to build step 6(PrinterMonitor) with four ways Any CPU ARM64 Win32 and X64 together.