Windows store app update - windows-store-apps

Is windows store(windows 10) allow only delta update or we can update in some other way?If we have an app in windows store(windows 10) and I downloaded it in my machine.After some time update is available for that app and i have updated the app.Now, I want to verify weather it follow delta update or it replaces the entire application with the new one. How can i verify it?

Is windows store(windows 10) allow only delta update or we can update
in some other way?
You can select Generate app bundle always or if needed when creating app packages to implement delta update. App bundle uses a different manifest to contain the resources packages. Thus with app bundle, users only download the relevant files, rather than all possible resources, especially when your app includes language-specific assets.
To make users download the whole package, you can choose Generate app bundle never. But please note once your app is published as appxbundle, you cannot go back to non-appxbundle format. This time you can try method in this article to ensure your resources will surely be installed on the users' devices, which is for Windows 8.1 but still works to UWP app.
And since the version 1607, we can use the API in Windows.Services.Store to programmatically check for package updates for the current app, download and installed the updated packages.
Now, I want to verify weather it follow delta update or it replaces
the entire application with the new one. How can i verify it?
Firstly, your package need to contain the language-specific assets or a variety of image-scale assets, making sure to include the language not supported by your device or image-scale not equipped with your device. You need to generate an app bundle while creating package. After downloading the update, you can check if your local package contains the resource package not needed.

Apart from choosing the right languages, image sizes from the App Bundle as mentioned by Mattew Wu, UWP supports delta updates (or differential updates) automatically. Check out more in this blog post in MSDN blogs.
A "AppxBlockMap.xml" is automatically created at the time of packaging, which is
an XML document that contains a two dimensional list of information about files in the package. The first dimension lays out high level details on the file (e.g. name and size) and the second dimension provides SHA2-256 hash representations of each 64KB slice of that file (aka the “block”).
So, the Store update compares this file from both the packages and downloads only the required parts.
I don't think you will be able to check the size of the delta package that will be downloaded, but there are a few methods that you can follow to make sure that your app supports delta updates
Keep files in the package small – doing this will ensure that if a change is needed that would impact the full file, the update would still be small.
Modifications to files should be additive if possible – additive changes will ensure that end-user devices only download those changed blocks.
Modifications to files should be contained to 64KB blocks if possible – if your app does have large files and requires changes to the middle of a file, containing changes to a set of blocks will go a long way
Refer the aforementioned blog post for more detailed explanation.

Related

How to view big h5p files

As I understand, h5p cannot be viewed on a local device, e.g. in offline mode (I'm aware of h5p-standalone but it requires setting up a local webserver)
and viewing requires a webserver that supports h5p, e.g. via WordPress plugin.
Assuming that I have a large h5p file (e.g. 1G Byte) with many images.
Does this large file needs to be uploaded first to the server?
Thanks
If you want to run H5P files, you will always have to have some form of runtime environment. That can be (PHP) based like the ones that you already mentioned, but there's also a node.js port of H5P core than can be used. That port is also the foundation of the editor/player named Lumi. It uses Electron to edit/play H5P files locally on Windows, MacOS and Linux. So the H5P file will not have to be provided on a webserver to run.
You can also use Lumi (or its functions) to convert H5P files into single HTML files that contain all the code and the stylesheets to run, also media (base64 encoded). Of course, that approach tends to generate large files and you have a lot of redundancy as all dependecies that are required to rum will be inside every single HTML file instead of being loaded as needed - but you can run that file in a browser either from a server or locally without the need for a webserver.

Workflow for User Secrets in .netcore?

I'm playing around in .netcore and attempting to make use of the user secret store, some details are here: https://docs.asp.net/en/latest/security/app-secrets.html
I'm getting along with it well enough when working locally, but I'm having trouble understanding how this could be utilized effectively in a team environment, and if I wanted to work on this project from more than one computer.
The store itself (at least by default) keeps its configuration json file within the users/appdata (on windows). This feature is good to use if you're uploading the project to github, to hide your API keys, connection strings etc. This is all great when it's just me, on one machine working on a project. But how does this work when working in a team environment, or on multiple machines? The only thing I can think of is to find the configuration file, check it into a private repo, and make sure to replace it in the correct directory when changes occur.
Is there another way to manage this that I'm not aware of?
As you already know, the Secret Manager tool is providing another method to avoid checking sensitive data into source control by adding this layer of control.
So, where should we store sensitive configuration instead? The location should obviously be separate from your source code and, more importantly, secure. It could be in a separate private repository, protected fileshare, document management system, etc.
Rather than finding and sharing the exact configuration file, however, I would suggest keeping a script (e.g. .bat file) that you would run on each machine to set your secrets. For example:
dotnet user-secrets set MySecret1 ValueOfMySecret1 --project c:\work\WebApp1
dotnet user-secrets set MySecret2 ValueOfMySecret2 --project c:\work\WebApp1
This would be more portable between machines and avoid the hassle of knowing where to find and copy the config files themselves.
Also, for these settings, consider whether you need them to be the same across all developers in your team. For local development, I would normally want to have control to install, use, and name resources differently than others in my team. Of course, this depends on your situation and preferences, and I see reasons to share them too.

Using a web browser read system time, display data and write configuration data from a USB Mass storage class

I've an embedded system which runs firmware and has USB mass storage with size 79kB. So when you plug in the device to any computer(MAC/Windows), it pops as a 79kB flash drive. The firmware creates files which has transaction records. The objective is to display these transactions (tables and simple graphs) to the user. I've narrowed down to a web browser. So the user (with MAC/Windows PC) can plug in the USB device mass storage and open an HTML file in the mass storage drive and view all the transactions in the form of tables and simple bar graphs. The tricky part comes here: the device(firmware) needs to update it's clock, and this time input has to be sourced from the MAC/Windows PC. How can this be achieved?
This is the minimum requirement. Further, through the web browser the user wants to write some configuration parameters for e.g. through a text box and a submit button in the HTML page.
NOTE: Here the device has USB mass storage type and the web browser approach were selected so that there is no prerequisites for the user.
Please suggest an alternative if this can be done using another approach for e.g. a different class of USB or some other application locally available on MAC/Windows desktop/laptop. For e.g. the application should run on both on Mac and Windows i.e. the code should be the same but can be built into separate packages one for Mac and the other (.exe) for Windows. Please suggest a platform for this that has same source but can be built for both mac and windows. Thanks!
As far as I know, there is no way a web browser could write to a file. If such a thing was possible, it would be a huge security issue.
You have to write a piece of native software to do all the tasks you name. That can be done in pretty much any programming language, and if you're developing embedded systems I reckon you must have some experience in programming.
I'm looking at doing something similar and have an idea, though you may be better equipped to run with it than I am. Have the define contain a directory called "SET_DATE" with files "YEAR15" through "YEAR99", "MON01" through "MON12", "DATE01" through "DATE31", "H00" through "H23", "M00" through "M59", "S00" through "S59", and "SET"; each such file should start at a different sector, though none of the sectors in question need to contain any data (they need not physically be stored anywhere). To set the date to July 4, 2020 at 12:34:56pm, read the following files in sequence:
SET_DATE/YEAR20
SET_DATE/MONTH07
SET_DATE/DATE04
SET_DATE/H12
SET_DATE/M34
SET_DATE/S56
SET_DATE/SET
The last access should cause the unit to set its clock. If a user might want to set the clock more than once, that could be accommodated by either having a bunch of essentially-identical directories under SET_DATE (so setting the date the first time would use SET_DATE/00/YEAR20, the second time SET_DATE/01/YEAR20, etc.) and/or having the drive unmount/remount itself if necessary to clear out any caching.
I would think it unwise to have directory fetches trigger actions, since Windows or an anti-virus tool might decide to pre-cache all the directories in a drive when it is mounted. I would not expect Windows or a browser to eagerly load files, however, so I would think one could have read accesses trigger actions.

Do ApplicationData.localSettings get cleared when the app gets updated?

I'm working on modern Windows 8 app and wanted to figure out if Windows.Storage.ApplicationData.current.localSettings (msdn doc is here) get cleaned up when the app gets updated by the store.
Those settings are preserved across app updates, as are the roamingSettings and the contents of localFolder, roamingFolder, and tempFolder. In other words, performing an app update does not affect any of the appdata state, which makes perfect sense when you consider that many updates are minor bug fixes and should not in the least way require resetting or migrating existing state.
Do note that uninstalling an app and then reinstalling it will clean out localSettings, localFolder, and tempFolder. roamingSettings and roamingFolder will be restored provided that the user has had the app installed on another device within some reasonable period of time (unspecified, but something like 30 days).
It's also good to know that app state has its own versioning scheme through ApplicationData.setVersionAsync, and that an app update can choose, if it wants to migrate appdata from one version to another. Examples can be found in the Application Data sample.
No, your local settings will persist between app updates.

How to change Sublime Text Packages directory location?

I would like to change the Packages directory location or add a new one (to be on network drive.)
I can't use the symlink.
I had a look on the plugins, but can't find.
I am on Windows Vista, Windows 8 (soon.)
Thank you for your help.
Christophe
If a moderator could please turn this post into a comment, because it is only a potential workaround to the issue (rather than a complete solution).
Using an OSX operating system, I am automatically backing-up (to Dropbox with a symlink) the entire SublimeText2 folder and subfolders within the application support directory. Inasmuch as Dropbox works on different platforms, perhaps this will give the original poster some ideas to have multiple computers using the same Packages data. I am successfully using this method to automatically synchronize all three (3) of my computers -- i.e., if anything changes on one computer in the Packages directory or subdirectories, then all computers are automatically synchronized.
Of course, back up your data on each computer before trying out this method.