Skycoder42 / qdep

A very basic yet simple to use dependency management tool for qmake based projects
BSD 3-Clause "New" or "Revised" License
18 stars 4 forks source link

works on Windows? #1

Closed Buzzroid closed 5 years ago

Buzzroid commented 5 years ago

Does qdep works on Windows? I've failed to build QtAutoUpdater on Windows, which uses "QDEP_DEPENDS += Skycoder42/QExceptionBase@1.0.0"

Errors: LINK : fatal error LNK1104: '.obj\debug\qexceptionbase.obj'

Skycoder42 commented 5 years ago

It does work on windows. As you can see on Appveyor, I have working builds for all the MSVC2017 Kits, Mingw and MSVC2015 x64.

I also have a Windows 10 Machine where I test stuff, and I can build QtAutoUpdater (and other qdep dependend projects) there without problems.

Please check/do the following things for me, so I can narrow down the problem:

Thank you for your cooperation. qdep is quite new and thus a few bugs are sadly to be expected. I am however eager to fix them and will try to solve this problem as quickly as possible.

Buzzroid commented 5 years ago

A space character in the path (user name) caused an error for python, which in turn caused an error for qdep.

common.py @ qdep `def get_cache_dir_default(): return appdirs.user_cache_dir("qdep")

def get_cache_dir(pkg_url, pkg_branch): cache_dir = os.getenv("QDEP_CACHE_DIR", get_cache_dir_default()) cache_dir = path.join(cache_dir, hashlib.sha3_256(pkg_url.encode("UTF-8")).hexdigest(), pkg_branch) os.makedirs(cache_dir, exist_ok=True) return cache_dir ` appdirs does not quote for a space-contained path, which causes the trouble. I've set QDEP_CACHE_DIR to a path which does not contain space character. Now everything works fine.

So, I think that this is not the bug of qdep. Just mentioning QDEP_CACHE_DIR in the doc would be helpful for us.

Thank you for the great work.

Buzzroid commented 5 years ago

Or, Escaping (Quoting) the path returned from appdirs would be appreciated.

Skycoder42 commented 5 years ago

Thanks for the details. I will definitely look into this and try to apply proper quoting everywhere. It's not directly a bug of qdep, but something I should still take care of.

And BTW, the environment variables are mention in the readme, as part of the "Documentation" chapter. See Environment variables