Skip to content

Commit f984576

Browse files
committed
code sign published installer
1 parent b089b4a commit f984576

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

.gitignore

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
obj
2-
bin
3-
obj
4-
bin
5-
TestResult.xml
6-
*.suo
7-
PdfScribeCore.csproj.user
8-
PdfScribe.csproj.user
9-
/PdfScribeInstall/PrimaryOutputHarvest/*.pdb
10-
/PdfScribeInstall/PrimaryOutputHarvest/*.exe
11-
/PdfScribeInstall/PrimaryOutputHarvest/*.config
12-
/PdfScribeInstall/PrimaryOutputHarvest/*.dll
1+
TestResult.xml
132

143
#Ignore thumbnails created by Windows
154
Thumbs.db
@@ -42,3 +31,4 @@ _ReSharper*/
4231
.vs/
4332
#Nuget packages folder
4433
packages/
34+
publish/

PdfScribeInstall/PdfScribeInstall.wixproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,18 @@
9595
</CreateProperty>
9696
</Target>
9797
<PropertyGroup>
98-
<PostBuildEvent>powershell -command "(Get-FileHash -Algorithm SHA512 %27!(TargetPath)%27).Hash + %27 %2a%27 + (Split-Path %27!(TargetPath)%27 -leaf) | Out-File -filePath %27!(TargetPath).sha512%27 -encoding Default"
99-
powershell -command "((Get-Content %27!(TargetPath).sha512%27) -join \"`n\") + \"`n\" | Set-Content -NoNewline %27!(TargetPath).sha512%27"</PostBuildEvent>
98+
<PreBuildEvent>powershell -command "del ((Split-Path %27!(TargetPath)%27 -parent) + %27\%2a.sha512%27)"</PreBuildEvent>
10099
</PropertyGroup>
101100
<PropertyGroup>
102-
<PreBuildEvent>powershell -command "del ((Split-Path %27!(TargetPath)%27 -parent) + %27\%2a.sha512%27)"</PreBuildEvent>
101+
<PostBuildEvent>powershell -command "(Get-FileHash -Algorithm SHA512 %27!(TargetPath)%27).Hash + %27 %2a%27 + (Split-Path %27!(TargetPath)%27 -leaf) | Out-File -filePath %27!(TargetPath).sha512%27 -encoding Default"
102+
powershell -command "((Get-Content %27!(TargetPath).sha512%27) -join \"`n\") + \"`n\" | Set-Content -NoNewline %27!(TargetPath).sha512%27"
103+
if $(ConfigurationName) == Release (
104+
cd /d $(SolutionDir)
105+
if NOT EXIST "publish\" mkdir "publish"
106+
if NOT EXIST "publish\unsigned" mkdir "publish\unsigned"
107+
del /q "publish\unsigned\%2a"
108+
copy /y "!(TargetPath)" "publish\unsigned"
109+
copy /y "!(TargetPath).sha512" "publish\unsigned"
110+
)</PostBuildEvent>
103111
</PropertyGroup>
104112
</Project>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PdfScribe v1.3.1
1+
# PdfScribe v1.3.2
22

33
PdfScribe is a PDF virtual printer. Check the [releases](https://github.com/stchan/PdfScribe/releases) page to download a prebuilt MSI package.
44

@@ -9,7 +9,7 @@ PdfScribe is a PDF virtual printer. Check the [releases](https://github.com/stch
99

1010
## Building from source
1111

12-
Visual Studio 2019/Votive 2019 (or newer), and Wix 3.11 (or newer) are required to build PdfScribe.
12+
Visual Studio 2022/Votive 2022, and Wix 3.11 (or newer) are required to build PdfScribe.
1313

1414
PdfScribe links to, and distributes the following third party components:
1515

@@ -35,7 +35,7 @@ In the application config file (PdfScribe.exe.config), there are the following s
3535
* Check repo [issues](https://github.com/stchan/PdfScribe/issues) for the latest.
3636

3737
## Release notes
38-
#### v1.3.1
38+
#### v1.3.2
3939
* Set GS AutoRotatePages to /None (issue #32)
4040
#### v1.3.0
4141
* Added **StripNoRedistill** option (fix for issue #33).

publishrelease.bat

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
echo off
2+
if EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" (
3+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
4+
echo on
5+
msbuild PdfScribe.sln -t:Rebuild -p:Configuration=Release -r
6+
if NOT EXIST "publish\signed" mkdir "publish\signed"
7+
del /q "publish\signed\*"
8+
copy /y "publish\unsigned\PdfScribeInstall_*.msi" "publish\signed\"
9+
cd "publish\signed\"
10+
signtool sign /n "Open Source Developer, Sherman Chan" /t http://time.certum.pl /fd sha256 /v PdfScribeInstall_*.msi
11+
) ELSE (
12+
echo Could not set build tools environment.
13+
exit 1
14+
)

0 commit comments

Comments
 (0)