{"category":{"version":"591f17ae21d2ff0f00cf5a3f","project":"547cd7662eaee50800ed1089","_id":"591f17af21d2ff0f00cf5a41","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-21T09:47:49.247Z","from_sync":false,"order":1,"slug":"getting-started-windows-framework","title":"Get Started: Windows Apps"},"parentDoc":null,"project":"547cd7662eaee50800ed1089","user":"547cd6ac78fd57080023ca99","version":{"__v":1,"_id":"591f17ae21d2ff0f00cf5a3f","project":"547cd7662eaee50800ed1089","createdAt":"2017-05-19T16:05:02.775Z","releaseDate":"2017-05-19T16:05:02.775Z","categories":["591f17af21d2ff0f00cf5a40","591f17af21d2ff0f00cf5a41","591f17af21d2ff0f00cf5a42","591f17af21d2ff0f00cf5a43","591f17af21d2ff0f00cf5a44","591f17af21d2ff0f00cf5a45","591f17af21d2ff0f00cf5a46","591f17af21d2ff0f00cf5a47","591f17af21d2ff0f00cf5a48"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.1","version":"1.0.1"},"_id":"591f17b021d2ff0f00cf5a4e","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-21T16:33:55.944Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":18,"body":"#Prerequisites\nYou’ll need to generate and download a public key from DevMate Dashboard before you can start the integration of DevMate Update. Follow the instructions below to get a public key:\n1. Open your DevMate account and choose Settings > DevMateKit in the left-side pane.\n2. Disclose the Updates Delivery section, choose “DevMate key pair” and then click Download Key for <ApplicationName>.\n3. Open the downloaded file in any text editor and use its content as `PublickDSAKey`.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4d69907-11.png\",\n        \"11.png\",\n        1012,\n        518,\n        \"#dde3e4\"\n      ],\n      \"caption\": \"Getting PublickDSAKey\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE\",\n  \"body\": \"A unique `PublickDSAKey` key is also provided by DevMate's Add Application wizard on the Update configuration step.\"\n}\n[/block]\n#Adding the Feedback functionality\n1. Take the steps described in [Integrate DevMateKit](doc:integrate-devmatekit) if you haven't done it yet.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE\",\n  \"body\": \"You must specify `PublickDSAKey` to enable the Updates functionality. Your unique key is provided by DevMate's Add Application wizard (available from your DevMate account).\"\n}\n[/block]\n2. You can specify additional `DMFrameworkSettings` properties if needed. DevMate Update provides the following configuration options:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`IsBeta`\",\n    \"1-0\": \"`ApplicationIcon`\",\n    \"2-0\": \"`ActionBeforeStartUpdater`\",\n    \"3-0\": \"`CheckForBetaUpdates`\",\n    \"4-0\": \"`CheckForTestUpdates`\",\n    \"5-0\": \"`CheckForUpdatesAutomatically`\",\n    \"6-0\": \"`UpdateArguments`\",\n    \"0-1\": \"bool\",\n    \"1-1\": \"string\",\n    \"2-1\": \"Action\",\n    \"3-1\": \"bool\",\n    \"4-1\": \"bool\",\n    \"5-1\": \"bool\",\n    \"6-1\": \"string\",\n    \"0-2\": \"Specifies whether a current version of the application is Beta.\",\n    \"1-2\": \"Sets a “TitleBar” icon for DevMate Framework windows. Must contain at least one 16x16pt icon. Example: *pack://application:,,,/TestApp;component/icon.ico*.\",\n    \"2-2\": \"Method that is ran right after Updater.exe is started. Can be used for closing the application.\",\n    \"3-2\": \"If set to “true”, offers to download a beta version of the application.\",\n    \"4-2\": \"If set to “true”, offers to download a test version of the application.\",\n    \"5-2\": \"Enables automatic check for updates availability. For more information, read [Configuring Updates API](https://docs.devmate.com/docs/add-update#section-configuring-update-api) (below).\",\n    \"6-2\": \"Used to add command line arguments when Updater.exe is run.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\nFor example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DMUpdatesFrameworkSettings.UpdateArguments = \\\"/silent\\\";\\nDMUpdatesFrameworkSettings.CheckForBetaUpdates = true;\\nDMUpdatesFrameworkSettings.CheckForTestUpdates = false;\\nDMUpdatesFrameworkSettings.CheckForUpdatesAutomatically = true;\\nDMUpdatesFrameworkSettings.ActionBeforeStartUpdater = () => App.Current.Shutdown();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n##Configuring Update API\nUse the following code snippet to open the Check for Updates window:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DMUpdatesWindow window = new DMUpdatesWindow(); \\nwindow.BigIconSource = new BitmapImage(new Uri(\\\"pack://application:,,,/Images/icon.png\\\")); \\nwindow.ShowDialog();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\nUse the following code snippet to open the Auto Update Checker window:\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE\",\n  \"body\": \"Checking for updates can be performed if a user selects the “AutoUpdate” option (if `CheckForUpdatesAutomatically` property is set to “true”).\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var updatesFramework = new UpdatesFramework();\\nupdatesFramework.AutoCheckUpdate(App.Current.Dispatcher, RunUpdateWindow);\\nprivate void RunUpdateWindow(XMLRss xmlRss) \\n{\\t\\t\\t\\t\\n\\tDMUpdatesWindow window = new DMUpdatesWindow(xmlRss)\\n\\twindow.BigIconSource = new BitmapImage(new\\n\\tUri(“pack://application:,,,/Images/icon.png\\\"));\\n\\twindow.ShowDialog();\\n}\\n\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"You must use 128x128pt icon for the `BigIconSource` property.\\nRead [Upload an App to DevMate](doc:upload-an-app-to-devmate) to find out more.\",\n  \"title\": \"NOTE\"\n}\n[/block]","excerpt":"","slug":"add-update","type":"basic","title":"Configure Updates"}
#Prerequisites You’ll need to generate and download a public key from DevMate Dashboard before you can start the integration of DevMate Update. Follow the instructions below to get a public key: 1. Open your DevMate account and choose Settings > DevMateKit in the left-side pane. 2. Disclose the Updates Delivery section, choose “DevMate key pair” and then click Download Key for <ApplicationName>. 3. Open the downloaded file in any text editor and use its content as `PublickDSAKey`. [block:image] { "images": [ { "image": [ "https://files.readme.io/4d69907-11.png", "11.png", 1012, 518, "#dde3e4" ], "caption": "Getting PublickDSAKey" } ] } [/block] [block:callout] { "type": "info", "title": "NOTE", "body": "A unique `PublickDSAKey` key is also provided by DevMate's Add Application wizard on the Update configuration step." } [/block] #Adding the Feedback functionality 1. Take the steps described in [Integrate DevMateKit](doc:integrate-devmatekit) if you haven't done it yet. [block:callout] { "type": "info", "title": "NOTE", "body": "You must specify `PublickDSAKey` to enable the Updates functionality. Your unique key is provided by DevMate's Add Application wizard (available from your DevMate account)." } [/block] 2. You can specify additional `DMFrameworkSettings` properties if needed. DevMate Update provides the following configuration options: [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "h-2": "Description", "0-0": "`IsBeta`", "1-0": "`ApplicationIcon`", "2-0": "`ActionBeforeStartUpdater`", "3-0": "`CheckForBetaUpdates`", "4-0": "`CheckForTestUpdates`", "5-0": "`CheckForUpdatesAutomatically`", "6-0": "`UpdateArguments`", "0-1": "bool", "1-1": "string", "2-1": "Action", "3-1": "bool", "4-1": "bool", "5-1": "bool", "6-1": "string", "0-2": "Specifies whether a current version of the application is Beta.", "1-2": "Sets a “TitleBar” icon for DevMate Framework windows. Must contain at least one 16x16pt icon. Example: *pack://application:,,,/TestApp;component/icon.ico*.", "2-2": "Method that is ran right after Updater.exe is started. Can be used for closing the application.", "3-2": "If set to “true”, offers to download a beta version of the application.", "4-2": "If set to “true”, offers to download a test version of the application.", "5-2": "Enables automatic check for updates availability. For more information, read [Configuring Updates API](https://docs.devmate.com/docs/add-update#section-configuring-update-api) (below).", "6-2": "Used to add command line arguments when Updater.exe is run." }, "cols": 3, "rows": 7 } [/block] For example: [block:code] { "codes": [ { "code": "DMUpdatesFrameworkSettings.UpdateArguments = \"/silent\";\nDMUpdatesFrameworkSettings.CheckForBetaUpdates = true;\nDMUpdatesFrameworkSettings.CheckForTestUpdates = false;\nDMUpdatesFrameworkSettings.CheckForUpdatesAutomatically = true;\nDMUpdatesFrameworkSettings.ActionBeforeStartUpdater = () => App.Current.Shutdown();", "language": "csharp" } ] } [/block] ##Configuring Update API Use the following code snippet to open the Check for Updates window: [block:code] { "codes": [ { "code": "DMUpdatesWindow window = new DMUpdatesWindow(); \nwindow.BigIconSource = new BitmapImage(new Uri(\"pack://application:,,,/Images/icon.png\")); \nwindow.ShowDialog();", "language": "csharp" } ] } [/block] Use the following code snippet to open the Auto Update Checker window: [block:callout] { "type": "info", "title": "NOTE", "body": "Checking for updates can be performed if a user selects the “AutoUpdate” option (if `CheckForUpdatesAutomatically` property is set to “true”)." } [/block] [block:code] { "codes": [ { "code": "var updatesFramework = new UpdatesFramework();\nupdatesFramework.AutoCheckUpdate(App.Current.Dispatcher, RunUpdateWindow);\nprivate void RunUpdateWindow(XMLRss xmlRss) \n{\t\t\t\t\n\tDMUpdatesWindow window = new DMUpdatesWindow(xmlRss)\n\twindow.BigIconSource = new BitmapImage(new\n\tUri(“pack://application:,,,/Images/icon.png\"));\n\twindow.ShowDialog();\n}\n", "language": "csharp" } ] } [/block] [block:callout] { "type": "info", "body": "You must use 128x128pt icon for the `BigIconSource` property.\nRead [Upload an App to DevMate](doc:upload-an-app-to-devmate) to find out more.", "title": "NOTE" } [/block]