alvr-org / PhoneVR

Use Steam VR-enabled applications with your phone as HMD (Head-mounted display). The only Open-Source solution to similar commercial packages like VRidge, iVRy, Trinus etc etc.
GNU General Public License v3.0
561 stars 38 forks source link

Linux Support #51

Closed RangerMauve closed 1 year ago

RangerMauve commented 3 years ago

Any chance this could be made compatible with SteamVR for Linux?

Does the server side rely on windows-specific APIs?

ShootingKing-AM commented 3 years ago

Hello, The OpenVR API Seems not to fully support linux yet(https://github.com/ValveSoftware/openvr/issues/749), but I personally didnt test PVR on linux. As far as building goes, there shouldn't be any issue in compiling PVR-Server for linux.

Any PRs for linux support are welcome :D

ghost commented 3 years ago

@ShootingKing-AM Hey, I'm looking to build this, could you throw me some build instructions? I'm not too sure how to go about building this!

ShootingKing-AM commented 3 years ago

@rainonwires You mean building on Linux ?? Then you need to use "makefile" + gcc. Just like any other cpp projects.

ghost commented 3 years ago

@rainonwires You mean building on Linux ?? Then you need to use "makefile" + gcc. Just like any other cpp projects.

I've never used a makefile before, nor built any cpp files from a custom makefile so could you help me out here?

ShootingKing-AM commented 3 years ago

Actually I didn't myself try to build it on Linux. So it may give out certain errors/warning which should be fixed. I am presently working of hwencoding implementation.

If you wish to help us with Linux compilation and you are uncomfortable with make, you can just use gcc to compile .cpp files to .o with -o argument and link all files into .so at the end.

ghost commented 3 years ago

@ShootingKing-AM Alright Ill try that out. Thanks.

ShootingKing-AM commented 3 years ago

If you are stuck with any errors or anything, you can use the discrod Server to ping us to get much faster reply :)

RichardTry commented 3 years ago

I get error: no matching function for call to ‘std::basic_ifstream<char>::basic_ifstream(const wchar_t*) cos ifstream(wchar_t *) is not standard C++.

blooalien commented 3 years ago

Any PRs for linux support are welcome :D

Hey, thanks for bein' open to the idea of Linux support. I also was interested in trying to build this on Linux. Were you needing someone to create a Makefile for this? I didn't find one anywhere in the git checkout.

ShootingKing-AM commented 3 years ago

Any PRs for linux support are welcome :D

Hey, thanks for bein' open to the idea of Linux support. I also was interested in trying to build this on Linux. Were you needing someone to create a Makefile for this? I didn't find one anywhere in the git checkout.

Thanks for taking interest in this project :) I didn't personally compile it on linux so no makefile is in the repo.

@RichardTry and @RangerMauve were trying to compile it on linux. Seems still they didn't find a way. The discussion was going on discord(link in readme) group.

Basically whats needed is makefile + some conditional code compilation based on the Compiler os. Some basic functions have some linux alternatives which need to be implemented to compile on linux.

RichardTry commented 3 years ago

@blooalien you can find Makefile in my fork, many errors are fixed, but windows.h and d3d11.h are still in dependencies, so it not compiles yet.

blooalien commented 3 years ago

@blooalien you can find Makefile in my fork, many errors are fixed, but windows.h and d3d11.h are still in dependencies, so it not compiles yet.

Oh, very nice! Thanks for that. I'll have to see if I can figure anything out. Prolly not. I'ma Python guy mostly, but I'ma try anyhow... :)

ShootingKing-AM commented 3 years ago

Guys if you are stuck anywhere unable to convert winodws -> linux; Ping me with those spcecific issues, with Error, Line number, function, file name etc. on Discord.

We have another similar community also trying to get things running on Linux, using OpenVR SDK as well as another Dev(who is more active on the other community :/) working on both. We can discuss and collaborate on specific issues :) Dont get depressed if you are not getting though a point ;)

gaycodegal commented 2 years ago

looks like most of the wide character typing is involved with file names. C++17 std::filesystem::path is cross platform and should make it so it handles wide characters and other types normally cross platform. Will be looking into this myself, but wanted to mention it here in case I do not complete this work

https://en.cppreference.com/w/cpp/filesystem/path/path https://stackoverflow.com/questions/821873/how-to-open-an-stdfstream-ofstream-or-ifstream-with-a-unicode-filename

ShootingKing-AM commented 1 year ago

This has been solved in latest release by using ALVR Server. If its not feel free to reopen the issue.