mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:14:35 +02:00
Merge pull request #956 from birarda/master
changes to README for new local stack setup, fix custom domain IP/port
This commit is contained in:
commit
476ccc0d1c
2 changed files with 24 additions and 38 deletions
36
README.md
36
README.md
|
@ -94,7 +94,7 @@ I want to run my own virtual world!
|
||||||
|
|
||||||
In order to set up your own virtual world, you need to set up and run your own
|
In order to set up your own virtual world, you need to set up and run your own
|
||||||
local "domain". At a minimum, you must run a domain-server, voxel-server,
|
local "domain". At a minimum, you must run a domain-server, voxel-server,
|
||||||
audio-mixer, and avatar-mixer to have a working virtual world. The audio-mixer and avatar-mixer are assignments given from the domain-server to any assignment-client that reports directly to it.
|
audio-mixer, and avatar-mixer to have a working virtual world. The audio-mixer, avatar-mixer, and voxel-server are assignments given from the domain-server to any assignment-client that reports directly to it.
|
||||||
|
|
||||||
Complete the steps above to build the system components, using the default Cmake Unix Makefiles generator. Start with an empty build directory.
|
Complete the steps above to build the system components, using the default Cmake Unix Makefiles generator. Start with an empty build directory.
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ window, change directory into the build directory, make the needed components, a
|
||||||
First we make the targets we'll need.
|
First we make the targets we'll need.
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
make domain-server voxel-server assignment-client
|
make domain-server assignment-client
|
||||||
|
|
||||||
If after this step you're seeing something like the following
|
If after this step you're seeing something like the following
|
||||||
|
|
||||||
|
@ -114,35 +114,16 @@ If after this step you're seeing something like the following
|
||||||
|
|
||||||
you likely had Cmake generate Xcode project files and have not run `cmake ..` in a clean build directory.
|
you likely had Cmake generate Xcode project files and have not run `cmake ..` in a clean build directory.
|
||||||
|
|
||||||
Then, launch the static components - a domain-server and a voxel-server. All of the targets will run in the foreground, so you'll either want to background it yourself or open a seperate terminal window per target.
|
Then, launch the static domain-server. All of the targets will run in the foreground, so you'll either want to background it yourself or open a seperate terminal window per target.
|
||||||
|
|
||||||
cd domain-server && ./domain-server
|
cd domain-server && ./domain-server
|
||||||
./voxel-server/voxel-server --local > /tmp/voxel-server.log 2>&1 &
|
|
||||||
|
|
||||||
Then, run an assignment-client with 2 forks to fulfill the avatar-mixer and audio-mixer assignments. It uses localhost as its assignment-server and talks to it on port 40102 (the default domain-server port).
|
Then, run an assignment-client with 3 forks to fulfill the avatar-mixer, audio-mixer, and voxel-server assignments. It uses localhost as its assignment-server and talks to it on port 40102 (the default domain-server port).
|
||||||
|
|
||||||
./assignment-client/assignment-client -n 2 -a localhost -p 40102
|
./assignment-client/assignment-client -n 3
|
||||||
|
|
||||||
Any target can be terminated with CTRL-C (SIGINT) in the associated terminal window.
|
Any target can be terminated with CTRL-C (SIGINT) in the associated terminal window.
|
||||||
|
|
||||||
Determine the IP address of the machine you're running these servers on. Here's
|
|
||||||
a handy resource that explains how to do this for different operating systems.
|
|
||||||
http://kb.iu.edu/data/aapa.html
|
|
||||||
|
|
||||||
On Mac OS X, and many Unix systems you can use the ifconfig command. Typically,
|
|
||||||
the following command will give you the IP address you need to use.
|
|
||||||
|
|
||||||
ifconfig | grep inet | grep broadcast
|
|
||||||
|
|
||||||
You should get something like this:
|
|
||||||
|
|
||||||
inet 192.168.1.104 netmask 0xffffff00 broadcast 192.168.1.255
|
|
||||||
|
|
||||||
Your IP address is the first set of numbers. In this case "192.168.1.104". You
|
|
||||||
may now use this IP address to access your domain. If you are running a local
|
|
||||||
DNS or other name service you should be able to access this IP address by name
|
|
||||||
as well.
|
|
||||||
|
|
||||||
To test things out you'll want to run the Interface client. You can make that target with the following command:
|
To test things out you'll want to run the Interface client. You can make that target with the following command:
|
||||||
|
|
||||||
make interface
|
make interface
|
||||||
|
@ -150,9 +131,8 @@ To test things out you'll want to run the Interface client. You can make that ta
|
||||||
Then run the executable it builds, or open interface.app if you're on OS X.
|
Then run the executable it builds, or open interface.app if you're on OS X.
|
||||||
|
|
||||||
To access your local domain in Interface, open the Preferences dialog box, from
|
To access your local domain in Interface, open the Preferences dialog box, from
|
||||||
the Interface menu on OS X or the File menu on Linux, and enter the IP address of the local DNS name for the
|
the Interface menu on OS X or the File menu on Linux, and enter "localhost" for the
|
||||||
server computer in the "Domain" edit control.
|
server hostname in the "Domain" edit control.
|
||||||
|
|
||||||
In the voxel-server/src directory you will find a README that explains in
|
In the voxel-server/src directory you will find a README that explains in
|
||||||
further detail how to setup and administer a voxel-server.
|
further detail how to setup and administer a voxel-server.
|
||||||
|
|
|
@ -106,7 +106,7 @@ void NodeList::setDomainHostname(const QString& domainHostname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset our _domainIP to the null address so that a lookup happens on next check in
|
// reset our _domainIP to the null address so that a lookup happens on next check in
|
||||||
_domainIP = QHostAddress();
|
_domainIP.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeList::timePingReply(sockaddr *nodeAddress, unsigned char *packetData) {
|
void NodeList::timePingReply(sockaddr *nodeAddress, unsigned char *packetData) {
|
||||||
|
@ -283,15 +283,21 @@ void NodeList::sendDomainServerCheckIn(const char* assignmentUUID) {
|
||||||
|
|
||||||
QHostInfo domainServerHostInfo = QHostInfo::fromName(_domainHostname);
|
QHostInfo domainServerHostInfo = QHostInfo::fromName(_domainHostname);
|
||||||
|
|
||||||
if (!domainServerHostInfo.addresses().isEmpty()) {
|
for (int i = 0; i < domainServerHostInfo.addresses().size(); i++) {
|
||||||
// set our domainIP to the first IP address
|
if (domainServerHostInfo.addresses()[i].protocol() == QAbstractSocket::IPv4Protocol) {
|
||||||
_domainIP = domainServerHostInfo.addresses().first();
|
_domainIP = domainServerHostInfo.addresses()[i];
|
||||||
|
|
||||||
|
qDebug("DS at %s is at %s\n", _domainHostname.toStdString().c_str(), _domainIP.toString().toStdString().c_str());
|
||||||
|
|
||||||
|
printedDomainServerIP = true;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
qDebug("DS at %s is at %s\n", _domainHostname.toStdString().c_str(), _domainIP.toString().toStdString().c_str());
|
// if we got here without a break out of the for loop then we failed to lookup the address
|
||||||
|
if (i == domainServerHostInfo.addresses().size() - 1) {
|
||||||
printedDomainServerIP = true;
|
qDebug("Failed domain server lookup\n");
|
||||||
} else {
|
}
|
||||||
qDebug("Failed domain server lookup\n");
|
|
||||||
}
|
}
|
||||||
} else if (!printedDomainServerIP) {
|
} else if (!printedDomainServerIP) {
|
||||||
qDebug("Domain Server IP: %s\n", _domainIP.toString().toStdString().c_str());
|
qDebug("Domain Server IP: %s\n", _domainIP.toString().toStdString().c_str());
|
||||||
|
@ -380,7 +386,7 @@ int NodeList::processDomainServerList(unsigned char* packetData, size_t dataByte
|
||||||
// if the public socket address is 0 then it's reachable at the same IP
|
// if the public socket address is 0 then it's reachable at the same IP
|
||||||
// as the domain server
|
// as the domain server
|
||||||
if (nodePublicSocket.sin_addr.s_addr == 0) {
|
if (nodePublicSocket.sin_addr.s_addr == 0) {
|
||||||
nodePublicSocket.sin_addr.s_addr = _domainIP.toIPv4Address();
|
nodePublicSocket.sin_addr.s_addr = htonl(_domainIP.toIPv4Address());
|
||||||
}
|
}
|
||||||
|
|
||||||
addOrUpdateNode((sockaddr*) &nodePublicSocket, (sockaddr*) &nodeLocalSocket, nodeType, nodeId);
|
addOrUpdateNode((sockaddr*) &nodePublicSocket, (sockaddr*) &nodeLocalSocket, nodeType, nodeId);
|
||||||
|
|
Loading…
Reference in a new issue