Dynamic file path for IDE setting? - ide

Can you set the drive letter to be dynamically added for an Windows application setting on a flash-USB?
Would it be an environment variable, and if so what would it be called? -> (i.e. %root%/Qt/4.8.1/bin)
Issue Example:
I have Qt SDK 1.2.1 installed on my flash drive for plug and play on any workstation without the environment. The issue is if the drive letter isn't assigned to be the same as when I installed it, things wont link or compile.

One approach (if your IDE supports this) could be to use an environment variable to refer to the drive name. Then when you know the letter, set the env. var to the appropriate value.
Note: depending on your OS you might need to restart your IDE to pick up the change in the env. variable

Related

Should I tell Intellij that my WSL filesystem is case sensitive?

I share my Windows 10 filesystem with the Windows Subsystem for Linux. I keep my coding projects in the dev folder in my user directory, and share that to /mnt/c/Users/Conan/dev in WSL. Intellij runs projects from the Windows filesystem, but I use a range of command-line tools to run things (such as java) from the share in WSL.
When I start Intellij it says:
Filesystem Case-Sensitivity Mismatch
The project seems to be located on a case-sensitive file system.
This does not match the IDE setting (controlled by property "idea.case.sensitive.fs")
Is this correct? My Windows filesystem is not case-sensitive, but the files were created from bash in WSL. Which setting should I use?
Better solution than making the Linux directory case-insensitive. Make the Windows directory you are using case-sensitive. See https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl/
This makes for a more complete Linux experience and avoids interop issues such as described here.
In addition, I recommend utilizing the metadata option available in build 17134 (April Update or 1803) or newer for Windows via wsl.conf (manually create in /etc). This will allow your windows directories to keep the permissions assigned by the linux distro you're running with WSL. See https://blogs.msdn.microsoft.com/commandline/2018/02/07/automatically-configuring-wsl/

LUA windows: How do I launch windows metro app with Unified Remote script

I'm trying to make a custom remote for unified remote server in windows 8.1
The sample scripts have os.start(command). It works for something like calc, but I'm trying to launch a metro app 'netflix://' and Lua doesn't seem to want to accept it - I think it's not taking the front slashes.
Is there a way to get Lua to launch a metro app in windows? Thanks
Assuming you mean os.execute() command, to run commands that open files and run based on protocol association, you need to use start command:
os.execute("start http://google.com")
If you need to put the parameter in quotes, then make sure to include a pair of empty quotes as the first parameter:
os.execute([[start "" "netflix://..."]])
For os.start(), it seems that you have to pass the whole path to a command. The Unified Remote API states that it should match installed applications, but I believe it might only be applicable to applications with binaries in the PATH, which is why their example of calc works.
With this in mind, and knowing that start works well directly from PoweShell, this command does what we need:
os.start("C:\\WINDOWS\\system32\\cmd.exe", "/c", "start", "netflix:");
Answering this old question since it's the top google hit when looking for launching windows10 apps with Lua for Unified Remote
As a side note, due to limitations on the Netflix Win10 app, I ended up simply opening Firefox and giving it the Netflix URL. Assuming default installation:
os.start("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.netflix.com");

How to obtain all versions of KRE?

Problem
I want to both use stable versions of KRE and the bleeding edge nightly built KRE. One ASP.NET5 application may be beta2, but another I may want to be beta4. So what I did was install both in powershell as found here.
What happened is that the stable KVM installed in C:/Users/derp/.kre and the nightly build KVM installed in C:/Users/derp/.k
Worse yet, I can only see this now
Attempts
I tried kvm install KRE-CLR-x86.1.0.0-beta2 and it failed
Shall I try moving the packages from /kre file to the /.k file? This seems hacky and like a really bad idea
RTFM - Tried to use the install feature and including the -a, but failed.
I'm doing something the hard way and can't see the obvious.
I search on here
I feel if there is an answer to what I am trying to do above, it is worth being on here for others to find as well. Thank you all for your patience.
ASP.NET 5 is under development and there is no guarantee that changes between different pre-release version are backward compatible (sorry!).
The /.kre -> ./k rename is not backward compatible and you cannot have both the old and the new kvm simultaneously on the PATH. However, you can get can have two versions of kvm on your machine but you will have to use the full path for at least one of them.
I think the key is the path environment variable of your system. You have to use two set of "kvm", one for night builds, one for public beta, to download and set correct path environment variable.
For instance, I get one kvm from Entity Framework 7 repository, which can download and use beta 4 builds. I also have another kvm from Home repository which can download and use public beta builds.
You can use either kvm with "upgrade" or "use" command to set correct path environment variable, then run your application on the runtime you need. I think even Visual Studio 2015 CTP runs your projects based on the Runtime specified in your path environment variable. For the time being, only beta 3 run times can display in the project property dialog of VS 2015 CTP, but when hitting ctrl + F5, my website starts to load beta 4 runtime and assemblies, I can see the loading in output window, I think this is because I have .k folder prior to the .kre folder in the path environment variable.
Can you try the following?
$cmd-prompt>kpm Install KRE-CLR-x86
It worked for me.

Intellij 9.0.2 on Windows 7 putting the .IntelliJIdea90 folder under the Administrator folder

For some reason the .IntelliJIdea90 folder is under C:\Users\Administrator.IntelliJIdea90 when I installed Idea 9.0.2 on Windows 7 (64 bit). Does anybody have an idea why this would happen?
IDEA is using user.home Java property to find the location of your home folder. On your system this property returns Administrator for some reason. It's JDK standard property, so the problem is outside of IDEA code. Not sure what can be causing it, maybe some environment issue. On my Windows 7 64-bit IDEA puts this folder into the correct location with my user name.
You can get better luck with this OS/JDK related issue at http://superuser.com.
Paths to IDEA folders can be changed in IDEA_HOME\bin\idea.properties.
I would always suggest to use for IntelliJ the ZIP versions - so never the installer.
This way you have the greatest control over your configuration, and also can have more IntelliJ versions side by side on the same computer.
After downloading the IDEA ZIP, you need to edit just two files:
idea.bat - to specify the JDK at the beginning
idea.properties - to change where the configuration is saved
I would suggest to use $idea.home as a place for configuration instead of the default $user.home . This way each IntelliJ version would have it's own configuration that would not mix with the other installations.
The big advantage of this approach is that is also portable among computers, e.g. once you do the above, you can copy that to several other computers and IntelliJ will just work there too.
The only downside of the method is that without the installer, you need to create on the desktop the icon to idea.bat manually.

How to make my software run from pendrive?

I need to know how to make a software in Visual Studio(VC++ or VB) that can be run from a USB pendrive?
Is there anyway i can create this standalone software that doesnt need any installation in the PC in which the USB is plugged into?
Just save the executable on the drive. All referenced dlls also need to be stored there. If you have code access active you also need to make sure that the drive is allowed to provide executable code.
One more thought: If the system is linux ore mac then you should consder to switch to Java to be platform independend.
Yes, any native code application can run from a pen drive (so long as any dll's or associated files are also stored with it). .NET apps can also run... if the machine has the necessary run times installed.