diff --git a/.github/workflows/purge-cloudflare-cache.yml b/.github/workflows/purge-cloudflare-cache.yml
deleted file mode 100644
index a2d288faf..000000000
--- a/.github/workflows/purge-cloudflare-cache.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: Purge CloudFlare Cache
-
-on:
- page_build:
-
-jobs:
- purge_cache:
- runs-on: ubuntu-latest
- steps:
- - name: purge
- uses: jakejarvis/cloudflare-purge-action@master
- env:
- CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
- CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 9a92223ed..000000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,163 +0,0 @@
-env:
- IS_RELEASE_BRANCH: ${{ startsWith(github.ref, 'refs/heads/release/') }}
- BRANCH_NAME: ${{ github.ref_name }}
-
-name: Build and Deploy
-
-on:
- workflow_dispatch:
- push:
- branches:
- - 'release/1.*'
- paths-ignore:
- - '.github/**'
- - '.gitignore'
- - '*.md'
- - 'LICENSE'
- - 'build-and-deploy.ps1'
-
-jobs:
- build:
- runs-on: windows-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Setup MSBuild
- uses: microsoft/setup-msbuild@v2
-
- - name: Set up .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '7.x'
-
- - name: Restore NuGet packages
- run: msbuild src/Greenshot.sln /p:Configuration=Release /restore /t:PrepareForBuild
- env:
- Box13_ClientId: ${{ secrets.Box13_ClientId }}
- Box13_ClientSecret: ${{ secrets.Box13_ClientSecret }}
- DropBox13_ClientId: ${{ secrets.DropBox13_ClientId }}
- DropBox13_ClientSecret: ${{ secrets.DropBox13_ClientSecret }}
- Flickr_ClientId: ${{ secrets.Flickr_ClientId }}
- Flickr_ClientSecret: ${{ secrets.Flickr_ClientSecret }}
- Imgur13_ClientId: ${{ secrets.Imgur13_ClientId }}
- Imgur13_ClientSecret: ${{ secrets.Imgur13_ClientSecret }}
- Photobucket_ClientId: ${{ secrets.Photobucket_ClientId }}
- Photobucket_ClientSecret: ${{ secrets.Photobucket_ClientSecret }}
- Picasa_ClientId: ${{ secrets.Picasa_ClientId }}
- Picasa_ClientSecret: ${{ secrets.Picasa_ClientSecret }}
-
- - name: Build and package
- run: msbuild src/Greenshot.sln /p:Configuration=Release /t:Rebuild /v:normal
- env:
- Box13_ClientId: ${{ secrets.Box13_ClientId }}
- Box13_ClientSecret: ${{ secrets.Box13_ClientSecret }}
- DropBox13_ClientId: ${{ secrets.DropBox13_ClientId }}
- DropBox13_ClientSecret: ${{ secrets.DropBox13_ClientSecret }}
- Flickr_ClientId: ${{ secrets.Flickr_ClientId }}
- Flickr_ClientSecret: ${{ secrets.Flickr_ClientSecret }}
- Imgur13_ClientId: ${{ secrets.Imgur13_ClientId }}
- Imgur13_ClientSecret: ${{ secrets.Imgur13_ClientSecret }}
- Photobucket_ClientId: ${{ secrets.Photobucket_ClientId }}
- Photobucket_ClientSecret: ${{ secrets.Photobucket_ClientSecret }}
- Picasa_ClientId: ${{ secrets.Picasa_ClientId }}
- Picasa_ClientSecret: ${{ secrets.Picasa_ClientSecret }}
-
- - name: Copy Files
- run: |
- mkdir -p ${{ github.workspace }}/artifacts
- cp installer/Greenshot-INSTALLER-*.exe ${{ github.workspace }}/artifacts/
-
- - name: Upload Artifact
- uses: actions/upload-artifact@v4
- with:
- name: drop
- path: ${{ github.workspace }}/artifacts
-
- deploy:
- runs-on: windows-latest
- needs: build
-
- steps:
-
- - name: Checkout repository
- uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Download build artifacts
- uses: actions/download-artifact@v4
- with:
- name: drop # Name of the artifact uploaded in previous steps
- path: drop # Local folder where artifacts are downloaded
-
- - name: Extract version from file name
- if: env.IS_RELEASE_BRANCH == 'true'
- id: version_from_filename
- run: |
- $file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
- if (-not $file) {
- throw "No matching file found in 'drop' directory."
- }
- if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+)(.*)\.exe") {
- echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT
- } else {
- throw "Version number could not be extracted from file name: $($file.Name)"
- }
- shell: pwsh
-
- - name: Set version from sanitized branch name
- if: env.IS_RELEASE_BRANCH != 'true'
- id: version_from_branchname
- run: |
- $branch = "${{ github.ref }}" -replace '^refs/heads/', ''
- $sanitized = $branch -replace '[^a-zA-Z0-9._-]', '_'
- echo "version=$sanitized" >> $Env:GITHUB_OUTPUT
- shell: pwsh
-
- - name: Set version info
- id: version_info
- run: |
- echo "version=${{ steps.version_from_filename.outputs.version || steps.version_from_branchname.outputs.version }}" >> $GITHUB_OUTPUT
- shell: bash
-
-
- - name: Create tag
- if: env.IS_RELEASE_BRANCH == 'true'
- run: |
- git config user.name "github-actions[bot]"
- git config user.email "github-actions[bot]@users.noreply.github.com"
- git tag -a "v${{ steps.version_info.outputs.version }}" -m "v${{ steps.version_info.outputs.version }}"
- git push origin "v${{ steps.version_info.outputs.version }}"
-
- - name: Rename installer for non-release branch
- if: env.IS_RELEASE_BRANCH != 'true'
- run: |
- branch="${BRANCH_NAME:-${GITHUB_REF#refs/heads/}}"
- sanitized=$(echo "$branch" | sed 's/[^a-zA-Z0-9._-]/_/g')
- mv drop/Greenshot-INSTALLER-*.exe "drop/Greenshot-INSTALLER-${sanitized}.exe"
- shell: bash
-
- - name: Create GitHub Release
- uses: softprops/action-gh-release@v2
- with:
- name: "Greenshot ${{ steps.version_info.outputs.version }} (continuous build)"
- tag_name: ${{ env.IS_RELEASE_BRANCH == 'true' && format('v{0}', steps.version_info.outputs.version) || env.BRANCH_NAME }}
- files: drop/*.exe
- generate_release_notes: true
- draft: ${{ env.IS_RELEASE_BRANCH != 'true' }}
- prerelease: true
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Trigger GitHub Pages rebuild
- shell: bash
- run: |
- curl -X POST \
- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
- -H "Accept: application/vnd.github+json" \
- https://api.github.com/repos/${{ github.repository }}/pages/builds
-
diff --git a/.github/workflows/update-gh-pages.yml b/.github/workflows/update-gh-pages.yml
deleted file mode 100644
index ba45b70d1..000000000
--- a/.github/workflows/update-gh-pages.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Update GitHub Pages
-
-on:
- workflow_dispatch:
- release:
- types: [published, unpublished, created, edited, deleted, prereleased, released]
-
-jobs:
- update-gh-pages:
- runs-on: ubuntu-latest
- steps:
- - name: Trigger GitHub Pages rebuild
- shell: bash
- run: |
- curl -X POST \
- -H "Authorization: Bearer ${{ secrets.GH_PAGES_TOKEN }}" \
- -H "Accept: application/vnd.github+json" \
- https://api.github.com/repos/${{ github.repository }}/pages/builds
diff --git a/.gitignore b/.gitignore
index 7e96d5501..3afd2d7ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -214,6 +214,4 @@ ModelManifest.xml
*.credentials.cs
# Rider files
-.idea
-
-/installer/Greenshot-INSTALLER-*.exe
+.idea
\ No newline at end of file
diff --git a/README.md b/README.md
index a3e9696c7..1f47983e3 100644
--- a/README.md
+++ b/README.md
@@ -21,25 +21,4 @@ Being easy to understand and configurable, Greenshot is an efficient tool for pr
About this repository
---------------------
-This is the development branch is for Greenshot 1.3, which has been first released on 2025-07-14.
-
-Releases
---------
-
-You can find a list of all releases (stable and unstable) in the [Github releases](https://github.com/greenshot/greenshot/releases) or in the [version history on our website](https://getgreenshot.org/version-history/).
-The [downloads page on our website](https://getgreenshot.org/downloads/) always links to the latest stable release.
-
-Trademark and Logo Usage Policy
--------------------------------
-
-The Greenshot logo and trademark are the property of the Greenshot development team. Unauthorized use of the logo and trademark is generally prohibited. However, we allow the use of the Greenshot name and logo in the following contexts:
-
-* In blog posts, articles, or reviews that discuss or promote the Greenshot, provided that the usage is fair and does not imply endorsement by Greenshot.
-* In educational materials or presentations that accurately represent the project.
-
-Please refrain from using the Greenshot logo and trademark in any promotional materials, products, or in a manner that may cause confusion or imply endorsement without prior written permission.
-
-If you have any questions or wish to seek permission for other uses, please contact us.
-
-Thank you for your understanding and cooperation.
-
+This repository is for Greenshot 1.3, currently in development, but is the next planned release
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index 324758e42..000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Security Policy
-
-## Reporting a Vulnerability
-
-If you think you found a security issue in Greenshot, please report it responsibly [in our security section](https://github.com/greenshot/greenshot/security). We try to look into it as soon as possible - please give us some time for reaction, though.
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 000000000..558d40760
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,106 @@
+# .NET Desktop
+# Build and run tests for .NET Desktop or Windows classic desktop solutions.
+# Add steps that publish symbols, save build artifacts, and more:
+# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
+
+trigger:
+ batch: true
+ branches:
+ include:
+ - 'release/1.*'
+ exclude:
+ - 'develop'
+
+stages:
+- stage: Build
+ jobs:
+ - job: Build
+ variables:
+ - group: 'Plug-in Credentials'
+ - name: solution
+ value: 'src/Greenshot.sln'
+ - name: buildPlatform
+ value: 'Any CPU'
+ - name: buildConfiguration
+ value: 'Release'
+
+ pool:
+ vmImage: 'Windows-latest'
+
+ steps:
+ - task: MSBuild@1
+ displayName: Restore nuget packages and generate credential templates
+ inputs:
+ solution: '$(solution)'
+ platform: $(buildPlatform)
+ configuration: $(buildConfiguration)
+ msbuildArguments: '/restore /t:PrepareForBuild'
+
+ - task: MSBuild@1
+ displayName: Build and package
+ inputs:
+ solution: '$(solution)'
+ platform: $(buildPlatform)
+ configuration: $(buildConfiguration)
+ env:
+ Box13_ClientId: $(Box13_ClientId)
+ Box13_ClientSecret: $(Box13_ClientSecret)
+ DropBox13_ClientId: $(DropBox13_ClientId)
+ DropBox13_ClientSecret: $(DropBox13_ClientSecret)
+ Flickr_ClientId: $(Flickr_ClientId)
+ Flickr_ClientSecret: $(Flickr_ClientSecret)
+ Imgur13_ClientId: $(Imgur13_ClientId)
+ Imgur13_ClientSecret: $(Imgur13_ClientSecret)
+ Photobucket_ClientId: $(Photobucket_ClientId)
+ Photobucket_ClientSecret: $(Photobucket_ClientSecret)
+ Picasa_ClientId: $(Picasa_ClientId)
+ Picasa_ClientSecret: $(Picasa_ClientSecret)
+
+ - task: CopyFiles@2
+ displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
+ inputs:
+ SourceFolder: '$(Build.SourcesDirectory)\installer'
+ Contents: Greenshot-INSTALLER-*.exe
+ TargetFolder: '$(build.artifactstagingdirectory)'
+ flattenFolders: true
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: drop'
+ inputs:
+ PathtoPublish: '$(build.artifactstagingdirectory)'
+
+- stage: Deploy
+ jobs:
+ - deployment: GitHub_Release
+ pool:
+ vmImage: 'Windows-latest'
+
+ environment: 'GitHub Release'
+ strategy:
+ # default deployment strategy
+ runOnce:
+ deploy:
+ steps:
+ - download: current
+ artifact: drop
+
+ # Create a GitHub release
+ - task: GitHubRelease@0
+ inputs:
+ gitHubConnection: GitHub Release
+ repositoryName: '$(Build.Repository.Name)'
+ action: 'create' # Options: create, edit, delete
+ target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
+ tagSource: 'manual' # Required when action == Create# Options: auto, manual
+ tag: 'v$(Build.BuildNumber)' # Required when action == Edit || Action == Delete || TagSource == Manual
+ title: Greenshot $(Build.BuildNumber) unstable # Optional
+ #releaseNotesSource: 'file' # Optional. Options: file, input
+ #releaseNotesFile: # Optional
+ #releaseNotes: # Optional
+ assets: '$(Pipeline.Workspace)/drop/*.exe'
+ #assetUploadMode: 'delete' # Optional. Options: delete, replace
+ isDraft: true # Optional
+ isPreRelease: true # Optional
+ addChangeLog: true # Optional
+ #compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag
+ #releaseTag: # Required when compareWith == LastReleaseByTag
diff --git a/build-and-deploy.ps1 b/build-and-deploy.ps1
deleted file mode 100644
index 7645259c5..000000000
--- a/build-and-deploy.ps1
+++ /dev/null
@@ -1,149 +0,0 @@
-# USAGE
-# * Enable script execution in Powershell: 'Set-ExecutionPolicy RemoteSigned'
-# * Create a GitHub personal access token (PAT) for greenshot repository
-# * user must be owner of the repository
-# * token needs read and write permissions ""for Contents"" and ""Pages""
-# * Execute the script and paste your token
-
-# Prompt the user to securely input the Github token
-$SecureToken = Read-Host "Please enter your GitHub personal access token" -AsSecureString
-$ReleaseToken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureToken))
-
-# Variables
-$RepoPath = "." # Replace with your local repo path
-$ArtifactsPath = "$RepoPath\artifacts"
-$SolutionFile = "$RepoPath\src\Greenshot.sln"
-
-# Step 0: Update Local Repository
-git pull
-
-# Step 1: Restore NuGet Packages
-Write-Host "Restoring NuGet packages..."
-msbuild "$SolutionFile" /p:Configuration=Release /restore /t:PrepareForBuild
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Failed to restore NuGet packages."
- exit $LASTEXITCODE
-}
-
-# Step 2: Build and Package
-Write-Host "Building and packaging the solution..."
-msbuild "$SolutionFile" /p:Configuration=Release /t:Rebuild /v:normal
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Build failed."
- exit $LASTEXITCODE
-}
-
-# Step 3: Copy Installer Files
-Write-Host "Copying installer files..."
-if (-not (Test-Path $ArtifactsPath)) {
- New-Item -ItemType Directory -Force -Path $ArtifactsPath
-}
-Copy-Item "$RepoPath\installer\Greenshot-INSTALLER-*.exe" -Destination $ArtifactsPath -Force
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Failed to copy installer files."
- exit $LASTEXITCODE
-}
-
-# Step 4: Extract Version from File Name
-Write-Host "Extracting version from installer file name..."
-$InstallerFile = Get-ChildItem $ArtifactsPath -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -Last 1
-if (-not $InstallerFile) {
- Write-Error "No matching installer file found in '$ArtifactsPath'."
- exit 1
-}
-
-if ($InstallerFile.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
- $Version = $matches[1]
- Write-Host "Extracted version: $Version"
-} else {
- Write-Error "Version number could not be extracted from file name: $($InstallerFile.Name)"
- exit 1
-}
-
-# Step 5: Create Git Tag
-Write-Host "Creating Git tag..."
-cd $RepoPath
-#git config user.name "local-script"
-#git config user.email "local-script@example.com"
-git tag -a "v$Version" -m "v$Version"
-git push origin "v$Version"
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Failed to create Git tag."
- exit $LASTEXITCODE
-}
-
-# Step 6: Create GitHub Release
-Write-Host "Creating GitHub release..."
-$Headers = @{
- Authorization = "Bearer $ReleaseToken"
- Accept = "application/vnd.github+json"
-}
-$ReleaseData = @{
- tag_name = "v$Version"
- name = "Greenshot $Version unstable"
- body = "Pre-release of Greenshot $Version."
- draft = $true
- prerelease = $true
- generate_release_notes = $true
-}
-$ReleaseResponse = Invoke-RestMethod `
- -Uri "https://api.github.com/repos/greenshot/greenshot/releases" `
- -Method POST `
- -Headers $Headers `
- -Body (ConvertTo-Json $ReleaseData -Depth 10)
-
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Failed to create GitHub release."
- exit $LASTEXITCODE
-}
-
-Write-Host "Release created successfully."
-
-# Get the release ID from the response
-$ReleaseId = $ReleaseResponse.id
-Write-Host "Release ID: $ReleaseId"
-
-# Step 7: Upload .exe File to Release
-Write-Host "Uploading .exe file to GitHub release..."
-$ExeFilePath = "$ArtifactsPath\$($InstallerFile.Name)"
-if (-Not (Test-Path $ExeFilePath)) {
- Write-Error "Built .exe file not found: $ExeFilePath"
- exit 1
-}
-
-# GitHub API for uploading release assets
-$UploadUrl = $ReleaseResponse.upload_url -replace "{.*}", ""
-
-# Upload the file
-$FileHeaders = @{
- Authorization = "Bearer $ReleaseToken"
- ContentType = "application/octet-stream"
-}
-$FileName = [System.IO.Path]::GetFileName($ExeFilePath)
-
-Invoke-RestMethod `
- -Uri "$($UploadUrl)?name=$FileName" `
- -Method POST `
- -Headers $FileHeaders `
- -InFile $ExeFilePath `
- -ContentType "application/octet-stream"
-
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Failed to upload .exe file to release."
- exit $LASTEXITCODE
-}
-
-Write-Host "File uploaded successfully: $FileName"
-
-# Step 7: Trigger GitHub Pages Rebuild
-#Write-Host "Triggering GitHub Pages rebuild..."
-#Invoke-RestMethod `
-# -Uri "https://api.github.com/repos/greenshot/greenshot/pages/builds" `
-# -Method POST `
-# -Headers $Headers
-#if ($LASTEXITCODE -ne 0) {
-# Write-Error "Failed to trigger GitHub Pages rebuild."
-# exit $LASTEXITCODE
-#}
-#
-#Write-Host "GitHub Pages rebuild triggered successfully."
\ No newline at end of file
diff --git a/installer/additional_files/readme.txt b/installer/additional_files/readme.txt
index bdb64e2c4..1215789b6 100644
--- a/installer/additional_files/readme.txt
+++ b/installer/additional_files/readme.txt
@@ -7,29 +7,7 @@ CHANGE LOG:
All details to our tickets can be found here: https://greenshot.atlassian.net
-# Greenshot 1.3.xxx
-
-Bugs fixed:
-* greenshot.ini: Exclude Plugins and Include Plugins setting broken [#648](https://github.com/greenshot/greenshot/issues/648) [#642](https://github.com/greenshot/greenshot/issues/642) thanks to @Christian-Schulz for providing the fix
-
-Features added:
-
-# Greenshot 1.3.296
-
-Bugs fixed
-* Fix Administrative installation via user interface [#546](https://github.com/greenshot/greenshot/issues/546) [#611](https://github.com/greenshot/greenshot/issues/611) [#598](https://github.com/greenshot/greenshot/issues/598)
-
-Features added:
-* Installer: Allow Choice between All-Users (Administrative) and Current-User Installation [#625](https://github.com/greenshot/greenshot/pull/625)
-
-# Greenshot 1.3.292
-
-Bugs fixed:
-* Fix Administrative installation via command line using /ALLUSERS [#601](https://github.com/greenshot/greenshot/issues/601) [#619](https://github.com/greenshot/greenshot/issues/619)
-
-# Greenshot 1.3.290
-
-Note: the version information for the first 1.3 release is outdated/incomplete. Due to the long timespan and large amount of changes between 1.2 and 1.3 we lost track. Sorry.
+# Release notes for Greenshot 1.3
Greenshot 1.3 is the first Greenshot which targets .NET 4.7.2 which just by doing to solves some general issues in the area of Internet Explorer capturing, TLS communication and some other minor issues.
@@ -668,5 +646,3 @@ Features added:
* when clicking two overlapping elements, the one created later gets selected [ 1725175 ]
* created textboxes can now be edited with a doubleclick [ 1704408 ]
* selected font is now stored in the application config file [ 1704411 ]
-
-
diff --git a/installer/innosetup/setup.iss b/installer/innosetup/setup.iss
index fa358ee7b..bf49ea5ed 100644
--- a/installer/innosetup/setup.iss
+++ b/installer/innosetup/setup.iss
@@ -7,7 +7,6 @@
#define BinDir "bin\Release\net472"
#define ReleaseDir "..\..\src\Greenshot\bin\Release\net472"
#define PluginDir "..\..\src\Greenshot\bin\Release\net472\Plugins"
-#define CertumThumbprint GetEnv('CertumThumbprint')
; Include the scripts to install .NET Framework
; See https://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx
@@ -127,27 +126,21 @@ AppVersion={#Version}
ArchitecturesInstallIn64BitMode=x64
Compression=lzma2/ultra64
SolidCompression=yes
-DefaultDirName={autopf}\{#ExeName}
+DefaultDirName={code:DefDirRoot}\{#ExeName}
DefaultGroupName={#ExeName}
InfoBeforeFile=..\additional_files\readme.txt
LicenseFile=..\additional_files\license.txt
LanguageDetectionMethod=uilanguage
MinVersion=6.1sp1
+OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
OutputDir=..\
-; user may choose between all-users vs. current-user installation in a dialog or by using the /ALLUSERS flag (on the command line)
-; in registry section, HKA will take care of the appropriate root key (HKLM vs. HKCU), see https://jrsoftware.org/ishelp/index.php?topic=admininstallmode
-PrivilegesRequiredOverridesAllowed=dialog
-; admin privileges not required, unless user chooses all-users installation
-; the installer will ask for elevation if needed
PrivilegesRequired=lowest
SetupIconFile=..\..\src\Greenshot\icons\applicationIcon\icon.ico
-#if CertumThumbprint != ""
- OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
- SignTool=SignTool sign /sha1 "{#CertumThumbprint}" /tr http://time.certum.pl /td sha256 /fd sha256 /v $f
- SignedUninstaller=yes
-#else
- OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE-UNSIGNED
-#endif
+; Create a SHA1 signature
+; SignTool=SignTool sign /debug /fd sha1 /tr https://time.certum.pl /td sha1 $f
+; Append a SHA256 to the previous SHA1 signature (this is what as does)
+; SignTool=SignTool sign /debug /as /fd sha256 /tr https://time.certum.pl /td sha256 $f
+; SignedUninstaller=yes
UninstallDisplayIcon={app}\{#ExeName}.exe
Uninstallable=true
VersionInfoCompany={#ExeName}
@@ -159,7 +152,6 @@ VersionInfoVersion={#Version}
WizardImageFile=installer-large.bmp
; Reference a bitmap, max size 55x58
WizardSmallImageFile=installer-small.bmp
-
[Registry]
; Delete all startup entries, so we don't have leftover values
Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
@@ -178,16 +170,22 @@ Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: none; ValueName: {#E
Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
; Create the startup entries if requested to do so
-Root: HKA; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: """{app}\{#ExeName}.exe"""; Flags: uninsdeletevalue noerror; Tasks: startup
+; HKEY_LOCAL_USER - for current user only
+Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: """{app}\{#ExeName}.exe"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: IsRegularUser
+; HKEY_LOCAL_MACHINE - for all users when admin
+Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: """{app}\{#ExeName}.exe"""; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: not IsRegularUser
; Register our own filetype for all users
-Root: HKA; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Flags: uninsdeletevalue noerror
-Root: HKA; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Flags: uninsdeletevalue noerror
-Root: HKA; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE,0"""; Flags: uninsdeletevalue noerror
-Root: HKA; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Flags: uninsdeletevalue noerror
-
-; Disable the default PRTSCR Snipping Tool in Windows 11
-Root: HKCU; Subkey: Control Panel\Keyboard; ValueType: dword; ValueName: "PrintScreenKeyForSnippingEnabled"; ValueData: "0"; Flags: uninsdeletevalue; Check: ShouldDisableSnippingTool
+; HKEY_LOCAL_USER - for current user only
+Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE,0"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+; HKEY_LOCAL_MACHINE - for all users when admin
+Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE,0"""; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
[Icons]
Name: {group}\{#ExeName}; Filename: {app}\{#ExeName}.exe; WorkingDir: {app}; AppUserModelID: "{#ExeName}"
@@ -271,7 +269,6 @@ en.win10=Windows 10 plug-in
en.UninstallIconDescription=Uninstall
en.ShowLicense=Show license
en.ShowReadme=Show Readme
-en.disablewin11snippingtool=Disable Win11 default PrtScr snipping tool
de.confluence=Confluence Plug-in
de.default=Standard installation
@@ -284,7 +281,6 @@ de.optimize=Optimierung der Leistung, kann etwas dauern.
de.startgreenshot={#ExeName} starten
de.startup={#ExeName} starten wenn Windows hochfährt
de.win10=Windows 10 Plug-in
-de.disablewin11snippingtool=Deaktiviere das Standard Windows 11 Snipping Tool auf "Druck"
es.confluence=Extensión para Confluence
es.default=${default}
@@ -486,7 +482,6 @@ Name: "compact"; Description: "{code:CompactInstall}"
Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
[Components]
-Name: "disablesnippingtool"; Description: {cm:disablewin11snippingtool}; Flags: disablenouninstallwarning; Types: default full custom; Check: IsWindows11OrNewer()
Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
Name: "plugins\box"; Description: {cm:box}; Types: full custom; Flags: disablenouninstallwarning
@@ -536,8 +531,23 @@ Name: "languages\ukUA"; Description: {cm:ukUA}; Types: full custom; Flags: disab
Name: "languages\viVN"; Description: {cm:viVN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
Name: "languages\zhCN"; Description: {cm:zhCN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
Name: "languages\zhTW"; Description: {cm:zhTW}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
-
[Code]
+// Do we have a regular user trying to install this?
+function IsRegularUser(): Boolean;
+begin
+ Result := not (IsAdmin or IsAdminInstallMode);
+end;
+
+// The following code is used to select the installation path, this is localappdata if non poweruser
+function DefDirRoot(Param: String): String;
+begin
+ if IsRegularUser then
+ Result := ExpandConstant('{localappdata}')
+ else
+ Result := ExpandConstant('{pf}')
+end;
+
+
function FullInstall(Param : String) : String;
begin
result := SetupMessage(msgFullInstallation);
@@ -735,19 +745,6 @@ begin
Result := IsWindowsVersionOrNewer(10, 0);
end;
-function IsWindows11OrNewer: Boolean;
-var
- WindowsVersion: TWindowsVersion;
-begin
- GetWindowsVersionEx(WindowsVersion);
- Result := (WindowsVersion.Major >= 10) and (WindowsVersion.Build >= 22000);
-end;
-
-function ShouldDisableSnippingTool: Boolean;
-begin
- Result := IsComponentSelected('disablesnippingtool');
-end;
-
[Run]
Filename: "{app}\{#ExeName}.exe"; Description: "{cm:startgreenshot}"; Parameters: "{code:GetParamsForGS}"; WorkingDir: "{app}"; Flags: nowait postinstall runasoriginaluser
Filename: "https://getgreenshot.org/thank-you/?language={language}&version={#Version}"; Flags: shellexec runasoriginaluser
diff --git a/nuget.config b/nuget.config
deleted file mode 100644
index 554c2f634..000000000
--- a/nuget.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index caa6a3db3..f2ce406a1 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -1,65 +1,13 @@
-
-
-
-
-
-
-
-
-
- ();
- foreach (var line in InputLines)
- {
- string text = line.ItemSpec;
- foreach (var token in Tokens)
- {
- string tokenName = token.ItemSpec;
- // Skip if tokenName is null or empty
- if (string.IsNullOrEmpty(tokenName))
- continue;
-
- string replacementValue = token.GetMetadata("ReplacementValue");
- if (!string.IsNullOrEmpty(replacementValue))
- {
- string placeholder = "$"+ "{"+tokenName+"}"; // Token-Format wie $(Box13_ClientId)
- text = text.Replace(placeholder, replacementValue);
- }
- }
- output.Add(new Microsoft.Build.Utilities.TaskItem(text));
- }
- OutputLines = output.ToArray();
- ]]>
-
-
-
- $(NuGetPackageRoot)msbuildtasks/1.5.0.235/tools/
+ $(PkgMSBuildTasks)\tools\
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
\ No newline at end of file
diff --git a/src/Greenshot.Base/Greenshot.Base.csproj b/src/Greenshot.Base/Greenshot.Base.csproj
index 550682cd0..7e55c1dbc 100644
--- a/src/Greenshot.Base/Greenshot.Base.csproj
+++ b/src/Greenshot.Base/Greenshot.Base.csproj
@@ -3,10 +3,6 @@
true
-
- none
- false
-
diff --git a/src/Greenshot.Base/Interfaces/Plugin/AssemblyPluginIdentifierAttribute.cs b/src/Greenshot.Base/Interfaces/Plugin/AssemblyPluginIdentifierAttribute.cs
deleted file mode 100644
index 2be14c7a8..000000000
--- a/src/Greenshot.Base/Interfaces/Plugin/AssemblyPluginIdentifierAttribute.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2025 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System;
-
-namespace Greenshot.Base.Interfaces.Plugin
-{
- ///
- /// Attribute to specify a custom plugin identifier at assembly level
- ///
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
- public class AssemblyPluginIdentifierAttribute : Attribute
- {
- ///
- /// The identifier used for the plugin in configuration
- ///
- public string Identifier { get; }
-
- ///
- /// Constructor for the plugin identifier attribute
- ///
- /// The identifier for the plugin in configuration
- public AssemblyPluginIdentifierAttribute(string identifier)
- {
- Identifier = identifier;
- }
- }
-}
\ No newline at end of file
diff --git a/src/Greenshot.Editor/Drawing/StepLabelContainer.cs b/src/Greenshot.Editor/Drawing/StepLabelContainer.cs
index 7edecc4f8..e5d93e514 100644
--- a/src/Greenshot.Editor/Drawing/StepLabelContainer.cs
+++ b/src/Greenshot.Editor/Drawing/StepLabelContainer.cs
@@ -24,7 +24,6 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Runtime.Serialization;
-using System.Windows.Forms;
using Dapplo.Windows.Common.Extensions;
using Dapplo.Windows.Common.Structs;
using Greenshot.Base.Interfaces;
@@ -188,8 +187,6 @@ namespace Greenshot.Editor.Drawing
///
public override void Draw(Graphics graphics, RenderMode rm)
{
- if (Width == 0 || Height == 0) { return; }
-
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.CompositingQuality = CompositingQuality.HighQuality;
@@ -208,17 +205,9 @@ namespace Greenshot.Editor.Drawing
EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
}
- using FontFamily fam = new(FontFamily.GenericSansSerif.Name);
-
- //calculate new font size based on ratio from text height and text width
- float initialFontSize = Math.Min(Math.Abs(Width), Math.Abs(Height));
- using Font Measurefont = new(fam, initialFontSize, FontStyle.Bold, GraphicsUnit.Pixel);
- var fontSize = initialFontSize * TextRenderer.MeasureText(text, Measurefont).Height / TextRenderer.MeasureText(text, Measurefont).Width;
-
- //static scale for optimal fit
- fontSize *= 0.7f;
-
- using Font font = new(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
+ float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 1.4f;
+ using FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name);
+ using Font font = new Font(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, font);
}
diff --git a/src/Greenshot.Editor/Drawing/SvgContainer.cs b/src/Greenshot.Editor/Drawing/SvgContainer.cs
index 85b8cb43d..283f755e8 100644
--- a/src/Greenshot.Editor/Drawing/SvgContainer.cs
+++ b/src/Greenshot.Editor/Drawing/SvgContainer.cs
@@ -21,7 +21,6 @@
using System;
using System.Drawing;
-using System.IO;
using Dapplo.Windows.Common.Structs;
using Greenshot.Base.Core;
using Greenshot.Base.Interfaces;
@@ -35,32 +34,14 @@ namespace Greenshot.Editor.Drawing
[Serializable]
public class SvgContainer : VectorGraphicsContainer
{
- private MemoryStream _svgContent;
+ private readonly SvgDocument _svgDocument;
- [NonSerialized]
- private SvgDocument _svgDocument;
-
- public SvgContainer(Stream stream, ISurface parent) : base(parent)
+ public SvgContainer(SvgDocument svgDocument, ISurface parent) : base(parent)
{
- _svgContent = new MemoryStream();
- stream.CopyTo(_svgContent);
- Init();
- Size = new Size((int)_svgDocument.Width, (int)_svgDocument.Height);
+ _svgDocument = svgDocument;
+ Size = new Size((int)svgDocument.Width, (int)svgDocument.Height);
}
-
- protected override void Init()
- {
- base.Init();
- // Do nothing when there is no content
- if (_svgContent == null)
- {
- return;
- }
- _svgContent.Position = 0;
-
- _svgDocument = SvgDocument.Open(_svgContent);
- }
-
+
protected override Image ComputeBitmap()
{
//var image = ImageHelper.CreateEmpty(Width, Height, PixelFormat.Format32bppArgb, Color.Transparent);
diff --git a/src/Greenshot.Editor/Drawing/VectorGraphicsContainer.cs b/src/Greenshot.Editor/Drawing/VectorGraphicsContainer.cs
index 43da94c7d..45238caaf 100644
--- a/src/Greenshot.Editor/Drawing/VectorGraphicsContainer.cs
+++ b/src/Greenshot.Editor/Drawing/VectorGraphicsContainer.cs
@@ -47,8 +47,7 @@ namespace Greenshot.Editor.Drawing
/// This is the cached version of the bitmap, pre-rendered to save performance
/// Do not serialized, it can be rebuild with other information.
///
- [NonSerialized]
- private Image _cachedImage;
+ [NonSerialized] private Image _cachedImage;
///
/// Constructor takes care of calling Init
diff --git a/src/Greenshot.Editor/FileFormatHandlers/SvgFileFormatHandler.cs b/src/Greenshot.Editor/FileFormatHandlers/SvgFileFormatHandler.cs
index 76c5e85b9..14a33246e 100644
--- a/src/Greenshot.Editor/FileFormatHandlers/SvgFileFormatHandler.cs
+++ b/src/Greenshot.Editor/FileFormatHandlers/SvgFileFormatHandler.cs
@@ -1,89 +1,89 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using Greenshot.Base.Interfaces;
-using Greenshot.Base.Interfaces.Drawing;
-using Greenshot.Base.Interfaces.Plugin;
-using Greenshot.Editor.Drawing;
-using log4net;
-using Svg;
-
-namespace Greenshot.Editor.FileFormatHandlers
-{
- ///
- /// This handled the loading of SVG images to the editor
- ///
- public class SvgFileFormatHandler : AbstractFileFormatHandler, IFileFormatHandler
- {
- private static readonly ILog Log = LogManager.GetLogger(typeof(SvgFileFormatHandler));
- private readonly IReadOnlyCollection _ourExtensions = new[] { ".svg" };
-
- public SvgFileFormatHandler()
- {
- SupportedExtensions[FileFormatHandlerActions.LoadDrawableFromStream] = _ourExtensions;
- SupportedExtensions[FileFormatHandlerActions.LoadFromStream] = _ourExtensions;
- }
-
- public override bool TryLoadFromStream(Stream stream, string extension, out Bitmap bitmap)
- {
- var svgDocument = SvgDocument.Open(stream);
-
- try
- {
- bitmap = svgDocument.Draw();
- return true;
- }
- catch (Exception ex)
- {
- Log.Error("Can't load SVG", ex);
- }
- bitmap = null;
- return false;
- }
-
- public override bool TrySaveToStream(Bitmap bitmap, Stream destination, string extension, ISurface surface = null, SurfaceOutputSettings surfaceOutputSettings = null)
- {
- // TODO: Implement this
- return false;
- }
-
- public override IEnumerable LoadDrawablesFromStream(Stream stream, string extension, ISurface parent = null)
- {
- SvgContainer svgContainer = null;
- try
- {
- svgContainer = new SvgContainer(stream, parent);
- }
- catch (Exception ex)
- {
- Log.Error("Can't load SVG", ex);
- }
- if (svgContainer != null)
- {
- yield return svgContainer;
- }
- }
- }
-}
+/*
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
+ *
+ * For more information see: https://getgreenshot.org/
+ * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using Greenshot.Base.Interfaces;
+using Greenshot.Base.Interfaces.Drawing;
+using Greenshot.Base.Interfaces.Plugin;
+using Greenshot.Editor.Drawing;
+using log4net;
+using Svg;
+
+namespace Greenshot.Editor.FileFormatHandlers
+{
+ ///
+ /// This handled the loading of SVG images to the editor
+ ///
+ public class SvgFileFormatHandler : AbstractFileFormatHandler, IFileFormatHandler
+ {
+ private static readonly ILog Log = LogManager.GetLogger(typeof(SvgFileFormatHandler));
+ private readonly IReadOnlyCollection _ourExtensions = new[] { ".svg" };
+
+ public SvgFileFormatHandler()
+ {
+ SupportedExtensions[FileFormatHandlerActions.LoadDrawableFromStream] = _ourExtensions;
+ SupportedExtensions[FileFormatHandlerActions.LoadFromStream] = _ourExtensions;
+ }
+
+ public override bool TryLoadFromStream(Stream stream, string extension, out Bitmap bitmap)
+ {
+ var svgDocument = SvgDocument.Open(stream);
+
+ try
+ {
+ bitmap = svgDocument.Draw();
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Log.Error("Can't load SVG", ex);
+ }
+ bitmap = null;
+ return false;
+ }
+
+ public override bool TrySaveToStream(Bitmap bitmap, Stream destination, string extension, ISurface surface = null, SurfaceOutputSettings surfaceOutputSettings = null)
+ {
+ // TODO: Implement this
+ return false;
+ }
+
+ public override IEnumerable LoadDrawablesFromStream(Stream stream, string extension, ISurface parent = null)
+ {
+ SvgDocument svgDocument = null;
+ try
+ {
+ svgDocument = SvgDocument.Open(stream);
+ }
+ catch (Exception ex)
+ {
+ Log.Error("Can't load SVG", ex);
+ }
+ if (svgDocument != null)
+ {
+ yield return new SvgContainer(svgDocument, parent);
+ }
+ }
+ }
+}
diff --git a/src/Greenshot.Editor/Forms/ImageEditorForm.cs b/src/Greenshot.Editor/Forms/ImageEditorForm.cs
index 97263d8c2..87c3813c7 100644
--- a/src/Greenshot.Editor/Forms/ImageEditorForm.cs
+++ b/src/Greenshot.Editor/Forms/ImageEditorForm.cs
@@ -1023,9 +1023,6 @@ namespace Greenshot.Editor.Forms
case Keys.C:
BtnCropClick(sender, e);
break;
- case Keys.Z:
- BtnResizeClick(sender, e);
- break;
}
}
else if (e.Modifiers.Equals(Keys.Control))
diff --git a/src/Greenshot.Editor/Greenshot.Editor.csproj b/src/Greenshot.Editor/Greenshot.Editor.csproj
index 5dcd99bc1..7da9d555d 100644
--- a/src/Greenshot.Editor/Greenshot.Editor.csproj
+++ b/src/Greenshot.Editor/Greenshot.Editor.csproj
@@ -2,10 +2,6 @@
True
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Editor/Helpers/BinaryFormatterHelper.cs b/src/Greenshot.Editor/Helpers/BinaryFormatterHelper.cs
index 11c7dbae6..7f677367e 100644
--- a/src/Greenshot.Editor/Helpers/BinaryFormatterHelper.cs
+++ b/src/Greenshot.Editor/Helpers/BinaryFormatterHelper.cs
@@ -32,10 +32,6 @@ using static Greenshot.Editor.Drawing.FilterContainer;
namespace Greenshot.Editor.Helpers
{
- ///
- /// This helps to map the serialization of the old .greenshot file to the newer.
- /// It also prevents misuse.
- ///
internal class BinaryFormatterHelper : SerializationBinder
{
private static readonly ILog LOG = LogManager.GetLogger(typeof(BinaryFormatterHelper));
@@ -46,15 +42,11 @@ namespace Greenshot.Editor.Helpers
{"System.Drawing.Point",typeof(System.Drawing.Point) },
{"System.Drawing.Color",typeof(System.Drawing.Color) },
{"System.Drawing.Bitmap",typeof(System.Drawing.Bitmap) },
- {"System.Drawing.Icon",typeof(System.Drawing.Icon) },
- {"System.Drawing.Size",typeof(System.Drawing.Size) },
- {"System.IO.MemoryStream",typeof(System.IO.MemoryStream) },
{"System.Drawing.StringAlignment",typeof(System.Drawing.StringAlignment) },
{"System.Collections.Generic.List`1[[Greenshot.Base.Interfaces.Drawing.IFieldHolder", typeof(List)},
{"System.Collections.Generic.List`1[[Greenshot.Base.Interfaces.Drawing.IField", typeof(List)},
{"System.Collections.Generic.List`1[[System.Drawing.Point", typeof(List)},
{"Greenshot.Editor.Drawing.ArrowContainer", typeof(ArrowContainer) },
- {"Greenshot.Editor.Drawing.ArrowContainer+ArrowHeadCombination", typeof(ArrowContainer.ArrowHeadCombination) },
{"Greenshot.Editor.Drawing.LineContainer", typeof(LineContainer) },
{"Greenshot.Editor.Drawing.TextContainer", typeof(TextContainer) },
{"Greenshot.Editor.Drawing.SpeechbubbleContainer", typeof(SpeechbubbleContainer) },
@@ -88,14 +80,9 @@ namespace Greenshot.Editor.Helpers
{"Greenshot.Editor.Drawing.Fields.FieldType", typeof(FieldType) },
{"Greenshot.Editor.Drawing.FilterContainer+PreparedFilter", typeof(PreparedFilter) },
};
-
- ///
- /// Do the type mapping
- ///
- /// Assembly for the type that was serialized
- /// Type that was serialized
- /// Type which was mapped
- /// If something smells fishy
+ // Greenshot.Plugin.Drawing.EditStatus -> Greenshot.Base.Interfaces.Drawing.EditStatus
+ // GreenshotPlugin.Interfaces.Drawing.IFieldHolder -> Greenshot.Base.Interfaces.Drawing.IFieldHolder
+ // Greenshot.Drawing.FilterContainer+PreparedFilter -> Greenshot.Editor.Drawing
public override Type BindToType(string assemblyName, string typeName)
{
if (string.IsNullOrEmpty(typeName))
diff --git a/src/Greenshot.Editor/Helpers/ScaleHelper.cs b/src/Greenshot.Editor/Helpers/ScaleHelper.cs
index 8e4a76a13..8403bd939 100644
--- a/src/Greenshot.Editor/Helpers/ScaleHelper.cs
+++ b/src/Greenshot.Editor/Helpers/ScaleHelper.cs
@@ -202,7 +202,7 @@ namespace Greenshot.Editor.Helpers
{
// scaled rectangle (ratio) would be taller than original
// keep width and tweak height to maintain aspect ratio
- newSize = newSize.ChangeHeight(selectedSize.Width / originalRatio * flippedRatioSign);
+ newSize = newSize.ChangeWidth(selectedSize.Width / originalRatio * flippedRatioSign);
}
return newSize;
diff --git a/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.Credentials.template b/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.Credentials.template
index da2dbc7ae..df6eaa0bd 100644
--- a/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.Credentials.template
+++ b/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.Credentials.template
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
diff --git a/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.csproj b/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.csproj
index 2b3410c8f..fced869ad 100644
--- a/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.csproj
+++ b/src/Greenshot.Plugin.Box/Greenshot.Plugin.Box.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Box/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Box/Properties/AssemblyInfo.cs
index 0379e4a65..2ffb6f6fd 100644
--- a/src/Greenshot.Plugin.Box/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Box/Properties/AssemblyInfo.cs
@@ -21,13 +21,11 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to Box")]
-[assembly: AssemblyPluginIdentifier("Box Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.Confluence/Greenshot.Plugin.Confluence.csproj b/src/Greenshot.Plugin.Confluence/Greenshot.Plugin.Confluence.csproj
index 0734c44e9..d885ea3f5 100644
--- a/src/Greenshot.Plugin.Confluence/Greenshot.Plugin.Confluence.csproj
+++ b/src/Greenshot.Plugin.Confluence/Greenshot.Plugin.Confluence.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Confluence/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Confluence/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8d2833e17..000000000
--- a/src/Greenshot.Plugin.Confluence/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyDescription("A plugin to upload images to Confluence")]
-[assembly: AssemblyPluginIdentifier("Confluence Plugin")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/src/Greenshot.Plugin.Dropbox/Greenshot.Plugin.Dropbox.csproj b/src/Greenshot.Plugin.Dropbox/Greenshot.Plugin.Dropbox.csproj
index 7437b64aa..09eb988a5 100644
--- a/src/Greenshot.Plugin.Dropbox/Greenshot.Plugin.Dropbox.csproj
+++ b/src/Greenshot.Plugin.Dropbox/Greenshot.Plugin.Dropbox.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Dropbox/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Dropbox/Properties/AssemblyInfo.cs
index b95b9af6d..d01359e25 100644
--- a/src/Greenshot.Plugin.Dropbox/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Dropbox/Properties/AssemblyInfo.cs
@@ -21,13 +21,11 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to Dropbox")]
-[assembly: AssemblyPluginIdentifier("Dropbox Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.ExternalCommand/Greenshot.Plugin.ExternalCommand.csproj b/src/Greenshot.Plugin.ExternalCommand/Greenshot.Plugin.ExternalCommand.csproj
index d0151b7c0..50e39b62a 100644
--- a/src/Greenshot.Plugin.ExternalCommand/Greenshot.Plugin.ExternalCommand.csproj
+++ b/src/Greenshot.Plugin.ExternalCommand/Greenshot.Plugin.ExternalCommand.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.ExternalCommand/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.ExternalCommand/Properties/AssemblyInfo.cs
deleted file mode 100644
index acbe80370..000000000
--- a/src/Greenshot.Plugin.ExternalCommand/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2025 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyDescription("A plugin to send screenshots to other applications")]
-[assembly: AssemblyPluginIdentifier("External command Plugin")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/src/Greenshot.Plugin.Flickr/Greenshot.Plugin.Flickr.csproj b/src/Greenshot.Plugin.Flickr/Greenshot.Plugin.Flickr.csproj
index 8bdb8bcb4..5bc629bf1 100644
--- a/src/Greenshot.Plugin.Flickr/Greenshot.Plugin.Flickr.csproj
+++ b/src/Greenshot.Plugin.Flickr/Greenshot.Plugin.Flickr.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Flickr/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Flickr/Properties/AssemblyInfo.cs
index 9701ef654..30eafc83e 100644
--- a/src/Greenshot.Plugin.Flickr/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Flickr/Properties/AssemblyInfo.cs
@@ -21,13 +21,11 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to Flickr")]
-[assembly: AssemblyPluginIdentifier("Flickr Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.GooglePhotos/Greenshot.Plugin.GooglePhotos.csproj b/src/Greenshot.Plugin.GooglePhotos/Greenshot.Plugin.GooglePhotos.csproj
index 154410dd2..f2bfb8be5 100644
--- a/src/Greenshot.Plugin.GooglePhotos/Greenshot.Plugin.GooglePhotos.csproj
+++ b/src/Greenshot.Plugin.GooglePhotos/Greenshot.Plugin.GooglePhotos.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.GooglePhotos/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.GooglePhotos/Properties/AssemblyInfo.cs
index 3ff014500..a49045818 100644
--- a/src/Greenshot.Plugin.GooglePhotos/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.GooglePhotos/Properties/AssemblyInfo.cs
@@ -21,17 +21,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to GooglePhotos")]
-// Still using the old name 'Picasa-Web Plugin' as identifier for backwards compatibility
-// TODO: replace plugin identifier with "GooglePhotos Plugin" in the future
-[assembly: AssemblyPluginIdentifier("Picasa-Web Plugin")]
-
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/src/Greenshot.Plugin.Imgur/Greenshot.Plugin.Imgur.csproj b/src/Greenshot.Plugin.Imgur/Greenshot.Plugin.Imgur.csproj
index 5cb8e0baa..e0696e270 100644
--- a/src/Greenshot.Plugin.Imgur/Greenshot.Plugin.Imgur.csproj
+++ b/src/Greenshot.Plugin.Imgur/Greenshot.Plugin.Imgur.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Imgur/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Imgur/Properties/AssemblyInfo.cs
index 4f9d4afb5..befa881fd 100644
--- a/src/Greenshot.Plugin.Imgur/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Imgur/Properties/AssemblyInfo.cs
@@ -21,13 +21,11 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to Imgur")]
-[assembly: AssemblyPluginIdentifier("Imgur Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.Jira/Greenshot.Plugin.Jira.csproj b/src/Greenshot.Plugin.Jira/Greenshot.Plugin.Jira.csproj
index d38eb063a..a06e33882 100644
--- a/src/Greenshot.Plugin.Jira/Greenshot.Plugin.Jira.csproj
+++ b/src/Greenshot.Plugin.Jira/Greenshot.Plugin.Jira.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Jira/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Jira/Properties/AssemblyInfo.cs
deleted file mode 100644
index 44f8800ce..000000000
--- a/src/Greenshot.Plugin.Jira/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2025 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyDescription("A plugin to upload images to Jira")]
-[assembly: AssemblyPluginIdentifier("Jira Plugin")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/src/Greenshot.Plugin.Office/Greenshot.Plugin.Office.csproj b/src/Greenshot.Plugin.Office/Greenshot.Plugin.Office.csproj
index 982b86833..347a58339 100644
--- a/src/Greenshot.Plugin.Office/Greenshot.Plugin.Office.csproj
+++ b/src/Greenshot.Plugin.Office/Greenshot.Plugin.Office.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Office/OfficeUtils.cs b/src/Greenshot.Plugin.Office/OfficeUtils.cs
index 305611c5d..52ca8d7cb 100644
--- a/src/Greenshot.Plugin.Office/OfficeUtils.cs
+++ b/src/Greenshot.Plugin.Office/OfficeUtils.cs
@@ -1,45 +1,43 @@
using System.Linq;
using Microsoft.Win32;
-namespace Greenshot.Plugin.Office
+namespace Greenshot.Plugin.Office;
+
+///
+/// A small utility class for helping with office
+///
+internal static class OfficeUtils
{
+ private static readonly string[] OfficeRootKeys = { @"SOFTWARE\Microsoft\Office", @"SOFTWARE\WOW6432Node\Microsoft\Office" };
///
- /// A small utility class for helping with office
+ /// Get the path to the office exe
///
- internal static class OfficeUtils
+ /// Name of the office executable
+ public static string GetOfficeExePath(string exeName)
{
- private static readonly string[] OfficeRootKeys = { @"SOFTWARE\Microsoft\Office", @"SOFTWARE\WOW6432Node\Microsoft\Office" };
-
- ///
- /// Get the path to the office exe
- ///
- /// Name of the office executable
- public static string GetOfficeExePath(string exeName)
+ string strKeyName = exeName switch
{
- string strKeyName = exeName switch
- {
- "WINWORD.EXE" => "Word",
- "EXCEL.EXE" => "Excel",
- "POWERPNT.EXE" => "PowerPoint",
- "OUTLOOK.EXE" => "Outlook",
- "ONENOTE.EXE" => "OneNote",
- _ => ""
- };
+ "WINWORD.EXE" => "Word",
+ "EXCEL.EXE" => "Excel",
+ "POWERPNT.EXE" => "PowerPoint",
+ "OUTLOOK.EXE" => "Outlook",
+ "ONENOTE.EXE" => "OneNote",
+ _ => ""
+ };
- foreach (string strRootKey in OfficeRootKeys)
+ foreach (string strRootKey in OfficeRootKeys)
+ {
+ using RegistryKey rootKey = Registry.LocalMachine.OpenSubKey(strRootKey);
+ if (rootKey is null) continue;
+
+ foreach (string officeVersion in rootKey.GetSubKeyNames().Where(r => r.Contains(".")).Reverse())
{
- using RegistryKey rootKey = Registry.LocalMachine.OpenSubKey(strRootKey);
- if (rootKey is null) continue;
-
- foreach (string officeVersion in rootKey.GetSubKeyNames().Where(r => r.Contains(".")).Reverse())
- {
- using RegistryKey installRootKey = Registry.LocalMachine.OpenSubKey($@"{strRootKey}\{officeVersion}\{strKeyName}\InstallRoot");
- if (installRootKey == null) continue;
- return $@"{installRootKey.GetValue("Path")}\{exeName}";
- }
+ using RegistryKey installRootKey = Registry.LocalMachine.OpenSubKey($@"{strRootKey}\{officeVersion}\{strKeyName}\InstallRoot");
+ if (installRootKey == null) continue;
+ return $@"{installRootKey.GetValue("Path")}\{exeName}";
}
- return null;
}
+ return null;
}
-}
\ No newline at end of file
+}
diff --git a/src/Greenshot.Plugin.Office/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Office/Properties/AssemblyInfo.cs
index 6b14a40f5..9dcc75892 100644
--- a/src/Greenshot.Plugin.Office/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Office/Properties/AssemblyInfo.cs
@@ -21,13 +21,11 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to export images to Office applications")]
-[assembly: AssemblyPluginIdentifier("Office Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.Photobucket/Greenshot.Plugin.Photobucket.csproj b/src/Greenshot.Plugin.Photobucket/Greenshot.Plugin.Photobucket.csproj
index d0151b7c0..50e39b62a 100644
--- a/src/Greenshot.Plugin.Photobucket/Greenshot.Plugin.Photobucket.csproj
+++ b/src/Greenshot.Plugin.Photobucket/Greenshot.Plugin.Photobucket.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Photobucket/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Photobucket/Properties/AssemblyInfo.cs
index 231ca594d..783762320 100644
--- a/src/Greenshot.Plugin.Photobucket/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Photobucket/Properties/AssemblyInfo.cs
@@ -21,14 +21,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plugin to upload images to Photobucket")]
-[assembly: AssemblyPluginIdentifier("Photobucket Plugin")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
diff --git a/src/Greenshot.Plugin.Win10/Greenshot.Plugin.Win10.csproj b/src/Greenshot.Plugin.Win10/Greenshot.Plugin.Win10.csproj
index 14126adb3..c1c1729e0 100644
--- a/src/Greenshot.Plugin.Win10/Greenshot.Plugin.Win10.csproj
+++ b/src/Greenshot.Plugin.Win10/Greenshot.Plugin.Win10.csproj
@@ -1,8 +1,4 @@
-
- none
- false
-
PreserveNewest
diff --git a/src/Greenshot.Plugin.Win10/Properties/AssemblyInfo.cs b/src/Greenshot.Plugin.Win10/Properties/AssemblyInfo.cs
index 3f4b5bef2..d1b6cbd1b 100644
--- a/src/Greenshot.Plugin.Win10/Properties/AssemblyInfo.cs
+++ b/src/Greenshot.Plugin.Win10/Properties/AssemblyInfo.cs
@@ -1,33 +1,10 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2025 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: https://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection;
+using System.Reflection;
using System.Runtime.InteropServices;
-using Greenshot.Base.Interfaces.Plugin;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A plug-in for Windows 10 only functionality")]
-[assembly: AssemblyPluginIdentifier("Win10 Plugin")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
diff --git a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs
index 52005356c..b9120fee7 100644
--- a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs
+++ b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs
@@ -95,17 +95,7 @@ namespace Greenshot.Plugin.Win10
}
// Prepare the toast notifier. Be sure to specify the AppUserModelId on your application's shortcut!
- Microsoft.Toolkit.Uwp.Notifications.ToastNotifierCompat toastNotifier = null;
- try
- {
- toastNotifier = ToastNotificationManagerCompat.CreateToastNotifier();
- }
- catch (Exception ex)
- {
- Log.Warn("Could not create a toast notifier.", ex);
-
- return;
- }
+ var toastNotifier = ToastNotificationManagerCompat.CreateToastNotifier();
// Here is an interesting article on reading the settings: https://www.rudyhuyn.com/blog/2018/02/10/toastnotifier-and-settings-careful-with-non-uwp-applications/
try
diff --git a/src/Greenshot.sln b/src/Greenshot.sln
index b71e79bd3..91ddf4314 100644
--- a/src/Greenshot.sln
+++ b/src/Greenshot.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.7.34009.444
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29728.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot", "Greenshot\Greenshot.csproj", "{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}"
ProjectSection(ProjectDependencies) = postProject
@@ -48,7 +48,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\azure-pipelines.yml = ..\azure-pipelines.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
- ..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Editor", "Greenshot.Editor\Greenshot.Editor.csproj", "{148D3C8B-D6EC-4A7D-80E9-243A81F19DD2}"
diff --git a/src/Greenshot/Greenshot.csproj b/src/Greenshot/Greenshot.csproj
index f0d97afe9..fc4dd90d1 100644
--- a/src/Greenshot/Greenshot.csproj
+++ b/src/Greenshot/Greenshot.csproj
@@ -9,10 +9,6 @@
false
false
-
- none
- false
-
@@ -21,7 +17,6 @@
-
@@ -80,7 +75,6 @@
-
diff --git a/src/Greenshot/Helpers/PluginHelper.cs b/src/Greenshot/Helpers/PluginHelper.cs
index e5724a4f5..3ed3d97c3 100644
--- a/src/Greenshot/Helpers/PluginHelper.cs
+++ b/src/Greenshot/Helpers/PluginHelper.cs
@@ -219,15 +219,18 @@ namespace Greenshot.Helpers
{
var assembly = Assembly.LoadFrom(pluginFile);
- if (IsPluginExcludedByConfig(assembly, pluginFile) )
- {
- continue;
- }
-
var assemblyName = assembly.GetName().Name;
+
var pluginEntryName = $"{assemblyName}.{assemblyName.Replace("Greenshot.Plugin.", string.Empty)}Plugin";
var pluginEntryType = assembly.GetType(pluginEntryName, false, true);
+ if (CoreConfig.ExcludePlugins != null && CoreConfig.ExcludePlugins.Contains(pluginEntryName))
+ {
+ Log.WarnFormat("Exclude list: {0}", string.Join(",", CoreConfig.ExcludePlugins));
+ Log.WarnFormat("Skipping the excluded plugin {0} with version {1} from {2}", pluginEntryName, assembly.GetName().Version, pluginFile);
+ continue;
+ }
+
var plugin = (IGreenshotPlugin) Activator.CreateInstance(pluginEntryType);
if (plugin != null)
{
@@ -252,54 +255,5 @@ namespace Greenshot.Helpers
}
}
}
- ///
- /// This method checks the plugin against the configured include and exclude plugin
- /// lists. If a plugin is excluded, a warning is logged with details about the exclusion.
- ///
- private bool IsPluginExcludedByConfig(Assembly assembly, string pluginFile)
- {
- // Get plugin identifier from assembly attributes
- string pluginConfigIdentifier = GetPluginIdentifier(assembly, pluginFile);
-
- if (CoreConfig.IncludePlugins is { } includePlugins
- && includePlugins.Count(p => !string.IsNullOrWhiteSpace(p)) > 0 // ignore empty entries i.e. a whitespace
- && !includePlugins.Contains(pluginConfigIdentifier))
- {
- Log.WarnFormat("Include plugin list: {0}", string.Join(",", includePlugins));
- Log.WarnFormat("Skipping the not included plugin '{0}' with version {1} from {2}", pluginConfigIdentifier, assembly.GetName().Version, pluginFile);
- return true;
- }
-
- if (CoreConfig.ExcludePlugins is { } excludePlugins
- && excludePlugins.Contains(pluginConfigIdentifier))
- {
- Log.WarnFormat("Exclude plugin list: {0}", string.Join(",", excludePlugins));
- Log.WarnFormat("Skipping the excluded plugin '{0}' with version {1} from {2}", pluginConfigIdentifier, assembly.GetName().Version, pluginFile);
- return true;
- }
-
- return false;
- }
-
- ///
- /// Retrieves the plugin identifier for the specified assembly.
- ///
- private string GetPluginIdentifier(Assembly assembly, string pluginFile)
- {
- // Try to find PluginIdentifierAttribute
- var attribute = assembly
- .GetCustomAttributes()
- .FirstOrDefault();
-
- if (!string.IsNullOrEmpty(attribute?.Identifier))
- {
- return attribute.Identifier;
- }
-
- // If no attribute found, fall back to the sub namespace
- var pluginSubNamespace = assembly.GetName().Name.Replace("Greenshot.Plugin.", string.Empty);
- Log.WarnFormat("No '{0}' found in '{1}'. Use plugin namespace '{2}' as fallback.", nameof(AssemblyPluginIdentifierAttribute), pluginFile, pluginSubNamespace);
- return pluginSubNamespace;
- }
}
}
\ No newline at end of file
diff --git a/src/Greenshot/Languages/language-ca-CA.xml b/src/Greenshot/Languages/language-ca-CA.xml
index 323f7849f..423c55006 100644
--- a/src/Greenshot/Languages/language-ca-CA.xml
+++ b/src/Greenshot/Languages/language-ca-CA.xml
@@ -305,7 +305,7 @@ Malgrat això, encara es poden utilitzar totes les característiques de Greensho
Afegeix un comptador (I)
Afegeix una bafarada (S)
- Canvia la mida (Z)
+ Canvia la mida
Configuració del canvi de mida
Manté la relació d'aspecte
Amplada
diff --git a/src/Greenshot/Languages/language-cs-CZ.xml b/src/Greenshot/Languages/language-cs-CZ.xml
index cc409c66f..86d7f2207 100644
--- a/src/Greenshot/Languages/language-cs-CZ.xml
+++ b/src/Greenshot/Languages/language-cs-CZ.xml
@@ -308,7 +308,7 @@ Všechny funkce Greenshotu jsou stále dostupné přímo z místní nabídky bez
Přidat počítadlo (I)
Přidat textovou bublinu (S)
- Změnit velikost (Z)
+ Změnit velikost
Nastavení změny velikosti
Zachovat poměr stran
Šířka
diff --git a/src/Greenshot/Languages/language-de-DE.xml b/src/Greenshot/Languages/language-de-DE.xml
index b636da112..a50ad0119 100644
--- a/src/Greenshot/Languages/language-de-DE.xml
+++ b/src/Greenshot/Languages/language-de-DE.xml
@@ -312,7 +312,7 @@ Sie können aber auch alle Greenshot-Funktionen über das Kontextmenü des Green
Zähler hinzufügen (I)
Sprechblase hinzufügen (S)
- Skalieren (Z)
+ Skalieren
Einstellungen für Skalierung
Seitenverhältnis beibehalten
Breite
diff --git a/src/Greenshot/Languages/language-en-US.xml b/src/Greenshot/Languages/language-en-US.xml
index 1403d3e9c..5cac2280d 100644
--- a/src/Greenshot/Languages/language-en-US.xml
+++ b/src/Greenshot/Languages/language-en-US.xml
@@ -312,7 +312,7 @@ All Greenshot features still work directly from the tray icon context menu witho
Add counter (I)
Add speechbubble (S)
- Resize (Z)
+ Resize
Resize settings
Maintain aspect ratio
Width
diff --git a/src/Greenshot/Languages/language-fr-FR.xml b/src/Greenshot/Languages/language-fr-FR.xml
index 4ef502438..50cde5788 100644
--- a/src/Greenshot/Languages/language-fr-FR.xml
+++ b/src/Greenshot/Languages/language-fr-FR.xml
@@ -144,7 +144,7 @@ De plus, nous apprécierions beaucoup que vous preniez la peine de vérifier si
Imprimer
Rétablir {0}
Réinitialiser la taille
- Redimensionner (Z)
+ Redimensionner
Maintenir le rapport L / H
Hauteur
Pourcentage
diff --git a/src/Greenshot/Languages/language-id-ID.xml b/src/Greenshot/Languages/language-id-ID.xml
index fcb887082..df31cd624 100644
--- a/src/Greenshot/Languages/language-id-ID.xml
+++ b/src/Greenshot/Languages/language-id-ID.xml
@@ -144,7 +144,7 @@ Juga, kami sangat terbantu apabila anda mengecek laporan lain yang sama dengan k
Cetak
Ulang {0}
Reset ukuran
- Ubah ukuran (Z)
+ Ubah ukuran
Pertahankan aspek rasio
Tinggi
Persen
diff --git a/src/Greenshot/Languages/language-it-IT.xml b/src/Greenshot/Languages/language-it-IT.xml
index 89d68c988..b0cb0e96f 100644
--- a/src/Greenshot/Languages/language-it-IT.xml
+++ b/src/Greenshot/Languages/language-it-IT.xml
@@ -322,7 +322,7 @@ In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono
Aggiungi conteggio
Aggiungi nuvoletta
- Ridimensiona (Z)
+ Ridimensiona
Impostazioni ridimensionamento
Mantieni rapporto dimensioni
Larghezza
diff --git a/src/Greenshot/Languages/language-ja-JP.xml b/src/Greenshot/Languages/language-ja-JP.xml
index 36f5231f2..03638f0dc 100644
--- a/src/Greenshot/Languages/language-ja-JP.xml
+++ b/src/Greenshot/Languages/language-ja-JP.xml
@@ -143,7 +143,7 @@ Greenshot には一切の保障がありません。GNU General Public License
印刷
やり直し{0}
サイズをリセット
- リサイズ (Z)
+ リサイズ
縦横比を維持する
高さ
パーセント
diff --git a/src/Greenshot/Languages/language-kab-DZ.xml b/src/Greenshot/Languages/language-kab-DZ.xml
index 8a690952c..e3366a18a 100644
--- a/src/Greenshot/Languages/language-kab-DZ.xml
+++ b/src/Greenshot/Languages/language-kab-DZ.xml
@@ -144,7 +144,7 @@ Rnu ɣur-s, nḥemmel aṭas ma yella tesneqdeḍ aneqqis igebren ugur-agi. (Tze
Siggez
Err-d {0}
Wennez teɣzi
- Snifel tahri/teɣzi (Z)
+ Snifel tahri/teɣzi
Eǧǧ afmiḍi Teɣ / Teh
Awrir
Afmiḍi
diff --git a/src/Greenshot/Languages/language-ko-KR.xml b/src/Greenshot/Languages/language-ko-KR.xml
index 144188ad8..0bf90570e 100644
--- a/src/Greenshot/Languages/language-ko-KR.xml
+++ b/src/Greenshot/Languages/language-ko-KR.xml
@@ -304,7 +304,7 @@ ${hostname} PC명
카운터 더하기 (I)
설명선 더하기(S)
- 크기조정 (Z)
+ 크기조정
크기조정 설정
종횡비 유지
너비
diff --git a/src/Greenshot/Languages/language-lv-LV.xml b/src/Greenshot/Languages/language-lv-LV.xml
index dea057944..acbe9eacb 100644
--- a/src/Greenshot/Languages/language-lv-LV.xml
+++ b/src/Greenshot/Languages/language-lv-LV.xml
@@ -306,7 +306,7 @@ Arī bez karstiem taustiņiem visas darbības iespējams veikt izmantojot „Gre
Pievienot skaitli (I)
Pievienot teksta norādi (S)
- Mainīt izmēru (Z)
+ Mainīt izmēru
Izmēra maiņas iestatījumi
Saglabāt izmēru attiecības
Platums
diff --git a/src/Greenshot/Languages/language-nl-NL.xml b/src/Greenshot/Languages/language-nl-NL.xml
index d640b0a42..65c008c01 100644
--- a/src/Greenshot/Languages/language-nl-NL.xml
+++ b/src/Greenshot/Languages/language-nl-NL.xml
@@ -307,7 +307,7 @@ Alle Greenshot functies werken ook zonder sneltoetsen via het context menu.Teller toevoegen (I)
Tekstballon toevoegen (S)
- Grootte (Z)
+ Grootte
Vergrotingsinstellingen
Verhouding behouden
Breedte
diff --git a/src/Greenshot/Languages/language-pt-PT.xml b/src/Greenshot/Languages/language-pt-PT.xml
index 4da21743d..53a3ea424 100644
--- a/src/Greenshot/Languages/language-pt-PT.xml
+++ b/src/Greenshot/Languages/language-pt-PT.xml
@@ -305,7 +305,7 @@ Todas as funcionalidades do Greenshot funcionam directamente através do menu de
Adicionar contador (I)
Adicionar balão de texto (S)
- Redimensionar (Z)
+ Redimensionar
Definições de Redimensionamento
Manter proporções
Largura
diff --git a/src/Greenshot/Languages/language-sv-SE.xml b/src/Greenshot/Languages/language-sv-SE.xml
index c5b1517e2..c67bfe8fe 100644
--- a/src/Greenshot/Languages/language-sv-SE.xml
+++ b/src/Greenshot/Languages/language-sv-SE.xml
@@ -305,7 +305,7 @@ Alla Greenshots funktioner fungerar fortfarande från snabbmenyn i aktivitetsfä
Lägg till räknare
Lägg till pratbubbla
- Anpassa storlek (Z)
+ Anpassa storlek
Storleksinställningar
Behåll bildförhållande
Bredd
diff --git a/src/Greenshot/Languages/language-uk-UA.xml b/src/Greenshot/Languages/language-uk-UA.xml
index 057927676..1eae26c97 100644
--- a/src/Greenshot/Languages/language-uk-UA.xml
+++ b/src/Greenshot/Languages/language-uk-UA.xml
@@ -306,7 +306,7 @@ ${hostname} назва комп’ютера
Додати лічильник (Ш)
Додати словесну бульбашку (І)
- Змінити розмір (Z)
+ Змінити розмір
Параметри зміни розміру
Зберігати пропорції
Ширина
diff --git a/src/Greenshot/Languages/language-zh-TW.xml b/src/Greenshot/Languages/language-zh-TW.xml
index 63f8fce2f..69f5e6696 100644
--- a/src/Greenshot/Languages/language-zh-TW.xml
+++ b/src/Greenshot/Languages/language-zh-TW.xml
@@ -307,7 +307,7 @@ Greenshot 所有功能仍然可以直接從通知區圖示的內容功能表動
加入計數器 (I)
加入對話框 (S)
- 縮放 (Z)
+ 縮放
縮放設定
維持長寬比
長度