Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 308966da36 | |||
| cff9bc4876 | |||
| f3323420a8 |
@@ -3,7 +3,7 @@
|
|||||||
<Product Id="*"
|
<Product Id="*"
|
||||||
Name="NFC Actions"
|
Name="NFC Actions"
|
||||||
Language="1033"
|
Language="1033"
|
||||||
Version="1.0.0.0"
|
Version="1.0.2.0"
|
||||||
Manufacturer="Dangerous Things"
|
Manufacturer="Dangerous Things"
|
||||||
UpgradeCode="A1B2C3D4-E5F6-4A5B-8C9D-0E1F2A3B4C5D">
|
UpgradeCode="A1B2C3D4-E5F6-4A5B-8C9D-0E1F2A3B4C5D">
|
||||||
|
|
||||||
@@ -20,6 +20,15 @@
|
|||||||
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
|
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
|
||||||
<Property Id="MSIINSTALLPERUSER" Value="1" />
|
<Property Id="MSIINSTALLPERUSER" Value="1" />
|
||||||
|
|
||||||
|
<!-- Launch application after installation -->
|
||||||
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch NFC Actions" />
|
||||||
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
|
||||||
|
<Property Id="WixShellExecTarget" Value="[#NfcActionsExe]" />
|
||||||
|
<CustomAction Id="LaunchApplication"
|
||||||
|
BinaryKey="WixCA"
|
||||||
|
DllEntry="WixShellExec"
|
||||||
|
Impersonate="yes" />
|
||||||
|
|
||||||
<Icon Id="ProductIcon" SourceFile="..\NfcActions\Resources\icon.ico" />
|
<Icon Id="ProductIcon" SourceFile="..\NfcActions\Resources\icon.ico" />
|
||||||
<Property Id="ARPPRODUCTICON" Value="ProductIcon" />
|
<Property Id="ARPPRODUCTICON" Value="ProductIcon" />
|
||||||
<Property Id="ARPHELPLINK" Value="https://dangerousthings.com" />
|
<Property Id="ARPHELPLINK" Value="https://dangerousthings.com" />
|
||||||
@@ -27,10 +36,26 @@
|
|||||||
|
|
||||||
<Feature Id="ProductFeature" Title="NFC Actions" Level="1">
|
<Feature Id="ProductFeature" Title="NFC Actions" Level="1">
|
||||||
<ComponentGroupRef Id="ProductComponents" />
|
<ComponentGroupRef Id="ProductComponents" />
|
||||||
|
<ComponentGroupRef Id="HarvestedFiles" />
|
||||||
<ComponentRef Id="ApplicationShortcut" />
|
<ComponentRef Id="ApplicationShortcut" />
|
||||||
<ComponentRef Id="AutoStartRegistry" />
|
<ComponentRef Id="AutoStartRegistry" />
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
|
<UI>
|
||||||
|
<!-- Use WixUI_Minimal without license page -->
|
||||||
|
<UIRef Id="WixUI_InstallDir" />
|
||||||
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||||
|
|
||||||
|
<!-- Skip the license page -->
|
||||||
|
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2">1</Publish>
|
||||||
|
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">1</Publish>
|
||||||
|
|
||||||
|
<Publish Dialog="ExitDialog"
|
||||||
|
Control="Finish"
|
||||||
|
Event="DoAction"
|
||||||
|
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
|
||||||
|
</UI>
|
||||||
|
|
||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
<Directory Id="LocalAppDataFolder">
|
<Directory Id="LocalAppDataFolder">
|
||||||
<Directory Id="CompanyFolder" Name="DangerousThings">
|
<Directory Id="CompanyFolder" Name="DangerousThings">
|
||||||
@@ -72,30 +97,21 @@
|
|||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<!-- Registry and cleanup component -->
|
||||||
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
|
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
|
||||||
<Component Id="MainExecutable" Guid="D4E5F6A7-B8C9-4D8E-1F2A-3B4C5D6E7F8A">
|
<Component Id="RegistryEntries" Guid="D4E5F6A7-B8C9-4D8E-1F2A-3B4C5D6E7F8A">
|
||||||
<File Id="NfcActionsExe"
|
|
||||||
Source="..\NfcActions\bin\Release\net7.0-windows\win-x64\publish\NfcActions.exe" />
|
|
||||||
<RegistryValue Root="HKCU"
|
<RegistryValue Root="HKCU"
|
||||||
Key="Software\DangerousThings\NfcActions"
|
Key="Software\DangerousThings\NfcActions"
|
||||||
Name="MainExe"
|
Name="Installed"
|
||||||
Type="integer"
|
Type="integer"
|
||||||
Value="1"
|
Value="1"
|
||||||
KeyPath="yes"/>
|
KeyPath="yes"/>
|
||||||
<RemoveFolder Id="RemoveINSTALLFOLDER" Directory="INSTALLFOLDER" On="uninstall" />
|
<RemoveFolder Id="RemoveINSTALLFOLDER" Directory="INSTALLFOLDER" On="uninstall" />
|
||||||
<RemoveFolder Id="RemoveCompanyFolder" Directory="CompanyFolder" On="uninstall" />
|
<RemoveFolder Id="RemoveCompanyFolder" Directory="CompanyFolder" On="uninstall" />
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Id="ResourcesFolder" Guid="E5F6A7B8-C9D0-4E9F-2A3B-4C5D6E7F8A9B">
|
|
||||||
<File Id="IconIco" Source="..\NfcActions\bin\Release\net7.0-windows\win-x64\publish\Resources\icon.ico" />
|
|
||||||
<RegistryValue Root="HKCU"
|
|
||||||
Key="Software\DangerousThings\NfcActions"
|
|
||||||
Name="Resources"
|
|
||||||
Type="integer"
|
|
||||||
Value="1"
|
|
||||||
KeyPath="yes"/>
|
|
||||||
</Component>
|
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
|
|
||||||
|
<!-- Harvested files will be included from HarvestedFiles.wxs -->
|
||||||
|
|
||||||
</Product>
|
</Product>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
|||||||
BIN
NfcActions-Setup-v1.0.2-NET8.msi
Normal file
BIN
NfcActions-Setup-v1.0.2-NET8.msi
Normal file
Binary file not shown.
BIN
NfcActions-Setup-v1.0.2.msi
Normal file
BIN
NfcActions-Setup-v1.0.2.msi
Normal file
Binary file not shown.
7
NfcActions/App.config
Normal file
7
NfcActions/App.config
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<!-- Force software rendering to prevent DirectWrite crashes -->
|
||||||
|
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier2OrGreater=true;Switch.System.Windows.DoNotScaleForDpiChanges=false" />
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using System.Windows.Media;
|
||||||
using NfcActions.Services;
|
using NfcActions.Services;
|
||||||
using NfcActions.ViewModels;
|
using NfcActions.ViewModels;
|
||||||
using Application = System.Windows.Application;
|
using Application = System.Windows.Application;
|
||||||
@@ -13,6 +15,7 @@ namespace NfcActions;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
private static Mutex? _instanceMutex;
|
||||||
private NotifyIcon? _notifyIcon;
|
private NotifyIcon? _notifyIcon;
|
||||||
private Icon? _customIcon;
|
private Icon? _customIcon;
|
||||||
private MainWindow? _mainWindow;
|
private MainWindow? _mainWindow;
|
||||||
@@ -22,8 +25,40 @@ public partial class App : Application
|
|||||||
private LogService? _logService;
|
private LogService? _logService;
|
||||||
private MainViewModel? _viewModel;
|
private MainViewModel? _viewModel;
|
||||||
|
|
||||||
|
public App()
|
||||||
|
{
|
||||||
|
// CRITICAL: Set software rendering mode BEFORE any WPF initialization
|
||||||
|
// This must be done in the constructor before InitializeComponent()
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Set environment variable as additional safeguard
|
||||||
|
Environment.SetEnvironmentVariable("DOTNET_SYSTEM_WINDOWS_DONOTUSEPRESENTATIONDPICAPABILITYTIER2ORGREATER", "1");
|
||||||
|
|
||||||
|
// Force software rendering
|
||||||
|
RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// If this fails, try to continue anyway
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Application_Startup(object sender, StartupEventArgs e)
|
private void Application_Startup(object sender, StartupEventArgs e)
|
||||||
{
|
{
|
||||||
|
// Ensure only one instance runs at a time
|
||||||
|
bool createdNew;
|
||||||
|
_instanceMutex = new Mutex(true, "NfcActions_SingleInstance_Mutex", out createdNew);
|
||||||
|
|
||||||
|
if (!createdNew)
|
||||||
|
{
|
||||||
|
System.Windows.MessageBox.Show("NFC Actions is already running. Check the system tray.",
|
||||||
|
"NFC Actions",
|
||||||
|
MessageBoxButton.OK,
|
||||||
|
MessageBoxImage.Information);
|
||||||
|
Shutdown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize services
|
// Initialize services
|
||||||
_logService = new LogService();
|
_logService = new LogService();
|
||||||
_cardReaderService = new CardReaderService(_logService);
|
_cardReaderService = new CardReaderService(_logService);
|
||||||
@@ -107,5 +142,7 @@ public partial class App : Application
|
|||||||
_notifyIcon?.Dispose();
|
_notifyIcon?.Dispose();
|
||||||
_customIcon?.Dispose();
|
_customIcon?.Dispose();
|
||||||
_cardReaderService?.Dispose();
|
_cardReaderService?.Dispose();
|
||||||
|
_instanceMutex?.ReleaseMutex();
|
||||||
|
_instanceMutex?.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.2</Version>
|
||||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
<AssemblyVersion>1.0.2.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
<FileVersion>1.0.2.0</FileVersion>
|
||||||
<Company>Dangerous Things</Company>
|
<Company>Dangerous Things</Company>
|
||||||
<Product>NFC Actions</Product>
|
<Product>NFC Actions</Product>
|
||||||
<Description>NFC card reader monitoring and action automation</Description>
|
<Description>NFC card reader monitoring and action automation</Description>
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<PublishSingleFile>true</PublishSingleFile>
|
<PublishSingleFile>false</PublishSingleFile>
|
||||||
<SelfContained>true</SelfContained>
|
<SelfContained>true</SelfContained>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<PublishReadyToRun>true</PublishReadyToRun>
|
<PublishReadyToRun>false</PublishReadyToRun>
|
||||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
<PublishTrimmed>false</PublishTrimmed>
|
||||||
|
<EnableCompressionInSingleFile>false</EnableCompressionInSingleFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
74
RELEASE_NOTES.md
Normal file
74
RELEASE_NOTES.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# NFC Actions v1.0.0 - Initial Release
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### Core Functionality
|
||||||
|
- **System Tray Application** - Runs quietly in the background, accessible from the system tray
|
||||||
|
- **Real-time NFC Monitoring** - Automatically detects and monitors all PC/SC compatible NFC readers
|
||||||
|
- **Dynamic Reader Management** - Handles USB reader plug/unplug events automatically
|
||||||
|
- **NDEF Payload Extraction** - Supports Type 2 and Type 4 NFC tags with automatic block size detection
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
- **Copy to Clipboard** - Copies NDEF payload data to clipboard for easy pasting
|
||||||
|
- **Launch URLs** - Opens URI records in your default browser (URL records only)
|
||||||
|
- **Keyboard Input** - Types NDEF content as keyboard input into active application
|
||||||
|
|
||||||
|
### User Interface
|
||||||
|
- **Configuration Window** - Clean, simple interface for managing readers and actions
|
||||||
|
- **Real-time Activity Log** - Color-coded logging (Debug, Info, Warning, Error) for visibility
|
||||||
|
- **Dangerous Things Branding** - Custom icons and clickable logo
|
||||||
|
|
||||||
|
### Technical Features
|
||||||
|
- **Settings Persistence** - Remembers your preferences between sessions
|
||||||
|
- **Auto-start on Login** - Automatically starts when you log in to Windows
|
||||||
|
- **File Logging** - Debug logs saved to application directory for troubleshooting
|
||||||
|
- **Single-file Deployment** - No .NET runtime installation required
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Download **NfcActions-Setup.msi** from the release assets
|
||||||
|
2. Run the installer
|
||||||
|
3. The application will:
|
||||||
|
- Install to `%LOCALAPPDATA%\DangerousThings\NFC Actions`
|
||||||
|
- Create a Start Menu shortcut
|
||||||
|
- Configure automatic startup on login
|
||||||
|
- Start running immediately in the system tray
|
||||||
|
|
||||||
|
## System Requirements
|
||||||
|
|
||||||
|
- **Operating System**: Windows 10 or Windows 11
|
||||||
|
- **Hardware**: PC/SC compatible NFC reader (USB or built-in)
|
||||||
|
- **Runtime**: None required (self-contained)
|
||||||
|
|
||||||
|
## Tested Readers
|
||||||
|
|
||||||
|
- Identiv uTrust 3700 F
|
||||||
|
- HID OMNIKEY 5022 CL
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. **First Launch**: Click the tray icon to open the configuration window
|
||||||
|
2. **Enable/Disable Readers**: Check or uncheck readers in the "Active Readers" list
|
||||||
|
3. **Configure Actions**: Select which actions to perform when a card is detected
|
||||||
|
4. **Tap NFC Card**: Simply tap your NFC card to any enabled reader
|
||||||
|
5. **Monitor Activity**: Watch the activity log for real-time feedback
|
||||||
|
|
||||||
|
## Known Limitations
|
||||||
|
|
||||||
|
- Only the first NDEF record is processed (multiple records not supported yet)
|
||||||
|
- Only NDEF payload is used (not the full NDEF message structure)
|
||||||
|
- URI detection is limited to standard URI record types and identifier codes
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
- **Website**: https://dangerousthings.com
|
||||||
|
- **Repository**: https://git.dngr.us/DangerousThings/nfc-actions
|
||||||
|
- **Issues**: Report bugs via the repository issue tracker
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright © 2025 Dangerous Things
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Built with Claude Code** - https://claude.com/claude-code
|
||||||
@@ -9,7 +9,7 @@ param(
|
|||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
|
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
$projectPath = Join-Path $scriptPath "NfcActions\NfcActions.csproj"
|
$projectPath = Join-Path $scriptPath "NfcActions\NfcActions.csproj"
|
||||||
$publishPath = Join-Path $scriptPath "NfcActions\bin\Release\net7.0-windows\win-x64\publish"
|
$publishPath = Join-Path $scriptPath "NfcActions\bin\Release\net8.0-windows\win-x64\publish"
|
||||||
$installerPath = Join-Path $scriptPath "Installer"
|
$installerPath = Join-Path $scriptPath "Installer"
|
||||||
|
|
||||||
Write-Host "=== NFC Actions Release Build ===" -ForegroundColor Cyan
|
Write-Host "=== NFC Actions Release Build ===" -ForegroundColor Cyan
|
||||||
@@ -70,8 +70,28 @@ if ($BuildInstaller) {
|
|||||||
|
|
||||||
Push-Location $installerPath
|
Push-Location $installerPath
|
||||||
|
|
||||||
# Run candle (compile)
|
# Create obj and bin directories if they don't exist
|
||||||
& candle.exe Product.wxs -out obj\Product.wixobj
|
New-Item -ItemType Directory -Force -Path obj | Out-Null
|
||||||
|
New-Item -ItemType Directory -Force -Path bin | Out-Null
|
||||||
|
|
||||||
|
# Run heat to harvest all files from publish folder
|
||||||
|
Write-Host " Harvesting files from publish folder..." -ForegroundColor Gray
|
||||||
|
& heat.exe dir $publishPath -cg HarvestedFiles -gg -sfrag -srd -dr INSTALLFOLDER -var var.PublishDir -out obj\HarvestedFiles.wxs
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Pop-Location
|
||||||
|
Write-Host "Heat (file harvesting) failed!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Update the harvested file to set ID to NfcActions.exe
|
||||||
|
Write-Host " Setting file ID for NfcActions.exe..." -ForegroundColor Gray
|
||||||
|
$harvestedContent = Get-Content obj\HarvestedFiles.wxs -Raw
|
||||||
|
$harvestedContent = $harvestedContent -replace '(<File Id=")([^"]+)(" KeyPath="yes" Source="\$\(var\.PublishDir\)\\NfcActions\.exe")', '$1NfcActionsExe$3'
|
||||||
|
Set-Content obj\HarvestedFiles.wxs -Value $harvestedContent
|
||||||
|
|
||||||
|
# Run candle (compile) on both wxs files
|
||||||
|
Write-Host " Compiling installer..." -ForegroundColor Gray
|
||||||
|
& candle.exe Product.wxs obj\HarvestedFiles.wxs "-dPublishDir=$publishPath" -out obj\ -arch x64
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Write-Host "Candle (WiX compile) failed!" -ForegroundColor Red
|
Write-Host "Candle (WiX compile) failed!" -ForegroundColor Red
|
||||||
@@ -79,7 +99,8 @@ if ($BuildInstaller) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Run light (link)
|
# Run light (link)
|
||||||
& light.exe obj\Product.wixobj -out bin\NfcActions-Setup.msi -ext WixUIExtension
|
Write-Host " Linking MSI package..." -ForegroundColor Gray
|
||||||
|
& light.exe obj\Product.wixobj obj\HarvestedFiles.wixobj -out bin\NfcActions-Setup.msi -ext WixUIExtension -ext WixUtilExtension -sval
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Write-Host "Light (WiX link) failed!" -ForegroundColor Red
|
Write-Host "Light (WiX link) failed!" -ForegroundColor Red
|
||||||
|
|||||||
Reference in New Issue
Block a user