Use SBT to download / use file from URL - sbt

My goal is simple: download an external file at build-time and include it in an SBT-packaged artifact.
I have been looking or a way to fetch data based on a URL and use the local File as the source in a Univeral / mapping (see sbt-native-packager Universal plugin).
Is it possible to make SBT (1.x) do this natively at all?

Related

Qt way to get libraries path

I have several QPlugins (shared objects) that I install {CMAKE_PREFIX}/lib/<appname>, how can I find out this path at runtime to load the plugins? Note that the CMAKE_PREFIX user user settable.
If these plugins are part of your application project and you are looking for a build time answer, you can generate a config.h file containing that path.
You can use CMake's configure_file command for that.

Xamarin (Forms): how to download and use an SQLite DB file

my client has a simple SQLite DB exposed through an URL (direct download of the DB entire file).
What I have to do is to download the file and then use it in my app: Android and iOS.
I am already able to use the same DB locally: I have a copy of the same file that is online (not updated) in my assets and resource folders and I can use the data in it inside my app. The DB structure won't change; the file is updated every night to reflect the changes in their DB, so only record updates/additions/removals.
Anyone can give me any advice on how to achieve this result?
Since you already have a url of this data file, then you need to separately download this file and save it to local on each platform, and use DependencyService to call the method of each platform in your portable lib.
For the example of using DependencyService, you can refer to Saving and Loading Files.
For the downloading part, you can use some plugins for example like CrossDownloadManager, which may make your work easier.
Or if you want to complement this work in your PCL, you can add a System.Net.Http reference in your PCL, then use HttpClient to download your database file, but you still need to use DependencyService to save this file on different platforms.

How to use a license with JWrapper

So I have been working with the free version of JWrapper for some time now and have been quite pleased with the results; however, I have now purchased a license and would like to use it but I am unable to find the method with which to activate my JWrapper. I do not use the graphical interface version of JWrapper; rather I have created a xml installation file and pass that directly via commandline to JWrapper for building. Is there a special xml tag for specifying the license location? I was unable to find this information on JWrapper's homepage or support docs.
I received an answer from the support team. In order to use the license without using the JWrapperApp gui to build your application you will simply have to have the jwlicense.txt file in the same directory as your jwrapper.jar
After some tests it appears that the jwlicence.txt file must be in the current directory. So the best is to have all the files (jwrapper jar, jwrapper.xml and jwlicence.txt) in the same folder and run the compiler from that folder.

how to make meteor ignore files in a Package?

I have a package which includes a file that gets frequently rebuilt. This causes meteor to restart each time that file is edited.
There are ways to get meteor to ignore files within the main app, eg putting inside a .directory but is there a way to do this within a package?
The catch is that I DO need the final file to be included for deployment, so it has to be named - as an asset - and included in the package addFiles.
The only solution I have so far is to host the asset external to the meteor app and load it in via http or something on each cold start, but that's a bit fragile.
As of Meteor v1.5.2.1, there is support for a .meteorignore file. It behaves the same as a .gitignore. Have you tried using it?
You can use them in any directory of your project and are fully integrated with the file watching system.

Is it possible to do an out-of-source build with bjam?

Due to quota restrictions I really need to build a project that I'm working on with all of the temporary files and build products in a separate directory (in my case /tmp/somewhere).
I'm used to doing this with CMake, is it possible with bjam, if so, how?
Yes you can. In your project declaration you can specify the build-dir location to anything you like instead of the default local bin.v2 location (see projects).

Resources