1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Cloudflare Security Issue - Change Your Passwords!

    Hello there, Guest!

    Cloudflare, the internet proxy we use to protect ourselves against DDoS and other malicious attacks, reported on 23rd February 2017 that they had patched a bug reported by Google's Project Zero that was exposing sensitive information in random requests, approximately 0.00003% of all requests, since September 2016.

    Whilst it is unlikely that any information has been leaked from this website, we recommend that all users change their passwords here on the Pokémon Online forums, as a precaution. Remember to use a unique and secure password for every site that requires one.

    We apologise for any inconvenience caused.

    Dismiss Notice

How to run from the source / develop

Discussion in 'Development General' started by Fuzzysqurl, May 6, 2015.

  1. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,092
    Likes Received:
    937
    Mac, Linux & Raspberry Pi Tutorials

    This will be a guide on how to install all the software needed to run Pokemon Online from the source, allowing you to make local changes for either your own use or for help in advancing the simulator.
    Prep work
    First, you'll need to make some downloads.
    Qt 5.0.2: http://download.qt.io/archive/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-mingw47_32-x86-offline.exe (650 MB, it will take some time to download. I suggest starting it now. Also, you cannot use a newer version of Qt otherwise things will not work correctly.)
    GitHub for Windows: https://windows.github.com/ (661 KB)

    Second, you'll need to have a github account and a fork of the main repo. If you do not have one, then go make one: https://github.com/
    If you do, or after you make one, head over to https://github.com/po-devs/pokemon-online and click the button that says "Fork" in the upper right corner.
    [​IMG]

    Third, you need a folder you can easily access or remember that has NO SPACES IN THE NAME. Make sure to name it something that you'll know what it is. I personally just put it in Documents with the name "POServer", but this part is up to you. Just remember where you save it because you'll need to access it very shortly.
    Setting up GitHub
    Open the GitHubSetup.exe that you downloaded and proceed to install it. It will download some additional files (45 MB) required for the program to run. Two icons will appear, probably on your desktop, called "GitHub" and "GitShell". There will also be an entry in your Start Menu to launch the programs (Folder named "GitHub, Inc"), so you're welcome to delete the icons if you prefer to have a clean desktop.
    [​IMG]
    The main client should also launch.
    [​IMG]
    Type your log in information, then use the pre-filled values for the next screen (Configure), and if anything pops up for "Repositories" just click "Skip" for now.
    [​IMG]

    Click the "+" button in the upper left of the client and select "Clone" in the new window that pops up. Select "pokemon-online" and then "Clone pokemon-online" at the bottom.
    [​IMG]
    It will prompt you to select a location to clone in. Locate the folder you made in the previous section and press OK. It will then download all the files from the repo onto your computer. This process can take some time to complete fully. When it is complete, click the button in the top right for "Sync" and it will ensure your local copy matches the remote copy.
    [​IMG]

    (Optional) Personally, I prefer using Git Bash for my Shell handler. For the most part you won't be using it, but if you run into issues and do end up needing it, its a lot easier to ask for help if everyone uses the same handler. By default, GitHub uses PowerShell. In order to change it, click the Gear shaped icon in the top right and select "Options". Select "Git Bash" from the right hand list and then "Save."

    Setting up Qt
    Hopefully by now Qt is done downloading, otherwise you'll need to wait for that to finish.
    Open it up and proceed to install. The installer is pre-loaded with all the default values you need. Blindly agree to the terms & conditions without reading them to continue the install... or read them, I don't care.

    After it finishes installing it will show the completed screen. Uncheck the "ReadMe" (or don't, if you enjoy reading!) but leave "Launch Qt Creator" checked.
    [​IMG]

    When Qt Creator launches, go to to "File" and select "Open File or Project" (or Ctrl+O). Navigate to the folder you created at the start and open the folder that says "pokemon-online" in that folder should be a file called "PokemonOnline.pro". This is your project file, so select that to open.

    A configuration screen will pop up. The default values are fine once again. If it isn't broke, make a bunch of changes to it so that it breaks really bad don't fix it!
    [​IMG]

    This is what your screen should look similar to
    [​IMG]

    You'll need to change a few settings in order to be successful, so click the icon that looks like a computer monitor with the word "Debug" and then in the new window that pops up, change it to "Release". The reason for this is that Debug doesn't always work correctly on Windows. Once that is changed, click the icon that looks like a folder with the word "Projects".
    In Build steps for qmake click details and add
    Code (text):
    1. CONFIG+="po_all"
    You can also type "-j" in the Make Argument box. It's supposed to speed up build time but no one on the internet can come to a consensus on what to do with this box.
    [​IMG]

    Running
    Click the icon that looks like a piece of paper with the word "Edit" to go back to the main section. Your two main things you'll be running are "Server" and "Teambuilder" (Client). You can right click the section and select "Run" and the respective clients will open after a bit of building time. "BattleServer" is another one you could frequently run, but that automatically starts up when you run "Server" anyway.

    Keeping up to date

    [Coming soon]

    Editing files
    [Coming soon]
     
    Last edited: May 6, 2015
  2. Camilo

    Camilo Member

    Joined:
    Apr 10, 2014
    Messages:
    53
    Likes Received:
    2
    Thanks :D i'll try it, if i have a trouble i'll comment you
     
  3. Camilo

    Camilo Member

    Joined:
    Apr 10, 2014
    Messages:
    53
    Likes Received:
    2
    [​IMG]

    2 Hours and it doesnt build, what can i do?
     
  4. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,092
    Likes Received:
    937
    Sorry just noticed this. Typically those errors are ignorable and wouldn't cause the build to fail. Was it just taking a long time and you cancelled it? Or did it fail to build on its own? If its the former, I can help you with building parts individually. If its the latter, there's usually a red circle with an exclamation mark letting you know of the fatal error that prevent it from finishing.
     
  5. Zahid Shaikh

    Zahid Shaikh New Member

    Joined:
    Dec 9, 2015
    Messages:
    3
    Likes Received:
    0
    After all the compiling QT Creator does it lastly says
    "Unable to find Pokemon-debug-.exe. It does not exist"
     
  6. MidwayMarshall

    MidwayMarshall woof Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jun 13, 2014
    Messages:
    302
    Likes Received:
    167
    Did you set it to release instead of debug?
     
  7. Zahid Shaikh

    Zahid Shaikh New Member

    Joined:
    Dec 9, 2015
    Messages:
    3
    Likes Received:
    0
    yes i tried both of them
     
  8. Zahid Shaikh

    Zahid Shaikh New Member

    Joined:
    Dec 9, 2015
    Messages:
    3
    Likes Received:
    0
    Here is the screenshot
     

    Attached Files:

  9. Professor Oak

    Professor Oak Pimp Hand Strong Forum Administrator Server Owner Social Media Rep Forum Administrator Server Owner Social Media Rep

    Joined:
    Apr 21, 2010
    Messages:
    3,393
    Likes Received:
    1,988
    PO Trainer Name:
    Professor Oak
    Qt creator always stops responding permanently upon loading the cloned project in POServer folder on Windows 10. Any way around this that doesn't involve changing operating system or completely redoing PO in an updated Qt version?
     
  10. turbedi

    turbedi Professional circle clicker ~~~ Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jul 18, 2013
    Messages:
    373
    Likes Received:
    143
    PO Trainer Name:
    turbedi
    Can you try to switch the build from Debug to Release in the bottom left when you try to load the project? It should take a few seconds until Qt stops responding, so there should be enough time to swap. It will crash right after that, but after restarting Qt and reloading the project it should work fine (at least it does for me)
     
  11. Professor Oak

    Professor Oak Pimp Hand Strong Forum Administrator Server Owner Social Media Rep Forum Administrator Server Owner Social Media Rep

    Joined:
    Apr 21, 2010
    Messages:
    3,393
    Likes Received:
    1,988
    PO Trainer Name:
    Professor Oak
    Turns out that the exact opposite of what you said worked for me.

    It loaded fine as Debug build, but crashed any time I tried to change it to Release. Got it working last night and did some testing for Fuzzy :P
     
  12. Yttrium

    Yttrium Active Member Developer Developer

    Joined:
    Sep 29, 2010
    Messages:
    595
    Likes Received:
    209
    PO Trainer Name:
    Yttrium
    [​IMG]
    rip
     
    EvilDingoRobot and Rabidragon like this.
  13. MidwayMarshall

    MidwayMarshall woof Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jun 13, 2014
    Messages:
    302
    Likes Received:
    167
    Keeping up to date is simply using github. Editing files it pretty self explanatory in qt for most file types.
     
    Fuzzysqurl and Zoroark like this.