How to deploy multiple shiny apps at the same time? - rstudio

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.

Related

how can I package resource files in a winrt app

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

Where do resource files go when developing Mac apps?

I'm new to developing Mac OSX apps via Delphi (Berlin) and don't know where to put resource files. In Windows I can write ImageControl1.LoadFromFile('aFile.png'); and know that's referencing the directory where my executable is located. Or I can do something like make and reference the path to a separate directory where I'm putting resources.
But I don't know where to put resources or how their paths work when developing on a Windows machine for an app that'll be compiled and run on a Mac. I tried putting an image file in the Delphi project's OSX subdirectory as well as entering a complete path, i.e., LoadFromFile('path/goes/here'). I also tried using forward and backward slashes in the path name expression. In each case I got an error (when compiling for Mac, not Windows). I'm sort of thinking the files should live on the Mac somewhere...but I'm lost.
I'm hoping someone could tell me where to put these kinds of resource files, or how to properly reference them, when developing Mac apps on a Windows machine (or, alternatively, a good reference or two that'll explain it to me ... I looked online but couldn't find an answer).
There's some info about the structure of macOS app bundles, here:
https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19
In the Delphi Deployment Manager, resources can be deployed to a remote path of:
Contents\Resources\
And subfolders thereof. The following code should return the root of the .app package:
NSStrToStr(TNSBundle.Wrap(TNSBundle.OCClass.mainBundle).bundlePath)
Add /Contents/Resources (and applicable subfolders) to that path, and you can load the deployed files from there

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.

How do I use symbolic links with Xcode 4 and Cordova

I'm unable to get Xcode to copy over www resources to my PhoneGap based iPhone app. I considered using Git submodules, but since the app has to work on different platforms (iPhone, Android, etc) and has to be branded differently (images, css, and small changes to some files), it does not solve the complete problem.
I ended with a solution where I created an external core www folder and created symlinks for every file from the different projects. If a file needed special attention on a platform or for a branding requirement, then I could simply replace that instance of a symlink with an actual file.
This all would work like a charm, but for some reason Xcode for does not copy the symlinked resources over to the phone. Does anyone have any idea how to make this work? Or a solid alternative. Even if this takes me a day to fix.
Thanks.
This solution worked perfectly to pull in the symlinks on build. Using this method you can build Phonegap solutions for all platforms and have them branded differently with the absolute minimum code duplication.
In short, create a common directory that contains all your phonegap www contents, and then symlink this from your different projects (platform differences or branding differences). For building on Xcode, add the following to your project's run script:
rsync -pvtrlL --cvs-exclude \
$PROJECT_DIR/../Resources* \
$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH
Note: You also need to dereference symlinks if you build for BlackBerry.
I just want to say that using symbolic links shouldn't be necessary. You can simply drop the folder into xcode, and DO NOT copy the files.
In my case, my shared folder was called "mobile", so I did have to create this run script:
mv $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/mobile $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/www
This simply renames the directory so Cordova can find what it's looking for.

Mac OS X - How to store web projects in a location other than /Library

Google turns up nothing but very basic set up of web servers on the Mac. I've got that.
I build web projects locally on a Mac using PHP/MySQL. I store the sites in /Library/WebServer/Documents then access them via browsers with http://localhost.
This works fine.
What I would like to do is to be able to place symlinks or aliases of projects into the /WebServer/Documents folder and access sites on other (local) drives. I don't want to have to store everything in the Library folder. However, it seems that symlinks don't work. The only way a project functions is if all it's files are located in the /Library folder - no symlinks.
I realize I can change the root path for the web server in the http.conf file but I don't want to actually change the server path, I merely want to use symlinks if possible. I also realize I could use something like MAMP, but things run fine with my traditional set up (and I prefer to avoid MAMP since it's not always real-world). Main motivation here is that I don't want to store files on the boot volume, where there Library folder is located.
Can I use symlinks for directories with Mac OS10.6.8/Apache? if so how, please?
Thanks!
Solved via this article at Apple:
http://support.apple.com/kb/TA21182?viewlocale=en_US
One must specifically create a symbolic link. Which, it appears, is not the same as an Alias on the Mac OS.
But this isn't feature of MAMP application, this is about web server. Make it through MAMP and go see what is new in apache config files (httpd.conf, vhost.conf).
you have to use symlinks instead of an alias... sad there is no ui for that!
you have to go into the Terminal and type:
ln -s /ORIGINALPATH /LINKEDPATH
the first PATH is the base path of the original file and the second is for the base path for the symlink of the file/folder etc

Resources