Page 1 of 2 12 LastLast
Results 1 to 40 of 71

Thread: How to run from the source on Windows

  1. #1

    Default How to run from the source on Windows

    This tutorial is aimed to people without knowledge of git and compiling. People who know their way around can just go to https://github.com/po-devs/pokemon-online and use their favorite tools.

    Installs

    First, install the Qt SDK: http://qt.nokia.com/downloads/sdk-windows-cpp
    Then, install the latest MinGW: http://sourceforge.net/projects/ming...8.exe/download. Don't forget to select C++ compiler in the things to install.
    Then, replace the contents of C:/QtSdk/mingw by the contents of C:/MinGW

    Then install Git Bash: (read under here before the installation) http://code.google.com/p/msysgit/

    (Take the latest download).

    During the installation of Git Bash, you'll be asked two things where you shouldn't take the first option. For those, take the option in those screens:





    Downloading the source

    Open git bash. It'd really help if you had some linux experience, or followed a quick tutorial on terminal commands.

    Anyway here is a brief summary of the basics:


    • Use pwd to show the current directory
    • Use ls to show the files in the current directory
    • Use cd xxx to go in the xxx directory
    • Use cd ../ to go one directory up (and ../../ to go two directories up, ...)
    • When you've typed the beginning of a command or a file path you can press TAB to have it auto completed.
    • You can press the Up arrow and the Down arrow to navigate through commands history


    So you can move around your Folders. Once you've found a suitable place to put the source folder, stop moving. (The source folder will be created within the current folder)

    And type:

    Code :
    git clone git://github.com/coyotte508/pokemon-online.git
    You can also add a space and then a custom name for the source folder if you don't like pogeymon-online.

    The download'll proceed...

    Once it's finished, you don't really need to use git bash anymore (except to update the source).

    Compiling and Running

    Run Qt Creator. Open pogeymon-online/src/PokemonInfo/PokemonInfo.pro. Do the same for pogeymon-online/src/Utilities/Utilities.pro and pogeymon-online/src/Server/Server.pro

    Right click on a project in the list of the editor and select build to build it. Build, in that order:


    • Utilities
    • PokemonInfo
    • Server


    Then right click on the Server project and select "Run" to run it. You may have to make it the current project in order to run it (go in the projects tab, and select it, then go back in the editing tab)

    Note: MinGW 4.4 can give you problems with things like ::swprintf not defined. In that case delete the lines that cause the problem (like using ::swprintf).

    Updating the Server

    Go in git bash, go in the source folder (pogeymon-online) and type git pull. If you made script changes it may fail, in that case do:
    Code :
    git stash
    git pull
    git stash apply
    There are other ways to do it if you're more experienced with git . It's just recommended to back up the tiers.xml and scripts.js files before updating.

    Running the Server in a Debugger

    Make the Server the active project in Qt Creator. And instead of running it, press F5. Then if it crashes you'll have a backtrace and you can screenshot it to report a crash

    Note: All that can be done for the client too. Just compile BattleInfo and then Teambuilder instead of Server. And if you succeed having crashes for the Teambuilder, you can report them too.
    Last edited by coyotte508; December 20th, 2012 at 23:47.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  2. #2

    Default sorry but some pic s are dead

    i was installing the git.but i don't know which choice should i take. the pic s are dead.

    so ....

  3. #3

    Default

    The pics aren't dead.

    Anyway, when the title is "Adjusting your path environment", choose "Run Git from the Windows Command Prompt" (2nd choice)

    And when it's "Configuring the line ending conversions", choose "Checkout as-is, commit as-is" (3rd option)

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  4. #4
    Developer
    Found 2 bugsData CollectorFormer Pokémon Online Developer
    Blastcore's Avatar
    Join Date
    Jul 2010
    Location
    Argentina
    Posts
    761

    Default

    I was compling the Server and got a "mingw32-make.exe2 stopped working.

  5. #5

    Default

    I've followed the instructions to the letter, as well as tried other clients such as TortoiseGit, but every time I try it hangs at "Cloning into pogeymon-online". Any idea what the problem might be?

  6. #6

    Default

    Sourceforge is slow, so you should wait for like 15 minutes (do something else during that time), if nothing happens still then post again.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  7. #7

    Default

    It's been a couple hours.

  8. #8

    Default

    use this instead then: git://github.com/coyotte508/pokemon-online.git

    I'll permanently move to github maybe for the git repository, provided other developers agree.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  9. #9

    Default

    It still didn't work until I told it to use the HTTP protocol instead, which I couldn't do previously because Sourceforge doesn't support Git over HTTP. Thanks!

  10. #10

    Default

    You could have registered an account at sourceforge and used ssh to transfer, actually.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  11. #11

    Default

    Note: In the soon future, maybe you will need C++0x capabilities to compile it.

    See secret tag in OP on how to do it easily.
    Last edited by coyotte508; September 8th, 2011 at 22:44.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  12. #12
    Developer
    Found 2 bugsData CollectorFormer Pokémon Online Developer
    Blastcore's Avatar
    Join Date
    Jul 2010
    Location
    Argentina
    Posts
    761

    Default

    I'm more dead. Why we would need C++0x?

  13. #13

    Default

    Why Qt sdk takes so much time to install.Even after 1 hour it was just 4 %

  14. #14
    I see what you did there
    Pokémon Online DeveloperCo-Lead DeveloperManages PO ScriptsMafia AdminManages PO MafiaServer Owner and the MOST AWESOME VIKING!Global Forum Moderator
    Lamperi's Avatar
    Join Date
    Apr 2010
    Location
    Tampere, Finland
    Posts
    2,617

    Default

    It downloads the stuff from the internet (if you are using the network installer). 1-2GB might take a long time on slower network connections.
    Master of Science (Tech), Mathematics
    Dad with three daughters, full time Design Engineer in a software company
    I wish days had 28 hours instead of 24

  15. #15

    Default

    So,is there any way to make it a bit fast?

  16. #16
    I see what you did there
    Pokémon Online DeveloperCo-Lead DeveloperManages PO ScriptsMafia AdminManages PO MafiaServer Owner and the MOST AWESOME VIKING!Global Forum Moderator
    Lamperi's Avatar
    Join Date
    Apr 2010
    Location
    Tampere, Finland
    Posts
    2,617

    Default

    Get a faster Internet.
    Master of Science (Tech), Mathematics
    Dad with three daughters, full time Design Engineer in a software company
    I wish days had 28 hours instead of 24

  17. #17

    Default

    Okay finaly i installed it but m stuck at this step "Compiling and Running" Please help

  18. #18
    I see what you did there
    Pokémon Online DeveloperCo-Lead DeveloperManages PO ScriptsMafia AdminManages PO MafiaServer Owner and the MOST AWESOME VIKING!Global Forum Moderator
    Lamperi's Avatar
    Join Date
    Apr 2010
    Location
    Tampere, Finland
    Posts
    2,617

    Default

    What did you do?
    Master of Science (Tech), Mathematics
    Dad with three daughters, full time Design Engineer in a software company
    I wish days had 28 hours instead of 24

  19. #19

    Default

    Actually I am not getting how to run,can someone please upload screenshots?

  20. #20
    100kv

    Default

    It's pretty straightforward. Just right click on Server, and click Run (it has that green play icon).


    I'm having some problems compiling and running too. When I build Teambuilder I get 3 errors:

    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\cwchar:159: error: '::swprintf' has not been declared
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\cwchar:166: error: '::vswprintf' has not been declared
    and
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qha sh.h:225: error: invalid operands of types 'const BattleEnum' and 'BattleEnum' to binary 'operator=='

    I tried using the MinGW 4.6, following coyotte's instructions, but I also end up with this error:

    Running build steps for project Teambuilder...
    Configuration unchanged, skipping qmake step.
    Could not start process "mingw32-make.exe"
    Error while building project Teambuilder (target: Desktop)
    When executing build step 'Make'

    This applies for every project I try to compile (not just Teambuilder).

    EDIT:
    I was able to fix the above problem. Originally I just created a shortcut for the new MinGW, but when I created a hard copy into Qt/MinGW it worked fine.

    However, now I'm getting various errors building Teambuilder...

    EDIT 2:
    I was able to run Teambuilder project successfully. I had to comment out "<<<<<<<" and "========" from channel.cpp, and also build BattleManager project first. Thanks to Lamperi
    Last edited by 100kv; October 24th, 2011 at 06:36. Reason: solved mingw32-make.exe problem

  21. #21
    I see what you did there
    Pokémon Online DeveloperCo-Lead DeveloperManages PO ScriptsMafia AdminManages PO MafiaServer Owner and the MOST AWESOME VIKING!Global Forum Moderator
    Lamperi's Avatar
    Join Date
    Apr 2010
    Location
    Tampere, Finland
    Posts
    2,617

    Default

    The ""<<<<<<<", "========" lines mean that the GIT had a conflict while merging files, and couldn't automatically merge/combine them.

    Between "<<<<<<<<" and "========" is "your" version of the code, and "========", ">>>>>>>>" the other version of the code. You should then merge them by hand, such a way that the code does what it should do.
    Master of Science (Tech), Mathematics
    Dad with three daughters, full time Design Engineer in a software company
    I wish days had 28 hours instead of 24

  22. #22
    Developer
    Found 2 bugsData CollectorFormer Pokémon Online Developer
    Blastcore's Avatar
    Join Date
    Jul 2010
    Location
    Argentina
    Posts
    761

    Default

    Haven't PO moved to Github? o.O

  23. #23
    Admin/Developer
    Found 1 bugFormer PO Mafia LeaderFormer PO Mafia LeaderFormer Pokémon Online DeveloperFormer Server Administrator
    Viderizer's Avatar
    Join Date
    Mar 2011
    Location
    Finland, Vantaa
    Posts
    277

    Default

    Yes.

    Quote Originally Posted by coyotte508 View Post
    Code :
    git clone git://github.com/coyotte508/pokemon-online.git
    You are now breathing manually.

  24. #24

    Join Date
    Aug 2010
    Location
    Portugal
    Posts
    5

    Default

    You should do something about that "secret" tag in the OP. What's in there is essential for compiling the latest versions.

  25. #25

    Default

    Actually not, the latest version's been made compatible with gcc 4.4 for windows users. I deleted the secret tag.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  26. #26

    Join Date
    Aug 2010
    Location
    Portugal
    Posts
    5

    Default

    I guess I did something wrong then. gcc 4.4 didn't work for me - it resulted in a segmentation fault when compiling. And gcc 4.6 would give me linker errors. Then I compiled the qt libraries and qt creator with gcc 4.6, and now PO compiles without errors.

  27. #27

    Default

    Oh right. It's because you can't use qt 4.8.0 with gcc 4.4 if you enable c++0x, you have to use qt 4.7.4. Since I erased the links... I'd be grateful if you could tell me where you got the working gcc 4.6!

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  28. #28

    Join Date
    Aug 2010
    Location
    Portugal
    Posts
    5

    Default

    I got gcc 4.6 from here:
    http://sourceforge.net/projects/ming...8.exe/download
    (latest version of mingw-get-inst)

  29. #29
    Senior Of Team Rocket Kata's Avatar
    Join Date
    Dec 2011
    Location
    Pakistan
    Posts
    2

    Default

    Sorry coyotee your method not working i dont know why ?

  30. #30

    Default

    I updated the guide slightly to take in account the new mingw (thanks wiz!)

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  31. #31

    Default

    How do you fix an -lzip error on windows? Compiling from qt on windows gives an lzip error :x

  32. #32

    Default

    It should find the zip files (bin/zip.dll and bin/zlib1.dll). Can you give the whole compiling output and your Teambuilder.pro file?

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  33. #33

    Default

    http://pastebin.com/83Pa6QQU This is for my friend's pc btw, not mine. Compiled the pokemononline.pro which has all the .pro's in src folder in one file.

    Edit: missed an extra bin of importance... http://pastebin.com/nCtbA3wX
    Last edited by kupo; July 1st, 2012 at 03:34.

  34. #34

    Default

    And are the files bin/zip.dll and bin/zlib1.dll there?

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  35. #35

    Default

    Just checked, yes both are there.

  36. #36

    Default

    Disable the shadow build in your project options, and rebuild everything.

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  37. #37

    Default

    Did that, and now we get no zlip errors, but we do get these:
    C:\Users\Steven\Desktop\qtpo\pokemon-online\src\Teambuilder\serverchoicemodel.cpp:-1: In member function 'virtual QVariant ServerChoiceModel::headerData(int, Qt::Orientation, int) const':
    C:\Users\Steven\Desktop\qtpo\pokemon-online\src\Teambuilder\serverchoicemodel.cpp:113: error: 'InitialSortOrderRole' is not a member of 'Qt'

  38. #38

    Default

    Yes, I'm sorry, you're going to have to update to Qt 4.8.

    You'll also have to get the custom MinGW because Qt 4.8 doesn't work with the current one with C++0X (it's all explained in the OP)

    - Badges: 3rd Gen, Challenge Cup, VGC 2011 -
    Proud Teams: Adv, UU Gen 4
    (23:07:44) ±Chatot: Scott TM disallowed swearing.

  39. #39
    Developer
    Found 2 bugsData CollectorFormer Pokémon Online Developer
    Blastcore's Avatar
    Join Date
    Jul 2010
    Location
    Argentina
    Posts
    761

    Default

    Quote Originally Posted by coyotte508 View Post
    Yes, I'm sorry, you're going to have to update to Qt 4.8.

    You'll also have to get the custom MinGW because Qt 4.8 doesn't work with the current one with C++0X (it's all explained in the OP)
    I hope you don't get the same issues as i do.
    I'm a Pokémon Online Developer. You can feel free to contact me though Private Message or Visitor Message.

  40. #40

    Default

    Quote Originally Posted by coyotte508
    uhm your compiler doesn't like C99 arrays.

    http://gcc.gnu.org/onlinedocs/gcc-3....c_5.html#SEC82

    This must be due to the compilation flags. I need to see the "compile output" to see what flags qt calls gcc with. And i'll only answer if it's in the appropriate thread (the one on how to run the source on windows)

    Also you don't need to build the client step by step anymore, just right click on the whole Pokemon Online project and build.
    I built the whole project and I got this: http://pastebin.com/ezvTJwzN as my compile output.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •