Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1535 commits
Select commit Hold shift + click to select a range
3ce84a6
Tools: Fix msi signing
cyanfish Dec 31, 2024
6571a5c
Flatpak: Update dependency build versions
cyanfish Dec 31, 2024
98a962f
Flatpak: Fix net9 paths
cyanfish Dec 31, 2024
92d6945
Update changelog
cyanfish Dec 31, 2024
d758764
CI: Use mainline net9
cyanfish Dec 31, 2024
1d88df1
Update copyright to 2025
cyanfish Jan 2, 2025
6ea12cf
Windows: Fix worker signing
cyanfish Jan 12, 2025
91fa727
Upgrade NAPS2.Tesseract.Binaries to 1.3.0
cyanfish Jan 19, 2025
524ca25
Sane: Implement KeyValueOptions
cyanfish Jan 26, 2025
afca464
Fix wrong error when disk is full
cyanfish Jan 26, 2025
76a8154
Simplify error handling
cyanfish Jan 26, 2025
50260d3
Add NoSplitWithMultipleScans test
cyanfish Jan 26, 2025
e3d04e0
CLI: Fix help text for --delay
cyanfish Jan 26, 2025
0fb0fbe
Move input handle management into PdfDocument
cyanfish Jan 27, 2025
a00a247
Support importing from streams
cyanfish Jan 27, 2025
d32c153
CI: Temporarily disable macos tests
cyanfish Jan 27, 2025
6f5e83e
Support importing zip files
cyanfish Jan 27, 2025
77cc7fe
Support .cbz extension for zip files
cyanfish Feb 1, 2025
589fe45
WIP: Keyboard shortcut settings
cyanfish Feb 1, 2025
a69e5f8
Keyboard shortcut assignment
cyanfish Feb 2, 2025
417c937
Reload keyboard shortcuts after change
cyanfish Feb 2, 2025
aacf543
Add "Assign" button for keyboard shortcuts
cyanfish Feb 2, 2025
c57b920
Fix crop form to focus OK by default
cyanfish Feb 2, 2025
611a01f
Update templates
cyanfish Feb 2, 2025
1126626
Add missing keyboard shortcut elements
cyanfish Feb 2, 2025
72d2b23
Better stringify keyboard symbols
cyanfish Feb 2, 2025
e5cecb3
Add icon for keyboard shortcuts
cyanfish Feb 2, 2025
423a6e6
Add separators to the keyboard shortcut list
cyanfish Feb 2, 2025
951c6fa
Add "Deskew" keyboard shortcut
cyanfish Feb 2, 2025
dfea4bd
Add NAPS2.Internals license to readme
cyanfish Feb 2, 2025
585f44d
Support mode="lock" on appsettings KeyboardShortcuts
cyanfish Feb 2, 2025
18b885d
CLI: Add a --waitscan option
cyanfish Feb 2, 2025
5d71460
CLI: Add --firstnow option
cyanfish Feb 2, 2025
15d9e4c
Rebuild toolbars when keyboard shortcuts change
cyanfish Feb 2, 2025
5dfedf7
Mac: Enable keyboard shortcut settings
cyanfish Feb 2, 2025
4c320bd
Gtk: Don't recreate toolbars
cyanfish Feb 2, 2025
8e14a8a
Gtk: Fix showing profiles toolbar
cyanfish Feb 2, 2025
2e34c4e
WinForms: Fix ampersands in profiles toolbar
cyanfish Feb 2, 2025
d953b06
Update language files
cyanfish Feb 2, 2025
e7cf25f
PUBLISH (8.0b3)
cyanfish Feb 2, 2025
c9bd7b7
Fix null ref
cyanfish Feb 2, 2025
3c64f7f
SDKREL (1.1.4)
cyanfish Feb 2, 2025
068370e
Fix static localized strings
cyanfish Feb 7, 2025
94a9309
Use GridView for keyboard shortcuts and polish
cyanfish Feb 8, 2025
b8cd1e6
Add CopyToStream method
cyanfish Feb 17, 2025
fe352c7
Combine CreateProcessedImage overloads
cyanfish Feb 17, 2025
7729027
Fix warnings
cyanfish Feb 17, 2025
c1a41b7
Add RenderPage overloads to IPdfRenderer
cyanfish Feb 17, 2025
691bb32
Rework ProcessedImage ref counts
cyanfish Feb 22, 2025
a4a651d
Handle shared storage better for recovery
cyanfish Feb 22, 2025
4ae310a
Remove unnecessary doc load
cyanfish Feb 23, 2025
f4ce720
Always take pdfium lock before disposing
cyanfish Feb 23, 2025
3c146ff
Implement TimedCache
cyanfish Feb 23, 2025
a038072
Msix packaging wip
cyanfish Mar 2, 2025
678b63a
Update appxmanifest in "n2 setver"
cyanfish Mar 6, 2025
8461e88
Disable trimming in NAPS2.App.Console
cyanfish Mar 6, 2025
2b533b0
Add "New Outlook" email provider
cyanfish Mar 15, 2025
725e108
Improve new outlook termination condition
cyanfish Mar 15, 2025
6b599e8
Add aliases for msix executables
cyanfish Mar 16, 2025
d38c178
Fix msix worker processes
cyanfish Mar 16, 2025
956303f
Check Windows version before msix check
cyanfish Mar 16, 2025
80640ce
Bump ImageSharp version
cyanfish Mar 16, 2025
f7d3dd8
Fix warnings
cyanfish Mar 16, 2025
ff55019
Fix msix assets
cyanfish Mar 16, 2025
c130500
Add supported languages to msix manifest
cyanfish Mar 16, 2025
4edc89a
Fix msix Serbian language codes
cyanfish Mar 16, 2025
8ca11f1
Add msix file associations
cyanfish Mar 16, 2025
dcb1e04
Fix flatpak size
cyanfish Mar 17, 2025
72935d2
UI for custom resolution/dpi
cyanfish Mar 18, 2025
00e916a
Switch to new .slnx solution format
cyanfish Mar 18, 2025
0a1f32e
Use sha256 for tesseract downloads
cyanfish Mar 18, 2025
8119d88
Use sha256 for updates
cyanfish Mar 18, 2025
8286ae2
Use separate sig256 field for sha256
cyanfish Mar 18, 2025
4c3532b
Include sha256 fields in update push
cyanfish Mar 18, 2025
cf445de
Escl: Don't correct DPI with naps2 extension
cyanfish Mar 18, 2025
3a7950b
Fix slnx path
cyanfish Mar 20, 2025
1fbde01
Gtk: Fix splitter initial position
cyanfish Mar 20, 2025
3af9fce
Twain: Fix scanning with unspecified DialogParent
cyanfish Mar 20, 2025
7636ee8
Split up worker project folders
cyanfish Mar 20, 2025
6300a54
Fix sdk nupkg path
cyanfish Mar 20, 2025
b7a9d26
SDKREL (1.1.5)
cyanfish Mar 20, 2025
78c910a
Add worker project build dep
cyanfish Mar 20, 2025
f91367e
CI: Update to macos 15
cyanfish Mar 20, 2025
ad8f4da
Revert back to .sln file
cyanfish Mar 20, 2025
f6f2a49
Revert "Fix sdk nupkg path"
cyanfish Mar 20, 2025
c7861cf
CI: Unconditionally install macos workload
cyanfish Mar 20, 2025
6b9d74b
CI: Fix macos workload condition
cyanfish Mar 20, 2025
215b188
Fix certificate loading
cyanfish Mar 20, 2025
a15059c
Fix temp file name
cyanfish Mar 20, 2025
0bf4e5e
Add accessible name to double buttons
cyanfish Mar 21, 2025
83a9bf0
Fix msix manifest path
cyanfish Mar 21, 2025
80fdbf4
Dynamically set msix version
cyanfish Mar 21, 2025
c10c731
PUBLISH (8.1.0)
cyanfish Mar 21, 2025
73a7cab
Update language files
cyanfish Mar 21, 2025
9dad06f
Fix resolution form min width
cyanfish Mar 21, 2025
5fb8ebc
Gtk: Fix unscaled dropdowns
cyanfish Mar 21, 2025
409d33d
Gtk: Fix keyboard shortcuts grid
cyanfish Mar 21, 2025
ab4e06b
Rename msix artifacts
cyanfish Mar 21, 2025
efe7d7b
Fix dpi bug
cyanfish Mar 21, 2025
5436404
PUBLISH (8.1.1)
cyanfish Mar 21, 2025
3f56dab
Fix sourceforge default windows download
cyanfish Mar 22, 2025
da2d3be
Update CodeDependencies
cyanfish Mar 29, 2025
5b5db0a
Fix RTL issues
cyanfish Mar 29, 2025
3a07424
Support alignment on rows/columns
cyanfish Mar 29, 2025
dd9f3d5
Add link param to ErrorOutput
cyanfish Mar 29, 2025
dfdcd3e
Extract WindowsEnvironment helper class
cyanfish Mar 29, 2025
61f4c88
Add vcredist binaries (14.42.34433)
cyanfish Mar 29, 2025
d3f4a33
Include vcredist files in packages
cyanfish Mar 29, 2025
7ae9f6f
Revert "Add link param to ErrorOutput"
cyanfish Mar 29, 2025
ec813e7
Remove vcredist from exe installer
cyanfish Mar 29, 2025
106f2f4
Substitute non-numeric placeholders before showing save dialog
cyanfish Mar 29, 2025
b265300
Fix unsaved changes after auto save
cyanfish Mar 29, 2025
685aeed
Allow splitting multiple images at once
cyanfish Mar 29, 2025
b800cc3
PUBLISH (8.1.2)
cyanfish Mar 29, 2025
7fdda7f
Fix test build
cyanfish Mar 29, 2025
d1aaf66
Improve Appium test flakiness
cyanfish Mar 29, 2025
8dfaef4
Update language files
cyanfish Mar 29, 2025
e897596
Increase Appium startup wait
cyanfish Mar 29, 2025
e5cb72e
Add missing changelog item
cyanfish Mar 29, 2025
1039144
Sane: Fix duplex with adf-mode
cyanfish Apr 1, 2025
c1f1cc3
Twain: Fix Native transfer on net9
cyanfish Apr 1, 2025
633aff9
Add TwainTransferMode.Default
cyanfish Apr 1, 2025
96f5362
Use TwainTransferMode.Default for x64 DSM
cyanfish Apr 1, 2025
a401b6f
Update dictionary
cyanfish Apr 1, 2025
d94dbd5
Don't restore form location if there are multiple monitors with diffe…
cyanfish Apr 1, 2025
8ead45f
Only change dpi behavior on WinForms
cyanfish Apr 3, 2025
c2fae30
WinForms: Fix dpi issues with form size
cyanfish Apr 3, 2025
0fec0bc
Only save form state after being shown
cyanfish Apr 3, 2025
793cb7f
Use a fixed minimum width for the sidebar
cyanfish Apr 3, 2025
d1cab8d
Fix sidebar width when dpi changes
cyanfish Apr 3, 2025
d327ef9
PUBLISH (8.1.3)
cyanfish Apr 3, 2025
d9e5699
SDKREL (1.1.6)
cyanfish Apr 4, 2025
7d0b167
Add theme setting
cyanfish Apr 5, 2025
46fe29d
Only support Theme setting on Windows
cyanfish Apr 5, 2025
2756b5e
Add theme to appsettings.xml
cyanfish Apr 5, 2025
39843a8
Upgrade System.Drawing.Common to 9.x
cyanfish Apr 5, 2025
868d958
Upgrade NAPS2.Tesseract.Binaries to 1.3.1
cyanfish Apr 5, 2025
83ba9db
Fix test error
cyanfish Apr 5, 2025
fdd2d43
Don't unnecessarily reload desktop form
cyanfish Apr 8, 2025
2d45664
Update language files
cyanfish Apr 8, 2025
fa9d96c
PUBLISH (8.1.4)
cyanfish Apr 8, 2025
886db54
Update changelog
cyanfish Apr 8, 2025
1369b27
Add runtime identifiers for win-arm64
cyanfish Apr 16, 2025
7e2cdf6
Compat for win-arm64
cyanfish Apr 16, 2025
62949a4
Tools: Packaging for win-arm64 wip
cyanfish Apr 16, 2025
796a53b
Update dependencies for win-arm64
cyanfish Apr 16, 2025
c3e8efc
Add winarm files to package
cyanfish Apr 16, 2025
45e1dc6
Disable TWAIN on Windows arm64
cyanfish Apr 16, 2025
7a98ed7
Add vcredist files for arm64
cyanfish Apr 16, 2025
1d6dd52
Background sharing wip
cyanfish Apr 16, 2025
b247c46
Add "Edit with" strings
cyanfish Apr 16, 2025
8855340
Tools: Fix worker build command
cyanfish Apr 17, 2025
bb01762
Windows service manager impl
cyanfish Apr 17, 2025
9943ab0
Fix UriHelper for unix paths
cyanfish Apr 18, 2025
e880846
Identify directory-only paths even without a trailing slash
cyanfish Apr 18, 2025
46ef403
Gtk: Don't try to set current filter
cyanfish Apr 18, 2025
683b598
Linux background sharing via systemd
cyanfish Apr 18, 2025
4695adc
Add DisposeAll extension
cyanfish Apr 20, 2025
bc93356
Fix mac deps search path for tests
cyanfish Apr 20, 2025
99ccde2
Fix OCR fonts for macOS 15
cyanfish Apr 20, 2025
b95b80a
CI: Re-enable mac tests
cyanfish Apr 20, 2025
37a504d
Add --nonetwork option for "n2 test"
cyanfish Apr 20, 2025
cbf4f19
CI: Skip network tests on macOS
cyanfish Apr 20, 2025
52d335f
Replace "No friendly name" string
cyanfish May 25, 2025
3c1d47f
WIP: External editors
cyanfish May 25, 2025
8da31a3
Windows app list for "edit with"
cyanfish May 25, 2025
e2ee86e
"Edit with" polish
cyanfish May 25, 2025
e8d608a
Add missing keyboard shortcuts to appsettings.xml and InternalDefaults
cyanfish May 25, 2025
14da201
Linux "edit with"
cyanfish May 25, 2025
5ab061e
Mac "edit with"
cyanfish May 26, 2025
e5f8d0b
Refactor SystemEmailClients to an interface
cyanfish May 26, 2025
97545f5
Fix empty email provider
cyanfish May 26, 2025
134f833
Only show Apple Mail as an email provider if it's the default email r…
cyanfish May 26, 2025
6292c5d
Clear undo stack after external edit
cyanfish May 31, 2025
98d433a
"Edit with" for multiple selection
cyanfish May 31, 2025
46c2fd9
Fix selection for "Edit with"
cyanfish May 31, 2025
fc2cb4d
Improve fallback behavior for external-edit load
cyanfish May 31, 2025
0aa9af4
Linux: Fix systemd start on login
cyanfish May 31, 2025
369ecac
Disable Apple Mail instead of hiding when not usable
cyanfish May 31, 2025
5da7153
Remember check state for "apply to all selected"
cyanfish May 31, 2025
281c97a
Rename InitializePlatform to InitializeForegroundApp
cyanfish Jun 1, 2025
bab2b57
Separate GuiModule from inheritors
cyanfish Jun 1, 2025
6c83913
Add platform modules to Console/Server entry points
cyanfish Jun 1, 2025
8b21c36
Better document modules
cyanfish Jun 1, 2025
dbd8a6c
Remove unnecessary binding
cyanfish Jun 1, 2025
2906549
Remove WorkerModule from ServerEntryPoint
cyanfish Jun 1, 2025
085a49a
Add ServerAppTests
cyanfish Jun 1, 2025
1d9815b
Refactor out unhandled exception handlers
cyanfish Jun 1, 2025
8a5346c
Add a tray indicator for ServerEntryPoint
cyanfish Jun 1, 2025
3a191ff
Unregister server from a separate process
cyanfish Jun 1, 2025
424351b
Fix ordering for unregister command
cyanfish Jun 2, 2025
a2ae64e
Linux: Use systemd KillMode=process to avoid killing the unregister p…
cyanfish Jun 2, 2025
8f82733
Mac: Use setsid to avoid killing the unregister process
cyanfish Jun 2, 2025
0d85888
Mac: Use a grayscale icon for the system tray
cyanfish Jun 2, 2025
2183eb1
Escl: Search longer for device queries
cyanfish Jun 2, 2025
6c53605
Escl: Store and use ConnectionUri instead of searching at every scan
cyanfish Jun 2, 2025
f5a6729
Escl: Race mDNS and GetCapabilities requests
cyanfish Jun 2, 2025
ceb15b3
Mark ServerAppTests as GuiTheory
cyanfish Jun 2, 2025
e35cd36
Add StopSharingServerResponse
cyanfish Jun 2, 2025
faf52b8
Uncheck when the sharing server is stopped from the system tray
cyanfish Jun 2, 2025
3c9db86
Update templates
cyanfish Jun 2, 2025
b5dd8e8
Escl: Backpropagate connection URI changes
cyanfish Jun 2, 2025
fa274a7
Fix ProfilesUpdated event thread
cyanfish Jun 2, 2025
bb62e15
Include IconUri in backpropagation
cyanfish Jun 2, 2025
2f7f0c2
Update sidebar when profiles are updated
cyanfish Jun 2, 2025
d2f00f1
Add OriginalFilePath to PostProcessingData
cyanfish Jun 2, 2025
5e2d5ac
Use OriginalFileName as the default file name for saving
cyanfish Jun 2, 2025
1117bf5
Mac: Fix save menu items not being disabled
cyanfish Jun 3, 2025
fc140d0
Mac: Fix extension not being added
cyanfish Jun 3, 2025
e7b6650
Mac: Add padding to the left of the file filters
cyanfish Jun 3, 2025
4831dba
Mac: Use native split/combine icons
cyanfish Jun 7, 2025
9d3ed0f
Mac: Add "edit with" to preview window
cyanfish Jun 7, 2025
a7fea8b
Escl: Add tests for ConnectionUri
cyanfish Jun 7, 2025
ce9cea1
Escl: Service manager normalization
cyanfish Jun 7, 2025
3fd5d27
Update language files
cyanfish Jun 7, 2025
98ea5a1
Fix test reliability
cyanfish Jun 7, 2025
a822ec9
Escl: Add offline device tests
cyanfish Jun 7, 2025
324fd81
PUBLISH (8.2.0)
cyanfish Jun 7, 2025
5973608
Use Flatpak version of flatpak-builder
cyanfish Jun 8, 2025
54e17ad
Tools: Update msi/msix tool paths
cyanfish Jun 8, 2025
2fc16df
SDKREL (1.2.0)
cyanfish Jun 8, 2025
356cd5c
Msix: Fix store manifest
cyanfish Jun 8, 2025
a246fdc
Msix: Add a Microsoft Store review prompt
cyanfish Jun 8, 2025
bb3253a
Tools: Add --images and --scope options for "n2 test"
cyanfish Jun 9, 2025
ad8c7ad
Fix wpf/imagesharp tests
cyanfish Jun 9, 2025
43be163
CI: Add WPF/ImageSharp tests
cyanfish Jun 9, 2025
b567b06
Fix build
cyanfish Jun 9, 2025
d7cc594
CI: Set fail-fast to false
cyanfish Jun 9, 2025
3991313
Improve test platform conditions for image type
cyanfish Jun 9, 2025
1a66c73
Sane: Support boolean "duplex" option
cyanfish Aug 4, 2025
f4a8097
Escl: Try to correct invalid doctype decls
cyanfish Aug 4, 2025
ced97b0
Enable TWAIN on Windows arm64
cyanfish Aug 4, 2025
4826f09
Fix extraneous error log with SDK
cyanfish Aug 4, 2025
43d502b
Escl: Accept different capability schema versions
cyanfish Aug 4, 2025
fc75a22
Gtk: Partial fix for hidden buttons after form relayout
cyanfish Aug 4, 2025
5984f3b
Remove vcredist files
cyanfish Aug 30, 2025
cfab2a4
Upgrade NAPS2.Tesseract.Binaries to 1.4.0
cyanfish Aug 30, 2025
f541d30
Upgrade ImageSharp to 3.1.11
cyanfish Aug 30, 2025
2f55850
WinForms: Fix preview cut off
cyanfish Aug 30, 2025
19c2aa5
Mac: Fix entitlements for SANE
cyanfish Aug 30, 2025
2de5c2e
PUBLISH (8.2.1)
cyanfish Aug 30, 2025
ff150db
Update language files
cyanfish Aug 30, 2025
e181685
Appium: Increase timeout on saving
cyanfish Aug 30, 2025
fdb63ea
Tools: Add --xcompile option to "n2 publish"
cyanfish Aug 30, 2025
094dd0f
SDKREL (1.2.1)
cyanfish Aug 31, 2025
4443afc
Sane: Add cap tests
cyanfish Aug 31, 2025
773837e
Sane: Fix caps for duplex boolean
cyanfish Aug 31, 2025
bad4402
Sane: Allow getting and setting inactive options
cyanfish Aug 31, 2025
24aa8fa
Worker: Fix debug logging flag
cyanfish Sep 7, 2025
3cd6800
Escl: Fix CORS for OPTIONS request
cyanfish Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: .NET

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-24.04, macos-15]
steps:
- name: Install OS dependencies
if: matrix.os == 'ubuntu-24.04'
run: sudo apt-get install -y fonts-liberation2 fonts-noto-core fonts-noto-cjk
- uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install workloads
if: matrix.os == 'macos-15'
run: dotnet workload install macos
- name: Build
run: dotnet run --project NAPS2.Tools -- build debug -v
- name: Test
if: matrix.os != 'macos-15'
run: dotnet run --project NAPS2.Tools -- test -v --nogui
- name: Test (mac)
if: matrix.os == 'macos-15'
run: dotnet run --project NAPS2.Tools -- test -v --nogui --nonetwork
- name: Test (WPF images)
if: matrix.os == 'windows-2022'
run: dotnet run --project NAPS2.Tools -- test -v --nogui --images wpf --scope sdk
- name: Test (ImageSharp images)
if: matrix.os == 'ubuntu-24.04'
run: dotnet run --project NAPS2.Tools -- test -v --nogui --images is --scope sdk
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Desktop.ini
.DS_Store
packages/
*.user
*.suo
Expand Down
798 changes: 798 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Primary NAPS2 developer:
Ben Olden-Cooligan (Copyright 2012-2022)
Ben Olden-Cooligan (Copyright 2012-2025)

Original NAPS developer:
Pavel Sorejs (Copyright 2009)
Expand All @@ -10,3 +10,6 @@ Luca De Petrillo (Copyright 2015)
Peter De Leeuw
Peter Hommel
Alexander Rabenstein

And others:
https://github.com/cyanfish/naps2/graphs/contributors
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAPS2 - Not Another PDF Scanner
https://www.naps2.com

Copyright 2009-2022 NAPS2 Contributors
Copyright 2009-2025 NAPS2 Contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
33 changes: 18 additions & 15 deletions NAPS2.App.Console/NAPS2.App.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6-windows;net462</TargetFrameworks>
<TargetFramework>net9-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Exe</OutputType>
<AppConfig>app.config</AppConfig>
<LargeAddressAware>true</LargeAddressAware>
<RootNamespace>NAPS2.Console</RootNamespace>
<AssemblyName>NAPS2.Console</AssemblyName>


<SelfContained>true</SelfContained>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<!-- TODO: Re-enable trimming if we can fix startup time as well as WIA being broken -->
<PublishTrimmed>false</PublishTrimmed>
<TrimMode>none</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>

<Title>NAPS2 - Not Another PDF Scanner</Title>
<Product>NAPS2 - Not Another PDF Scanner</Product>
<Copyright>Copyright 2009, 2012-2020 NAPS2 Contributors; Icons from http://www.fatcow.com/free-icons</Copyright>

<!--
We reference the 32-bit worker directly so the EXE is included in the output.
-->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<Import Project="..\NAPS2.Setup\targets\CommonTargets.targets" />
<Import Project="..\NAPS2.Setup\targets\NativeLibs.targets" />
<Import Project="..\NAPS2.Setup\targets\SdkUsers.targets" />

<ItemGroup>
<PackageReference Include="NAPS2.Wia" Version="1.0.1" />

<ProjectReference Include="..\NAPS2.App.Worker\NAPS2.App.Worker.csproj" />
<ProjectReference Include="..\NAPS2.Images.Gdi\NAPS2.Images.Gdi.csproj" />
<ProjectReference Include="..\NAPS2.Lib\NAPS2.Lib.csproj" />
<ProjectReference Include="..\NAPS2.Lib.WinForms\NAPS2.Lib.WinForms.csproj" />
</ItemGroup>

<PackageReference Include="LargeAddressAware" Version="1.0.3" />
<ItemGroup>
<ContentWithTargetPath Include="..\NAPS2.Setup\appsettings.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Link>appsettings.xml</Link>
<TargetPath>appsettings.xml</TargetPath>
</ContentWithTargetPath>
</ItemGroup>

</Project>
11 changes: 8 additions & 3 deletions NAPS2.App.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NAPS2.EntryPoints;
using System.Runtime;
using NAPS2.EntryPoints;

namespace NAPS2.Console;

Expand All @@ -10,7 +11,11 @@ static class Program
[STAThread]
static int Main(string[] args)
{
// Use reflection to avoid antivirus false positives (yes, really)
return (int) typeof(WindowsConsoleEntryPoint).GetMethod("Run")!.Invoke(null, new object[] { args })!;
var profilesPath = Path.Combine(Paths.AppData, "jit");
Directory.CreateDirectory(profilesPath);
ProfileOptimization.SetProfileRoot(profilesPath);
ProfileOptimization.StartProfile("naps2.console.jit");

return WindowsConsoleEntryPoint.Run(args);
}
}
8 changes: 0 additions & 8 deletions NAPS2.App.Console/app.config

This file was deleted.

13 changes: 6 additions & 7 deletions NAPS2.App.Gtk/NAPS2.App.Gtk.csproj
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net9</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>NAPS2</RootNamespace>
<AssemblyName>naps2</AssemblyName>
<Version>7.0.1</Version>
<ApplicationIcon>../NAPS2.Lib/Icons/favicon.ico</ApplicationIcon>

<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>

<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;linux-arm64</RuntimeIdentifiers>

<Title>NAPS2 - Not Another PDF Scanner</Title>
<Product>NAPS2 - Not Another PDF Scanner</Product>
<Copyright>Copyright 2009, 2012-2022 NAPS2 Contributors</Copyright>
</PropertyGroup>

<Import Project="..\NAPS2.Setup\targets\CommonTargets.targets" />
<Import Project="..\NAPS2.Setup\targets\NativeLibs.Linux.targets" />
<Import Project="..\NAPS2.Setup\targets\SdkUsers.targets" />

<ItemGroup>
<PackageReference Include="NAPS2.Tesseract.Binaries" Version="1.0.3" />
<PackageReference Include="NAPS2.Pdfium.Binaries" Version="1.2.0" />
<PackageReference Include="NAPS2.Tesseract.Binaries" Version="1.4.0" />

<ProjectReference Include="..\NAPS2.Lib.Gtk\NAPS2.Lib.Gtk.csproj" />

<PackageReference Include="Eto.Platform.Gtk" Version="2.7.2" />
<PackageReference Include="Eto.Platform.Gtk" Version="2.8.3" />
<!-- This shouldn't need a reference normally, but otherwise "dotnet restore" doesn't pick
it up, which breaks the flatpak build. -->
<PackageReference Include="Microsoft.NETCore.App" Version="2.1.*" />
Expand Down
8 changes: 7 additions & 1 deletion NAPS2.App.Gtk/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NAPS2.EntryPoints;
using System.Runtime;
using NAPS2.EntryPoints;

namespace NAPS2;

Expand All @@ -9,6 +10,11 @@ static class Program
/// </summary>
static void Main(string[] args)
{
var profilesPath = Path.Combine(Paths.AppData, "jit");
Directory.CreateDirectory(profilesPath);
ProfileOptimization.SetProfileRoot(profilesPath);
ProfileOptimization.StartProfile("naps2.jit");

// Use reflection to avoid antivirus false positives (yes, really)
typeof(GtkEntryPoint).GetMethod("Run").Invoke(null, new object[] { args });
}
Expand Down
8 changes: 8 additions & 0 deletions NAPS2.App.Mac/Entitlements.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<!-- Some macOS versions have trouble loading sane without dyld (see WorkerFactory.cs).
From a security perspective this should be ok as libraries will still need to have the right signature. -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<!-- Needed for SANE to work properly.
Unfortunate, but .NET is a managed language so the potential attack surface is minimal. -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
Binary file modified NAPS2.App.Mac/Icon.icns
Binary file not shown.
77 changes: 75 additions & 2 deletions NAPS2.App.Mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,94 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

<!-- Basic metadata -->
<key>CFBundleName</key>
<string>NAPS2</string>
<key>CFBundleIdentifier</key>
<string>com.naps2.desktop</string>
<key>CFBundleShortVersionString</key>
<string>7.0.1</string>
<string>8.2.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<string>12.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
<key>NSPrincipalClass</key>

<!-- We start as a background application in case we're in worker mode and don't want to show a UI.
If we're in GUI mode we dynamically switch to a foreground application (see MacEntryPoint.cs). -->
<string>NSApplication</string>
<key>LSBackgroundOnly</key>
<true/>

<!-- File types for "Open With" -->
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>PDF</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>JPG</string>
<key>LSItemContentTypes</key>
<array>
<string>public.jpeg</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>JP2</string>
<key>LSItemContentTypes</key>
<array>
<string>public.jpeg-2000</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>PNG</string>
<key>LSItemContentTypes</key>
<array>
<string>public.png</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>TIFF</string>
<key>LSItemContentTypes</key>
<array>
<string>public.tiff</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>BMP</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.bmp</string>
</array>
</dict>
</array>

</dict>
</plist>
16 changes: 8 additions & 8 deletions NAPS2.App.Mac/NAPS2.App.Mac.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7-macos10.15</TargetFramework>
<TargetFramework>net9-macos</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>NAPS2</RootNamespace>
<AssemblyName>NAPS2</AssemblyName>
<Version>7.0.1</Version>
<ApplicationIcon>../NAPS2.Lib/Icons/favicon.ico</ApplicationIcon>

<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
<SupportedOSPlatformVersion>12.0</SupportedOSPlatformVersion>
<RuntimeIdentifiers Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx-x64;osx-arm64</RuntimeIdentifiers>
<TrimMode>partial</TrimMode>

<Title>NAPS2 - Not Another PDF Scanner</Title>
<Product>NAPS2 - Not Another PDF Scanner</Product>
<Copyright>Copyright 2009, 2012-2022 NAPS2 Contributors</Copyright>
</PropertyGroup>

<Import Project="..\NAPS2.Setup\targets\CommonTargets.targets" />
<Import Project="..\NAPS2.Setup\targets\NativeLibs.Mac.targets" />
<Import Project="..\NAPS2.Setup\targets\SdkUsers.targets" />

<ItemGroup>
<PackageReference Include="NAPS2.Sane.Binaries" Version="1.0.4" />
<PackageReference Include="NAPS2.Tesseract.Binaries" Version="1.0.3" />
<PackageReference Include="NAPS2.Pdfium.Binaries" Version="1.2.0" />
<PackageReference Include="NAPS2.Sane.Binaries" Version="1.1.0" />
<PackageReference Include="NAPS2.Tesseract.Binaries" Version="1.4.0" />

<ProjectReference Include="..\NAPS2.Lib.Mac\NAPS2.Lib.Mac.csproj" />

<PackageReference Include="Eto.Platform.macOS" Version="2.7.2" />
<PackageReference Include="Eto.Platform.macOS" Version="2.8.3" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions NAPS2.App.Mac/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Runtime;
using NAPS2.EntryPoints;

namespace NAPS2;
Expand All @@ -9,6 +10,11 @@ static class Program
/// </summary>
static void Main(string[] args)
{
var profilesPath = Path.Combine(Paths.AppData, "jit");
Directory.CreateDirectory(profilesPath);
ProfileOptimization.SetProfileRoot(profilesPath);
ProfileOptimization.StartProfile("naps2.jit");

// Use reflection to avoid antivirus false positives (yes, really)
typeof(MacEntryPoint).GetMethod("Run").Invoke(null, new object[] { args });
}
Expand Down
Loading