how can I change Android Studio system files folder path on Windows? - android-studio

I install my development tools from zipped distributions and by setting paths by self so I can easily continue using after system fails/reinstallations as well as copying into other PCs I have.
I am trying to use Android Studio on a path portable as possible, and it is mostly going well. I extracted android studio under t:\Tools\Android\android-studio\ and use following command in CMD console to start it.
set ANDROID_SDK_ROOT=t:\Tools\Android\sdk\
set ANDROID_HOME=t:\Tools\Android\sdk\
set ANDROID_SDK_HOME=t:\Tools\Android\.android
set ANDROID_PREFS_ROOT=t:\Tools\Android\.android
t:\Tools\Android\android-studio\bin\studio64.exe
Today I found out this is not enough for my purposes after a plugin fails to load because of incompatibility, that the path to "Android Studio system files" is still set to
%USER%\AppData\Local\Google\AndroidStudio4.1
I couldn't find a proper answer on how to set this path under t:\Tools\Android\ through an environment variable. answers I could find are just mentioning this path but does not tell about changing it. (or just missed in like millions of topics containing same search terms)
Can you please show a way, if there is any, to change this folder path?

This does not seems to be done by simple environment variables.
However, it seems a bit of manual work makes it possible.
editing editing these lines in t:\Tools\Android\android-studio\bin\idea.properties file
idea.config.path=${idea.home.path}/.AndroidStudio/config
idea.system.path=${idea.home.path}/.AndroidStudio/system
idea.plugins.path=${idea.config.path}/plugins
idea.log.path=${idea.system.path}/log
and then using this environment variable
set STUDIO_PROPERTIES=t:\Tools\Android\android-studio\bin\idea.properties
Visit Making Android Studio Portable (2017+ versions) for more info for portability

Related

How can I fix Microsoft Visual C++ 2017 X64 Minimum Runtime error during installing Redistributable packages (VC_redist.x64.exe, VC_redist.x86.exe)?

During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.

Change where Visual Studio default settings on startup?

I like to keep my folders quite organised, and don't like the default Visual Studio folder in my documents. It seems like it should be rather simple to point VS to my own custom folders for most of its settings, which I have done. The only problem is, on start up, VS keeps looking for a settings file (*.vssettings file) in a (non-existent) default folder which I can't seem to find any option to change (c:\users\renzo\documents\visual studio 2013\settings), making the IDE revert to most recent settings (the custom settings file I have created in a nice separate folder... which is fine, but accompanied by an annoying error message). If I so much as touch the tools-options menu (literally, without changing anything) VS then creates a new folder (in that same annoying default location!) storing my current settings! The cycle repeats!
Is there anyway to change where VS looks for these default *.vssettings files, and stop creating this new irritating "CurrentSettings.vssettings" file!?
Might seem a bit nit-picky, but its really getting under my skin!
Thanks,
Renzo
Use mklink to change directory or file location to what you want. Choose one of the commands below.
mklink /d d:\VisualStudio c:\users\renzo\documents\visual studio 2013
mklink /d d:\VisualStudioSettings c:\users\renzo\documents\visual studio 2013\settings
mklink d:\VisualStudioSettings\CurrentSettings.vssettings "d:\VisualStudioSettings c:\users\renzo\documents\visual studio 2013\settings\CurrentSettings.vssettings"

Eclipse shortcuts in Resharper

I just started with Visual Studio + Resharper, coming from Java development with Eclipse. I can navigate eclipse pretty quickly, because I memorized all the shortcuts I need. Now it seems like Resharper knows all what eclipse can do (probably even more), but its mapped to different keys, and i really don't feel like learning a new set of shortcuts for the same stuff.
So my question:
Where is Resharpers shortcut configuration file (if there is any)? I saw a bunch of .xml files in it's bin directory, but I'm not sure it's the right place to look. Couldn't find anything in the docs, only how to change the shortcuts from VS one-by-one.
Is there an eclipse preset? I found this on github, but there is absolutely no explanation, on what to do with it, and in the file name it states, it's for r# 5.0 and i have 8.1 (not sure if there is any difference in the configuration part).
I found this file using Google Search: https://github.com/chrismo/jetbrains.keymaps/blob/master/resharper.5.0.eclipse.shortcuts.vs2010.vssettings
You can download it and use Visual Studio's Tools -> Import and Export Settings ... command to import it.
Resharper comes with only two default keyboard schemes, 'Visual Studio' or 'IntelliJ IDEA' (see here). Choose one that you are most happy with (under Resharper->Options...->Environment->Keyboard & Menus) and change any shortcuts in Visual Studio (under Tools->Options...->Environment->Keyboard) to match the ones in Eclipse. It may be easier just to re-learn one of the default schemes though.

Syntax highlight fail on Classes in Visual Studio 2012

I recently installed Visual Studio on a laptop and the syntax highlight fails to change Classes colors.
I tried exporting and importing the full, complete set of settings and it is still looking like that.
EDIT
I tried those websites with schemes and decided to try one, the Humane scheme, and this is how the sample code looks in my laptop after installing those settings:
However, this is how it is supposed to look:
Note the lack of highlight in class names.
What could it be causing this?
I'm starting to think that's another setting at another place which causes this.
Finally, it worked by resetting user data, running this from the Visual Studio Command Prompt
devenv /Resetuserdata
Found the hint here:
https://stackoverflow.com/a/11988265/1213246
Changin syntax highlight could be done through the menu Tools - Options - Environment - Font & Colors. It's a try and test approach that is not much improved from earlier versions of Visual Studio.
Fortunately, today there are entire sites with themes that simply need to be choosen and installed
I suggest you to visit http://studiostyl.es/ where you can find thousands themes or, for more generic go to http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx

SDL in Visual C++ - where to properly put images used in the program?

I'm just learning SDL and I would like to know where is the correct place to put images and other file stuff in?
I use Visual C++ 2010 Express and the problem is that when I compile a program and start it straightly from IDE, it instantly stops because it can't load images. But when I start it by clicking on it in Release/Debug folder, where these images are placed, it is, of course, OK.
It seems that the IDE starts the program from another path than Release/Debug folder.
My question is - how shall I deal with it? Is there a way of setting the location of images directly in Visual C++? I'm asking this question because when I'm unable to start the program from IDE -> I can't use that IDE's debugger.
I hope I explained my situation well enough and thanks for the answers.
If you click on your project with the right mouse button, select properties, on the window that opens, click on "Debugging", notice the entry "Working directory", put there the directory where you want your program to run.
I am used to create a folder called work and put images, sounds, etc, there and configure the working directory to use this folder.
Also, any dlls not in system path must go there for your program to find it or in the same folder where visual is creating your exe.
Also on the same window, you will see the "Environment" entry, you can use it to configure path to dlls if neeeded setting the PATH environment variable, like for example:
PATH=c:\mylibs\dlls\

Resources