Unity Perforce Mapping Failure - unity3d

So after using unity's asset server for quite a while I decided I would try Perforce as it seemed like a good alternative and a viable way to work with people without the pro license. I am using Windows version of Unity 5 and a Linux install of P4V.
The problem I am getting is this error
The Client path
//ProjectName
maps to this folder
~\Perforce\ProjectName
which is not a parent directory of the projects root:
C:\Users\...\ProjectName`
After searching the internet I found nothing as to what exactly this means so I figured I would ask.

Two pieces of configuration data aren't matching up:
The client workspace root, which in your case appears to be set to "~\Perforce\ProjectName", and
The project root, which in your case appears to be set to "C:\Users...\ProjectName"
P4Connect is expecting the "project root" (C:\Users...) to be "under" the "workspace root" (~\Perforce...)
I suspect the problem is in the use of the Unix-y tilde (~) character to mean your home directory. In general, Windows software doesn't expand the tilde character automatically; that is a Unix-y behavior.
Try replacing the ~ with the full path to your project root.
And make sure that your project root is located inside of your workspace root.

Related

Search in files broken on SSH remote target

I have several RaspberryPIs as remotes in VSCode via SSH.
In some of them at some point the "search in files" feature has stoped working.
It is only searching inside the opened files.
[EDIT]
After further investigation I found out that on all the Raspberrys where the error occurs I can not install ripgrep. (E: Unable to locate package ripgrep)
As VSCode is using ripgrep for searching this may be the cause but what is the solution then?
[EDIT2]
I built and installed ripgrep manuall. No success.
But maybe it is related to the debian version being 9.X
As several people have reported the same problem but the cirumstances are always different I tried the following solutions:
Make sure the "book" icon is not checked (some users had that problem)
Make sure it is not related to path lenght. Just one folder in ~ with file a.py and b.py (some user had that problem)
Made sure there is nothing in the .gitignore file (some user had that problem)
Made a new folder not inside a samba shared folder (some user had that problem)
Deactivated all exensions on the remote
Deactivated all non SSH related extensions on the PC
Compared the setting on the broken remote to a working one. They are completely the same.
deleted the .vscode-server folder on the remote to force VSCode to install it again

Gear VR Framework: Problems with cleaning (first step)

I'm currently trying to set up everything to develop a Gear VR app with Eclipse in Java but I keep getting errors when I clean the Gear VR Framework project:
http://pastebin.com/yK8810bG
"Das System kann die angegebene Datei nicht finden." simply means:
"The system cannot find the file specified."
At first Eclipse didn't recognize the directory "C:\Programme\Programmieren\AndroidNDK" (originally "Program Files" instead of "Programme" but it didn't work because of the space; has the subfolders "build", "platforms",...) as a valid folder for the NDK. According to another thread on Stackexchange, you have to create an empty file without a file extension and with the name "ndk-build" in the main folder (so "AndroidNDK"), which I did - even though there's already a file like that in the subfolder "build". That at least made Eclipse happy but now I get the above error messages.
Yes, the folders "GVRf" and "ovr_sdk_mobile" are in the same root folder and yes, I added "C:\Programme\Programmieren\AndroidNDK" to the Windows Path variable but I still get the same error messages.
I checked, the files really don't exist but I don't know, where I would even get them. I followed the steps here, including 1.b., so I should have everything necessary but apparently I don't. Plus, I double checked with this youtube video. I did everything the guy did - except the Git part for GVRf (I downloaded the zip) but including not copying the project into my workspace (that sadly gave me a bunch of other "cannot find..." errors) - and it worked just fine for him but not for me.
Since this doesn't work, I also can't even test the samples. :/
Any ideas where I can get the missing files or what actually could be the problem and how I can fix it?
I fixed it:
There must not be any spaces in the path, so you shouldn't put the framework + NDK in a subfolder of e.g. "Program Files". Eclipse and Java usually don't care but the framework and NDK apparently do.
Eclipse's workspace/your project has to be on the same HDD as the framework. I've tried a couple of things but haven't gotten it to work with my usual workspace since that's on a different HDD.
There seemed to be a problem with the old version of the framework (April 11th to 13th), simply couldn't get it to run. It's now running fine with a newer version (April 15th) - as long as the two above points are met.

How to eliminate RubyMine false "No such file to load" errors

I've recently installed RubyMine on a second machine and cloned a GitHub repository there.
My application runs exactly the same as on the first machine, but the RM code inspection result is radically different: I get dozens of "No such file to load" errors.
This even though the application runs fine both from the command line and from RM.
In dialog Run/Debug Configurations, I have specified load paths (-I. -I..) in the Ruby arguments.
Does the code inspection not honor the configuration? Or perhaps it's using a different configuration?
A bit late, but you may need to mark the directories that are load path roots in your app within the Rubymine tree - right click and do "Mark Directory As/Load Path Root".
For me the other solutions did not work. However, the problem was that RubyMine detected the wrong ruby version - while rvm for the project was ruby 2.4.1, in RubyMine it defaulted to the last version it had (2.4.2). So going to RubyMine > Preferences > Ruby SDK & Gems and changing the version for the project to the correct one solved it.
If you use the "Mark Directory As/Load Path Root" action, this will apply for IDE autocompletion only. It will not be propagated onto the interpreter (as it would be in PyCharm with Python).
You have to either keep using the -I switch, or configure $LOAD_PATH in your code, or (preferably) set up a Gem project with bundler support. You can then configure the path in a gemspec file. See https://www.jetbrains.com/help/ruby/creating-gem-project.html.
Sources:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206741945-Load-Path-not-working-at-all-
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206727915-Building-RubyGems-lib-in-load-path-
You can try changing Project Path Mappings and set relative Local Path and Remote Path to get it to work.

pydev directory django shell

I'm using PyDev in a django project of mine.
When I start the django sheel, the os.getcwd() command returns my home folder.
This is bad, since my code points to some resources by relative paths, assuming as current directory the directory containing the manage.py.
In this post (http://stackoverflow.com/questions/2746342/pydev-and-django-pydev-breaking-django-shell) someone recommended to use absolute paths to avoid this problem.
But I think it is a very bad practice, since things will not work when other people checkout the code into their computers.
The closest hint I found here:
http://old.nabble.com/-pydev---Users--how-to-set-working-directory-for-console--td25328455.html
It seems we can use "Run/Debug Settings" to set the current directory associated to a "runnable module". However, in this way we cannot associate the setting to the django console. I have tried to associate it with the manage.py, but it did not work.
So, the question: how to define the working directory of django shell?
Thank you,
Leonardo

How to use relative paths for projects added to an Eclipse workspace?

I am working on some Eclipse projects that are stored on a USB key. I have added them to a workspace whose root folder is also on the USB key, but the projects are not located directly into this directory. As a result their absolute paths are written in the .projects folder of the workspace.
This raises problems when I use the key on several computers, because the drive letter assigned to the USB key is not always the same (and I do not want to assign a specific letter to it on all computers). Eclipse cannot open my projects when the drive letter differs from that of the USB key at the time I added the project to the workspace.
Is there a solution to this problem ? Specifically, is there a way to make Eclipse add projects to a workspace by using their relative path from the workspace folder ?
Its really not that hard. You just have to assign a new variable that points to WORKSPACE/..;. For example, you can use the Forge Minecraft modder pack - it has a workspace that is immediately ready no matter what machine downloads it, where you place it or even if you move it.
Download this:
http://files.minecraftforge.net/minecraftforge/minecraftforge-src-1.6.2-9.10.0.789.zip
And then unzip it and run install.bat/cmd. Then check the contents of forge/mcp/eclipse/Minecraft/{.project,.workspace} to see some examples.
I've got my workspace working on github like this.
In my experience it will break at some time if you try to "hack" the metadata of eclipse.
Consider the substcommand in windows (As you mention drive letter I assume windows)
create a bat file containing
subst N: .
Running this will mount the current dir as N: So You can place this on the usb drive, and run that prior to running eclipse, then You will always find the same content on drive N:
To remove the mount do
subst /D N:
You might consider making a bat file that mount N:, start eclipse and after eclipse exit unmount N: something like
startMyProject.bat:
subst N: .
N:/eclipse <yadayada options>
subst /D N:
The short answer is that you cannot do it without hacking your workspace metadata (under [workspace.dir]/.metadata). Eclipse workspaces aren't designed to be portable and even though you are not physically moving your workspace, you are in effect moving it by changing drive letters.
I'd recommend trying to find a way to have your projects under workspace.dir. Not guaranteed that you will not have problems that way, but may improve your odds. Depending on what features of Eclipse you use, you may very well end up with other types of absolute paths in your workspace metadata.
This question is kinda old, but there's an entirely different approach: You can create a Junction from the Folder where Eclipse expects the Project, for example E:\foo\workspace\myproject and link it to where the project lays, for example E:\bar\myproject.
A Junction essentially means that you can access the same folder through 2 different paths, thus you don't need to worry with the weird relative path limitations of Eclipse. To create it easily and fast, I recommend you to get Link Shell Extension
I haven't tried this myself, but this might work. Try:
Add your source folder as linked resource & remove previous definition:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-45.htm
Close eclipse and find your project folder in your workspace (ex: C:\Documents and Settings\username\workspace\yourproject\) Replace absolute paths in files .project & .classpath with relative paths.