how can I package resource files in a winrt app - windows

What is the best approach to deploy "Resource" files within a WinRT app - Windows Store app? I am working on an app that will use a number of html and css template files to generate multiple reports.
How would I go about packaging these files (potentially within folders) to be deployed with the windows store app?
Ideally I would like to specify folders with the CSS files and Images that can be copied to an app directory during installation so I can reference them in the subsequent reports, but with permission issues in store apps I would be OK even if these could be deployed to the pictures folder or some other accessible location
I tried the assets group in visual studio 2019 but that only allows individual files to be included and I would have to programmatically extract them which seems pretty kludgy.
some additional details
UWP app using winRT/CPP
On the device (primarily surface tablet) I would like a folder hierarchy of appReports/css, appReports/img, appReports/fonts
I would prefer to create these subfolders within the Pictures folder so that the users can easily find the reports
I would be using MSIX as the deployment strategy
If I was to bundle the template files into assets tree - I would need to do the following steps
a. create the subdirectories css, img and fonts within Pictures from the app
b. copy the template files to the respective folders
My thought was that there might be an easier way to do this external to the app since this is really only a one time setup situation

Related

How to create files in working folder on Windows 10 UWP

We have a Universal Windows 10 Platform (UWP) application containing an unmodifiable C library which creates web files in its working folder. These web files are then loaded by the WebView object for display. This architecture is working fine on other platforms, but it fails on UWP due to a lack of write access to the working folder. Apparently in a UWP app the working folder has special ACL protections which prevent creating files. Is there a way to create a UWP app which is permitted to create new files in its own working folder?
Note, we have tried using a different folder but in those cases the WebView object either will not load a file at all or does not load associated xsl, css, etc files. Very frustrating.
Cheers, Bill :-)
There is no way to write to the installation folder. This is by design to ensure seamless differential updates and clean uninstall of apps.
Have you tried setting the current working directory (to local appdata for example) before using the component?
Thanks,
Stefan Wick - Windows Developer Platform

How to deploy multiple shiny apps at the same time?

I've have multiple subdirectories containing some Shiny apps.
Here is the directory structure :
/Documents/shinyapps/app1/ui.R
/Documents/shinyapps/app1/Server.R
/Documents/shinyapps/app2/ui.R
/Documents/shinyapps/app2/Server.R
It looks like it's not possible to deploy multiple shiny apps at the same time using RStudio. I'm using Rstudio: Version 1.0.44
I've tried with this structure as well but app2 is not found:
Documents/shinyapps/app1/ui.R
/Documents/shinyapps/app1/Server.R
/Documents/shinyapps/app1/app2/ui.R
/Documents/shinyapps/app1/app2/Server.R
Maybe try using shiny server.
You can download shiny server and install it in your Linux machine.
Then you can go to the deployment folder (which is usually /srv/shiny-server but can be changed in the config files).
You can either:
create a directory structure in the folder and refer to each app with the different file paths.
Or:
Create an index.html file and arrange your shiny apps to fit in a custom made landing page of your liking. The easiest way is to use iframes.

How to associate file during folder copy on Mac OS X

I involved with the development of an application that is intended to deploy on multiple desktop system including the Macintosh.
Our team decided we would like to a drag and drop installation for the Macintosh. However, the application is intended to ship with other content besides the application itself such as example files.
Originally these files were placed in the application bundle, however this was discovered to be problematic as the cross platform libraries used for the user interface will not allow someone to access the contents in the bundle. Also force users to have to dive into a bundle to find content does not offer a great user experience.
To that end, we decided to pull these examples file and what not out of the bundle and place them in a separated folder that lived along side the application bundle. To make sure everything including the examples and the application were copied together during the drag and drop installation, a new top level folder was created that contained everything to be copied.
The problem that now exists is that whereby when originally just the application bundle was copied over to the system, the copying of this top level folder does not cause file associations for the application to occur automatically.
What can be done to associate an application with certain files when someone installs by dragging a folder contain the application bundle?
I suggest you to deliver it separately in one dmg. So your dmg structure will look like next:
MyApp -> Applications
MyApp Examples -> Application Support
Simple, user-friendly, no problems with association.
Actually it looks like the file association is working after all. Someone reported a defect against the installation not making the associations. However, I just tested the installation on a clean system and copying over the folder does seem to make the associations.

TFS 2010 Build Automation for a Web Site: Delete a file in the publish folder after build

We are trying to adapt a build automation strategy for our ASP.NET web site (not a web project) in vs 2010 ultimate & tfs 2010.
Build definition makes the build and publishes the web site into folders like
<drop_folder>\<defn_name>\<defn_name>_<year><month><day>.<build no>\Release_PublishedWebsites
Now we try to delete particular files and folders from that folder. For instance the "images" or "files" folders, that we need to exclude before packaging. I know that if it were a web project, there exists a straightforward solution. We also tried to modify the build process template (xaml) file. There is a "DeleteDirectory" component but we couldn't figure out what to write to the Directory variable.
Thank you.
If you follow the XAML way, you would just have to feed the Directory argument of DeleteDirectory with the physical UNC path to the folder you 're trying to get rid of.Something along the lines of String.Format("{0}\\{1}\\{2}\\Release_PublishedWebsites", BuildDetail.DropLocation, BuildDetail.BuildNumber, Date.Now.Year)
should get you near to your target. Since the drop location of the build might be on a different machine, also ensure that the account conducting the build (by default = NetworkService) has the rights to delete folders on the target.

how do I package support files in a cocoa app

I'm building an application where I want to provide the user with a few dozen templates that will internally take the form of property lists. I would also want to group them in categories, which would conveniently be achieved using folders.
While I have contemplated shipping these files as simple resources in my application, I don't like the idea of this single location containing dozens and dozens of files, and besides it doesn't seem to be possible to group them in folders.
I can see that many applications have installed such resources in their application support directory (~/Library/Application Support//...), but I can't seem to find any documentation resource on how to achieve this.
I don't like the idea of this single location containing dozens and dozens of files, and besides it doesn't seem to be possible to group them in folders.
It is. Put them in folders in your project directory, then add the top-level folder(s) to your project. Make sure you add it/them as folder reference(s) and not group(s) (see? that sheet does have a purpose!).
Then, add the folder reference(s) to your Copy Bundle Resources or Copy Files phase.
One word of warning: When you change one of the files in the folder, you may need to “touch” the folder to get Xcode to re-copy it. You can do this in Xcode or from the terminal.
You can group items in sub-folders of your app bundle's Resources directory. Unless you want users to edit these plists, keeping them in your app bundle allows users to drag-n-drop install your app, rather than having to use an installer package (a big win).
You can group them into folders in your application bundle by adding a "New Copy Files Build Phase" to your project as described in this forum post:
http://forums.macrumors.com/showthread.php?t=458594

Resources