-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake needs to install HUT directory on OSX #2116
Comments
It is currently set in the class as:
It could be made dependent on
if that would solve it for the suggestion that @adcxyz is mentioning for OSX. Important is that it needs to be installed system-wide and found in a platform-transparent way. |
For finding the best option - Where are these folders on linux?
On OSX, Platform.systemAppSupportDir is hardly ever used. |
Platform.systemAppsupportDir and String.scDir are the same on Linux. We should also check for Windows!
|
OK, I have access to a windows 7 machine and can test later today. In our April 1 discussion, we had some of it figured out, and rereading it, external_libraries/hidapi/CMakeLists.txt: ... // and at the bottom: if( HID_INSTALL_HUT ) install(DIRECTORY hut —
best a
|
@adcxyz , do you want this for 3.7.2, or is 3.8 fine? That you have a Windows machine sounds exciting :D You might want to try it mit Luis' brand new Windows code. It's actually accessible as a pre-pre-version in a Windows branch in the new hidapi repo in SC org. |
@bagong, I will get very little time on that windows machine, and installation things will be frowned upon, |
Ah, setting up a build environment for Windows is likely to take a couple of hours the first time, and you'd have to build from scratch to test anything concerning HID on Windows. So if your time slice on the Windows server is below a couple of hours it is likely not realistic to test anything on Windows (the very first time)... ;) And it wouldn't make much sense either, as HID doesn't work on SCWin 3.7 and could only be added for 3.7.3 if really wanted on 3.7. |
I've had a look at this now, also because I'm hoping 3.7.2 can come out soon. The problem with bringing this into 3.7.2 is not so much that it is difficult or risky per se, but that putting something into this submodule without merging other commits as well is pretty tricky. There are 4 commits in master that haven't been added to SC yet and that also need testing. So may I propose to keep this for 3.8. For self builders, btw I think there is a nice and useful way to test the result, even when using 3.7 (the submodule can locally be updated independently of the SC branch). As to this issue: I think the consensus is the install folder should be Platform.resourceDir, right? May I propose to call it
Which I think is cross-platform. So I'll send a PR to the hidapi submodule that installs the folder as suggested, and another one to SC, that set's
Does that look right? (alongside that I'll add I would like to do the following: push the submodule additions at the end of a larger existing pull-request that allows HID on Windows to work. The PR is targeted at 3.8, and next to Windows support, de facto also implies a few older, mainly linux related commits, that haven't been added to SC yet, and haven't had much exposure. Ideally we would accumulate the remaining stuff needed for even better HID support on a single branch. That will make testing a PR in a submodule significantly easier, and could make testing across OS frontiers fun. ;) I think everybody here has the rights to write directly to the branch and thereby add to the PR. The branch is called hid3.8 and is in this repo:
If we agree on this, I'll put it in action (it's almost ready, so any minute ;) ), and add an explanation how to activate the branch in the submodule... And: once we have all of that in the submodule, I think it could also be used in 3.7 if so wished. It would then just be a matter of setting the module to the right commit there, and backporting the tiny additions to sc itself. |
Hehe, sorry, I was not patient enough. So these are the two PRs in question: SC: |
Dear Rainer, thanks so much for taking care of this!
for OSX, yes.
The dir name was “HID_Support/hut/“, which we could keep (it says clearly what it is); // The quick tests would be:
// Quick tests for hutDirectory:
+1
thanks, |
Added. On Windows, MinGW build:
Just to show off (with Luis' work) ;)
Please teeeeeest! |
On OSX the hut folder doesn't install yet, and on Linux it's installed to /usr/local//HID... instead of share. I'll try to fix that. |
Wrong, on Linux it does install properly. I had just forgotten to use my PR ;) Ubuntu Studio 16.04:
This is from HID-branch latest including Marije's yet unused commits:
|
I hope that Mac works too, now:
|
The difficulty in testing this is that the both PRs must be used in conjunction to work. getting the one to SC is simple (assuming the sc repo is
Getting the branch in the submodule is a bit trickier. You need to be sure first, that the hidapi submodule is already initialized to pull from the hidapi repo in the supercollider org (rather than still from Marijes):
You might additionally need to do these steps to really switch:
After this you can checkout the
If you want to return to the old state, just do:
Happy testing! |
hi @bagong, fails here in line:
?
|
Hi, Alberto,
you may need to do a "git fetch --all", and then "git checkout -t
origin/hid3.8".
|
ok, thanks, tried that: |
@adcxyz , if the hut directory is not copied anywhere, you probably haven't got the right branch.
|
Eeeeeh, sorry A. there is a mistake in that line you quoted:
It has to be:
Soooory... (I just changed it above) |
@adcxyz did you get there? Sorry for that mishap earlier. At this point positive feedback would be as helpful as problem-reports. Also the SC part of the complementary commits is merged to master now, so getting it going is a bit simpler. I am tempted to clean up this thread to avoid scaring off people. Once you have that gotcha with submodules, it's actually pretty simple... Currently the following would be the quickest/easiest way to get the full set of HID innovations:
Ready to build! |
just tested fresh build with your instructions now, git branch seems right:
build seems ok, but Library does not compile (likely unrelated) with:
no HID_Support/hut in Contents/Resources/, script install it to /usr/local//HID_Support/hut :
so no luck yet on OSX :-( |
@adcxyz , sorry, yes, I can reproduce that. Something went wrong in my tests. Will try to fix tonight... |
Should be fixed now. It's kind of a provisional fix, as the install should better be defined in sc-land, where the fundamental variables for install are visible. So I had to reassign them in the submodule. I made clean builds on Windows, OSX and Linux, and it all looks fine now. Happy testing and sorry for the annoying detours I caused ;) |
looks like it is installing the HID_Support/hut in Resources/ . Yay!
|
Thanks for being patient! Sorry, I forgot to mention: I don't get any error of the sort you observe... As to building, my commands were: cmake -GXcode -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 .. I am on 10.11.5 and Xcode 7.3... I hope that's not an issue here... |
I've posted testbuilds using that hid3.8 branch within 3.7.2. As Windows is still very unstable on master it doesn't make sense to post a build of the master branch. I added an OSX build as well (should work down to OSX 10.7): https://github.com/bagong/supercollider/releases/tag/Version-3.7.2-win-HID I think @llloret is very eager for input (any platform), an opportunity we should not let pass by ;). There is some additional stuff in that branch relevant for the other platforms, especially @sensestage 's Linux related commits before Luis' work. Unfortunately I don't know how to create a debian package, so for Linux it's still biy ;) |
just tested building current master and hutDirectory is where it should be - yay! |
From @adcxyz :
On linux, the cmake install script copies a folder “hut” from external lib hidapi)
into SCClassLibrary, which is looked up as
HIDUsage.hutDirectory;
/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/HID_support/hut/
On OSX this folder is not copied, and thus hutDirectory is missing,
so you cannot ask HIDs for semantic element types by name.
IMO, it would be cleaner to put that folder into String.scDir,
have HIDUsage.hutDirectory point to it with:
/SuperCollider.app/Contents/Resources/HID_support/hut/
I don’t know how to safely fix that in the cmake script,
but I am sure it is simple for someone who does :-)
BTW, for people who want to add the missing folder to an existing install of SC, see here:
https://github.com/ModalityTeam/Modality-toolkit/blob/master/Modality/HelpSource/Tutorials/Fix_Missing_hutDirectory_osx.schelp
The text was updated successfully, but these errors were encountered: