Monday, July 31, 2023

Battletech 3062 GOG windows Install how to Xubuntu 22.04

Update I installed Garuda Demonized.
Once that was installed, opened Bottles. Installed dotnet 472. Added winhttp. changed limits. added corefonts. 
Once that was all done, easy.


As with my previous how to, it's very possible I've missed something, Troubleshooting's a bitch. Leave me a comment and I'll update.

Install winehq


sudo dpkg --add-architecture i386 

sudo mkdir -pm755 /etc/apt/keyrings

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources

sudo apt update

sudo apt install --install-recommends winehq-stable

export WINEARCH=win32

export WINEPREFIX=~/.wine32

winecfg

should be set for windows 7 on applications tab, but otherwise, click ok.


Install lutris

sudo apt install lutris

(alternatively, download deb from https://github.com/lutris/lutris/releases)


Install Battletech

Open lutris, click the plus sign, search for a lutris installer type battletech.
Select gog w/ dxvk, click install, click install again, make sure source is set to select file, click browse, select your gog windows battletech installer exe.

let it do its thing(it'll take awhile, and you won't see anything), battletech will be installed

You should check now to make sure it works.


Now, select battletech, click on the arrow beside the wine glass at the bottom, and select "open bash terminal"


now, type in winetricks dotnet472

you'll also need some fonts(optional but useful if you use debug)
winetricks corefonts

select, 

continue, 

checkbox the license, 

install, 

restart later, 

repeat until done. there's several


Install DLC's

select battletech from lutris again, click the wine icon, and select "Run EXE inside wine prefix"

select your dlc executable, and install.


From here on in, you can follow the guide starting at section 2 modifying the folder paths as needed with 1 minor change

https://www.bta3062.com/index.php?title=Linux_Installation_Guide
Again, run the btainstaller from "Run EXE inside wine prefix"

Samsung Odyssey + and SteamVR in xubuntu 22.04

*caveat There are things that I did, that I'm not posting here.I can't remember everything, but I searched synaptic for broad terms, and searched through to find what I needed. Or just googled. Or just installed what ever lib was complaining.  Check your logs for clues. vrserver.txt is where I first saw the libcurl error. the other vr*.txt logs have useful info as well if you get stuck, you should be able to find help on the discord. (searching the discord is where I got the clue for the fix for the libcurl error as well.)

*Edit, I referenced this page for a bunch of things, and couldn't find it again, when I did my reinstall.
https://gitlab.freedesktop.org/monado/webpage/-/merge_requests/41/diffs

First install video Drivers.
I have an Nvidia RTX 2060, so I've installed the latest tested proprietary drivers from ubuntu. (You can google if you don't know how... it's easy) (if you can't save xorg.conf, google "nvidia polkit")


Then install these:

   sudo apt install cmake ninja-build build-essential git wget unzip libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libbluetooth-dev libsystemd-dev xr-hardware

Download and compile/install Monado

    git clone https://gitlab.freedesktop.org/monado/monado.git

    cd monado/

    cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/usr

    sudo ninja -C build install


create /etc/X11/xorg.conf.d/99-HMD.conf and insert this into contents


   sudo nano /etc/X11/xorg.conf.d/99-HMD.conf


Section "Device"

    Identifier     "Device0"

    Driver         "nvidia"


    Option "AllowHMD" "yes"

EndSection

xrandr --output HDMI-0 --prop --set non-desktop 1

now run monado-service with your headset plugged in and you should get a grey output on the goggles.

press enter to exit monado-service

monado-service

Install Steam and devices(again, lots of how tos on this)
sudo apt install steam-installer steam-devices
log in, and install steamvr 

There were a bunch of other steps that I did not include, as most were not necessary. Most of it was troubleshooting, and I think the next line is what would have saved me hours...


Libcurl is installed with steam, and it's corrupt? incorrect? dunno... link it to actual, and all works fine.


   cd /home/$USER/.steam/steam/ubuntu12_32/steam-runtime/pinned_libs_64

   mv libcurl.so.4 libcurl.so.4.bak

   ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4 libcurl.so.4
Then,

~/.steam/steam/steamapps/common/SteamVR/bin/vrpathreg.sh adddriver /usr/share/steamvr-monado

Run steamvr

This works with multiple monitors. Maybe older versions had issues, but this did not.

Installed these, but not sure if I needed them.
 python3 vulkan-tools libvulkan1 

OpenXR-SDK

sudo apt install mesa-common-dev libxxf86vm-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-glx0-dev libxcb-dri2-0-dev libx11-xcb-dev libvulkan-dev libgl1-mesa-dev 

git clone https://github.com/KhronosGroup/OpenXR-SDK.git
cd OpenXR-SDK
cmake . -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -Bbuild
sudo ninja -C build install

sudo mkdir -p /etc/xdg/openxr/1/
sudo ln -s /usr/share/openxr/1/openxr_monado.json /etc/xdg/openxr/1/active_runtime.json
mkdir -p ~/.config/openxr/1
ln -s /usr/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.json

Installed basalt according to readme/ https://gitlab.freedesktop.org/monado/webpage/-/merge_requests/41/diffs
and now 6dof works? either way, my terminology may be wrong, but it's good.

### For SLAM tracking support, using Basalt 

Some other dependencies are needed.

  sudo apt install libtbb-dev libglew-dev libpng-dev liblz4-dev libbz2-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-date-time-dev libboost-program-options-dev libboost-serialization-dev libgtest-dev libfmt-dev libuvc-dev

git clone --recurse-submodules https://gitlab.freedesktop.org/mateosss/basalt
cd basalt
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
sudo ninja -C build install

recompile monado

cd monado/

    cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/usr

    sudo ninja -C build install

A bit about this xrandr command. I could make this load on login, but I run multiple monitors and my hdmi port uses one, so I switch it. also, I don't leave my headset plugged in, to save it's life. even plugged in and off, it's warm, so I leave it unplugged when not using, and then run this when I plug in, and test with monado-service.

xrandr --output HDMI-0 --prop --set non-desktop 1
test with
monado-service

check the readme's for info on this line as well, as you may have a different setup than mine, and your variables will be different.