Universal .so file generation for all android studio projects - android-studio

I know this question is there a lot on this platform, however, what I am looking for is the way for which I can generate .so files one time and can utilize them in all projects whenever I need them without any modification. is that possible?
If it is possible then what things need to be done?

Related

When using someone else's application code do I need to run Cmake to get the project structure for my operating system.

I am getting into a position where I have to use other people code for projects, for example openTLD. I want to change some of the code to give it more functionality and use it in a diffrent way. What I have found is that many people have packaged their files in such a way that you are supposed to use
cmake
and then
make
and sometimes after that
make install
I don't want to install the software on my system. What I am looking to do is get these peoples code to a point where I can add to it in Eclipse or even just using Nano and then compile it.
At what point is the code in a workable/usable state. Can I use it after doing cmake or do I need to also call make? Is my thinking correct that it would be better to edit the code after calling cmake as opposed to before? I am not going to want my finished code to be cross platform supported, it will only be on Linux. Is it easer to learn cmake and edit the code befor running cmake as opposed to not learning cmake and using the code afterwards, if that is possible?
You question is a little open ended.
Looking at the opentld project, there is a binary and a library available for use. If you are interested in using the binary in your code, you need to download the executables(Linux executables are not posted). If you are planning to use the library, you have two options. Either you use the pre-built library or build it during your build process. You would include the header files in your custom application and link with the library.
If you add more details, probably others can pitch in with new answers or refine the older ones.

I am having difficulty getting a new version of a 3rd party SDK to import into Android Studio

I am having difficulty getting a new version of a 3rd party SDK to import into Android Studio.
In the earlier version they released .jar and .so files which I copied into /lib and /jniLibs and then added the lib files into the Android Studio app and everything worked. The app ran, used the libraries and all was good in the world. Recently a new version of this SDK was released but in this new release they have resource files (but they are not compiled into the jar/so files; there is a $Rstring.class files that they say I should import. I've now spent days copying into various locations in the app project with no luck and the missing strings result in crashes when calling their SDK.
OK, I figure I'd try to import their SDK folder (which is how they document to do it if you are using Eclipse). Well, no matter what I've tried and after selecting the folder or SDK's project file I get a dialog asking for the Eclipse workspace and a list of what appears to be source file names. I can't get past this dialog because obviously I don't have their files.
Has anyone run into this and found a solution; perhaps I'm missing something in the process but after spending the better part of 3-4 days trying and searching and trying more things I'm hopeful for help from the community.
OK, I found the answer and it was a combination of issues in how this particular 3rd party distributed the SDK and not fully understanding the menu.
The 3rd party in question packaged the SDK with the output files of the build as well as files that needed to be imported making an import alone to not work.
Combine this with menu confusion: File->Import Module is NOT the same as New->Modules->Import Existing Project only added to the confusion.
The solution ended up being to use the File->Import Module which appears to be a very different operation and once done most of the issues where solved. It solved the main issues I asked above which was missing resourced.
Still missing was the library (.jar) files which had to me copied into the app's lib folder and "added as library" but the .SO files did not need to be copied and in fact doing that resulted in a duplicate files warning.
I'm not sure I can fully explain what happened but what I think happened is that the "module" was where the app read the .so and string resources from but was unable to load the .jar files because (I suspect) these files where not part of the module but rather where outputs of building the source and it was removing the source files which caused the inability of the new->Module->Import to fail.
Hopefully this makes sense or at least give someone an idea of what to look for when/if they run into a similar issue.

Cross platform installation conventions & best practices

I manage an open source project that we currently distribute as a zipped bundle of files. We provide a bundle for Windows and Mac -- we currently expect Linux users to compile it themselves.
This program comes with a bunch of auxiliary files that the user will need to access. These include example files and example/default scripts (like plugins) that the user will need to be able to easily find (preferably not searching through a maze of /usr/local/foo/examples/scripts).
The user will also have their own files (that they may want to store in random locations), but they will also have their own collection of scripts (that they probably want centralized so they are always available).
I would like to support installation in multi-user environments where the user does not have permissions to mess with the program installation. The program will include an API (shared library and header) and a Python wrapper for that too. It would be nice to make those available automatically.
We build the project with CMake - and currently use CPack to bundle the zip files. CPack has much more capability than we are currently using. This is not a mechanical question of how to build the package/installation files, but a convention question of where to put all the stuff?
We would like to have an Application on MacOS, an installer for Windows, and packages for Linux. Mac Apps package icons, fonts, images, etc. nicely, but they don't seem to support user-visible files very well.
I would love for there to be a cross-platform standard way of handling this situation, but I have trouble finding decent examples on individual platforms.
Is there anything better for us to do than just a zip of files?
Providing archive of those extra files is probably one of the best solutions. You may encourage users to download them on first start of program - let users decide where they want them themselves.

Run Monogame exe without Visual Studios

This is probably a stupid question but I am no the best with technology so I figured I might as well ask. I am working on creating a website for myself and I would like to put Monogame work on there. Is there a way I could I guess compress it all into one file for a person to download and then play it? or possibly make it playable via my website and how have them download anything?
This is my first post on her so sorry if this is not worded properly (it being 2:30 a.m. is not helping either). Thank you very much!
You cannot implement MonoGame as a game on your website. The closest you're gonna get is having it working over Local Network. And this has only been tested with XNA.
However yes, if you compile a complete version of your game and Zip it, that should work. As far as I've experienced, if you simply make sure to include MonoGame.Framework.Dll, it should work without any further requirements (apart of course from the standard ones, such as DirectX and .Net Framework in general).
You might want to test this on a clean computer (Virtual machine would also work I think). If this doesn't work, make an installer instead, using the Visual Studio Publish feature. I've never had that fail before

Using minizip in Visual C++ 2010

I've been programming for a while, but for some reason I just can't find how to do something that I know has to be simple. I want to create zip files with a small utility that does not require dlls or any other helper files. I found a few places that recommend using zlib and minizip to work with zip files. I just can't figure out HOW to use them. I've installed zlib, but I have no clue how to install or use minizip. Every thing I find assumes I already have my environment set up to use it and "all you need to do is use function X and voila!" I've been trying to find how to use external libraries, but I'm getting just as vague info that way too. Are there any books that might be a place to start looking? I'm all for educating myself, but I'm actually quite lost with where to start on this.
Checkout XZip on CodeProject: http://www.codeproject.com/KB/cpp/xzipunzip.aspx
If you don't want to have to use any DLL's, that is a way to go. I've been using the 7-Zip DLLs with C# .NET programs lately. The 7-Zip SDK itself is not fun to work with, and all the solutions I know of that really work require the 7-Zip DLLs. However, once you integrate 7-Zip, you have ZIP, TAR, RAR, just about every other archive format integrated. The 7-Zip format itself is my favorite as it generally offers the best compression.
For .NET managed code, the SevenZipSharp library makes integrating the 7-Zip DLLs a snap:
http://sevenzipsharp.codeplex.com/

Resources