mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-15 10:27:31 +00:00
Merge pull request #2900 from keymanapp/feat/windows/sentry-user-control
feat(windows): user control for upload to sentry
This commit is contained in:
commit
55b229b27d
25 changed files with 372 additions and 140 deletions
|
|
@ -394,18 +394,18 @@
|
|||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="kmshell.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>kmshell.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="Profiling\AQtimeModule1.aqt" Configuration="Debug" Class="ProjectFile">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>.\</RemoteDir>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="kmshell.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>kmshell.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -24,7 +24,7 @@ unit UImportOlderVersionSettings;
|
|||
|
||||
interface
|
||||
|
||||
function FirstRunInstallDefaults(DoDefaults,DoStartWithWindows,DoCheckForUpdates: Boolean; FDisablePackages: string): Boolean; // I2753
|
||||
function FirstRunInstallDefaults(DoDefaults,DoStartWithWindows,DoCheckForUpdates: Boolean; FDisablePackages: string; DoAutomaticallyReportUsage: Boolean): Boolean; // I2753
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ uses
|
|||
RegistryKeys,
|
||||
UImportOlderKeyboardUtils;
|
||||
|
||||
function FirstRunInstallDefaults(DoDefaults,DoStartWithWindows,DoCheckForUpdates: Boolean; FDisablePackages: string): Boolean; // I2753
|
||||
function FirstRunInstallDefaults(DoDefaults,DoStartWithWindows,DoCheckForUpdates: Boolean; FDisablePackages: string; DoAutomaticallyReportUsage: Boolean): Boolean; // I2753
|
||||
var
|
||||
n, I: Integer;
|
||||
v: Integer;
|
||||
|
|
@ -129,6 +129,8 @@ begin
|
|||
|
||||
if DoStartWithWindows then kmcom.Options['koStartWithWindows'].Value := True; // I2753
|
||||
if DoCheckForUpdates then kmcom.Options['koCheckForUpdates'].Value := True; // I2753
|
||||
if DoAutomaticallyReportUsage then kmcom.Options['koAutomaticallyReportUsage'].Value := True;
|
||||
|
||||
|
||||
if DoDefaults then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -546,7 +546,8 @@ begin
|
|||
Pos('installdefaults', FQuery) > 0,
|
||||
Pos('startwithwindows', FQuery) > 0,
|
||||
Pos('checkforupdates', FQuery) > 0,
|
||||
FDisablePackages); // I2651, I2753
|
||||
FDisablePackages,
|
||||
Pos('automaticallyreportusage', FQuery) > 0); // I2651, I2753
|
||||
end;
|
||||
|
||||
UpdateAllLocaleDoctypes; // I2605
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE Locale SYSTEM 'localedef.dtd'>
|
||||
|
||||
<Locale>
|
||||
|
||||
|
||||
<!--
|
||||
locale.dtd: Contains all localizable strings from Keyman Configuration XML files.
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
-->
|
||||
|
||||
<String Group="System" Type="PlainText" Id="S_LocaleAuthors" Version="7.1.266.0" Description="Name(s) of people who created this translation - i.e. your name">Keyman</String>
|
||||
|
||||
|
||||
<String Group='_Font' Type="PlainText" Id="SK_UIFontName" Version="7.0.230.0" Description="The standard font">Segoe UI</String>
|
||||
<String Group='_Font' Type="PlainText" Id="SK_UIFontSize" Version="7.0.230.0" Description="The standard font size">9</String>
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKBalloonClickToSelectKeyboard" Version="8.0.330.0" Description="Balloon that shows when Keyman Desktop icon is first shown during the tutorial">Click this icon to select a keyboard</String>
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKBalloonOSKClosed" Version="8.0.330.0" Description="Balloon that shows when OSK is closed">&Name; is still running. Click this icon to use your language keyboard at any time</String>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Configuration Dialog -->
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
|
@ -58,7 +58,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
|
||||
<String Group="Configuration Dialog" Type="PlainText" Id="S_Caption_Help" Version="7.0.239.0" Description="Configuration dialog link to Help">Help</String>
|
||||
|
||||
<!-- Tab names and shortcut keys -->
|
||||
<!-- Tab names and shortcut keys -->
|
||||
|
||||
<String Group="Configuration Dialog - Tab names" Type="PlainText" Id="S_Keyboards" Version="7.0.230.0" Description="Keyboard Layouts tab name">Keyboard Layouts</String> <String Group="Configuration Dialog - Tab names" Type="PlainText" Id="S_Keyboards_AccessChar" Version="7.0.230.0" Description="Direct access to the Keyboard Layouts tab using alt+">K</String>
|
||||
<String Group="Configuration Dialog - Tab names" Type="PlainText" Id="S_Options" Version="7.0.230.0" Description="Options tab name">Options</String> <String Group="Configuration Dialog - Tab names" Type="PlainText" Id="S_Options_AccessChar" Version="7.0.230.0" Description="Direct access to the Options tab using alt+">O</String>
|
||||
|
|
@ -94,7 +94,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Caption_Languages" Version="9.0.420.0" Description="Text preceding linked language profiles">Languages:</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Languages_Uninstall" Version="9.0.420.0" Description="Remove language profile">✕</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Languages_Install" Version="9.0.420.0" Description="Add language profile">Add language</String>
|
||||
|
||||
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Caption_OnScreenKeyboard" Version="7.0.230.0" Description="Term for the On Screen Keyboard">On Screen Keyboard:</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_OnScreenKeyboard_Custom" Version="8.0.306.0" Description="(OSK) Custom term">Custom</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_OnScreenKeyboard_Installed" Version="7.0.230.0" Description="(OSK) Installed term">Installed</String>
|
||||
|
|
@ -103,7 +103,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Caption_Documentation" Version="8.0.306.0" Description="Term for the Documentation">Documentation:</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Documentation_Installed" Version="8.0.306.0" Description="(Documentation) Installed term">Installed</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Documentation_NotInstalled" Version="8.0.306.0" Description="(Documentation) Not installed term">Not installed</String>
|
||||
|
||||
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Caption_Message" Version="7.0.230.0" Description="Keyboard download window, etc. - term for additional messages">Message:</String>
|
||||
<String Group="Configuration Dialog - Captions" Type="PlainText" Id="S_Caption_Copyright" Version="7.0.230.0" Description="Keyboard download window, etc. - term for copyright">Copyright:</String>
|
||||
|
||||
|
|
@ -143,6 +143,9 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koDeadkeyConversion" Version="9.0.480.0" Description="Advanced options - Base keyboard deadkeys are treated as normal keys">Treat hardware deadkeys as plain keys</String>
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koShowHints" Version="7.0.244.0" Description="General options - show/hide hint messages (resets hint messages individually disabled)">Show hint messages</String>
|
||||
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koAutomaticallyReportErrors" Version="14.0" Description="General options - report errors to Keyman team automatically">Automatically report errors to keyman.com</String>
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koAutomaticallyReportUsage" Version="14.0" Description="General options - report anonymous usage to Keyman team automatically">Share anonymous usage statistics with keyman.com</String>
|
||||
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koStartWithWindows" Version="7.0.230.0" Description="Startup options - Start Keyman with Windows start">Start when Windows starts</String>
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koShowStartup" Version="7.0.230.0" Description="Startup options - show/hide splash screen">Show splash screen</String>
|
||||
<String Group="Configuration Dialog - Options tab" Type="FormatString" Id="koShowWelcome" Version="7.0.230.0" Description="Startup options - show/hide welcome screen">Show welcome screen</String>
|
||||
|
|
@ -163,7 +166,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<String Group="Configuration Dialog - Options tab" Type="PlainText" Id="S_Button_UILanguage" Version="7.0.230.0" Description="Options button - changes user interface language/localization">User interface language...</String>
|
||||
|
||||
<String Group="Configuration Dialog - Options tab" Type="PlainText" Id="S_Button_BaseKeyboard" Version="9.0.445.0" Description="Options tab - base keyboard button">Base Keyboard...</String>
|
||||
|
||||
|
||||
<!-- Hotkeys tab -->
|
||||
|
||||
<String Group="Configuration Dialog - Hotkeys tab" Type="PlainText" Id="S_Hotkey_Keyboard_Prefix" Version="7.0.230.0" Description="Hotkey - activation term preceding Keyman keyboard layout name. Note: include a space following."></String> <!-- e.g. "Activate [Korean KORDA] Keyboard" -->
|
||||
|
|
@ -184,10 +187,10 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<String Group="Configuration Dialog - Hotkeys tab" Type="PlainText" Id="S_Hotkey_OpenTextEditor" Version="7.1.275.0" Description="Hotkey - open text editor">Open Text Editor</String>
|
||||
|
||||
<String Group="Configuration Dialog - Hotkeys tab" Type="PlainText" Id="S_Hotkey_SwitchLanguage" Version="8.0.294.0" Description="Hotkey - switch language window">Open Language Switcher</String>
|
||||
|
||||
|
||||
<String Group="Configuration Dialog - Hotkeys tab" Type="PlainText" Id="S_Hotkey_Control_Title" Version="7.1.274.0" Description="Hotkey - Control Title">General Hotkeys</String>
|
||||
<String Group="Configuration Dialog - Hotkeys tab" Type="PlainText" Id="S_Hotkey_Keyboard_Title" Version="7.1.274.0" Description="Hotkey - Keyboard Title">Keyboard Layouts</String>
|
||||
|
||||
|
||||
<!-- Languages tab -->
|
||||
|
||||
<String Group="Configuration Dialog - Languages tab" Type="PlainText" Id="S_Languages_InstalledLanguage" Version="7.0.230.0" Description="Languages - Windows installed languages column header">Installed Language</String>
|
||||
|
|
@ -236,7 +239,7 @@ Create a user interface translation for Keyman Desktop at http://www.tavultesoft
|
|||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<!-- Note: this dialog uses captions from the Configuration dialog as well -->
|
||||
|
||||
|
||||
<Dialog Id="InstallKeyboard" Width="600" Height="300" />
|
||||
|
||||
<String Group="Install Keyboard Dialog" Type="PlainText" Id="S_InstallKeyboard_Title" Version="7.0.230.0" Description="Install keyboard/package dialog title">Install Keyboard/Package</String>
|
||||
|
|
@ -290,22 +293,22 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
|
||||
<String Group="Select Keyboard for Install Dialog" Type="FormatString" Id="SKSelectKeyboardsTitle" Version="7.0.241.0" Description="Select Keyboards for Install dialog title">Select Keyboards to Install</String>
|
||||
<String Group="Select Keyboard for Install Dialog" Type="FormatString" Id="SKSelectKeyboardsBlurb" Version="7.0.241.0" Parameters="%0:s: Number of keyboards user can still install" Description="Select Keyboards for Install text">You cannot install all the keyboards in this package. You can install a maximum of %0:d additional keyboards. Please select the keyboards you wish to install from this package.</String>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Online Update Dialog -->
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<Dialog Id="OnlineUpdate" Width="470" Height="260" />
|
||||
|
||||
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_Title" Version="7.0.230.0" Description="Update dialog title, where &Name; = product name">Updated &Name; Components Available</String>
|
||||
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_NewVersionAvailable" Version="7.0.230.0" Description="Update dialog - updates available text">Updates for &Name_CN; are now available</String>
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_NewVersionPrompt" Version="7.1.255.0" Description="Update dialog - prompt to select updates">Please select the updates you wish to install:</String>
|
||||
|
||||
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_InstallQuery" Version="7.0.230.0" Description="Update dialog - install query">Do you want to download and install this patch now?</String>
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_DownloadFrom" Version="7.0.230.0" Description="Update dialog - download information">You can download the new version from:</String>
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_DownloadQuery" Version="7.0.230.0" Description="Update dialog - keyman.com website visiting query">Do you want to visit the website now?</String>
|
||||
|
||||
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_Button_InstallNow" Version="7.0.230.0" Description="Update dialog - install now button">Install Now</String>
|
||||
<String Group="Online Update Dialog" Type="PlainText" Id="S_Update_Button_InstallLater" Version="7.0.230.0" Description="Update dialog - cancel button">Cancel</String>
|
||||
|
||||
|
|
@ -323,7 +326,7 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
<String Group="Online Update Dialog" Type="FormatString" Id="SKUpdate_IconText" Version="8.0.288.0" Description="Update icon - text">Click this icon to download and install updates</String>
|
||||
<String Group="Online Update Dialog" Type="FormatString" Id="SKUpdate_IconMenuText" Version="8.0.288.0" Description="Update icon - install menu item">View and &install &Name; updates</String>
|
||||
<String Group="Online Update Dialog" Type="FormatString" Id="SKUpdate_IconMenuExit" Version="8.0.288.0" Description="Update icon - exit menu item">E&xit online update check</String>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Splash Dialog -->
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
|
@ -336,12 +339,12 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_Start" Version="8.0.294.0" Description="Start Keyman Desktop button">Start Keyman</String>
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_Exit" Version="8.0.294.0" Description="Exit button">Exit</String>
|
||||
|
||||
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_OtherTasks" Version="8.0.294.0" Description="Other tasks heading">Other tasks</String>
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_Configuration" Version="8.0.294.0" Description="Keyman Configuration link">Configuration</String>
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_ShowAtStartup" Version="9.0.341.0" Description="Show at Startup toggle">Show this screen at startup</String>
|
||||
<String Group="Splash Dialog" Type="PlainText" Id="S_Splash_HideAtStartup" Version="9.0.431.0" Description="Hide at Startup toggle">Hide this screen at startup</String>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
<!-- UI Languages & Localization -->
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
|
@ -367,7 +370,7 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<Dialog Id="LangSetup" Width="650" Height="375"></Dialog>
|
||||
|
||||
|
||||
<String Group="Language Setup Dialog" Type="PlainText" Id="S_LangSetup_Title" Version="7.0.230.0" Description="Language configuration tasks dialog title">Language Configuration Tasks</String>
|
||||
|
||||
<String Group="Language Setup Dialog" Type="PlainText" Id="S_LangSetup_TitleInnerPrefix" Version="7.0.230.0" Description="LCT dialog - subtitle text preceding language name(s)">Configure your computer to work with</String>
|
||||
|
|
@ -429,7 +432,7 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
<!-- Menu Items -->
|
||||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<String Group="System Tray Menu Items" Type="Caption" Caption="Switch Keyman Desktop Off" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - Switch Keyman Desktop Off">Switch &Name; &Off</String>
|
||||
<String Group="System Tray Menu Items" Type="Caption" Caption="Switch Keyman Desktop Off" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - Switch Keyman Desktop Off">Switch &Name; &Off</String>
|
||||
<String Group="System Tray Menu Items" Type="Caption" Caption="On Screen Keyboard" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - OSK">On Screen &Keyboard</String>
|
||||
<String Group="System Tray Menu Items" Type="Caption" Caption="Keyboard Usage" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - Keyboard Usage">Keyboard &Usage</String>
|
||||
<String Group="System Tray Menu Items" Type="Caption" Caption="Font Helper" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - Font Helper">&Font Helper</String>
|
||||
|
|
@ -441,7 +444,7 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
<String Group="System Tray Menu Items" Type="Caption" Caption="Exit" Version="7.0.230.0" Parameters="& precedes alt + access-character" Description="Systray item - Exit">E&xit</String>
|
||||
|
||||
<String Group="System Tray Menu Items" Type="PlainText" Id="SKMenu_NoKeyboardsInstalled" Version="7.0.230.0" Description="Systray - notice of no keyboard layouts installed">No keyboard layouts are installed.
|
||||
Choose "Configuration" to install a
|
||||
Choose "Configuration" to install a
|
||||
keyboard layout for your language.</String>
|
||||
|
||||
<String Group="On Screen Keyboard Menu Items" Type="Caption" Caption="Fade When Inactive" Version="7.0.230.0" Description="OSK right-click menu - fade OSK when mouse is elsewhere">Fade When Inactive</String>
|
||||
|
|
@ -461,7 +464,7 @@ keyboard layout for your language.</String>
|
|||
<String Group="Usage Page" Type="HTML" Id="S_Usage_KeyboardDocumentation" Version="7.1.261.0" Description="Usage page - Text shown when keyboard has documentation">Click the buttons below to view additional documentation and/or On Screen Keyboard.</String>
|
||||
<String Group="Usage Page" Type="HTML" Id="S_Usage_KeymanOff" Version="7.1.261.0" Description="Usage page - Text shown when no Keyman keyboard is active">No keyboard layout is currently selected in &Name;. Click on any of the keyboard icons in the toolbar above to choose a keyboard layout.</String>
|
||||
<String Group="Usage Page" Type="HTML" Id="S_Usage_NoKeyboardsInstalled" Version="7.1.261.0" Description="Usage page - Text shown when no Keyman keyboards are installed">No keyboard layouts are currently installed or loaded. Use &Name; Configuration to install a keyboard layout.</String>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Formatted messages, assorted -->
|
||||
<!-- These messages cannot contain HTML tags and are plain text -->
|
||||
|
|
@ -471,7 +474,7 @@ keyboard layout for your language.</String>
|
|||
<!-- General -->
|
||||
|
||||
<String Group="Formatted Messages"
|
||||
Type="FormatString"
|
||||
Type="FormatString"
|
||||
Id="SKApplicationTitle"
|
||||
Version="7.0.230.0"
|
||||
Description="Company and product name used for the title of message boxes and message dialogs">&Name_CN;</String>
|
||||
|
|
@ -483,10 +486,10 @@ keyboard layout for your language.</String>
|
|||
|
||||
<!-- Notices -->
|
||||
|
||||
<String Group="Formatted Messages"
|
||||
Type="FormatString"
|
||||
<String Group="Formatted Messages"
|
||||
Type="FormatString"
|
||||
Id="SKPackageAlreadyInstalled"
|
||||
Version="7.0.230.0"
|
||||
Version="7.0.230.0"
|
||||
Parameters="%0:s = Package to be uninstalled"
|
||||
Description="Notice during package installation that a package with the same name is already installed.">A package with the name %0:s is already installed. Do you want to uninstall it and install the new one?</String>
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKKeyboardAlreadyInstalled" Version="7.0.230.0" Parameters="%0:s = Keyboard name" Description="Notice during keyboard layout installation that a keyboard layout with the same name is already installed.">A keyboard with the name '%0:s' is already installed. If you continue, it will be uninstalled before the new one is installed. Continue?</String>
|
||||
|
|
@ -502,8 +505,8 @@ keyboard layout for your language.</String>
|
|||
<String Group="Formatted Messages" Type="FormatString" Id="SKANSIEncoding" Version="7.0.230.0" Description="Keyboard with an ANSI or Codepage encoding">Codepage</String>
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKUnicodeEncoding" Version="7.0.230.0" Description="Keyboard with a Unicode encoding">Unicode</String>
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKDownloadProgress_Title" Version="7.0.230.0" Description="Notice of file downloading">Downloading File</String>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Confirmation Requests -->
|
||||
|
||||
<String Group="Formatted Messages" Type="FormatString" Id="SKUninstallOnScreenKeyboard" Version="7.0.230.0" Parameters="%0:s = Keyboard name" Description="Request for confirmation to uninstall OSK for a keyboard layout">Are you sure you want to remove the on screen keyboard installed for %0:s?</String>
|
||||
|
|
@ -552,7 +555,7 @@ PRIVACY WARNING: Please note that the debug logfile records all keystrokes that
|
|||
<String Group="Formatted Messages" Type="FormatString" Id="SKLangCheck_WindowsLanguage_Install" Version="7.1.259.0" Parameters="%0:s = language name, %1:s = keyboard name" Description="Shown when Keyman wants to install a Windows language and link it to a Keyman keyboard so that when one is selected by the user, the other automatically switches in">Install language %0:s and link to Keyman keyboard %1:s</String>
|
||||
|
||||
<!-- OSK Font Helper -->
|
||||
|
||||
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_PleaseWait1" Description="OSK Font helper loading message part 1">Please wait while &Name; finds the fonts that will work with</String>
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_PleaseWait2" Description="OSK Font helper loading message part 2">keyboard.</String>
|
||||
|
||||
|
|
@ -569,10 +572,10 @@ PRIVACY WARNING: Please note that the debug logfile records all keystrokes that
|
|||
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_NoFonts1a" Description="OSK Font helper no fonts part 1">No fonts were found on your system that work with </String>
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_NoFonts1b" Description="OSK Font helper no fonts part 2">. Please <a href="keyman:welcome">check the documentation</a> to find fonts for this keyboard.</String>
|
||||
|
||||
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_NoKeyboards" Description="OSK Font helper no keyboards">No keyboard layouts are currently installed or loaded. Use &Name; Configuration to install a keyboard layout.</String>
|
||||
<String Group="OSK Font Helper" Type="HTML" Version="8.0.294.0" Id="S_OSK_FontHelper_ChooseKeyboard" Description="OSK Font helper choose keyboard">Please choose a &Name; keyboard to find the fonts that will work with it.</String>
|
||||
|
||||
|
||||
<!-- OSK Hints -->
|
||||
|
||||
<String Group="OSK Hints" Type="Plain Text" Version="8.0.294.0" Id="S_OSK_Hint_Title" Description="On Screen Keyboard Hintbar title">Hint:</String>
|
||||
|
|
@ -590,5 +593,5 @@ PRIVACY WARNING: Please note that the debug logfile records all keystrokes that
|
|||
<!-- - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<String Group="Text Editor" Type="FormatString" Version="10.0.836.0" Id="SKTextEditorCaption" Description="Caption of Text Editor">Text Editor - &Name;</String>
|
||||
|
||||
|
||||
</Locale>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ type
|
|||
InstallSuccess: Boolean);
|
||||
procedure CheckInstalledVersion;
|
||||
function InstallMSI: Boolean;
|
||||
procedure InstallPackages(StartKeyman,StartWithWindows,CheckForUpdates,StartDisabled,StartWithConfiguration: Boolean);
|
||||
procedure InstallPackages(StartKeyman,StartWithWindows,
|
||||
CheckForUpdates,StartDisabled,StartWithConfiguration,
|
||||
AutomaticallyReportUsage: Boolean);
|
||||
procedure PrepareForReboot(res: Cardinal);
|
||||
function RestartWindows: Boolean;
|
||||
procedure RunVersion6Upgrade(const kmshellpath: WideString);
|
||||
|
|
@ -106,7 +108,9 @@ type
|
|||
destructor Destroy; override;
|
||||
procedure CheckInternetConnectedState;
|
||||
function DownloadFile(ADownloadURL, ADownloadFilename: WideString): Boolean;
|
||||
function DoInstall(Handle: THandle; PackagesOnly, CheckForUpdatesInstall, StartAfterInstall, StartWithWindows, CheckForUpdates, StartDisabled, StartWithConfiguration: Boolean): Boolean;
|
||||
function DoInstall(Handle: THandle; PackagesOnly, CheckForUpdatesInstall,
|
||||
StartAfterInstall, StartWithWindows, CheckForUpdates, StartDisabled,
|
||||
StartWithConfiguration, AutomaticallyReportUsage: Boolean): Boolean;
|
||||
procedure LogError(const msg: WideString; ShowDialogIfNotSilent: Boolean = True);
|
||||
property Silent: Boolean read FSilent write FSilent;
|
||||
property PromptForReboot: Boolean read FPromptForReboot write FPromptForReboot; // I3355 // I3500
|
||||
|
|
@ -183,7 +187,9 @@ begin
|
|||
inherited;
|
||||
end;
|
||||
|
||||
function TRunTools.DoInstall(Handle: THandle; PackagesOnly, CheckForUpdatesInstall, StartAfterInstall, StartWithWindows, CheckForUpdates, StartDisabled, StartWithConfiguration: Boolean): Boolean;
|
||||
function TRunTools.DoInstall(Handle: THandle; PackagesOnly, CheckForUpdatesInstall,
|
||||
StartAfterInstall, StartWithWindows, CheckForUpdates, StartDisabled,
|
||||
StartWithConfiguration, AutomaticallyReportUsage: Boolean): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
|
|
@ -211,14 +217,17 @@ begin
|
|||
|
||||
if InstallMSI then
|
||||
begin
|
||||
InstallPackages(StartAfterInstall,StartWithWindows,CheckForUpdates,StartDisabled,StartWithConfiguration);
|
||||
InstallPackages(StartAfterInstall,StartWithWindows,CheckForUpdates,
|
||||
StartDisabled,StartWithConfiguration,AutomaticallyReportUsage);
|
||||
Result := True;
|
||||
end
|
||||
end
|
||||
else
|
||||
begin
|
||||
CheckInstalledVersion;
|
||||
InstallPackages(StartAfterInstall,StartWithWindows,CheckForUpdates,FInstallInfo.StartDisabled, FInstallInfo.StartWithConfiguration);
|
||||
InstallPackages(StartAfterInstall,StartWithWindows,CheckForUpdates,
|
||||
FInstallInfo.StartDisabled, FInstallInfo.StartWithConfiguration,
|
||||
AutomaticallyReportUsage);
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -686,7 +695,8 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TRunTools.InstallPackages(StartKeyman,StartWithWindows,CheckForUpdates,StartDisabled,StartWithConfiguration: Boolean);
|
||||
procedure TRunTools.InstallPackages(StartKeyman,StartWithWindows,CheckForUpdates,
|
||||
StartDisabled,StartWithConfiguration,AutomaticallyReportUsage: Boolean);
|
||||
var
|
||||
i: Integer;
|
||||
s: WideString;
|
||||
|
|
@ -715,6 +725,8 @@ begin
|
|||
|
||||
if StartWithWindows then s := s + 'StartWithWindows,';
|
||||
if CheckForUpdates then s := s + 'CheckForUpdates,';
|
||||
if AutomaticallyReportUsage then s := s + 'AutomaticallyReportUsage,';
|
||||
|
||||
|
||||
if (FInstalledVersion.Version = '') or (FInstalledVersion.ProductCode <> FInstallerVersion.ProductCode) then s := s + 'InstallDefaults,'; // I2651
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,8 @@ type
|
|||
ssOptionsStartAfterInstall,
|
||||
ssOptionsCheckForUpdates,
|
||||
ssOptionsCheckForUpdatesBeforeInstall,
|
||||
ssOptionsUpgradeKeyboards
|
||||
ssOptionsUpgradeKeyboards,
|
||||
ssOptionsAutomaticallyReportUsage
|
||||
);
|
||||
|
||||
const
|
||||
|
|
@ -155,7 +156,8 @@ const
|
|||
{ssOptionsStartAfterInstall} 'Start $APPNAME when installation completes',
|
||||
{ssOptionsCheckForUpdates} 'Check for updates online periodically',
|
||||
{ssOptionsCheckForUpdatesBeforeInstall} 'Check for updates before installing',
|
||||
{ssOptionsUpgradeKeyboards} 'Upgrade keyboards installed with older versions to version $VERSION'
|
||||
{ssOptionsUpgradeKeyboards} 'Upgrade keyboards installed with older versions to version $VERSION',
|
||||
{ssOptionsAutomaticallyReportUsage} 'Share anonymous usage statistics with keyman.com'
|
||||
);
|
||||
|
||||
implementation
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ object frmInstallOptions: TfrmInstallOptions
|
|||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'ssOptionsTitle'
|
||||
ClientHeight = 213
|
||||
ClientHeight = 222
|
||||
ClientWidth = 505
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
|
|
@ -59,7 +59,7 @@ object frmInstallOptions: TfrmInstallOptions
|
|||
end
|
||||
object cmdOK: TButton
|
||||
Left = 172
|
||||
Top = 172
|
||||
Top = 183
|
||||
Width = 73
|
||||
Height = 25
|
||||
Caption = 'OK'
|
||||
|
|
@ -69,7 +69,7 @@ object frmInstallOptions: TfrmInstallOptions
|
|||
end
|
||||
object cmdCancel: TButton
|
||||
Left = 260
|
||||
Top = 172
|
||||
Top = 183
|
||||
Width = 73
|
||||
Height = 25
|
||||
Cancel = True
|
||||
|
|
@ -77,4 +77,12 @@ object frmInstallOptions: TfrmInstallOptions
|
|||
ModalResult = 2
|
||||
TabOrder = 6
|
||||
end
|
||||
object chkAutomaticallyReportUsage: TCheckBox
|
||||
Left = 16
|
||||
Top = 153
|
||||
Width = 473
|
||||
Height = 17
|
||||
Caption = 'ssOptionsAutomaticallyReportUsage'
|
||||
TabOrder = 7
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ type
|
|||
chkUpgradeKeyman7: TCheckBox;
|
||||
cmdOK: TButton;
|
||||
cmdCancel: TButton;
|
||||
chkAutomaticallyReportUsage: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
function GetCanUpgradeKeyman7: Boolean;
|
||||
|
|
@ -46,6 +47,8 @@ type
|
|||
procedure SetStartAfterInstall(const Value: Boolean);
|
||||
procedure SetStartWithWindows(const Value: Boolean);
|
||||
procedure SetUpgradeKeyman7(const Value: Boolean);
|
||||
function GetAutomaticallyReportUsage: Boolean;
|
||||
procedure SetAutomaticallyReportUsage(const Value: Boolean);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
|
|
@ -55,6 +58,7 @@ type
|
|||
property CheckForUpdatesInstall: Boolean read GetCheckForUpdatesInstall write SetCheckForUpdatesInstall;
|
||||
property UpgradeKeyman: Boolean read GetUpgradeKeyman7 write SetUpgradeKeyman7;
|
||||
property CanUpgradeKeyman: Boolean read GetCanUpgradeKeyman7 write SetCanUpgradeKeyman7;
|
||||
property AutomaticallyReportUsage: Boolean read GetAutomaticallyReportUsage write SetAutomaticallyReportUsage;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -76,6 +80,12 @@ begin
|
|||
chkCheckForUpdatesInstall.Caption := FInstallInfo.Text(ssOptionsCheckForUpdatesBeforeInstall);
|
||||
// Keyman 11 and later version keyboards will always automatically update
|
||||
chkUpgradeKeyman7.Caption := FInstallInfo.Text(ssOptionsUpgradeKeyboards);
|
||||
chkAutomaticallyReportUsage.Caption := FInstallInfo.Text(ssOptionsAutomaticallyReportUsage);
|
||||
end;
|
||||
|
||||
function TfrmInstallOptions.GetAutomaticallyReportUsage: Boolean;
|
||||
begin
|
||||
Result := chkAutomaticallyReportUsage.Checked;
|
||||
end;
|
||||
|
||||
function TfrmInstallOptions.GetCanUpgradeKeyman7: Boolean;
|
||||
|
|
@ -108,6 +118,11 @@ begin
|
|||
Result := chkUpgradeKeyman7.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmInstallOptions.SetAutomaticallyReportUsage(const Value: Boolean);
|
||||
begin
|
||||
chkAutomaticallyReportUsage.Checked := Value;
|
||||
end;
|
||||
|
||||
procedure TfrmInstallOptions.SetCanUpgradeKeyman7(const Value: Boolean);
|
||||
begin
|
||||
chkUpgradeKeyman7.Enabled := Value;
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ type
|
|||
FCheckForUpdatesInstall: Boolean;
|
||||
FStartAfterInstall: Boolean;
|
||||
FStartWithWindows: Boolean;
|
||||
FAutomaticallyReportUsage: Boolean;
|
||||
FDisableUpgradeFrom6Or7Or8: Boolean; // I2847 // I4293
|
||||
procedure SetOfflineByRequest(const Value: Boolean);
|
||||
procedure Rewrap;
|
||||
|
|
@ -494,7 +495,7 @@ begin
|
|||
SetupMSI; // I2644
|
||||
|
||||
if GetRunTools.DoInstall(Handle, PackagesOnly, FCheckForUpdatesInstall, FStartAfterInstall, FStartWithWindows, FCheckForUpdates,
|
||||
FInstallInfo.StartDisabled, FInstallInfo.StartWithConfiguration) then
|
||||
FInstallInfo.StartDisabled, FInstallInfo.StartWithConfiguration, FAutomaticallyReportUsage) then
|
||||
begin
|
||||
if not Silent and not FStartAfterInstall then // I2610
|
||||
ShowMessage(FInstallInfo.Text(ssInstallSuccess));
|
||||
|
|
@ -519,6 +520,8 @@ var
|
|||
oldHeight: Integer;
|
||||
begin
|
||||
|
||||
FAutomaticallyReportUsage := True;
|
||||
|
||||
Application.Title := FInstallInfo.Text(ssApplicationTitle);
|
||||
Caption := FInstallInfo.Text(ssTitle);
|
||||
cmdInstall.Caption := FInstallInfo.Text(ssInstallButton);
|
||||
|
|
@ -599,6 +602,7 @@ procedure TfrmRunDesktop.lblOptionsClick(Sender: TObject);
|
|||
begin
|
||||
with TfrmInstallOptions.Create(Self) do
|
||||
try
|
||||
AutomaticallyReportUsage := FAutomaticallyReportUsage;
|
||||
StartWithWindows := FStartWithWindows;
|
||||
StartAfterInstall := FStartAfterInstall;
|
||||
CheckForUpdates := FCheckForUpdates;
|
||||
|
|
|
|||
|
|
@ -130,6 +130,30 @@ inherited frmOptions: TfrmOptions
|
|||
Caption = '&Automatically save before importing OSK'
|
||||
TabOrder = 8
|
||||
end
|
||||
object gbPrivacy: TGroupBox
|
||||
Left = 8
|
||||
Top = 280
|
||||
Width = 401
|
||||
Height = 73
|
||||
Caption = 'Privacy'
|
||||
TabOrder = 9
|
||||
object chkReportUsage: TCheckBox
|
||||
Left = 8
|
||||
Top = 44
|
||||
Width = 311
|
||||
Height = 17
|
||||
Caption = '&Share anonymous usage statistics with keyman.com'
|
||||
TabOrder = 0
|
||||
end
|
||||
object chkReportErrors: TCheckBox
|
||||
Left = 8
|
||||
Top = 21
|
||||
Width = 311
|
||||
Height = 17
|
||||
Caption = 'Automatically report &errors to keyman.com'
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object tabEditor: TTabSheet
|
||||
Caption = 'Editor'
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ type
|
|||
chkAutoSaveBeforeCompiling: TCheckBox;
|
||||
chkOSKAutoSaveBeforeImporting: TCheckBox;
|
||||
chkDebuggerAutoResetBeforeCompiling: TCheckBox;
|
||||
gbPrivacy: TGroupBox;
|
||||
chkReportUsage: TCheckBox;
|
||||
chkReportErrors: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cmdOKClick(Sender: TObject);
|
||||
procedure cmdDefaultFontClick(Sender: TObject);
|
||||
|
|
@ -199,6 +202,9 @@ begin
|
|||
|
||||
editWebHostDefaultPort.Text := IntToStr(WebHostDefaultPort); // I4021
|
||||
|
||||
chkReportUsage.Checked := ReportUsage;
|
||||
chkReportErrors.Checked := ReportErrors;
|
||||
|
||||
lblEditorCustomTheme.Caption := '';
|
||||
if EditorTheme = '' then
|
||||
cbEditorTheme.ItemIndex := 0
|
||||
|
|
@ -295,6 +301,9 @@ begin
|
|||
ExternalEditorPath := editExternalEditorPath.Text;
|
||||
DefaultProjectPath := IncludeTrailingPathDelimiter(editDefaultProjectPath.Text);
|
||||
|
||||
ReportUsage := chkReportUsage.Checked;
|
||||
ReportErrors := chkReportErrors.Checked;
|
||||
|
||||
Write;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ type
|
|||
FDebuggerAutoResetBeforeCompiling: Boolean;
|
||||
FAutoSaveBeforeCompiling: Boolean;
|
||||
FOSKAutoSaveBeforeImporting: Boolean;
|
||||
FReportErrors: Boolean;
|
||||
FReportUsage: Boolean;
|
||||
procedure CloseRegistry;
|
||||
procedure OpenRegistry;
|
||||
function regReadString(const nm, def: string): string;
|
||||
|
|
@ -95,6 +97,9 @@ type
|
|||
property AutoSaveBeforeCompiling: Boolean read FAutoSaveBeforeCompiling write FAutoSaveBeforeCompiling;
|
||||
property OSKAutoSaveBeforeImporting: Boolean read FOSKAutoSaveBeforeImporting write FOSKAutoSaveBeforeImporting;
|
||||
|
||||
property ReportErrors: Boolean read FReportErrors write FReportErrors;
|
||||
property ReportUsage: Boolean read FReportUsage write FReportUsage;
|
||||
|
||||
property WebHostDefaultPort: Integer read FWebHostDefaultPort write FWebHostDefaultPort; // I4021
|
||||
|
||||
property AllowMultipleInstances: Boolean read FAllowMultipleInstances write FAllowMultipleInstances;
|
||||
|
|
@ -213,6 +218,9 @@ begin
|
|||
FFix183_LadderLength := regReadInt(SRegValue_IDEOpt_WebLadderLength, CRegValue_IDEOpt_WebLadderLength_Default);
|
||||
|
||||
FDefaultProjectPath := IncludeTrailingPathDelimiter(regReadString(SRegValue_IDEOpt_DefaultProjectPath, GetFolderPath(CSIDL_PERSONAL) + CDefaultProjectPath));
|
||||
|
||||
FReportErrors := regReadBool(SRegValue_AutomaticallyReportErrors, True);
|
||||
FReportUsage := regReadBool(SRegValue_AutomaticallyReportUsage, True);
|
||||
finally
|
||||
CloseRegistry;
|
||||
end;
|
||||
|
|
@ -257,6 +265,9 @@ begin
|
|||
regWriteInt(SRegValue_IDEOpt_WebLadderLength, FFix183_LadderLength);
|
||||
|
||||
regWriteString(SRegValue_IDEOpt_DefaultProjectPath, FDefaultProjectPath);
|
||||
|
||||
regWriteBool(SRegValue_AutomaticallyReportErrors, FReportErrors);
|
||||
regWriteBool(SRegValue_AutomaticallyReportUsage, FReportUsage);
|
||||
finally
|
||||
CloseRegistry;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -430,6 +430,7 @@ uses
|
|||
keymanapi_TLB,
|
||||
KeymanVersion,
|
||||
OnlineConstants,
|
||||
Keyman.System.KeymanSentryClient,
|
||||
Keyman.Developer.UI.TikeOnlineUpdateCheck,
|
||||
GlobalProxySettings,
|
||||
Keyman.Developer.System.Project.ProjectFile,
|
||||
|
|
@ -481,6 +482,8 @@ var
|
|||
begin
|
||||
inherited;
|
||||
|
||||
TKeymanSentryClient.Client.MessageEvent(SENTRY_LEVEL_INFO, TKeymanSentryClient.LOGGER_DEVELOPER_IDE, 'Started Keyman Developer');
|
||||
|
||||
if not ForceDirectories(FKeymanDeveloperOptions.DefaultProjectPath) then
|
||||
begin
|
||||
// Fall back to Documents folder if we cannot create the default project path
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<AppType>Console</AppType>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>18.8</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win64</Platform>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ type
|
|||
GroupName: string;
|
||||
end;
|
||||
|
||||
const KeymanOptionInfo: array[0..13] of TKeymanOptionInfo = ( // I3331 // I3620 // I4552
|
||||
const KeymanOptionInfo: array[0..15] of TKeymanOptionInfo = ( // I3331 // I3620 // I4552
|
||||
// Global options
|
||||
|
||||
(opt: koKeyboardHotkeysAreToggle; RegistryName: SRegValue_KeyboardHotkeysAreToggle; OptionType: kotBool; BoolValue: False; GroupName: 'kogGeneral'),
|
||||
|
|
@ -130,6 +130,9 @@ const KeymanOptionInfo: array[0..13] of TKeymanOptionInfo = ( // I3331 // I36
|
|||
(opt: koShowHints; RegistryName: SRegValue_EnableHints; OptionType: kotBool; BoolValue: True; GroupName: 'kogGeneral'),
|
||||
(opt: koBaseLayout; RegistryName: SRegValue_UnderlyingLayout; OptionType: kotLong; IntValue: 0; GroupName: 'kogGeneral'),
|
||||
|
||||
(opt: koAutomaticallyReportErrors; RegistryName: SRegValue_AutomaticallyReportErrors; OptionType: kotBool; BoolValue: True; GroupName: 'kogGeneral'), // I4393
|
||||
(opt: koAutomaticallyReportUsage; RegistryName: SRegValue_AutomaticallyReportUsage; OptionType: kotBool; BoolValue: True; GroupName: 'kogGeneral'), // I4393
|
||||
|
||||
// OSK options
|
||||
|
||||
(opt: koReleaseShiftKeysAfterKeyPress; RegistryName: SRegValue_ReleaseShiftKeysAfterKeyPress; OptionType: kotBool; BoolValue: False; GroupName: 'kogOSK'),
|
||||
|
|
@ -147,7 +150,7 @@ const KeymanOptionInfo: array[0..13] of TKeymanOptionInfo = ( // I3331 // I36
|
|||
|
||||
(opt: koDeadkeyConversion; RegistryName: SRegValue_DeadkeyConversionMode; OptionType: kotBool; BoolValue: True; GroupName: 'kogAdvanced'), // I4552
|
||||
(opt: koDebugging; RegistryName: SRegValue_KeymanDebug; OptionType: kotBool; BoolValue: False; GroupName: 'kogAdvanced') // I4393
|
||||
);
|
||||
);
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -92,9 +92,11 @@ function RunCrashReportHandler: Boolean;
|
|||
implementation
|
||||
|
||||
uses
|
||||
System.Win.Registry,
|
||||
Vcl.Clipbrd,
|
||||
|
||||
Keyman.System.KeymanSentryClient,
|
||||
RegistryKeys,
|
||||
Upload_Settings,
|
||||
utilexecute;
|
||||
|
||||
|
|
@ -118,10 +120,16 @@ const
|
|||
S_Sentry_ViewEvent_URL = // Do not localize
|
||||
'https://sentry.keyman.com/organizations/keyman/projects/%0:s/events/%1:s/';
|
||||
|
||||
SENTRY_PROJECT_NAME_DESKTOP = 'keyman-desktop';
|
||||
SENTRY_PROJECT_NAME_DEVELOPER = 'keyman-developer';
|
||||
|
||||
function RunCrashReportHandler: Boolean;
|
||||
var
|
||||
frm: TfrmExceptionHandler;
|
||||
crashID, applicationName, applicationID, projectName, eventClassName, eventMessage: string;
|
||||
reg: TRegistry;
|
||||
RegKey: string;
|
||||
reportExceptions: Boolean;
|
||||
begin
|
||||
if ParamStr(1) <> '-c' then
|
||||
Exit(False);
|
||||
|
|
@ -141,6 +149,27 @@ begin
|
|||
frm.ProjectName := projectName;
|
||||
frm.EventClassName := eventClassName;
|
||||
frm.EventMessage := eventMessage;
|
||||
|
||||
// Load the registry settings for privacy settings
|
||||
|
||||
if projectName = SENTRY_PROJECT_NAME_DESKTOP
|
||||
then RegKey := SRegKey_KeymanEngine_CU
|
||||
else RegKey := SRegKey_IDEOptions_CU;
|
||||
|
||||
reg := TRegistry.Create;
|
||||
try
|
||||
reportExceptions :=
|
||||
not reg.OpenKeyReadOnly(RegKey) or
|
||||
not reg.ValueExists(SRegValue_AutomaticallyReportErrors) or
|
||||
reg.ReadBool(SRegValue_AutomaticallyReportErrors);
|
||||
finally
|
||||
reg.Free;
|
||||
end;
|
||||
|
||||
frm.lblText2.Visible := reportExceptions;
|
||||
frm.lblNoPersonal.Visible := reportExceptions;
|
||||
//? frm.lblNotReported.Visible := not reportExceptions;
|
||||
|
||||
frm.lblTitle.Caption := Format(S_Title_Message, [applicationName]);
|
||||
Application.Run;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ uses
|
|||
type
|
||||
TSentryClientConsole = class(TSentryClient)
|
||||
public
|
||||
constructor Create(AOptions: TSentryClientOptions; ACaptureExceptions: Boolean = True); override;
|
||||
constructor Create(AOptions: TSentryClientOptions; AFlags: TSentryClientFlags); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ implementation
|
|||
{ TSentryClientConsole }
|
||||
|
||||
constructor TSentryClientConsole.Create(AOptions: TSentryClientOptions;
|
||||
ACaptureExceptions: Boolean);
|
||||
AFlags: TSentryClientFlags);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ type
|
|||
private
|
||||
procedure HandleApplicationException(Sender: TObject; E: Exception);
|
||||
public
|
||||
constructor Create(AOptions: TSentryClientOptions; ACaptureExceptions: Boolean = True); override;
|
||||
constructor Create(AOptions: TSentryClientOptions; AFlags: TSentryClientFlags); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
|
@ -23,11 +23,11 @@ uses
|
|||
{ TSentryClientVcl }
|
||||
|
||||
constructor TSentryClientVcl.Create(AOptions: TSentryClientOptions;
|
||||
ACaptureExceptions: Boolean);
|
||||
AFlags: TSentryClientFlags);
|
||||
begin
|
||||
inherited Create(AOptions, ACaptureExceptions);
|
||||
inherited Create(AOptions, AFlags);
|
||||
|
||||
if ACaptureExceptions then
|
||||
if scfCaptureExceptions in AFlags then
|
||||
begin
|
||||
Application.OnException := HandleApplicationException;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ type
|
|||
TSentryClientEventType = (scetException, scetMessage);
|
||||
TSentryClientEventAction = (sceaContinue, sceaTerminate);
|
||||
|
||||
TSentryClientFlag = (scfCaptureExceptions, scfReportExceptions, scfReportMessages);
|
||||
TSentryClientFlags = set of TSentryClientFlag;
|
||||
|
||||
TSentryClientBeforeEvent = procedure(Sender: TObject; EventType: TSentryClientEventType;
|
||||
event: sentry_value_t;
|
||||
const EventClassName, Message: string;
|
||||
|
|
@ -54,6 +57,8 @@ type
|
|||
options: psentry_options_t;
|
||||
FOnBeforeEvent: TSentryClientBeforeEvent;
|
||||
FOnAfterEvent: TSentryClientAfterEvent;
|
||||
FReportExceptions: Boolean;
|
||||
FReportMessages: Boolean;
|
||||
procedure DoAfterEvent(const EventID, ExceptionClassName, Message: string;
|
||||
EventType: TSentryClientEventType);
|
||||
procedure DoBeforeEvent(event: sentry_value_t;
|
||||
|
|
@ -62,7 +67,7 @@ type
|
|||
procedure DoTerminate;
|
||||
function EventIDToString(Guid: TGUID): string;
|
||||
public
|
||||
constructor Create(AOptions: TSentryClientOptions; ACaptureExceptions: Boolean = True); virtual;
|
||||
constructor Create(AOptions: TSentryClientOptions; AFlags: TSentryClientFlags); virtual;
|
||||
destructor Destroy; override;
|
||||
|
||||
function MessageEvent(Level: TSentryLevel; const Logger, Message: string; IncludeStack: Boolean = False): TGUID;
|
||||
|
|
@ -70,6 +75,9 @@ type
|
|||
|
||||
property OnBeforeEvent: TSentryClientBeforeEvent read FOnBeforeEvent write FOnBeforeEvent;
|
||||
property OnAfterEvent: TSentryClientAfterEvent read FOnAfterEvent write FOnAfterEvent;
|
||||
|
||||
property ReportExceptions: Boolean read FReportExceptions;
|
||||
property ReportMessages: Boolean read FReportMessages;
|
||||
end;
|
||||
|
||||
TSentryClientClass = class of TSentryClient;
|
||||
|
|
@ -122,10 +130,12 @@ begin
|
|||
end;
|
||||
|
||||
|
||||
constructor TSentryClient.Create(AOptions: TSentryClientOptions; ACaptureExceptions: Boolean = True);
|
||||
constructor TSentryClient.Create(AOptions: TSentryClientOptions; AFlags: TSentryClientFlags);
|
||||
begin
|
||||
Assert(not Assigned(FInstance));
|
||||
FInstance := Self;
|
||||
FReportExceptions := scfReportExceptions in AFlags;
|
||||
FReportMessages := scfReportMessages in AFlags;
|
||||
|
||||
inherited Create;
|
||||
options := sentry_options_new;
|
||||
|
|
@ -153,8 +163,7 @@ begin
|
|||
|
||||
sentry_init(options);
|
||||
|
||||
|
||||
if ACaptureExceptions then
|
||||
if scfCaptureExceptions in AFlags then
|
||||
begin
|
||||
ExceptProc := @SentryExceptHandler;
|
||||
end;
|
||||
|
|
@ -283,35 +292,43 @@ const
|
|||
// A pseudo-frame is inserted at the top of the stack which points
|
||||
// to the address of the code that caused the exception
|
||||
begin
|
||||
event := sentry_value_new_event;
|
||||
if FReportExceptions then
|
||||
begin
|
||||
event := sentry_value_new_event;
|
||||
|
||||
DoBeforeEvent(event, ExceptionClassName, Message, scetException);
|
||||
DoBeforeEvent(event, ExceptionClassName, Message, scetException);
|
||||
|
||||
(*
|
||||
When we set exception information, the report is corrupted. Not sure why. So
|
||||
for now we won't create as an exception event. We still get all the information
|
||||
we want from this.
|
||||
(*
|
||||
When we set exception information, the report is corrupted. Not sure why. So
|
||||
for now we won't create as an exception event. We still get all the information
|
||||
we want from this.
|
||||
|
||||
Investigating this further at https://forum.sentry.io/t/corrupted-display-when-exception-data-is-set-using-native-sdk/9167/2
|
||||
Investigating this further at https://forum.sentry.io/t/corrupted-display-when-exception-data-is-set-using-native-sdk/9167/2
|
||||
|
||||
exc := sentry_value_new_object;
|
||||
sentry_value_set_by_key(exc, 'type', sentry_value_new_string(PAnsiChar(UTF8Encode(ExceptionClassName))));
|
||||
sentry_value_set_by_key(exc, 'value', sentry_value_new_string(PAnsiChar(UTF8Encode(Message))));
|
||||
sentry_value_set_by_key(event, 'exception', exc);
|
||||
*)
|
||||
exc := sentry_value_new_object;
|
||||
sentry_value_set_by_key(exc, 'type', sentry_value_new_string(PAnsiChar(UTF8Encode(ExceptionClassName))));
|
||||
sentry_value_set_by_key(exc, 'value', sentry_value_new_string(PAnsiChar(UTF8Encode(Message))));
|
||||
sentry_value_set_by_key(event, 'exception', exc);
|
||||
*)
|
||||
|
||||
sentry_value_set_by_key(event, 'message', sentry_value_new_string(PAnsiChar(UTF8Encode(Message))));
|
||||
sentry_value_set_by_key(event, 'message', sentry_value_new_string(PAnsiChar(UTF8Encode(Message))));
|
||||
|
||||
if AExceptAddr = nil then
|
||||
AExceptAddr := System.ExceptAddr;
|
||||
threads := CaptureStackTrace(AExceptAddr, FRAMES_TO_SKIP);
|
||||
if threads <> 0 then
|
||||
sentry_value_set_by_key(event, 'threads', threads);
|
||||
if AExceptAddr = nil then
|
||||
AExceptAddr := System.ExceptAddr;
|
||||
threads := CaptureStackTrace(AExceptAddr, FRAMES_TO_SKIP);
|
||||
if threads <> 0 then
|
||||
sentry_value_set_by_key(event, 'threads', threads);
|
||||
|
||||
uuid := sentry_capture_event(event);
|
||||
Result := uuid.native_uuid;
|
||||
uuid := sentry_capture_event(event);
|
||||
Result := uuid.native_uuid;
|
||||
|
||||
DoAfterEvent(EventIDToString(Result), ExceptionClassName, Message, scetException);
|
||||
DoAfterEvent(EventIDToString(Result), ExceptionClassName, Message, scetException);
|
||||
end
|
||||
else
|
||||
begin
|
||||
DoBeforeEvent(0, ExceptionClassName, Message, scetException);
|
||||
DoAfterEvent('', ExceptionClassName, Message, scetException);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSentryClient.MessageEvent(Level: TSentryLevel; const Logger,
|
||||
|
|
@ -325,24 +342,32 @@ const
|
|||
// Sentry.Client.CaptureStackTrace,
|
||||
// Sentry.Client.TSentryClient.MessageEvent
|
||||
begin
|
||||
event := sentry_value_new_message_event(
|
||||
{* level *} sentry_level_t(Level),
|
||||
{* logger *} PAnsiChar(UTF8Encode(Logger)),
|
||||
{* message *} PAnsiChar(UTF8Encode(Message))
|
||||
);
|
||||
|
||||
DoBeforeEvent(event, Logger, Message, scetMessage);
|
||||
|
||||
if IncludeStack then
|
||||
if FReportMessages or (FReportExceptions and (Level in [SENTRY_LEVEL_ERROR, SENTRY_LEVEL_FATAL])) then
|
||||
begin
|
||||
threads := CaptureStackTrace(nil, FRAMES_TO_SKIP);
|
||||
if threads <> 0 then
|
||||
sentry_value_set_by_key(event, 'threads', threads);
|
||||
event := sentry_value_new_message_event(
|
||||
{* level *} sentry_level_t(Level),
|
||||
{* logger *} PAnsiChar(UTF8Encode(Logger)),
|
||||
{* message *} PAnsiChar(UTF8Encode(Message))
|
||||
);
|
||||
|
||||
DoBeforeEvent(event, Logger, Message, scetMessage);
|
||||
|
||||
if IncludeStack then
|
||||
begin
|
||||
threads := CaptureStackTrace(nil, FRAMES_TO_SKIP);
|
||||
if threads <> 0 then
|
||||
sentry_value_set_by_key(event, 'threads', threads);
|
||||
end;
|
||||
|
||||
Result := sentry_capture_event(event).native_uuid;
|
||||
|
||||
DoAfterEvent(EventIDToString(Result), Logger, Message, scetMessage);
|
||||
end
|
||||
else
|
||||
begin
|
||||
DoBeforeEvent(0, Logger, Message, scetMessage);
|
||||
DoAfterEvent('', Logger, Message, scetMessage);
|
||||
end;
|
||||
|
||||
Result := sentry_capture_event(event).native_uuid;
|
||||
|
||||
DoAfterEvent(EventIDToString(Result), Logger, Message, scetMessage);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ type
|
|||
class procedure Stop;
|
||||
class property Client: TSentryClient read FClient;
|
||||
class property Instance: TKeymanSentryClient read FInstance;
|
||||
public
|
||||
const LOGGER_DEVELOPER_IDE = 'KeymanDeveloper.IDE';
|
||||
end;
|
||||
|
||||
|
||||
|
|
@ -36,6 +38,7 @@ uses
|
|||
System.Generics.Collections,
|
||||
System.JSON,
|
||||
System.SysUtils,
|
||||
System.Win.Registry,
|
||||
{$IF NOT DEFINED(CONSOLE)}
|
||||
System.UITypes,
|
||||
Vcl.Dialogs,
|
||||
|
|
@ -46,6 +49,7 @@ uses
|
|||
|
||||
KeymanPaths,
|
||||
KeymanVersion,
|
||||
RegistryKeys,
|
||||
utilexecute;
|
||||
|
||||
const
|
||||
|
|
@ -95,14 +99,16 @@ begin
|
|||
if EventType = scetException then
|
||||
begin
|
||||
// We need to look for a kmcomapi errlog and report that
|
||||
ReportRemoteErrors(EventID);
|
||||
if FClient.ReportExceptions then
|
||||
ReportRemoteErrors(EventID);
|
||||
|
||||
if kscfShowUI in FFlags then
|
||||
begin
|
||||
{$IF DEFINED(CONSOLE)}
|
||||
// Write to console
|
||||
writeln(ErrOutput, 'Fatal error '+EventClassName+': '+Message);
|
||||
writeln(ErrOutput, 'This error has been automatically reported to the Keyman team.');
|
||||
if FClient.ReportExceptions then
|
||||
writeln(ErrOutput, 'This error has been automatically reported to the Keyman team.');
|
||||
writeln(ErrOutput);
|
||||
{$ELSE}
|
||||
// Launch external gui exception dialog app.
|
||||
|
|
@ -215,7 +221,10 @@ end;
|
|||
|
||||
constructor TKeymanSentryClient.Create(SentryClientClass: TSentryClientClass; AProject: TKeymanSentryClientProject; AFlags: TKeymanSentryClientFlags);
|
||||
var
|
||||
reg: TRegistry;
|
||||
o: TSentryClientOptions;
|
||||
f: TSentryClientFlags;
|
||||
RegKey: string;
|
||||
begin
|
||||
Assert(not Assigned(FInstance));
|
||||
|
||||
|
|
@ -235,7 +244,37 @@ begin
|
|||
|
||||
o.Release := 'release-'+CKeymanVersionInfo.VersionWithTag;
|
||||
|
||||
FClient := SentryClientClass.Create(o, kscfCaptureExceptions in FFlags);
|
||||
if kscfCaptureExceptions in FFlags
|
||||
then f := [scfCaptureExceptions]
|
||||
else f := [];
|
||||
|
||||
// Load the registry settings for privacy settings
|
||||
|
||||
if AProject = kscpDesktop
|
||||
then RegKey := SRegKey_KeymanEngine_CU
|
||||
else RegKey := SRegKey_IDEOptions_CU;
|
||||
|
||||
reg := TRegistry.Create;
|
||||
try
|
||||
if reg.OpenKeyReadOnly(RegKey) then
|
||||
begin
|
||||
if not reg.ValueExists(SRegValue_AutomaticallyReportErrors) or
|
||||
reg.ReadBool(SRegValue_AutomaticallyReportErrors) then
|
||||
Include(f, scfReportExceptions);
|
||||
if not reg.ValueExists(SRegValue_AutomaticallyReportUsage) or
|
||||
reg.ReadBool(SRegValue_AutomaticallyReportUsage) then
|
||||
Include(f, scfReportMessages);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Include(f, scfReportExceptions);
|
||||
Include(f, scfReportMessages);
|
||||
end;
|
||||
finally
|
||||
reg.Free;
|
||||
end;
|
||||
|
||||
FClient := SentryClientClass.Create(o, f);
|
||||
FClient.OnAfterEvent := ClientAfterEvent;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ type
|
|||
koAutoOpenOSK, // I1288
|
||||
koAutoSwitchOSKPages, // I1375
|
||||
koUseTouchLayout,
|
||||
koBaseLayout
|
||||
koBaseLayout,
|
||||
koAutomaticallyReportErrors,
|
||||
koAutomaticallyReportUsage
|
||||
);
|
||||
|
||||
function KeymanOptionName(Option: TUtilKeymanOption): string;
|
||||
|
|
|
|||
|
|
@ -183,6 +183,11 @@ const
|
|||
SRegValue_AvailableLanguages = 'available languages'; //CU
|
||||
SRegValue_CurrentLanguage = 'current language'; //CU
|
||||
|
||||
{ Privacy }
|
||||
|
||||
SRegValue_AutomaticallyReportErrors = 'automatically report errors'; // CU, SRegKey_IDEOptions and SRegKey_KeymanEngine_CU
|
||||
SRegValue_AutomaticallyReportUsage = 'automatically report usage'; // CU, SRegKey_IDEOptions and SRegKey_KeymanEngine_CU
|
||||
|
||||
{ ActiveKeyboards }
|
||||
|
||||
SRegKey_ActiveKeyboards_CU = SRegKey_KeymanEngine_CU + '\Active Keyboards'; // CU
|
||||
|
|
|
|||
|
|
@ -126,6 +126,13 @@
|
|||
|
||||
#define REGSZ_DeepTSFIntegration "deep tsf integration"
|
||||
|
||||
/* Privacy settings - all DWORD 0/1 */
|
||||
|
||||
#define REGSZ_IDEOptions_CU ( REGSZ_KeymanDeveloperCU "\\IDE\\Options" )
|
||||
|
||||
#define REGSZ_AutomaticallyReportErrors "automatically report errors" // CU, SRegKey_IDEOptions and SRegKey_KeymanEngine_CU
|
||||
#define REGSZ_AutomaticallyReportUsage "automatically report usage" // CU, SRegKey_IDEOptions and SRegKey_KeymanEngine_CU
|
||||
|
||||
/* Splitting Registry into ReadOnly and FullAccess makes it much easier to ensure that we are using the registry
|
||||
correctly -- readonly wherever possible. */
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,41 @@
|
|||
#include <keymansentry.h>
|
||||
#include <keymanversion.h>
|
||||
#include <sentry.h>
|
||||
#include <registry.h>
|
||||
|
||||
#define SENTRY_DSN_DESKTOP "https://92eb58e6005d47daa33c9c9e39458eb7@sentry.keyman.com/5"
|
||||
#define SENTRY_DSN_DEVELOPER "https://39b25a09410349a58fe12aaf721565af@sentry.keyman.com/6"
|
||||
|
||||
bool g_report_exceptions, g_report_messages;
|
||||
|
||||
int keyman_sentry_init(bool is_keyman_developer) {
|
||||
sentry_options_t *options = sentry_options_new();
|
||||
const char *key;
|
||||
|
||||
if (is_keyman_developer) {
|
||||
sentry_options_set_dsn(options, SENTRY_DSN_DEVELOPER);
|
||||
key = REGSZ_IDEOptions_CU;
|
||||
} else {
|
||||
sentry_options_set_dsn(options, SENTRY_DSN_DESKTOP);
|
||||
key = REGSZ_KeymanCU;
|
||||
}
|
||||
|
||||
HKEY hkey;
|
||||
if (RegOpenKeyExA(HKEY_CURRENT_USER, key, 0, KEY_READ, &hkey) == ERROR_SUCCESS) {
|
||||
DWORD dwType, dwValue, dwValueSize = 4;
|
||||
|
||||
g_report_exceptions =
|
||||
RegQueryValueExA(hkey, REGSZ_AutomaticallyReportErrors, NULL, &dwType, (LPBYTE)&dwValue, &dwValueSize) != ERROR_SUCCESS || dwType != REG_DWORD || dwValue != 0;
|
||||
|
||||
dwValueSize = 4;
|
||||
g_report_messages =
|
||||
RegQueryValueExA(hkey, REGSZ_AutomaticallyReportUsage, NULL, &dwType, (LPBYTE)&dwValue, &dwValueSize) != ERROR_SUCCESS || dwType != REG_DWORD || dwValue != 0;
|
||||
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
else {
|
||||
g_report_exceptions = true;
|
||||
g_report_messages = true;
|
||||
}
|
||||
|
||||
sentry_options_set_release(options, KEYMAN_VersionWithTag);
|
||||
|
|
@ -76,56 +100,60 @@ void keyman_sentry_report_exception(DWORD ExceptionCode, PVOID ExceptionAddress)
|
|||
sentry_value_t event;
|
||||
const int FRAMES_TO_SKIP = 0;
|
||||
|
||||
event = sentry_value_new_event();
|
||||
if (g_report_exceptions) {
|
||||
event = sentry_value_new_event();
|
||||
|
||||
char message[64];
|
||||
wsprintfA(message, "Exception %x at %p", ExceptionCode, ExceptionAddress);
|
||||
char message[64];
|
||||
wsprintfA(message, "Exception %x at %p", ExceptionCode, ExceptionAddress);
|
||||
|
||||
/*
|
||||
When we set exception information, the report is corrupted. Not sure why. So
|
||||
for now we won't create as an exception event. We still get all the information
|
||||
we want from this.
|
||||
/*
|
||||
When we set exception information, the report is corrupted. Not sure why. So
|
||||
for now we won't create as an exception event. We still get all the information
|
||||
we want from this.
|
||||
|
||||
Investigating this further at https://forum.sentry.io/t/corrupted-display-when-exception-data-is-set-using-native-sdk/9167/2
|
||||
Investigating this further at https://forum.sentry.io/t/corrupted-display-when-exception-data-is-set-using-native-sdk/9167/2
|
||||
|
||||
sentry_value_t exc = sentry_value_new_object();
|
||||
sentry_value_set_by_key(exc, "type", sentry_value_new_string("Exception"));
|
||||
sentry_value_set_by_key(exc, "value", sentry_value_new_string(message));
|
||||
sentry_value_set_by_key(event, "exception", exc);*/
|
||||
sentry_value_set_by_key(event, "message", sentry_value_new_string(message));
|
||||
sentry_value_t exc = sentry_value_new_object();
|
||||
sentry_value_set_by_key(exc, "type", sentry_value_new_string("Exception"));
|
||||
sentry_value_set_by_key(exc, "value", sentry_value_new_string(message));
|
||||
sentry_value_set_by_key(event, "exception", exc);*/
|
||||
sentry_value_set_by_key(event, "message", sentry_value_new_string(message));
|
||||
|
||||
//sentry_event_value_add_stacktrace(event, &ExceptionAddress, 64);
|
||||
sentry_value_t threads = CaptureStackTrace(ExceptionAddress, FRAMES_TO_SKIP);
|
||||
if (threads._bits != 0) {
|
||||
sentry_value_set_by_key(event, "threads", threads);
|
||||
//sentry_event_value_add_stacktrace(event, &ExceptionAddress, 64);
|
||||
sentry_value_t threads = CaptureStackTrace(ExceptionAddress, FRAMES_TO_SKIP);
|
||||
if (threads._bits != 0) {
|
||||
sentry_value_set_by_key(event, "threads", threads);
|
||||
}
|
||||
|
||||
sentry_capture_event(event);
|
||||
|
||||
perror(message);
|
||||
}
|
||||
|
||||
sentry_capture_event(event);
|
||||
|
||||
perror(message);
|
||||
}
|
||||
|
||||
void keyman_sentry_report_message(keyman_sentry_level_t level, const char *logger, const char *message, bool includeStack) {
|
||||
const int FRAMES_TO_SKIP = 0;
|
||||
|
||||
sentry_value_t event;
|
||||
if ((g_report_exceptions && (level == SENTRY_LEVEL_ERROR || level == SENTRY_LEVEL_DEBUG)) || g_report_messages) {
|
||||
sentry_value_t event;
|
||||
|
||||
event = sentry_value_new_event();
|
||||
event = sentry_value_new_event();
|
||||
|
||||
event = sentry_value_new_message_event(
|
||||
/*level */ sentry_level_t(level),
|
||||
/*logger */ logger,
|
||||
/*message*/ message
|
||||
);
|
||||
event = sentry_value_new_message_event(
|
||||
/*level */ sentry_level_t(level),
|
||||
/*logger */ logger,
|
||||
/*message*/ message
|
||||
);
|
||||
|
||||
if (includeStack) {
|
||||
sentry_value_t threads = CaptureStackTrace(NULL, FRAMES_TO_SKIP);
|
||||
if (threads._bits != 0) {
|
||||
sentry_value_set_by_key(event, "threads", threads);
|
||||
if (includeStack) {
|
||||
sentry_value_t threads = CaptureStackTrace(NULL, FRAMES_TO_SKIP);
|
||||
if (threads._bits != 0) {
|
||||
sentry_value_set_by_key(event, "threads", threads);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sentry_capture_event(event);
|
||||
sentry_capture_event(event);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wrappers for main, wmain */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue