Author Topic: Single Click Windows Development Installer  (Read 21328 times)

Jimmy

  • Administrator
  • *****
  • Posts: 186
    • View Profile
Single Click Windows Development Installer
« on: November 07, 2012, 10:00:57 PM »
Hey guys,

Another boredom project here. I've ported the P-ROC Toolkit installer from Linux over to Windows.

How does it differ from the libpinproc Windows installers currently in distribution?
The libpinproc windows installer is a quick and easy way to get rolling with the baseline libpinproc library on your system. It makes no assumptions about the software environment (whether or not you develop your game in C, C++, .NET, etc).

The Full development installer compiles everything from source and sets up the python prerequisites for quick-start development on Pyprocgame (this can also be used to set up the baseline requirements for running other users' code).

The Windows version does not include PinMAME support (yet), but here is what it DOES include and/or install:

  • Python 2.6
  • PyYAML
  • YamlCPP
  • MinGW
  • cmake
  • PIL (Python Imaging Library used in Pyprocgame utilities)
  • Libpinproc (the installer downloads the latest master branch)
  • PyPinproc (the installer downloads the latest master branch)
  • PyProcgame (the installer downloads the latest master branch)
  • proc-shared (the installer downloads the latest master branch)
  • FTDI drivers (for communication with the P-ROC over USB)

Since the installer downloads the latest versions of the development frameworks at install-time as well as all their dependencies, a network connection is required.

When the installer completes, all content is installed in C:\P-ROC\ (with the exception of python and mingw which have to live in their own directories). The global pyprocgame configuration (config.yaml) is installed automatically to the user's home directory (C:\Users\<user>\.pyprocgame\ or C:\Documents and Settings\<user>\.pyprocgame) with some default settings already set to get the user up and running as quickly as possible.

Windows File Size: 32mb
Linux File Size: 8mb

Both the Linux and Windows kits can be downloaded from http://proctools.catster.net/

Problems? Questions? Feel free to drop me a PM. When reporting bugs, please include what version of Windows or Linux you're running as well as the architecture (32 bit / 64 bit).
« Last Edit: August 11, 2013, 11:20:36 AM by Gerry Stellenberg »

Steven

  • Wizard
  • *****
  • Posts: 467
    • View Profile
Re: Single Click Windows Development Installer
« Reply #1 on: November 08, 2012, 02:14:55 PM »
Thanks!

Pinswe

  • Full Member
  • ***
  • Posts: 36
    • View Profile
Re: Single Click Windows Development Installer
« Reply #2 on: November 20, 2012, 11:18:40 AM »
I just did a new install with the Single Click and this is how the P-ROC folder looks:

Code: [Select]

C:\P-ROC>dir
 Volymen i enhet C har ingen etikett.
 Volymens serienummer är E8CF-9A54

 Innehåll i katalogen C:\P-ROC

2012-11-20  17:06    <KAT>          .
2012-11-20  17:06    <KAT>          ..
2012-11-20  17:01    <KAT>          cmake
2012-11-20  17:01    <KAT>          ftdi
2012-11-20  17:04    <KAT>          libpinproc-master
2012-11-20  17:01    <KAT>          mingw-get
2012-11-20  17:01    <KAT>          PIL
2012-11-20  17:05    <KAT>          pypinproc-master
2012-11-20  17:06    <KAT>          pyprocgame-master
2012-11-20  17:05    <KAT>          pyyaml
2012-11-20  17:06    <KAT>          shared
2012-11-20  17:01    <KAT>          yaml-cpp-0.2.5
               0 fil(er)                   0 byte
              12 katalog(er)  68 457 816 064 byte ledigt

C:\P-ROC>

Shouldn't there be a procgame folder and where did the games folder go ?
I'm on Win7 32bit

Jimmy

  • Administrator
  • *****
  • Posts: 186
    • View Profile
Re: Single Click Windows Development Installer
« Reply #3 on: November 20, 2012, 01:04:48 PM »
What 'games' folder are you speaking of? There isn't one in the installer.

pyprocgame is there. It's in pyprocgame-master/ (this is the directory it was installed from, so if you modify the framework at all, you'll still have to re-run "python setup.py install" inside the pyprocgame-master/ folder)




MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Single Click Windows Development Installer
« Reply #4 on: November 20, 2012, 01:19:36 PM »

Shouldn't there be a procgame folder and where did the games folder go ?
I'm on Win7 32bit

The procgame folder is under the pyprocgame folder in this install. The games directory and that procgame directory are only needed by register_vpcom.py for visual pinball support. Your games can be launched from anywhere --pyprocgame doesn't care, again only VP seems to.

I've actually spent a lot of time over the last day and change trying to put together an add-on zip to add visual pinball support following the one-click install. I want to try to figure out what changes I can make to support the missing VP functionality that requires table changes, too.

If you don't care about VP support, I'll stop not helping. :)

Compy: the installer worked perfectly in windows 8, 64-bit. Thank you sir!!

Pinswe

  • Full Member
  • ***
  • Posts: 36
    • View Profile
Re: Single Click Windows Development Installer
« Reply #5 on: November 20, 2012, 02:02:29 PM »
Where is the games folder with all the example starter.py code ??
Are the JD & CFTBL examples nolonger installed with this install?
« Last Edit: November 20, 2012, 02:16:17 PM by Pinswe »

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Single Click Windows Development Installer
« Reply #6 on: November 20, 2012, 02:32:50 PM »
Where is the games folder with all the example starter.py code ??
Are the JD & CFTBL examples nolonger installed with this install?


As I recall, they weren't there when I installed it. Only starter. Do you need them?  They're in the old P-ROC .91 installer on vpforums. Of course they're also available on github.

Also, Compy: I noticed the register_vpcom.py bundled with this version (under tools) appears to be the 0.91 version, not the 0.91a update (that changes the ID/name of the COM object to no longer replace the VPinMAME controller but adds VPROC.Controller).  Where was this sourced from?
Never mind.  I think I'm the one who put the wrong version there...


Thanks!
« Last Edit: November 20, 2012, 02:42:39 PM by mocean »

Gerry Stellenberg

  • Administrator
  • *****
  • Posts: 2398
    • View Profile
    • PinballControllers.com
Re: Single Click Windows Development Installer
« Reply #7 on: November 20, 2012, 02:43:21 PM »
Destruk's old 0.91 installer is very old now and not maintained.  Mocean, if you are able to create an add-on that adds vpinmame stuff, that would be fantastic.  I'm guessing the updated register_vpcom.py was something that Destruk made and never fed back into the pyprocgame repository.  Compy's package has the latest checked-in version of the file.  If it needs to be updated, please email me the file, and I can see about checking it in.

Pinswe: The JD and CFTBL projects are not and should not be included with Compy's installer.  These are separate projects that people can download as required:

JD: https://github.com/preble/JD-pyprocgame
CFTBL: https://github.com/preble/creature

- Gerry

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Single Click Windows Development Installer
« Reply #8 on: November 21, 2012, 09:04:12 PM »
This post is unnecessary now. Complete details for adding VP to the Compy install are in the next post.
« Last Edit: November 22, 2012, 04:20:30 PM by mocean »

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Single Click Windows Development Installer
« Reply #9 on: November 22, 2012, 03:26:03 PM »
OK.  Here are the complete instructions to get Visual Pinball 9.14 working with pyProcGame as installed by the Compy 1.1 installer.  I assume
you know how to install Visual Pinball, and that additional files must be added, and it must be run in Administrator Mode (i.e., you can follow the
tutorial on vpforums).  

There are some files that you need that I am not including files because I did not author them and I don't want to violate anyone's
terms of use.  If I get the all clear, I'm happy to post/host the relevant files.  Note that almost all of them can be found in the 0.91 P-ROC
and 0.91a P-ROC bundles on vpforums...

0. Use Compy's 1.1 installer :)

1. Get/run the PythonWin32 installer
   http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.6.exe/download
   (also available in the 0.91 zip http://www.vpforums.org/index.php?app=downloads&showfile=5202)
2. Copy the 0.91a register_vpcom.py into c:\P-ROC\tools
        (0.91a zip is here: http://www.vpforums.org/index.php?app=downloads&showfile=5389)
   - as of now this is the latest version.  I'm working on
   updating it presently to try to bring some of the pinmame mechanics
   emulation into the Python code.  As it stands, if your machine
   has complex mechanical toys, you will have to comment out
   any cvpmMech/setMech calls and your toys won't work.
3. copy the games/ directory (from 0.91) and the shared directory into \P-ROC
4. copy core.vbs and your VPT files in \P-ROC\ (JD ones are in 0.91a's .zip)
VPT file location actually should not matter.  I tested this a bunch of times.  If you find that it
does matter, then you probably have your config.yaml in the wrong place...
5. there is already a config.yaml and vp_game_map.yaml in pyprocgame-master\procgame.  I'd remove these. I was wrong on this.
6. drop this vp_game_map.yaml into \P-ROC\shared
(feel free to omit my over-the-top comments, I find these things helpful since my memory is terrible)
Code: [Select]
# this file maps Visual Pinball (VP) ROM names to pyprocgame
#  games and yamls
# NOTE: the location of this file is specified in the
# config.yaml file (located in your username/.pyprocgame/)
# or a config.yaml file in the working directory where the
# game is launched.  A config file found in the current
# working directory stops the search, and thus takes
# precidence over any config file in the user's directory!
#
# the relevant setting in the config file is:
#   vp_game_map_file: /path-to-file/filename.yaml
# for example, mine is,
#   vp_game_map_file: /P-ROC/shared/vp_game_map.yaml


# Path to your pyprocgame directory
rundir: C:\P-ROC\

# Create an entry for each pinmame ROM associated with the VP table you want to use.
jd_l7:
    # Path to the game directory - relative path from tools/register_vpcom.py
    # so, if your putting this reg_vpcom in /p-roc/tools then this
    # means games must be in /p-roc/games
    # this value MUST start with a slash...weird no?
    path: /../games/jd
    # GameController class in the game directory
    # jd is the python file name, Game is the class
    kls: jd.Game
    # Path to the machine-specific YAML
    yaml: C:\P-ROC\shared\config\JD.yaml

cftbl_l4:
    # Path to the game directory - relative path from tools/register_vpcom.py
    path: /../games/cftbl
    # GameController class in the game directory
    kls: cftbl.CreatureGame
    # Path to YAML
    yaml: C:\P-ROC\shared\config\CFTBL.yaml

7. modify your config.yaml to ensure the following values:

Code: [Select]
# config path is the path to machine specific YAMLs
config_path: /P-ROC/shared/config/

# this enables the virutual P-ROC hardware; comment it out when
# connecting to a real machine!
pinproc_class: procgame.fakepinproc.FakePinPROC

# this is where I put my map...
vp_game_map_file: /P-ROC/shared/vp_game_map.yaml

8. On the command line: ([win]+[R], "cmd", [enter])
Code: [Select]
cd \P-ROC\
python tools\register_vpcom.py --register

9. Launch Judge Dredd in Visual Pinball to test.
Make sure you're running Visual Pinball as an Administrator otherwise you will get a python error because it won't be able to open the necessary files.  Similarly you need the assets for the JD table, which you can find reference to in other posts on the forum.

If you have questions, let me know.

Thanks!
- Michael

Update: this does work. I just did it for a brand new windows 7 install and it works just fine. I 'cheated' by having a zip of all the add-on files, but it does indeed work.

I might postpone my plans to port mech.c into register_vpcom.py since there's also the issue of supporting the machine specific simulator files, some of which include mech functionality (e.g., T2).

update: modifying register_vpcom.py at line 242 or so:

old: def SetMech(self, number):
new: def SetMech(self, number, args):

You won't have to comment out any Mech calls in the VBScript of the table... of course the mechs don't actually work, but now those calls don't cause VP to halt (so you don't have to comment them out before running).  :)


« Last Edit: November 23, 2012, 09:36:44 PM by mocean »

Steven

  • Wizard
  • *****
  • Posts: 467
    • View Profile
Re: Single Click Windows Development Installer
« Reply #10 on: December 27, 2012, 06:31:31 AM »
I used the single click installer for the first time, and it's really great to see everything being installed all by itself! :)

Jimmy

  • Administrator
  • *****
  • Posts: 186
    • View Profile
Re: Single Click Windows Development Installer
« Reply #11 on: December 27, 2012, 09:02:18 AM »
I used the single click installer for the first time, and it's really great to see everything being installed all by itself! :)

Glad it worked for you! It works out well because the installer grabs the latest packages so we don't have to repackage it every time a new version ships. However, I should probably change the title as it takes just "a few" clicks, but that just sounded catchier :)

-- Jimmy

Curbfeeler

  • Wizard
  • *****
  • Posts: 239
  • Dan - Des Moines, IA
    • View Profile
Re: Single Click Windows Development Installer
« Reply #12 on: January 05, 2013, 12:08:49 PM »
Wow, this is a great thread for newbies!  MarkS suggested I try this, and I'm very glad he did.  I make a good candidate for testing this thread out, since I am getting back to P-ROC after a 6-month absence.  I still have all the tools installed on a laptop, but I don't wish to use that laptop for P-ROC any longer, so I am setting up a different laptop.  It will be dedicated to P-ROC and nothing else.

Here are the steps I used to get going in record time...

GENERAL
1.  Format laptop with XP and load all necessary drivers.
2.  Install Google Chrome
3.  Install Wingware IDE
4.  Install winrar

PROC
1.  Get Package here... http://proctools.catster.net/
2.  Click package...
3.  Get games from here...
4.  Copy games to C:\P-ROC\pyprocgame-master\games\
5.  Download Media files for Dredd and extract
6.  Undo comments on the following line in config.yaml:
Code: [Select]
#pinproc_class: procgame.fakepinproc.FakePinPROC (only do this if you don't have a P-ROC, which I currently don't.
7.  Run jd.py and/or creature.py at command line.

Viola!  I can now launch both tables.  Next I need to get Visual Pinball going.

VISUAL PINBALL
1.  Install VPInstaller_1_0_3.zip
2.  Get VPinball912_Minimal.zip and put in VP folder
3.  Get VPinball914 Minimal.zip and put in VP folder
4.  Play a VPMAME table (in my case DE Star Wars) just to make sure it's all set up correctly.
5.  Download PROC-VP-091.zip and PROC_VP_091a_update.zip from VPFORUMS.
6.  Copy the contents to the root of C: since both archives contain the P-ROC folder (there were overwrites, but I kept the newest).
7.  Follow steps 6,7,8 here... http://www.pinballcontrollers.com/forum/index.php?topic=626.msg5319#msg5319
8.  Double click C:\P-ROC\Judge Dredd PROC.vpt to load the table in VP.

Viola!  The P-ROC version comes up instead of VPMAME.  Only issue I have is I only have one screen on this laptop and the DMD doesn't stay on top.  Have to keep ALT-TABBING to play a test game.

Thanks to both Compy and Mocean for putting these instructions together.  Compared to what I went through back in May this was a snap!

Dan
« Last Edit: August 11, 2013, 11:21:02 AM by Gerry Stellenberg »

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Single Click Windows Development Installer
« Reply #13 on: January 05, 2013, 02:41:02 PM »
I've been updating the register_vpcom.py. You should no longer need to change your vbs in the vpt.
See here:
http://www.pinballcontrollers.com/forum/index.php?topic=679.msg5602#msg5602

- Michael

Seven11

  • Wizard
  • *****
  • Posts: 228
    • View Profile
    • Skit-B Presents - Predator
Re: Single Click Windows Development Installer
« Reply #14 on: January 11, 2013, 11:51:36 AM »
Just gotta say how nice this thing is.  Installed on two laptops with zero complications and I was up and running perfectly.  Thanks so much for throwing this all together for us!
See the progress with the custom Predator machine!
http://www.skitbpinball.com/