I'm currently building an app with some binary files (jpeg, mp3 ...).
When I upload my app on the gateway system, the binaries are uploaded in a "MIMES" folder.
How can I access those files from SAPUI5 ?
I placed all my binaries (PNG images in my case) into a separate folder /png under webapp folder in Web IDE and in controller onInit event I calculate the path like this ("hcm.myleaverequest.ESSLeaveReqExt" is my app id):
this._sPNGpath = $.sap.getModulePath("hcm.myleaverequest.ESSLeaveReqExt", "/png");
and also store this path in a local JSON model ViewSettings to make it possible use it in binding expressions. Something like this:
icon="{ViewSettings>/PNGPath}/mylogo.png"
Such an arrangement works fine for me after deploying to the SAP gateway.
Update for MP3 files:
It appears Web IDE can't import MP3 file as binary, it always formats it thinking it's a text file. However, if you change the file extension to png you can load the file into a project folder. After that you can play the file by standard tag using sap.ui.core.HTML control:
<core:HTML content='<audio controls><source src="{ViewSettings>/PNGPath}/old_telephone_ringing_copy.png" type="audio/mpeg"></audio>'>
Most probably it would work after deployment (I didn't try it though)
Related
I am working through how to automate the build and deploy of my Service Fabric app. Currently I'm working on the package step and while it is creating files within the pkg subfolder it is always creating a folder hierarchy of files, not a true package in a single file. I would swear I've seem a .SFPKG file (or something similarly named) that has everything in one file (a zip maybe?). Is there some way to to create such a file with msbuild?
Here's the command line I'm using currently:
msbuild myservice.sfproj "/p:Configuration=Dev;Platform=AnyCPU" /t:Package /consoleloggerparameters:verbosity=minimal /maxcpucount
I'm concerned about not having a single file because it seems inefficient in sending a new package up to my clusters, and it's harder for me to manage a bunch of files on a build automation server.
I believe you read about the .sfpkg at
https://azure.microsoft.com/documentation/articles/service-fabric-get-started-with-a-local-cluster
Note that internally we do not yet support provisioning a .sfpkg file. This is a feature that will be coming in soon (date TBD). Instead, we upload each file in the application package.
Update (SF 6.1 - April 2018)
Since 6.1 it is possible to create a ZIP file (*.sfpkg) and upload it to an external store. Service Fabric executes a GET operation to download the sfpkg application package. For more infos see https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-package-apps#create-an-sfpkg
NOTE: This only works with external provisioning, the Azure image store still doesn't support sfpkg files.
I am building an app for windows store and I need some default and example data to be in the localstate folder (Windows.Storage.ApplicationData.current.localFolder) when the app run the first time.
The folder and files structure is a bit complex and I tryed to copy the files at the start of the application, but I can't manage that way.
Is it possible to have files being copied automatically from the installation folder to the localstate folder during the store app installation?
Unfortunately, customization of the app install process isn't currently supported. You have to do this as part of your first run processing.
One possibility is that you include the data in your package as a .ZIP or other compressed file and use an appropriate library to expand that file into a folder structure on startup. That could simplify your logic considerably. (I don't have a library to recommend; it's just an idea.)
I am writing a number of Google Packaged Apps which run independently, but share lots of code. For example, they all use "library.js". I would like to have only one copy of library.js so any changes to it will be used by all newly packed apps.
To package my apps, it seems they all must have a copy of library.js in their own directory structure, whereas it would be nice to have a single master copy in some other directory that is accessible to all. I currently do a manual check to make sure all files are up-to-date before packing, and I am writing some code to do the check automatically, but it seems like a work-around.
Can a Google Packaged App use JS code in external library directories, or must all code be under the root directory of the app (i.e., requiring copying from external directory) when packing?
Have you tried providing a URL i.e. host the javscript file in .js format to an accessible location to your apps and then provide the .js file URL in all your apps code. The very next time you want to change, all you have to do is to update that .js file.
I've been working on a mobile game in Unity for over a month, saving all my work to OneDrive. Today I restarted my computer and when it loaded back up I tried opening my project and it failed. I looked through my OneDrive and half my files are missing! I've been on the phone with Microsoft support all day and I can't get those files back.
I have the apk file for the game loaded onto my phone. Is there anyway to reverse build this thing back onto Unity or just get the files back from the apk file ?
If by APK you mean Android's APK file you can just 'unzip' it and get at least you xml files and other resources such as images. All classes will be packed to classes.dex file, which can be converted to Java's JAR by dex2jar tool. However JAR will give you only Java's binaries. You could further de-compile them to Java files, but they are not going to look pretty or very readable.
Well, at least you can recover you XML layouts.
Are the files in your recycle bin on the OneDrive website or locally? Often times when OneDrive files go missing they can be found there.
I am looking to use click once to deploy an application for internal use, When publishing to the network share it creates several files and folders. (manifest, ApplicationFiles etc)
Is there a way to bundle this up as a single file, I do not fancy the idea of allowing other users access to the application Files folder that is created, I would rather just give them the exe and have it take care of everything else.
Does anyone have experience with this, or am I stuck with the application Folder, Application Manifest, and setup file all being in the same directory for installation.
There is not a way to package the whole application folder and files into one file, like an MSI with ClickOnce.
You could code something on your own to have a shell app that use ClickOnce and its only file would be your app compressed. The shell would download that compressed file to the client's machine and would unzip etc.
You could also InstallShield Limited Edition that comes with VS 2012/2013 in the Other Projects, Setup and Deployment but that does give you the ClickOnce easy of deployment features. You could use the InstallShield setup to be your compress file in your shell clickonce app and then just use Process.Start to launch the InstallShield setup. It should work.