The Gamefromscratch PlayN installer is fairly straight forward in execution but has a few tricky points. Also, I can’t be sure it will work 100% and you can refer to this process to see if your installation worked properly.
On occasion an environmental or Maven problem can occur during installation, or you weren’t fast enough installing the Android SDK. If that happens, simply close the dos prompt then run the installer again.
First things first, download the GFSPlayNInstaller. Extract this file anywhere on your computer, it will contain two files, a .CMD and at .PS1 file. The PS1 file does all the work, but needs to be launched using the .CMD to have the proper permissions. Do not run from within the zip, this will not work. Throughout the install you might get a Windows firewall prompt regarding Java, this is part of the Google PlayN install process and should be granted permission.
Double click Install.cmd
A command prompt will open and you will receive a prompt to determine if your system is 32 or 64 bit; hopefully the detection is correct and you can simply click YES.
Now you will be prompted if you have a Java JDK installed ( the JRE is not enough! ).
If you do not have a JDK installed or you do not know, click No. This will cause the JDK to be downloaded and installed automatically. If you already have a JDK installed click Yes, and the following dialog will appear:
Simply navigate to the JDK directory and click OK. Do NOT click cancel, I am not completely sure what will happen, but I doubt it’s good. If you clicked No earlier, you will not get this dialog. If you clicked YES and the dialog didn’t appear, alt-tab around to see if it is there somewhere, it doesn’t always get focus.
Now you will be presented with this dialog:
This dialog is determining where PlayN is going to be installed. If you simply click OK, it will be created in C:. Where ever you select a new folder PlayN will be created, so you do not need to create a folder just for it. Again, don’t click Cancel… Now the installer is going to go off and do its magic for a while….
Behind the scenes it is doing a number of things, downloading a zip program, grabbing Git and the Android SDK. Even if you don’t want to develop for Android, you need the SDK installed for PlayN to work properly. That is the next step and it is very important you do this part correctly as it was the only bit I could not automate! You need to configure the Android SDK and you need to do it fairly quickly as the install will continue while the Android SDK install happens and eventually the install is going to depend on the SDK being installed. Worst case scenario, run the installer again and simply close the Android SDK window when it opens.
As I said, this part is important, so I made a rather cryptic message box to inform you of just that!
Once you click OK, the race is on! The Android SDK installer will be loaded and it should look like this:
It will take a minute or two to configure all of the various options… don’t be distracted by the installer going on in the background, keep your attention focused here! First things first, once it’s done fetching info, click the “Deselect All” button to clear all selections. Then you want to select Android 3 ( API11 )->SDK Platform, like this:
If everything was done correctly, the button will show “Install 1 package…”. If you want more features, you can run the Android SDK Manager later… when you aren’t under type restraints!
After you click the Install 1 package… button, you will see:
Simply click Install.
Alright, stressful bits are over, now just a matter of sitting back and letting the installer do it’s thing..
That was a screenshot of the installer doing it’s thing. Frankly it isnt very exciting and yes, it’s a rather long process. While that process is happening, the Android SDK Manager is chugging along and will eventually say:
Say whatever you want, it doesn’t really matter so you might as well go with Yes. Eventually assuming success with the Maven process ( actually it runs even if there is a failure… if you see a whole bunch of failures, try running the installer again ), you will get the following prompt:
This is just another simple GFS provide script that builds your new game Maven script for you. If you want to create a game of your own, click Yes. If you click Yes…
The new game wizard will appear! Simply fill in the values you want to make your game, like I have above and click Make Game! Once you click “Make Game” a MakeGame.bat file will be created then run. This process creates an actual game within your PlayN folder. Unfortunately I couldn’t completely automated it and it will prompt you to continue. When prompted ( in the dos prompt ) type Y then [Enter]. Voila, your new game is created! If you chose C: for your PlayN folder, your game will be located at [C:PlayNPlayNYourGame]
Finally, you will get one last prompt:
I hear there are all kinds of interesting things at that website, you should click Yes and check it out! If you click Yes, it will open your webbrowser ( or a new tab if already open ) and send you to GameFromScratch.com.
Voila, all done! Enjoy PlayN!
If you want to create a new game at a later date, the New Game Wizard can be run again, it is located at PlaynPlaynNewGame.cmd.
If you encounter any problems, please let me know and I will do what I can. Either use comments here, send me an email ( not preferred, because other people having the sample problem will not benefit from the results ) or I will piggyback the PlayN teams support process and request you post to StackOverflow with the PlayN tag and I will keep an eye on posts there.