Execute lobby from git repository

Post here if you want to help developing something for FAF.

Execute lobby from git repository

Postby rootbeer23 » 22 Oct 2014, 20:14

0) if you want to test the new lobby, talk to developers
1) download http://scfaf.net/lobby/lobbydeps.zip
2) install python-2.7.8.msi first the order of the others should not matter
3) install git-scm.com/download/win
4) git clone https://github.com/FAForever/lobby.git
4.1) download init_faf.lua from http://dropcanvas.com/292fa6yvJkrhn6 and save into c:\ProgramData\FAForever\lua
4.2) copy uid.dll and mfc100u.dll from official faf info the 'lobby' folder created by git (original FAF should be at c:\program files x86\forged alliance forever\)
5) c:\python27\python src\__main__.py

ps: because only init_faf.lua is linked and i was too lazy to gather the rest, you can only launch standard custom games.
Last edited by rootbeer23 on 25 Oct 2014, 02:29, edited 2 times in total.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Execute lobby from git repository

Postby Softly » 25 Oct 2014, 01:00

I've wanted to have a play around with some of the lobby code, but can't get it to run with this method.

It keeps telling me I am missing Microsoft Visual Studio... and Microsoft .NET (which I'm not). Any thoughts?

Additionally it doesn't seem to link to the res folder correctly, I see it was moved out of src (good move) but doesn't appear to have been linked to right. I could only get it to run at all by moving the res folder back into src :(.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Execute lobby from git repository

Postby rootbeer23 » 25 Oct 2014, 02:23

4.2 added to OP
about the other error, see if you are on the develop branch with

git branch

if the * is not next to develop run

git checkout develop

otherwise please post the error message.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Execute lobby from git repository

Postby Softly » 25 Oct 2014, 03:19

Moving uid.dll into lobby didn't work, but it did run from putting it in the src folder. Also there was already a copy of uid.dll in lobby\lib, so why wouldn't that one be used?

Here's the trace from running the lobby with the res folder outside the src folder:

Traceback (most recent call last):
File "C:\Users\*****\lobby\src\__main__.py", line 37, in <module>
import util
File "C:\Users\*****\lobby\src\util\__init__.py", line 651, in <module>
from crash import CrashDialog
File "C:\Users\*****\lobby\src\util\crash.py", line 23, in <module>
import fa
File "C:\Users\*****\lobby\src\fa\__init__.py", line 36, in <module>
from replay import replay
File "C:\Users\*****\lobby\src\fa\replay.py", line 23, in <module>
from fa.check import check
File "C:\Users\*****\lobby\src\fa\check.py", line 25, in <module>
from fa.mods import checkMods
File "C:\Users\*****\lobby\src\fa\mods.py", line 22, in <module>
import modvault
File "C:\Users\*****\lobby\src\modvault\__init__.py", line 71, in <module>
from modwidget import ModWidget
File "C:\Users\*****\lobby\src\modvault\modwidget.py", line 29, in <module>
FormClass, BaseClass = util.loadUiType("modvault/mod.ui")
File "C:\Users\*****\lobby\src\util\__init__.py", line 367, in loadUiType
return uic.loadUiType(os.path.join(COMMON_DIR, filename))
File "C:\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 200, in loadUiType
winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports)
File "C:\Python27\lib\site-packages\PyQt4\uic\Compiler\compiler.py", line 139, in compileUi
w = self.parse(input_stream)
File "C:\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 923, in parse
document = parse(filename)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: 'C:\\Users\\*****\\lobby\\src\\res\\modvault/mod.ui'

I'll have a quick look see if I can find where its linking to src\\res and tweak it
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Execute lobby from git repository

Postby Softly » 25 Oct 2014, 03:28

In util\__init__.py the link to res is relative to the src directory (line 42).

I've made a pull request to change it.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Execute lobby from git repository

Postby rootbeer23 » 25 Oct 2014, 03:29

did you copy mfc100u.dll too?
the exact same error appears in the master branch. are you sure you checked out develop?
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Execute lobby from git repository

Postby rootbeer23 » 25 Oct 2014, 03:33

nevermind. i see you start the lobby with CWD=src
python.exe src\__main__.py with CWD=lobby works.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Execute lobby from git repository

Postby Softly » 25 Oct 2014, 03:38

It just needs a readme update then on he correct working directory?
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Execute lobby from git repository

Postby rootbeer23 » 25 Oct 2014, 03:39

would not hurt.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Execute lobby from git repository

Postby odin002 » 04 Nov 2014, 23:12

Okay finally it's working, I can compile that : https://github.com/FAForever/lobby

So, for informations for people who would like to try to do it(i've asked some questions to softly in order to be able to compile the source), I would say (correct me please if I say something wrong, and thanks root for that tutorial too, it's his tutorial with some other informations):
Do it on windows, not linux, I've tried tbh on linux but I got sooooo many errors for the librairies so I've gave up.

0) if you want to test the new lobby, talk to developers
1) download http://scfaf.net/lobby/lobbydeps.zip
First intall the python2.7, then the order for the other files doesn't matter for the installation.
Don't worry if two installations don't work (matlib and scipy, I got the error message because I'm in 64 bits and not 32 bits but uh whatever, and even if I try 64 bits of matlib, it doesn't work, got a message error which says "python not found")

3) install git-scm.com/download/win

4)Download the zip available on this link : https://github.com/FAForever/lobby.git

4.1) download init_faf.lua from http://dropcanvas.com/292fa6yvJkrhn6 and save into c:\ProgramData\FAForever\lua
The link above is dead so try :
http://www.datafilehost.com/d/6385ccc6
or
http://s000.tinyupload.com/index.php?fi ... 8290072528

4.2) copy uid.dll and mfc100u.dll from official faf info the 'lobby' folder created by git (original FAF should be at c:\program files x86\forged alliance forever\)

4.3)Start the cmd console, and then type python, if it doesn't work (python is not found or something like that...) then do :
Right click on "My computer"
Click "Properties"
Click "Advanced system settings" in the side pannel
Click "Enviorment Variables"
Click the "New" below system variables
in name enter "pythonexe" (or anything you want)
in value enter the path to your python (example: "C:\Python32\")
Now edit the Path variable (in the system part) and add %pythonexe%; to the end of what's already there** (if at the end it's testetsg then modify it to have testetsg;%pythonexe%
IDK why this works but it did for me.
then try typing "python" in your cmd and it should work!

from a guy in http://stackoverflow.com/questions/6318 ... -windows-7

Now python is working. If not I guess it's because you failed to modify the Path variable or something like that... Ask for help here !

4.4)From the zip archive you got, unzip it and put the folder in c: (easier to go there)

5) start the cmd console, go in c:\python27 folder by using the console (cd .. or cd nameoffolderyou are going... I guess for everyone if you start it from windows to go in this folder try :
cd ..
cd..
cd nameofyourfolderoftheziparchive
and then type python src/__main__.py

Have fun now.
odin002
Avatar-of-War
 
Posts: 96
Joined: 11 Jun 2014, 06:02
Has liked: 5 times
Been liked: 12 times
FAF User Name: odin002


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest