Add basic vagrant compilation capability

Add 	FREECAD_USER_DATA environment variable required to support snap on ubuntu which is using Apparmor to
	limit application access to filesystem.
Add	automatic snap build on Xenial (ubuntu 16.04) within Vagrant build
Info	Build results are into /home/vagrant/Results (deb + snap
This commit is contained in:
Jean-Marie Verdun
2016-06-01 21:16:12 +02:00
committed by wmayer
parent c832fb5561
commit b0eea10e8e
12 changed files with 835 additions and 1 deletions

View File

@@ -1909,7 +1909,12 @@ void Application::ExtractUserPath()
if (pwd == NULL)
throw Base::Exception("Getting HOME path from system failed!");
mConfig["UserHomePath"] = pwd->pw_dir;
std::string appData = pwd->pw_dir;
char *path="/tmp";
if ( FCUserData=getenv("FREECAD_USER_DATA") )
path=FCUserData;
else
path= pwd->pw_dir;
std::string appData(path);
Base::FileInfo fi(appData.c_str());
if (!fi.exists()) {
// This should never ever happen