JsonLocalisation - linked translation files in TFS - json

I am using Visual Studio 2013 and TFS for source control. My solution contains json files with the translations for my app made with the mvvmcross framework. The mvvmcross JsonLocalisation plugin recommends to link the translation files from a commen location to the different projects needing them.
When trying to shelve or check-in these changes, TFS complains about the translation files not being available in the platform projects.... Do any of you guys have a nice solution to that (one that doesn't include branching)?
I'd really like to avoid branching because I then need to merge the files to all my platform projects on every change I make.
How do you solve that using TFS?

I am now certain branch/merge is the best option in TFS. File linking is NOT supported by TFS. I ended up putting my json translation in a resource folder outside the platform specific projects (Droid, Windows Phone and WPF). Then I branched that directory to mentioned projects.
The process for changes are now as follows. Changes made to translation files in i.e. Droid projects must be;
Checked-in in Droid project
Merged from Droid to CommonResource
Checked-in in CommonResource
Merged from CommonResource to WindowsPhone and WPF
Checked*in in Phone & WPF
It makes it a bit more cumbersome compared to File-linking but it'll work...
Best regards

You should package your files for distribution as a NuGet package.
If you create a nuget package you can automate the update and control of the files while making them an external dependency. You then publish your nuget package to a repository (UNC or ProGet) and reference from VS.
If you edit the files you create a new versions package and deploy then update the solutions. You can automate this by having a CI build that created your nuget from the files automatically and publishing.
Look at how the Node, Angular, and other JavaScript nuget packages are composed.

Related

adding files to all platforms of a cocos2d-x project

This is a very basic question, but I have not been able to find the answer anywhere.
I just got Cocos 2Dx 3.3, made a new project and built the HelloWorld scene that was generated.
It generated projects for all platforms, but I am currently compiling and running the Mac project using XCode.
I can easily add new files using XCode, but of course it only adds it to my XCode Project. I would have expected a way to automatically modify all projects at once to add files or change compiler settings. I saw that there is a CMake file, probably used for command line compilation, but I cannot find a way to use that to regenerate the projects for all platforms.
Is it possible to automatically add a file to all platforms? Maybe it is possible to modify the template directory os Cocos and use the cocos new command line to recreate the project from scratch?
Or is it better to do all that manually?
Such an automation would imply parsing of a project file, finding list of relevant files and then changing all the dozen of project files. Which is hell of the work.
Even if it was implemented, how would this implementation decide which project file is a main one? (to get filelist from) And if your projects all have different lists of files? This would need merging etc. etc.
For now cocos new only copies files from one place to another. Frankly, Cocos2d-x have much more serious problems to solve, so I don't think this feature will ever be implemented.
However, you could customize project files/folders to your needs to make process of adding files more or less convenient and sometimes even automatic. Here are some clues:
It is easy to change Android and Linux Makefiles so they will pick up all the source files from a specified folder. Just use wildcards. Resource files are picked up by default.
For Visual Studio solutions (Win32, Win8, WinPhone) you could enable "Show all files" to see all files that either added or not. Unfortunately you can only see files down in the folder tree relative to project folder. To see Classes folder, make a symlink (link /j) of a Classes folder near .vcxproj file. You'd better don't copy/move project folder after it. And don't forget to add this linked folder to ignore list of your versioning system, or you will end up with duplicated files. Resource files are picked up by default for Windows projects.
I am not aware of any solution for XCode project, so you basically stuck with manual source file addition. Which is most annoying among all platforms. However it can pick up resource folders with all files.
Anyway, I would be glad if someone would proof me wrong and would write some kind of script to solve this problem (and also to change project name, company id, automatic versioning, etc.). I believe it could be done more or less reliably with, let's say Python and some regex magic. At least until project file formats will change.

Windows Store apps verticalization / customization

The issue is the following: I have developed an app which has to be tailored to multiple customers (actually, just string/color/UI-related resources need to be customized). It should also be noted that other customizations may be implemented on the webservice-side.
The result of such an operation has to be a new app (with a new name) to be submitted to the store.
Is this contemplated by Windows Store policies?
What approaches can I follow?
A first approach which comes to my mind is straightforward but error-prone and verbose:
creating an app which performs the following operations:
Makes a copy of the solution
Retrieves all the solution resources
Allows the user to customize the resources
Builds in output the new app version (solution) with the overrides
If the "user" that will do the customization is a developer, meaning someone who knows how to use Visual Studio, I'd suggest creating a Visual Studio template project.
You can easily export your existing app project as template (Microsoft provides a basic step-by-step explanation at How to: Create Project Templates, and I've once written a blog post that contains a more detailed tutorial: Creating template projects).
Either way, the result is a .VSIX file that can be installed as Visual Studio Add-In. With that, any developer that has the project template installed can choose it from the File -> New -> Project... dialog in Visual Studio - a new project will be created including all the files from the original project, the developer can then adapt the resource files and build the project into a new App.

Debugging MvvmCross application in Xamarin Studio with MvvmCross sources

I'd like to be able to step through the MvvmCross sources in the debugging of a MvvmCross application.
And I want to keep the process of keeping the MvvmCross library up-to-date simple. Currently the MvvmCross project files cannot even be openened in Xamarin Studio without editing lots of .csproj files (due to some PCL/project platform issues).
I've found that using the MvvmCross-Binaries assemblies (and their .pdb and .mdb files) and putting their source code into "C:\Projects\Misc\MVVMCROSS" does the trick. You can even step through the sources and set break points.
That is not the most self-contained solution.
I am wondering, if there is a better way.
MvvmCross now contains the symbol packages so you can debug it: https://github.com/MvvmCross/MvvmCross/pull/889

Package dependencies in Android apk files

I am performing Android app reverse engineering (decompilation and further analysis). I wish to analyse the package dependencies between different packages inside the same apk file. Is there any tool which does this? Else, how can I deduce package dependency in apk files?
I wish to analyse the package dependencies between different packages inside the same apk file. Please let me know if there is any tool which does this
A tool called Dexter is available to find out all the packages present in an apk. Also, if there is a program dependency among any 2 packages, Dexter show it with an edge. It could be noted that the edges do not have any weight to indicate the strength of the dependency.
The only dependencies that I have run into with apk files are with the framework from the device. If you are dealing with a standard app available from the Play, then it generally contains everything that it needs inside its own package.
Some of the custom builds like Amazon Kindle Fire, Barns & Noble Nook, etc have built custom launchers and other services which then offer other functions through their frameworks.
The framework-res.apk is typically stored in the /system/framework location. You can extract that from your device and place it in your apktool folder of your %userprofile%/~. Apktool (I am assuming that is one of the tools you are using) will then reference it when it does the work.

Keeping third-party libraries under a Mercurial project: Sub-repos or not?

We are developing a closed-source project, versionned with Mercurial. We are using two libraries in our project :
One of those libraries is being developed by a third-party. They are using git, and we usually just pull from their repo once in a week to get the latest changes.
The other library is being developed by ourselves, and is under active development. It must live in its own public mercurial repository, as it is licensed under LGPL. (It's a fork of a third-party LGPL component, ported to our platform)
So my question is: How should I organize the source to ensure that:
A developer from our team should be able to get all the source (main project + libraries) with a single "clone" command
We should be able to pull easily the latest changes from the libraries, even though one of them is managed by git
Should we use mercurial sub-repos functionnality, with hg-git to access to the library under git? Is it well supported by TortoiseHg and BitBucket? (pros: easy to pull library changes / cons: does it works well?)
Or should we keep only snapshots of the libraries under our project? (thus, when there are new upstream changes in the libraries, we pull them to a separate place, and then copy the whole source to our project? (pros: will work / cons: pain in the ass, especially for the library that is being developed by ourselves, which is subject to a lot of daily changes)
Yeah, use the subrepo with hg-git. It's easy, well-supported, and effective. Your .hgsubstate file will include pointers to snapshots of the subrepos, and that file is controlled, so at any point in time you'll be able to answer the question: what version of library X was this working against. It's good stuff.
Alternately, you can use a dependency manager like ivy or maven as appropriate for your language, but don't include their libraries in your repo if you can avoid it. Pointers to versions of their code is better and a dependency manager or subrepos are the cleanest ways to do that.