• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Linux Running on Windows

Discovery

Developing myself
Joined
Apr 16, 2010
Messages
561
Solutions
11
Reaction score
262
Location
Neverland
Hello there!

Well, that's a tip for a lot of ppl who virtualize with another programs, use: WSL2.

Windows Subsystem for Linux​


WSL2 it's a resource, developed by Microsoft to install new Linux Images on Windows.

Microsoft provides a simple tutorial how-to setup everything.

https://docs.microsoft.com/en-us/windows/wsl/install-win10

YOUR WINDOWS 10 NEED TO BE UPDATED TO THE LAST VERSION

Download your Linux image on Microsoft Store:


1609155479720.png



1609155523096.png

1609155620321.png

Have a nice day :p
 
Time for tutorial "how to compile TFS on WSL, run in on Linux and connect from Windows Tibia client".
I will try to do it on evening. It's Microsoft technology :( They will drop support in 1-2 years.
I'm actually not sure about that. Microsoft has been looking to do steps in this direction for years. Even attempting to buy Ubuntu at one time. Big surprise, the linux community wasn't happy about that, so they backed out.
And since the linux community has been taking alot of steps lately to give windows users a better life when using GNU-systems and made the migrations alot easier, Microsoft has taken steps as well. But yeah, the tutorial will definitely be out of date in a year or two... But that goes for almost every tutorial. Most tutorials on OTLand are just not how you do things today anymore (for good reasons).
I really hope this progress continues. I am still forced to use dual-boot and that can be a pain.
 
Time for tutorial "how to compile TFS on WSL, run in on Linux and connect from Windows Tibia client".
I will try to do it on evening. It's Microsoft technology :( They will drop support in 1-2 years.

At this point it might be better to use Docker for such purposes since it also updated recently to be able to use WSL2 if on Windows10 host (works on Home version too), and even if Microsoft decides to drop support, dockerized project would still run (on whatever other virtualization you provide). 🤔
 
Time for tutorial "how to compile TFS on WSL, run in on Linux and connect from Windows Tibia client".
I will try to do it on evening. It's Microsoft technology :( They will drop support in 1-2 years.

Another great stuff, when you use WSL its totally compatible with visual studio.
About connection routing, I'll post another content haha
Post automatically merged:

does it run 32-bit programs like tibia client 6.4?

you keep using windows applications on windows, thats better for development, when coding, testing and deploying applications.
(i'm assuming tibia client 6.4 don't have linux support)
 
I just installed TFS, SSH server, MariaDB, PHP, Apache and Gesior2012 on WSL.
Connected to it from Windows OTClient, so it works, but it's not easy to install.

I found information, that you cannot make IP static on WSL2. Every system reboot, your Ubuntu machine will get new random IP.
Linuxes run using WSL are not using systemd, so most of debian/ubuntu tutorials from google are not compatible. I cannot recommend it for newbie users.

I will try to run TFS using Docker on Windows next weekend. Maybe it will be easier to install and configure.
 
I found information, that you cannot make IP static on WSL2. Every system reboot, your Ubuntu machine will get new random IP.
Ran into that once too, didn't wanna bother fucking with it too much and trashed WSL2 ever since. Still running WSL1 here. Not sure if they've added a proper way to make it run on a static IP yet.
 
Ran into that once too, didn't wanna bother fucking with it too much and trashed WSL2 ever since. Still running WSL1 here. Not sure if they've added a proper way to make it run on a static IP yet.
They made it impossible 'normal way'. First step of setting up static IP is to edit Windows 'vEthernet' network card and set there static IP/subnet, not DHCP. Now - installed WSL2 today - there is static IP by default. Windows/WSL somehow replace that static IP configuration every restart.
So only way to make it static is to create some .bat script that reconfigure Windows network settings every restart.
Linux.. Microsoft way: force some random changes that user cannot reconfigure, WE know better what user needs.
 
They made it impossible 'normal way'. First step of setting up static IP is to edit Windows 'vEthernet' network card and set there static IP/subnet, not DHCP. Now - installed WSL2 today - there is static IP by default. Windows/WSL somehow replace that static IP configuration every restart.
So only way to make it static is to create some .bat script that reconfigure Windows network settings every restart.
Linux.. Microsoft way: force some random changes that user cannot reconfigure, WE know better what user needs.

Hey there brother, would love to test this out and set up a local "test" server to run updates/tests on; did you end up creating a docker for TFS setup by chance?
 
Hey there brother, would love to test this out and set up a local "test" server to run updates/tests on; did you end up creating a docker for TFS setup by chance?
My current Windows TFS dev:
  • OTS compiles inside docker Linux machine
  • OTS runs inside docker Linux machine
  • MySQL runs on Windows
  • Website + phpmyadmin runs on Windows

To connect to server use IP 127.0.0.1 and port 7171.

Tested on TFS 1.4

How to install/run:
  • install WSL2
  • install Docker for Windows
  • install XAMPP - we install MySQL and website on Windows
  • edit file C:\xampp\mysql\bin\my.ini to make it run on all system IPs - just add line:
Code:
bind-address="0.0.0.0"
  • go phpmyadmin and add new user root with password root and 'host' % (it means 'any ip' in mysql)
  • edit config.lua and setup mysql connection ex.:
Lua:
mysqlHost = "192.168.55.102"
mysqlUser = "root"
mysqlPass = "root"
mysqlDatabase = "tfs15"
mysqlPort = 3306
use IP that Windows gets as it's local network IP, it will be accessible from docker - that way TFS 'inside docker' can connect to 'mysql running on Windows'
Code:
version: "3.7"

services:
  server:
    build:
      context: .
    restart: always
    volumes:
      - .:/srv
    ports:
      - "7171:7171"
      - "7172:7172"
Files are in real time sync, so you can edit Lua scripts on Windows and /reload Xxx on GOD to test changes.

Commands:
docker-compose build - checks, if there are any changes in src and compile sources
docker-compose up - starts server
CTRL+C - stops server

To stop/start server use docker-compose up/CTRL+C.
If you edit any C++ file, stop server, run docker-compose build and start it again.

Only thing to optimize left is to keep Linux TFS build folder somewhere in Windows or on some 'docker volume'. Right now every single change in C++ make it compile all files (not just 1 modified file).
You can edit CMakeLists.txt in TFS and remove line:
Code:
    set_target_properties(tfs PROPERTIES INTERPROCEDURAL_OPTIMIZATION True)
to make it compile much faster (compilation time dropped from 70 to 48 sec on my pc).
 
Back
Top