Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

Setting HOME messes up expected directories #15

Closed
333fred opened this issue Oct 6, 2016 · 13 comments
Closed

Setting HOME messes up expected directories #15

333fred opened this issue Oct 6, 2016 · 13 comments
Assignees

Comments

@333fred
Copy link
Member

333fred commented Oct 6, 2016

When you set the HOME env variable (I do this on Windows so I can put my dotfiles where I want them), the plugins unzips the wpilib folder to user home, not where I set it to. Then, actually building a program expects the wpilib folder to be in where I've set HOME to, not the user home. So I have two directories:

  • C:\Users\333fr\wpilib - Where the wpilib folder is unzipped to.
  • C:\otherdir\wpilib - Where the eventual build expects to find the wpilib folder.
@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 9, 2016

I assume the desired behavior here is to respect the env variable for the install?

@PeterJohnson
Copy link
Member

PeterJohnson commented Oct 9, 2016

Yes, I think so.

@333fred
Copy link
Member Author

333fred commented Oct 9, 2016

Yeah. Ideally, I should also be able to set an env variable like WPILIB_INSTALL_DIR or something of the like that and have it install there.

@JLLeitschuh
Copy link
Member

JLLeitschuh commented Oct 11, 2016

Isn't this why I added vagrant?
Does this work there?
Or would this be a build artifact has this problem?

@333fred
Copy link
Member Author

333fred commented Oct 11, 2016

This has nothing to do with vagrant. This an issue with the plugins, not the build.

@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 11, 2016

The problem is the Eclipse plugins installing the wpilib files on users machine. I don't think vagrant helps there.

Somewhere we must be using different variables to figure out where to install vs where to look for the files when building. I think it will be easy to find and fix, but I want to get the 3rd party stuff done before I look at it.

-------- Original message --------
From: Jonathan Leitschuh notifications@github.com
Date: 10/11/16 12:56 PM (GMT-05:00)
To: wpilibsuite/EclipsePlugins EclipsePlugins@noreply.github.com
Cc: Kevin OConnor koconnor@firstinspires.org, Comment comment@noreply.github.com
Subject: Re: [wpilibsuite/EclipsePlugins] Setting HOME messes up expected directories (#15)

Isn't this why I added vagrant?
Does this work there?
Or would this be a build artifact has this problem?

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/15#issuecomment-252977058, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOgBhlDJr1o6Ddy1LNipcf2NIsV72Czks5qy797gaJpZM4KPnYF.

@Kevin-OConnor Kevin-OConnor self-assigned this Oct 18, 2016
@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 18, 2016

I think doing both "WPILIB_DIR" or whatever, and respecting HOME and using user.home if neither are there starts to get a bit messy. If you had to pick between "WPILIB_DIR" and "HOME", with "HOME" being the easier to implement, what are your thoughts?

@333fred
Copy link
Member Author

333fred commented Oct 18, 2016

WPILIB_DIR, without a doubt. The only reason I have HOME set is so that I can easily share my dotfiles among my Windows computers, and it doesn't really break anything on Windows. It'll break a lot on anything 'Nix based.

@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 18, 2016

Ok, I'll try to figure out the one issue left to do that one then.

-------- Original message --------
From: Fred Silberberg notifications@github.com
Date: 10/18/16 6:15 PM (GMT-05:00)
To: wpilibsuite/EclipsePlugins EclipsePlugins@noreply.github.com
Cc: Kevin OConnor koconnor@firstinspires.org, Assign assign@noreply.github.com
Subject: Re: [wpilibsuite/EclipsePlugins] Setting HOME messes up expected directories (#15)

WPILIB_DIR, without a doubt. The only reason I have HOME set is so that I can easily share my dotfiles among my Windows computers, and it doesn't really break anything on Windows. It'll break a lot on anything 'Nix based.

You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/15#issuecomment-254655253, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOgBvmGQqF7lowHuX1QDOwMkVO7L0MNks5q1UTggaJpZM4KPnYF.

@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 19, 2016

So, after doing some work on this one, allowing a different install location opens up a can of worms that I am not convinced is worth it.

Specifically, it complicates installer creation for 3rd party installers, requires these installers to be re-run if the var is created or changed after they are installed and requires a DS change to be able to auto-launch the SmartDashboard from multiple possible locations.

Considering all of that, I think the appropriate fix here is to always install to user.home and fix what is currently causing breakage in Fred's scenario of HOME being set on Windows.

@333fred
Copy link
Member Author

333fred commented Oct 19, 2016

Ok. If we fix that, it'll at least make builds work on my machine without having to mess with settings.

Kevin-OConnor added a commit to Kevin-OConnor/EclipsePlugins that referenced this issue Oct 27, 2016
… location

Closes wpilibsuite#15 (%HOME% set on Windows breaks C++ project builds)
@Kevin-OConnor
Copy link
Contributor

Kevin-OConnor commented Oct 27, 2016

I have this working for new Eclipse installs (or existing if you delete the Eclipse variable for WPILIB in Window->Preferences->Run/Debug->String Substitution and restart Eclipse after starting the plugins). Is that good enough or do you want me to work on adding something to reset this for existing installs?

Kevin-OConnor added a commit to Kevin-OConnor/EclipsePlugins that referenced this issue Oct 27, 2016
… location

Closes wpilibsuite#15 (%HOME% set on Windows breaks C++ project builds)
Kevin-OConnor added a commit to Kevin-OConnor/EclipsePlugins that referenced this issue Oct 28, 2016
… location

Closes wpilibsuite#15 (%HOME% set on Windows breaks C++ project builds)
Kevin-OConnor added a commit to Kevin-OConnor/EclipsePlugins that referenced this issue Oct 28, 2016
… location

Closes wpilibsuite#15 (%HOME% set on Windows breaks C++ project builds)
PeterJohnson pushed a commit that referenced this issue Oct 28, 2016
… location (#45)

Closes #15 (%HOME% set on Windows breaks C++ project builds)
@333fred
Copy link
Member Author

333fred commented Oct 29, 2016

Confirmed working on my machine. Thanks Kevin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants