feat(windows): crash reports in CEF

This commit is contained in:
Marc Durdin 2020-03-25 17:42:06 +11:00
parent 4846127985
commit e00d4ebe8e
31 changed files with 5907 additions and 158 deletions

View file

@ -1 +1,2 @@
xml/localedef.dtd
xml/localedef.dtd
xml/sentry.init.js

View file

@ -15,7 +15,7 @@ build: version.res manifest.res icons xml
icons:
rc icons.rc
xml:
xml: sentry-init.js
cd $(ROOT)\src\desktop\kmshell\xml
-del /q $(ROOT)\bin\desktop\xml\*
copy * $(ROOT)\bin\desktop\xml\ #
@ -24,6 +24,10 @@ xml:
mkdir $(ROOT)\bin\desktop\locale
xcopy /S /I $(ROOT)\src\desktop\kmshell\locale $(ROOT)\bin\desktop\locale\
sentry-init.js:
cd $(ROOT)\src\desktop\kmshell\xml
$(MKVER_U) init.js.in init.js
clean: def-clean
if exist MessageIdentifiers.pas del MessageIdentifiers.pas
if exist icons\icons.res del icons\icons.res

View file

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="elements.xsl"/>
<xsl:variable name="locale_basekeyboard" select="$locale/Dialog[@Id='BaseKeyboard'][1]" />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_BaseKeyboard_Title']"/></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<style type="text/css">
@ -29,7 +30,7 @@ html {
body {
font-size: 11px;
text-align: justify;
padding: 0;
padding: 0;
margin: 0px;
width: <xsl:value-of select="$locale_basekeyboard/@Width" />px;
height: <xsl:value-of select="$locale_basekeyboard/@Height" />px;
@ -49,15 +50,15 @@ div {
font-size: 13.3px;
}
#border {
border: 1px solid #AD4A29;
#border {
border: 1px solid #AD4A29;
position: absolute;
left: 0;
top: 0;
width: <xsl:value-of select="$locale_basekeyboard/@Width - 2" />px;
width: <xsl:value-of select="$locale_basekeyboard/@Width - 2" />px;
height: <xsl:value-of select="$locale_basekeyboard/@Height - 2" />px;
}
#content {
padding: 10px;
text-align: center;
@ -69,7 +70,7 @@ div {
height: 36px;
text-align: center;
width: 100%;
}
}
.form { position: absolute; display: block; vertical-align: middle; height: 24px; }
#ProxyServerLabel { left: 16px; top: 20px;}
@ -93,7 +94,7 @@ div {
location.href='keyman:footer_ok?'+
'id='+document.getElementById('options_base_keyboard_select').value;
}
document.onkeydown = function()
{
if(event.keyCode == 13 && (!event.srcElement.type || event.srcElement.type != 'button')) ok();
@ -108,7 +109,7 @@ div {
<div id='content'>
<p><xsl:value-of select="$locale/String[@Id='S_BaseKeyboard_Text']"/></p>
<div id="options_base_keyboard">
<select id='options_base_keyboard_select'>
<xsl:for-each select="//BaseKeyboards/BaseKeyboard">
@ -120,7 +121,7 @@ div {
</xsl:for-each>
</select>
</div>
</div>
</div>
<div id="footer">
<xsl:call-template name="button">
<xsl:with-param name="default">1</xsl:with-param>

View file

@ -14,11 +14,11 @@ function _$(e)
function windowResize()
{
var
eContent = _$('contentframe'),
eFooter = _$('footerframe'),
var
eContent = _$('contentframe'),
eFooter = _$('footerframe'),
eMenu = _$('menuframe');
if(eContent && eFooter && eMenu)
{
eContent.style.height = (document.body.offsetHeight - eFooter.offsetHeight - 1) + 'px';
@ -26,7 +26,7 @@ function windowResize()
eContent.style.left = eMenu.offsetWidth + 'px';
eContent.style.top = 0 + 'px';
eMenu.style.height = (document.body.offsetHeight - eFooter.offsetHeight - eMenu.offsetTop) + 'px';
var h = (eContent.offsetHeight - 37 - 2) + 'px'; // header height and border height
_$('subcontent_keyboards').style.height = h;
_$('subcontent_options').style.height = h;
@ -42,23 +42,23 @@ function windowResize()
doAttachEvent(window, 'resize', windowResize);
doAttachEvent(window, 'load', windowResize);
document.addEventListener("DOMContentLoaded", windowResize);
function list_mousedown(event,n)
{
var e = document.getElementById('list_'+n);
window.setTimeout(function() { e.focus(); }, 10);
}
function list_focus(event,n)
{
return true;
}
function list_blur(event,n)
{
return true;
}
function list_keydown(event,n)
{
switch(event.keyCode)
@ -75,7 +75,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
elem.children[i].focus();
break;
}
}
break;
case 38: // up
@ -84,7 +84,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
event.cancelBubble=true;
return true;
}
// find prev list element
var elem = event.srcElement.parentElement;
for(var i = 0; i < elem.children.length; i++) {
@ -109,7 +109,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
event.cancelBubble=true;
return true;
}
// find next file element
var elem = event.srcElement.parentElement;
for(var i = 0; i < elem.children.length; i++) {
@ -129,6 +129,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
}
break;
case 37: // left
undefinedFunction();
case 109: // minus
var k = document.getElementById('list_detail_'+n);
if( !k ) break;
@ -144,7 +145,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
if( document.getElementById('menu_options_'+n) != null ) {
var x = document.getElementById('list_'+n).offsetLeft + document.getElementById('menuframe').offsetWidth + 100;
var y = document.getElementById('list_'+n).offsetTop + document.getElementById('keyboards_header').offsetHeight + 10;
ShowMenu( 'options_'+n, 'left', x, y);
}
event.cancelBubble = true;
@ -161,26 +162,26 @@ document.addEventListener("DOMContentLoaded", windowResize);
document.onfocusin = function() {
var itemtype, blah, elemid;
globalfocus = event.srcElement;
if(!event.srcElement) { return true; }
elemid = event.srcElement.id;
if(typeof elemid != 'string') {
if(typeof elemid != 'string') {
// e.g. if document has received focus, id may be undefined
return true;
}
itemtype = elemid.substr(0, 5);
if(event.srcElement.className.substr(0,8) != 'menuitem' && event.srcElement != menudiv
&& menudiv != null && menudiv.style.visibility=='visible') HideMenu();
if(globalfocus_item != null) {
if(globalfocus_item != event.srcElement && !globalfocus_item.contains(event.srcElement)) {
/* globalfocus_item.style.background = '';
globalfocus_item.style.filter = ''; */
$(globalfocus_item).removeClass('list_item_focus');
globalfocus_item = null;
}
}
}
if( event.srcElement.className.indexOf('list_item') >= 0 ) {
globalfocus_item = event.srcElement;
@ -190,8 +191,8 @@ document.addEventListener("DOMContentLoaded", windowResize);
return true;
}
return true;
}
}
function list_detail(event,n) {
var k = document.getElementById('list_'+n);
$(k).toggleClass('expanded');
@ -199,7 +200,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
save_state();
return false;
}
var loading_state = false;
function save_state() {
@ -215,7 +216,7 @@ document.addEventListener("DOMContentLoaded", windowResize);
});
$('#state').text(JSON.stringify(state));
}
function load_state() {
loading_state = true;
var s = $('#state').text();
@ -243,13 +244,13 @@ document.addEventListener("DOMContentLoaded", windowResize);
}
loading_state = false;
}
$( document ).ready(function() {
load_state();
$('#subcontent_keyboards').scroll(function() { save_state(); });
});
function submitSupportRequest() {
location.href = 'keyman:contact_support?message='+encodeURIComponent($('#contact_support').val());
}

View file

@ -1,32 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="elements.xsl"/>
<xsl:variable name="locale_downloadkeyboard" select="$locale/Dialog[@Id='DownloadKeyboard'][1]" />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_DownloadKeyboard_Title']"/></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<style type="text/css">
* { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI"; }
body {
padding: 0px; margin: 0px; overflow: hidden;
width: <xsl:value-of select="$locale_downloadkeyboard/@Width" />px;
body {
padding: 0px; margin: 0px; overflow: hidden;
width: <xsl:value-of select="$locale_downloadkeyboard/@Width" />px;
height: <xsl:value-of select="$locale_downloadkeyboard/@Height" />px;
}
html { width: 100%; padding: 0px; margin: 0px; overflow: hidden }
#size {
position: absolute;
width: <xsl:value-of select="$locale_downloadkeyboard/@Width" />px;
width: <xsl:value-of select="$locale_downloadkeyboard/@Width" />px;
height: <xsl:value-of select="$locale_downloadkeyboard/@Height" />px;
}
@ -58,7 +59,7 @@
event.cancelBubble = true; event.returnValue = false;
}
]]></script>
</head>
<body>
<div id="size"></div>

View file

@ -11,7 +11,8 @@
<html>
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_HelpTitle']" /></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<style type="text/css">
@ -27,7 +28,7 @@
width: 100%;
height: 100%;
}
#size { position: absolute; left: 0; top: 0;
width: <xsl:value-of select="$locale_help/@Width" />px;
height: <xsl:value-of select="$locale_help/@Height" />px;
@ -117,7 +118,7 @@
float: right;
padding: 10px;
}
#help {
margin: 60px 0 0 0;
}
@ -173,7 +174,7 @@
</a>
</div>
</div>
<div id="footer">
<div id="buttons">
<xsl:call-template name="button">
@ -182,10 +183,10 @@
</xsl:call-template>
</div>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -13,12 +13,13 @@
<html>
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id=$HintTitle]" /></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>hint.css</xsl:attribute></link>
<style type="text/css">
* {
* {
font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";
}
#container {
@ -66,10 +67,10 @@
<div id="hint">
<xsl:apply-templates select="/Keyman/Hint" />
</div>
<div id="footer">
<div id="checkbox">
<input type="checkbox" onclick='javascript:if(this.checked) location.href="keyman:dontshowhint"; else location.href="keyman:showhint";'
<input type="checkbox" onclick='javascript:if(this.checked) location.href="keyman:dontshowhint"; else location.href="keyman:showhint";'
style="vertical-align: middle;" id="chkWelcome" />&#160;<label for="chkWelcome"><xsl:value-of select="$locale/String[@Id='S_HintDialog_DontShowHintAgain']"/></label>
</div>
@ -89,7 +90,7 @@
</xsl:if>
</div>
</div>
</div>
</div>
</body>
</html>
@ -101,7 +102,7 @@
<!--
Example of how to do a custom hint
<xsl:template match="Hint[@ID='KH_EXITPRODUCT']">
<img id="exiticon" alt="icon">
<xsl:attribute name="src">
@ -111,5 +112,5 @@
<xsl:value-of select="$locale/String[@Id=$Hint]" />
</xsl:template>
-->
</xsl:stylesheet>

View file

@ -1,39 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="elements.xsl" />
<xsl:variable name="locale_installkeyboard" select="$locale/Dialog[@Id='InstallKeyboard'][1]" />
<xsl:template match="/">
<html>
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_InstallKeyboard_Title']"/></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>installkeyboard.css</xsl:attribute></link>
<style type="text/css">
* {
font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";
* {
font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";
}
#background {
width: <xsl:value-of select="$locale_installkeyboard/@Width" />px;
#background {
width: <xsl:value-of select="$locale_installkeyboard/@Width" />px;
height: <xsl:value-of select="$locale_installkeyboard/@Height" />px;
}
#foreground {
width: <xsl:value-of select="$locale_installkeyboard/@Width" />px;
#foreground {
width: <xsl:value-of select="$locale_installkeyboard/@Width" />px;
height: <xsl:value-of select="$locale_installkeyboard/@Height" />px;
}
#frame {
width: <xsl:value-of select="$locale_installkeyboard/@Width - 20" />px;
}
#footer {
width: <xsl:value-of select="$locale_installkeyboard/@Width - 16" />px;
width: <xsl:value-of select="$locale_installkeyboard/@Width - 16" />px;
}
</style>
<script type="text/javascript"><xsl:attribute name='src'><xsl:value-of select="/Keyman/templatepath"/>installkeyboard.js</xsl:attribute></script>
@ -73,7 +74,7 @@
<xsl:attribute name="src"><xsl:value-of select="/Keyman/KeymanPackageFile/readme" /></xsl:attribute>
</iframe>
</div>
</xsl:if>
</xsl:if>
<div class="content" id="details">
<div style="display:block;position:static;margin:0;padding:0;background:blue;overflow:hidden;">
<table style="width: 100%;background:white;">
@ -129,7 +130,7 @@
</body>
</html>
</xsl:template>
<xsl:template match="/Keyman/KeymanPackageFile/KeymanPackageContentKeyboardsFile/KeymanKeyboardFile/name">
<xsl:value-of select="."/><br />
</xsl:template>
@ -137,7 +138,7 @@
<xsl:template match="/Keyman/KeymanPackageFile/Fonts/Font/name">
<xsl:value-of select="."/><br />
</xsl:template>
<xsl:template match="/Keyman/KeymanKeyboardFile">
<tr>
<td class="detailheader"><xsl:value-of select="$locale/String[@Id='S_Caption_Filename']"/></td>
@ -160,7 +161,7 @@
<td class="otherdetails"><xsl:value-of select="copyright" /></td>
</tr>
</xsl:if>
<xsl:if test="message">
<tr>
<td class="detailheader"><xsl:value-of select="$locale/String[@Id='S_Caption_Message']"/></td>
@ -168,27 +169,27 @@
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="/Keyman/KeymanPackageFile">
<tr>
<td class="detailheader"><xsl:value-of select="$locale/String[@Id='S_Caption_Keyboards']"/></td>
<td class="otherdetails"><xsl:apply-templates select="KeymanPackageContentKeyboardsFile/KeymanKeyboardFile/name" /></td>
</tr>
<xsl:if test="Fonts/Font">
<tr>
<td class="detailheader"><xsl:value-of select="$locale/String[@Id='S_Caption_Fonts']"/></td>
<td class="otherdetails"><xsl:apply-templates select="Fonts/Font/name" /></td>
</tr>
</xsl:if>
<xsl:apply-templates select="detail[@name='version']"><xsl:with-param name="header"><xsl:value-of select="$locale/String[@Id='S_Caption_Version']"/></xsl:with-param></xsl:apply-templates>
<xsl:apply-templates select="detail[@name='author']"><xsl:with-param name="header"><xsl:value-of select="$locale/String[@Id='S_Caption_Author']"/></xsl:with-param></xsl:apply-templates>
<xsl:apply-templates select="detail[@name='website']"><xsl:with-param name="header"><xsl:value-of select="$locale/String[@Id='S_Caption_Website']"/></xsl:with-param></xsl:apply-templates>
<xsl:apply-templates select="detail[@name='copyright']"><xsl:with-param name="header"><xsl:value-of select="$locale/String[@Id='S_Caption_Copyright']"/></xsl:with-param></xsl:apply-templates>
</xsl:template>
<xsl:template match="detail">
<xsl:param name="header" />
<tr>
@ -207,7 +208,7 @@
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</tr>
</xsl:template>
</xsl:stylesheet>

View file

@ -19,9 +19,10 @@
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style> *{font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";}</style>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<style> *{font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";}</style>
<title><xsl:value-of select="$locale/String[@Id='S_ConfigurationTitle']"/></title>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>config.css</xsl:attribute></link>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>menu.css</xsl:attribute></link>

View file

@ -11,6 +11,8 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_Update_Title']"/></title>
<style type="text/css">

View file

@ -10,7 +10,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="$locale/String[@Id='S_ProxyConfiguration_Title']"/></title>
<style type="text/css">
* { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI"; }

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,26 @@
// init.js
// Initializes Sentry with Keyman definitions
// This file is dynamically built from init.js.in into init.js
// which allows us to easily populate a release tag. This
// transform is made in TIKE's makefile with mkver
//
// DO NOT MODIFY init.js; instead make changes in init.js.in.
//
Sentry.init({
dsn: 'https://92eb58e6005d47daa33c9c9e39458eb7@sentry.keyman.com/5', // Keyman Desktop
release: 'release-$VersionWithTag'
});
/* // Test sentry here:
function foobar() {
fbb();
}
function fbb() {
Sentry.captureException(new Error("Something broke again"));
}
foobar();
*/

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="elements.xsl"/>
@ -8,7 +8,8 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title><xsl:value-of select="($locale/String[@Id='S_Splash_Title'])[1]" /></title>
<style> * { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI";} </style>
<link rel="stylesheet" type="text/css"><xsl:attribute name="href"><xsl:value-of select="/Keyman/templatepath"/>menu.css</xsl:attribute></link>
@ -27,12 +28,12 @@
<div id="titleBox"></div>
<div id="silLogo"></div>
<div id="family"></div>
<a href="keyman:start" id="startNow" class="button">
<div class="btn btn-blue"><xsl:value-of select="$locale/String[@Id='S_Splash_Start']"/></div>
</a>
<a class="button" id="config" href="keyman:config"><div class="btn btn-orange"><xsl:value-of select="$locale/String[@Id='S_Splash_Configuration']"/></div></a>
<a href="keyman:exit" id="exit" class="button"><div class="btn btn-small"><xsl:value-of select="$locale/String[@Id='S_Splash_Exit']"/></div></a>
<div id="tasks">
@ -41,12 +42,12 @@
<label for="showAtStartupBox"><xsl:value-of select="$locale/String[@Id='S_Splash_ShowAtStartup']"/></label>
</div>
</div>
<div id="keyboards">
<xsl:apply-templates select="//KeymanKeyboardInstalled[loaded]"/>
<xsl:if test="count(//KeymanKeyboardInstalled[loaded]) = 0">No keyboards loaded - <a href="keyman:config">Open Configuration</a></xsl:if>
</div>
<div id="version"><xsl:value-of select="/Keyman/Version"/>
<span id="beta"><xsl:value-of select="$locale/String[@Id='S_BETA']"/></span>
</div>
@ -54,9 +55,9 @@
</body>
</html>
</xsl:template>
<xsl:template match="KeymanKeyboardInstalled">
<div><xsl:value-of select="name" /></div>
</xsl:template>
</xsl:stylesheet>

View file

@ -10,7 +10,8 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title>
<xsl:value-of select="$locale/String[@Id='Usage_Title']" />
</title>

View file

@ -11,18 +11,18 @@
<html>
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title>
<xsl:value-of select="$locale/String[@Id='SK_Usage_Title']" />
</title>
<style type="text/css">
* { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI"; font-size: 13.3px; }
body { padding: 6px; margin: 0px;
body { padding: 6px; margin: 0px;
background: #A0C1DC; border: none; }
html { padding: 0px; margin: 0px; }
#toolbar {
border-left: solid 1px black;
border-right: solid 1px black;
@ -42,14 +42,14 @@
#buttons input {
x-margin: 4px 4px; font-size: 12px
}
#outer { position: relative; }
#middle { position: absolute; top: 50%; }
#inner { position: relative; top: -30%; width: 100%; font-size: 13.3px; text-align: center; }
#nokeyboards { width: 84%; padding: 8px 3%; margin-left: 5%; background: #F5F6BE; border: solid 1px gray; text-align: left }
#nokeyboards img { float: left; padding: 0 16px 0 0 }
</style>
</head>

View file

@ -8,8 +8,8 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title>hintbar</title>
<style type="text/css">
* { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI"; font-size: 11px; }

View file

@ -8,8 +8,8 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.bundle.min.js</xsl:attribute><xsl:text> </xsl:text></script>
<script><xsl:attribute name="src"><xsl:value-of select="/Keyman/templatepath"/>sentry.init.js</xsl:attribute><xsl:text> </xsl:text></script>
<title>fonts</title>
<style type="text/css">
* { font-family: <xsl:value-of select="($locale/String[@Id='SK_UIFontName'])[1]" />, "Segoe UI"; font-size: 13.3px; }

View file

@ -13,12 +13,16 @@ build: version.res manifest.res icons dirs xml
$(COPY) kmlmc.cmd $(PROGRAM)\developer
if exist tike.dbg $(COPY) tike.dbg $(DEBUGPATH)\developer
xml: pull-keymanweb pull-npm
xml: pull-keymanweb pull-npm sentry.init.js
cd $(ROOT)\src\developer\tike\xml
-del /q $(ROOT)\bin\developer\xml\*
xcopy /s /y * $(ROOT)\bin\developer\xml
cd $(ROOT)\src\developer\tike
sentry-init.js:
cd $(ROOT)\src\developer\tike\xml\app\lib\sentry
$(MKVER_U) init.js.in init.js
pull-npm:
#
# Grab the version of Monaco and any other node modules

View file

@ -315,7 +315,8 @@ begin
// App requests are only accepted from local computer
// So test that the request comes from localhost
if (AContext.Binding.PeerIP <> '127.0.0.1') and
(AContext.Binding.PeerIP <> '0:0:0:0:0:0:0:1') then
(AContext.Binding.PeerIP <> '0:0:0:0:0:0:0:1') and
not doc.StartsWith('lib/sentry/') then // We'll allow sentry for non-local requests
begin
AResponseInfo.ResponseNo := 403;
AResponseInfo.ResponseText := 'Access denied';

View file

@ -2,3 +2,4 @@ lib/monaco
node_modules/
.vs/
.vscode/
lib/sentry/init.js

View file

@ -2,19 +2,22 @@
<html>
<head>
<meta charset='utf-8'>
<!-- Set the viewport width to match iOS device widths
<script src="/app/lib/sentry/bundle.min.js"></script>
<script src="/app/lib/sentry/init.js"></script>
<!-- Set the viewport width to match iOS device widths
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" /> -->
<meta name="viewport" content="width=device-width,user-scalable=no" />
<meta name="viewport" content="width=device-width,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Enable IE9 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Text Editor</title>
<link rel="stylesheet" type='text/css' href='editor.css' />
<script src="../lib/jquery/jquery-1.10.2.js"></script>
</head>
<body>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,26 @@
// init.js
// Initializes Sentry with Keyman definitions
// This file is dynamically built from init.js.in into init.js
// which allows us to easily populate a release tag. This
// transform is made in TIKE's makefile with mkver
//
// DO NOT MODIFY init.js; instead make changes in init.js.in.
//
Sentry.init({
dsn: 'https://39b25a09410349a58fe12aaf721565af@sentry.keyman.com/6', // Keyman Developer
release: 'release-$VersionWithTag'
});
/* // Test sentry here:
function foobar() {
fbb();
}
function fbb() {
Sentry.captureException(new Error("Something broke again"));
}
foobar();
*/

View file

@ -3,8 +3,9 @@
<xsl:template match="/">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta charset="UTF-8" />
<script src="/app/lib/sentry/bundle.min.js"><xsl:text> </xsl:text></script>
<script src="/app/lib/sentry/init.js"><xsl:text> </xsl:text></script>
<title>Help</title>
<style>

View file

@ -3,6 +3,9 @@
<head>
<meta charset='utf-8'>
<script src="/app/lib/sentry/bundle.min.js"></script>
<script src="/app/lib/sentry/init.js"></script>
<!-- Set the viewport width to match iOS device widths
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" /> -->
<meta name="viewport" content="width=device-width,user-scalable=no" />

View file

@ -3,6 +3,9 @@
<head>
<meta charset='utf-8'>
<script src="/app/lib/sentry/bundle.min.js"></script>
<script src="/app/lib/sentry/init.js"></script>
<!-- Set the viewport width to match iOS device widths
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" /> -->
<meta name="viewport" content="width=device-width,user-scalable=no" />

View file

@ -9,7 +9,8 @@
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<script src="/app/lib/sentry/bundle.min.js"><xsl:text> </xsl:text></script>
<script src="/app/lib/sentry/init.js"><xsl:text> </xsl:text></script>
<title>On Screen Keyboard Builder</title>
<link rel="stylesheet" type='text/css'><xsl:attribute name="href"><xsl:value-of select="/TouchLayoutBuilder/LibPath"/>jquery-ui.css</xsl:attribute></link>
<link rel='stylesheet' type='text/css'><xsl:attribute name="href"><xsl:value-of select="/TouchLayoutBuilder/LibPath"/>builder.css</xsl:attribute></link>
@ -24,7 +25,7 @@
<div id="wedgeAddKeyLeft" class="kcontrol wedge-vert"><span>+</span></div>
<div id="wedgeAddKeyRight" class="kcontrol wedge-vert"><span>+</span></div>
<div id="btnDelKey">x</div>
<div id='toolbar'>
<div id='controlToolbar'>
<button id='btnTemplate'>Template...</button>
@ -72,7 +73,7 @@
<button id='btnDelSubKeyArray'>Remove longpress popup</button>
<br class='clear' />
</div>
<div id="wedgeAddSubKeyLeft" class="skcontrol wedge-vert"><span>+</span></div>
<div id="wedgeAddSubKeyRight" class="skcontrol wedge-vert"><span>+</span></div>
<div id="btnDelSubKey">x</div>

View file

@ -4,6 +4,9 @@
<xsl:template name="head">
<head>
<script src="/app/lib/sentry/bundle.min.js"><xsl:text> </xsl:text></script>
<script src="/app/lib/sentry/init.js"><xsl:text> </xsl:text></script>
<link rel='stylesheet' type='text/css' href='res/project.css' />
<script src='res/common.js'><xsl:text> </xsl:text></script>
<script src='res/project.js'><xsl:text> </xsl:text></script>

View file

@ -50,7 +50,8 @@ uses
Winapi.ShlObj,
Winapi.Windows,
// ExternalExceptionHandler,
Sentry.Client,
KeymanPaths,
KeymanVersion,
// RedistFiles,
@ -68,12 +69,6 @@ procedure GlobalCEFApp_ProcessMessageReceived(const browser : ICefBrowser;
sourceProcess : TCefProcessId;
const message : ICefProcessMessage;
var aHandled : boolean); forward;
procedure GlobalCEFApp_UncaughtException(const browser : ICefBrowser;
const frame : ICefFrame;
const context : ICefv8Context;
const e : ICefV8Exception;
const stackTrace : ICefV8StackTrace); forward;
{ TInitializeCEF }
procedure TCEFManager.CompletionHandler(Sender: IKeymanCEFHost);
@ -118,8 +113,6 @@ begin
GlobalCEFApp.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36 (TIKE/'+SKeymanVersion+')';
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_ProcessMessageReceived;
GlobalCEFApp.OnUncaughtException := GlobalCEFApp_UncaughtException;
GlobalCEFApp.UncaughtExceptionStackSize := 64;
end;
destructor TCEFManager.Destroy;
@ -220,32 +213,4 @@ begin
end;
end;
procedure GlobalCEFApp_UncaughtException(const browser : ICefBrowser;
const frame : ICefFrame;
const context : ICefv8Context;
const e : ICefV8Exception;
const stackTrace : ICefV8StackTrace);
var
log, id: string;
I: Integer;
begin
id := LowerCase(ExtractFileName(ParamStr(0)))+'_'+GetVersionString+'_script_unknown';
I := string(frame.Url).LastDelimiter('/');
id := id + '_' + string(frame.Url).SubString(I + 1) + '_' + IntToStr(e.LineNumber);
log := 'Stack Trace:'#13#10;
for i := 0 to stackTrace.FrameCount - 1 do
begin
log := log + ' ' + stackTrace.Frame[i].FunctionName + ' ('+stackTrace.Frame[i].ScriptNameOrSourceUrl+':'+IntToStr(stackTrace.Frame[i].LineNumber)+')'#13#10;
end;
CefLog('CEFManager', 1, CEF_LOG_SEVERITY_ERROR, 'Error '+id+', '+e.Message+' in '+frame.Url);
{$MESSAGE HINT 'TODO: support exceptions in js windows'}
//LogExceptionToExternalHandler(id, 'Error occurred at line '+IntToStr(e.LineNumber)+' of '+e.ScriptResourceName,
// e.Message, log);
end;
end.