ae0f36d287
Web "Open in Goblin" pay buttons fired generic nostr: URIs, which the OS routed to whatever social client claims nostr:. Register a dedicated goblin: scheme and route it (plus nostr: pay URIs) to the prefilled send-review screen, the same destination as scanning a checkout QR. Parser (payuri): accept goblin: alongside nostr: (same payload, either scheme); add is_pay_uri() to tell a payment link from a slatepack. Runtime: an argv/intent/socket payload that is a pay URI is stashed and opened by the Goblin surface via SendFlow::from_deeplink, which shares the exact apply_scan path the camera uses. Desktop cold + warm start (argv + single-instance socket) and Android cold + warm (intent-filter) covered. Registration: Linux .desktop x-scheme-handler/goblin, Android goblin intent-filter, macOS CFBundleURLTypes, Windows WiX HKCR URL protocol.
123 lines
6.0 KiB
XML
123 lines
6.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?if $(sys.BUILDARCH) = x64 or $(sys.BUILDARCH) = arm64 ?>
|
|
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
|
|
<?else ?>
|
|
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
|
|
<?endif ?>
|
|
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
<Product Id="*" Version="0.3.6" UpgradeCode="C19F9B41-CD13-4F0E-B27D-E0EF8CF1CE91" Language="1033" Name="Goblin" Manufacturer="Ardocrat">
|
|
<Package Id="F4D20D15-2788-4199-9220-3905799817F6" InstallerVersion="300" Compressed="yes"/>
|
|
<Media Id="1" Cabinet="goblin.cab" EmbedCab="yes" />
|
|
|
|
<MajorUpgrade AllowDowngrades = "yes"/>
|
|
|
|
<Icon Id='Product.ico' SourceFile='wix\Product.ico'/>
|
|
<Property Id='ARPPRODUCTICON' Value='Product.ico' />
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<Directory Id='$(var.PlatformProgramFilesFolder)'>
|
|
<Directory Id="APPLICATIONROOTDIRECTORY" Name="Goblin"/>
|
|
</Directory>
|
|
|
|
<Directory Id="DesktopFolder" Name="Desktop">
|
|
<Component Id="ApplicationShortcutDesktop" Guid="14efa019-7ed7-4765-8263-fa5460f92495">
|
|
<Shortcut Id="ApplicationDesktopShortcut"
|
|
Name="Goblin"
|
|
Icon="Product.ico"
|
|
Description="GUI for Grin"
|
|
Target="[APPLICATIONROOTDIRECTORY]goblin.exe"
|
|
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
|
|
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
|
|
<RegistryValue
|
|
Root="HKCU"
|
|
Key="Software\Ardocrat\Goblin"
|
|
Name="installed"
|
|
Type="integer"
|
|
Value="1"
|
|
KeyPath="yes"/>
|
|
</Component>
|
|
</Directory>
|
|
|
|
<!-- Step 1: Define the directory structure -->
|
|
<Directory Id="ProgramMenuFolder">
|
|
<Directory Id="ApplicationProgramsFolder" Name="Goblin"/>
|
|
</Directory>
|
|
</Directory>
|
|
|
|
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
|
|
<Component Id="License" Guid="4b1d11d3-5d76-430e-b5ef-87f1a62cf21b">
|
|
<File Id="LicenseFile" DiskId="1" Source="wix\License.rtf" KeyPath="yes"/>
|
|
</Component>
|
|
<Component Id="goblin.exe" Guid="95444223-45BF-427A-85CA-61B035044305">
|
|
<File Id="goblin.exe" Source="$(var.CargoTargetBinDir)\goblin.exe" KeyPath="yes" Checksum="yes"/>
|
|
<File Id="slatepack.ico" Source="wix\Product.ico" />
|
|
<ProgId Id='goblin.slatepack' Description='Grin Slatepack message' Icon='slatepack.ico'>
|
|
<Extension Id='slatepack' ContentType='text/plain'>
|
|
<Verb Id='open' Command='Open' Target='[APPLICATIONROOTDIRECTORY]goblin.exe' Argument='%1' />
|
|
</Extension>
|
|
</ProgId>
|
|
</Component>
|
|
|
|
<!-- Register the goblin: URL protocol so web "Open in Goblin" pay
|
|
buttons launch the wallet with the payment link as argv[1],
|
|
which routes to the prefilled send-review screen. -->
|
|
<Component Id="GoblinUrlProtocol" Guid="a4f1c2e8-9b3d-4e6a-8c7f-2d1b5e9a0c34">
|
|
<RegistryKey Root="HKCR" Key="goblin">
|
|
<RegistryValue Type="string" Value="URL:Goblin Protocol" KeyPath="yes"/>
|
|
<RegistryValue Name="URL Protocol" Type="string" Value=""/>
|
|
<RegistryKey Key="shell\open\command">
|
|
<RegistryValue Type="string" Value=""[#goblin.exe]" "%1""/>
|
|
</RegistryKey>
|
|
<RegistryKey Key="DefaultIcon">
|
|
<RegistryValue Type="string" Value="[#goblin.exe]"/>
|
|
</RegistryKey>
|
|
</RegistryKey>
|
|
</Component>
|
|
</DirectoryRef>
|
|
|
|
<!-- Step 2: Add the shortcut to your installer package -->
|
|
<DirectoryRef Id="ApplicationProgramsFolder">
|
|
<Component Id="ApplicationShortcut" Guid="07f7fc68-bc3e-4715-9c10-0231a92b5ccb">
|
|
<Shortcut Id="ApplicationStartMenuShortcut"
|
|
Name="Goblin"
|
|
Description="Cross-platform GUI for Grin with focus on usability and availability to be used by anyone, anywhere."
|
|
Icon="Product.ico"
|
|
Target="[#goblin.exe]"
|
|
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
|
|
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
|
<RegistryValue Root="HKCU" Key="Software\Ardocrat\Goblin" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
|
</Component>
|
|
</DirectoryRef>
|
|
|
|
<Feature Id="MainApplication" Title="Goblin" Level="1">
|
|
<ComponentRef Id="goblin.exe" />
|
|
<ComponentRef Id="GoblinUrlProtocol" />
|
|
<ComponentRef Id="License" />
|
|
<!-- Step 3: Tell WiX to install the shortcut -->
|
|
<ComponentRef Id="ApplicationShortcutDesktop" />
|
|
<ComponentRef Id="ApplicationShortcut" />
|
|
</Feature>
|
|
|
|
|
|
<Property Id='ARPHELPLINK' Value='https://github.com/ardocrat/goblin'/>
|
|
|
|
<UI>
|
|
<UIRef Id="WixUI_Minimal" />
|
|
<Publish Dialog="ExitDialog"
|
|
Control="Finish"
|
|
Event="DoAction"
|
|
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
|
|
</UI>
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Application" />
|
|
|
|
<Property Id="WixShellExecTarget" Value="[#goblin.exe]" />
|
|
<CustomAction Id="LaunchApplication"
|
|
BinaryKey="WixCA"
|
|
DllEntry="WixShellExec"
|
|
Impersonate="yes" />
|
|
|
|
<WixVariable Id='WixUILicenseRtf' Value='wix\License.rtf'/>
|
|
</Product>
|
|
</Wix> |