Jump to content

Introducing Pind: A Pinball Daemon


freezy

Recommended Posts

If you have more detailed instructions so others could benefit from it, that would be great. Apart from that, I know that on Windows it can quite a pain to get the node modules which need compilation working correctly. If it reassures you, I've spent quite some time on it too, but finally installing the SDK mentioned in the installation instructions did the trick.

http://zxtech.wordpress.com/2013/02/20/contextify-specified-platform-toolset-v110-is-not-installed-or-invalid/

SET VisualStudioVersion=11.0

This has defiantley helped the last part , contextify. Although using SET VisualStudioVersion=11.0 could help from the start for Win7 64.

        /**
        * Path to installation folder. No trailing slash!
        * @important
        */
       path: 'I:\HyperPin\Pinmame\VPinMAME_Cabinet_DLL_2.5',

       /**
        * When bulk-applying rotation settings on tables, this indicates how to set the "rol" setting.
        * If set to true, the DMD will be rotated 270°, otherwise it will have the same orientation as
        * the playfield.
        */
       rotate: false,

Error: ENOENT, no such file or directory 'I:\HyperPin\Pind\node-pind\HyperPinPinmameVPinMAME_Cabinet_DLL_2.5'

I can't see much up with my config?

Link to comment
Share on other sites

  • Replies 222
  • Created
  • Last Reply
From some quick reading, it looks like NPM is not expecting to provide a option for distributing Node module binaries any time soon. But in the case of this app, would it be possible to host and distribute precompiled binaries through the Git repository? Or is something like nexe a distribution option? Frankly, given the complexity and storage footprint of all of the prerequisites, it is probably going to scare many people away from this app. At the very least, it would probably result in a much higher level of support vs innovation.

Well I'm pretty sure it's possible to distribute binaries via NPM. Thing is, all I can do is package folder and modules on the platforms I have (WinXP 32, Win7 x64, Win8 x64). I remember copying the folder from Win7 to Win8 and it didn't work, so there must be more than just 32/64 bit differences. Maybe, if more people start using it, more builds could be provided, but the thing is that additional dependencies (mostly purely JS libs) will be required as the project evolves, which would each time result it re-packaging everything for every platform. Also, the auto-update feature would need significant adjustments, which I'm not so keen on doing (need some stability first).

On the other hand, if people start seeing what Pind can do, I'm quite confident that many will take the burden of the initial installation (most of use already spent hundreds of hours building the cab).

Link to comment
Share on other sites

        /**
        * Path to installation folder. No trailing slash!
        * @important
        */
       path: 'I:\HyperPin\Pinmame\VPinMAME_Cabinet_DLL_2.5',

Error: ENOENT, no such file or directory 'I:\HyperPin\Pind\node-pind\HyperPinPinmameVPinMAME_Cabinet_DLL_2.5'

I can't see much up with my config?

I would try I:/HyperPin/Pinmame, that's the path of your VPM, right? Also, try slashes instead of backslashes.

Link to comment
Share on other sites

Cool. That was it.

I'm hoping this is the last error I shall receive? :2in1:

post-49389-142870600334_thumb.png

A couple of questions about the paths.

Pinmame - Can we set the path to the full directory instead of Pind adding /nvram to the path? I don't keep my nvram in the pinmame directory, I don't really fancy having to rename my cloud shares for the use of this.

VP & FP = The same kind of scenario as above. I keep all desktop/fullscreen seperate and no table folder resides in the program directorys. I won't really know how this works until I can try it out.

Support for other frontend like PinballX , which has more or less the same directory structure.

Link to comment
Share on other sites

Hmm looks like an error retrieving the last commit from your local repository. Did you use Git to checkout the files, or did you extract the zip file? I've committed a fix that should display the error message, if you could update and try again.

About the paths: Sure, I suppose that would be possible. What other special paths do you have besides nvram and tables? Artwork? Roms?

I'm aware of PinballX and also PinSelect, but I've never tried them and as far as I understood, they use the same structure than HyperPin. But checking those out is on my TODO list, so expect more support at some point.

Link to comment
Share on other sites

I went back and tried fresh without all the messing around with manualy installing the modules.

Running cmd as admin, making sure python was working and using the SET VisualStudioVersion=11.0 before i did any node installs.

I'm in now! & I have my directory set to PinballX, so we'll see how it goes. They seem to be matching good so far. Will have a good play around with it, Cheers for time & help!

Link to comment
Share on other sites

Have had a decent go at it and really like it. Head is spewing with ideas, I will let you know most of these at some point if you're ready :D

I had a couple of problems with some entries in my VP.xml (2 to be precise) , but after they were removed and created a new db it was good to go through and complete all the scanning.

Link to comment
Share on other sites

My updated install instructions with notes:

Installation

1. Install Node.js

Since Pind is running on top of Node.js, there is no need of an additional HTTP server. For the dependencies used in the project, npm will take care of downloading and compiling all the necessary libraries.

Download and install Node.js from here. Also, make sure node.exe and npm.cmd are in your PATH (per default at C:\Program Files\nodejs).

2. Install Git

If you haven't already, install Git for Windows. If you really want to live without Git, you can also download the zipball from GitHub instead of cloning in step 5 below.

3. Install Build Tools

Since not every library is available in native Javascript, NPM will have to do some compilation. This is the reason of Visual Studio and Windows SDK being included in the installation procedure.

Download and install Python 2.7.

Add C:\Python27 to your path

Uninstall ALL Microsoft Visual C++ 2010 Redistributable package (This was my biggest problem with the install. The Windows 7 SDK would not install until I did this)

On Windows 7 or above, download and install the Windows 7 SDK.

Download and install the Visual Studio 2010 Express.

4. Install Additional Dependencies

Pind needs to be able to unrar your downloaded files and deal with artwork. For that, the following software is needed:

Download and install GraphicsMagick and verify that the installer adds the directory to your PATH.

Download and install Unrar.

5. Install Pind

Open a command line prompt.

Go to where you want to install Pind - cd C:\Games\

Clone the repository - git clone git://github.com/freezy/node-pind.git

Install dependencies - cd node-pind, npm install -d

Don't close the command line window just yet.

6. Configure Pind

Copy config/settings.js to config/settings-mine.js and open it in a text editor. (No such files with json as the extension)

Go through every option and update it if necessary.

Make sure you got everything by searching "@important" in the file and double-check each value.

Initialize database schema via command prompt - node create-schema

Start Pind for a first test run (node app) and open a browser at http://localhost.

7. Make Pind start automatically

Download and install NSSM

On the command line prompt install Pind as a service - nssm install "Pinball Daemon" "C:\Program Files\nodejs\node.exe" C:\Games\node-pind\prod.js - with path names of your installation.

Manual update:

Open a command line prompt.

Go to where you installed Pind - cd C:\Games\node-pind

git pull --rebase

npm install

and you probably should do a

node create-schema

Link to comment
Share on other sites

Ok after the install I pulled everything into pind (hiscore, xml's, ipbdb) and tried to d/l the first table on VPF "The Shadow" and get this:

info: [vpf] Waiting for current login to complete...
info: [vpf] Got auth key: <deleted>
error: =========================================================================
=======
error: TypeError: Cannot call method 'checkSessionState' of undefined
   at Ob.callback ([url]https://apis.google.com/js/plusone.js:37:660[/url])
   at Nb ([url]https://apis.google.com/js/plusone.js:12:397[/url])
   at Ob ([url]https://apis.google.com/js/plusone.js:10:480[/url])
   at Hd [as F] ([url]https://apis.google.com/js/plusone.js:37:581[/url])
   at Ed.(anonymous function).C ([url]https://apis.google.com/js/plusone.js:37:233[/url])
   at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
error: =========================================================================
=======
info: Bye bye, cruel world.
info: [vpf] Login successful.
info: [vpf] Login completed, let's go!
info: [announce] "console": {"msg":"VPF: Preparing download","timeout":60000}
? event:channels:[admin] console
info: [vpf] Getting confirmation page at [url]http://www.vpforums.org/index.php?app=d[/url]
ownloads&module=display&section=download&do=confirm_download&hash=25a7627d5a6b4a
0d77318ab90cd937a8...
info: [announce] "console": {"msg":"VPF: Preparing download","timeout":60000}
? event:channels:[admin] console
info: [vpf] Getting confirmation page at [url]http://www.vpforums.org/index.php?app=d[/url]
ownloads&module=display&section=download&do=confirm_download&hash=402ac0cd510485
7eaeaf8defb6a4621e...

c:\Games\node-pind>

Link to comment
Share on other sites

Awesome downloads work!!! I tested tables, media packs and videos.

The integrated upgrade feature just gave me the usual 'No update found' so I git pull --rebase, npm install, node create-schema.

I'll post this on git also but when you goto Admin --> Downloads and click on the 'i' for information the small info screens do not clear, so you are left with the info screens stacked ontop each other.

Z

Link to comment
Share on other sites

I had just seen an update fix for download. It didn't work so I come here to see what has been said.

So am I right by saying everytime this gets a fix you have to rebuild the whole database again?

It's allready getting a little tedious for me with 340 tables to scan. Takes around about 15-20 minutes to get just past the scanning roms. And even after I had updated/wiped the database and files it still doesnt work. It looks like even though its crashed it has downloaded and moved rom into correct folder.

Will post logs, no time right now.././.............

Link to comment
Share on other sites

Well, neither git pull nor npm update touches the database. That would be the manual way. However, sometimes the database schema changes, in this case the app will just crash if you don't run node create-schema, which erases all data. Additionally, sometimes I add new settings to the config file, that you would need to patch manually too.

OR you use the upgrade feature in Pind, which updates the code, checks for new deps and runs npm if needed, checks for migration scripts and applies them while keeping the data, and finally patches your settings-mine if new options have been added.

The 15-20min is doing what? "Resync with HyperPin"?

Link to comment
Share on other sites

Yes , sorry , didn't think I would have to make new db. I just followed Zeeons working post. :) sync HP/IPDB/Update scores can take an exaggerated 15 mins maybe.

Normaly try the update button.

To make the Rom downloads work, I have to create a text file and rename it to the romname.zip and place in temp dir :)

Link to comment
Share on other sites

Spent some time tonight using PinD. Heres a running log of observations. Did manual update. Created New database. Reading my XML file is fine 131 tables. Downloading vpf index is fine.

Stability issues in try to get my missing media. I am mainly missing videos. Server crashes and I restart. Seems to resume. Changed concurrentdownloads to 1. Seems to grab 1-3 videos before crashing. Not sure if it helped

Seems to be grabbing same videos over and over. Maybe due to no video avail but trying to match it to something. Removed tables from XML file that it could not find videos for to see how far it continues. Periodically resyncing with XML. Or creating new db to see if it helps. Will keep trying until all media found. Maybe if an exact match is not found for media, prompt the user with list of possible matches and also an option to skip it. If user picks one, download it and rename it to match the xml table description. If user skips it, mark it Yellow (N/A).

Maybe move the DMD status window between table list and Actions section for easier viewing.

How can I change the default server port? I am running a web server on my PC already so I want to assign a diff port.

Link to comment
Share on other sites

punter1: Thanks for the report. Some of your problems are bugs and some need another solution.

Bugs: Pind shouldn't crash, if it does, it's a bug. If you could send me a log (logfile is in the logs subfolder), that would be great.

It's possible that there's another bug: Pind may not update the media stats that indicate if media is available for a table after successful video download. "Resync with HyperPin" does that.

Then there's the problem of HyperPin "description" different than what's in the media pack. For now there's not really a solution but either rename the media or change the name in the .xml manually. I'll see if I can come up with some clever matching algorithm that allows updating either that or renaming the media.

Port of the HTTP daemon is the first setting in settings.js. ;)

Cheers!

Link to comment
Share on other sites

I will repeat the test and submit a bug report with a XML script containing the problem tables and log. Some tables were - Big Brave (Gottlieb 1974),Big Daddy (Williams 1970)

As for the pattern matching. Might help to allow Bally and Midway and Williams to match if table name matches. Same with Premier and Gottlieb, etc

As for trying to match table description, table naming, media naming, video naming - that's the challenge :) Maybe create a lookup table of existing tables, all media, based on ipdb id, and then for new tables/files not contained in that lookup table revert to searching/pattern matching. After initial release, look up table could be crowd sourced like the Ledwiz tables configs and periodically updated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...