phrack / ShootOFF-legacy

An open source framework to enhance laser dry fire training.
BSD 4-Clause "Original" or "Old" License
30 stars 17 forks source link

The Windows packages do not support 32-bit versions of Windows. #60

Closed PhySicK closed 10 years ago

PhySicK commented 10 years ago

Tried to run on ASUS T100TA 64GB. Got info that this program can't run on my PC. Even in compatibility mode. May it is because I have Windows 8 32 bit. Maybe because my processor is 64bit. Could you please share any ideas?

phrack commented 10 years ago

Do you have more specific information, such as an error message or exception? This does in fact work on Windows 8, my dad regularly runs ShootOFF on Windows 8.

PhySicK commented 10 years ago

Thank you very much for the reply! I've only screenshot from the system (attached). I've tried to solve the issue by myself: may be the problem is in processor. For example, according to Intel, heterogeneous compute via APIs like OpenCL is not supported on Bay Trail for tablets—Intel says its focus was to get the platform out with a focus on compute through the x86 cores. May be there are other limitations in Atom. screenshot

phrack commented 10 years ago

Interesting! I am not a Windows guy, but I will try to start researching this myself later in the week. Unfortunately, I can't look at it seriously for the next several days because I have an important proposal to work on in my day job.

PhySicK commented 10 years ago

I'll also try to make some research and will be grateful for any ideas from you! Good luck with your day job, by the way.

gohtar commented 10 years ago

I got the same error message running on my laptop with windows 7 32bit. Is this a 64bit only program?

PhySicK commented 10 years ago

I guess gothar is right. I have a desktop with Win7 64 bit, ShootOFF works fine. I have a tablet with Win8 32 bit, ShootOFF doesn't work. I've installed virtual machines on both and tried other version of Windows. On tablet Win7 64 bit and now ShootOFF works, on desktop Win7 32 bit and ShootOFF doesn't work (error message is attached). Hope that would help! capture

phrack commented 10 years ago

Very nice work, that is exactly the problem! I am sorry for that fairly stupid oversight on my part, and I hope it didn't cost you too much time. I will leave this issue open to allow people to vote if they want a 32-bit version of the Windows package. I can make one by installing a 32-bit version of Windows in a VM, but it's not worth my time if the audience for it is really small. It sounds like you two are squared away right now without one. It's also entirely possible to just use the manual install process and not use the package for 32-bit Windows.

In the mean time, I've changed the title of all of the Windows packages to make it clear they are for 64-bit Windows and I am changing the title of this issue to make it clear what the actual problem is.

EzySetup commented 10 years ago

I'd love to see a 32-bit package. I'm a fairly literate PC user, but have been unable to get the application running and I'm very anxious to give it a try. I'd like to get it working and promote it. Something like this certainly needs more exposure.

If possible, I'd appreciate some help in getting it working. Following are the steps I've taken. 1) Downloaded and installed Python (python-2.7.6) and installed it to the default directory. 2) Installed numpy-MKL-1.8.1.win32-py2.7 3) Installed opencv-python-2.4.8.1.win32-py2.7 4) Installed Pillow-2.4.0.win32-py2.7 5) Installed pywin32-218.5.win32-py2.7 6) Installed Scipy-stack-14.4.1.win32-py2.7 7) PyAudio-0.2.7.win32-py2.7 8) Downloaded the archive file, unzipped and installed pyttsx-1.1 9) ShootOFF is unpacked and the directory structure is on my desktop. As far as I can tell, all the installs ran perfectly. I'm running Windows 7 Home Premium, SP1, on a Lenovo S10 Netbook with 1GB of RAM, an Intel Atom CPU N270, at 1.6GHz. When I launch ShootOFF then a command window opens. After a moment some text flashes by and the window immediately closes (much faster than I can get a glimpse of what the text might have said). Any help will be greatly appreciated. Regards, Andrew

phrack commented 10 years ago

Hello Andrew,

My guess is that it's failing to find a camera, although that should show you an error in a popup that stays up until you click OK. Let's try running ShootOFF from the command line to see if we can see the error message that way. Please do the following:

  1. Click the start button in Windows, then in the search bar in the start menu enter the text "cmd" without quotes and hit enter.
  2. On the command prompt that appears, enter the following command then hit enter on your keyboard:

cd [path_to_shootoff_directory]

You'll need to replace [path_to_shootoff_directory] with something like C:\users\ezysetup\desktop\shootoff, but only you know what the exact path is.

  1. Enter the following command and hit enter:

python shootoff.py

These instructions will run ShootOFF from the command line so that we can see what is printed out.

It's not hard to create a package on Windows once it's running on a machine, I just haven't had the resources to get a 32-bit Windows 7 VM set up (the one I have at the moment is 64-bit). On Windows, unlike Mac, it really is so easy that anyone can do it. Either way, I'll get a download of the right OS going in the background so I am making some progress towards having my own set-up to do this.

phrack commented 10 years ago

OK, so I tried something different. Instead of making a new VM, I did a complete 32-bit install of Python and all ShootOFF dependencies on my 64-bit VM and made the 32-bit versions co-exist with the 64-bit versions. In theory this allows me to generate Windows packages for both 32-bit and 64-bit Windows in the same VM. I indeed can generate both packages, they have the correct bit-ness, and they run on this VM. However, I have no way of knowing if the 32-bit package actually does run on a 32-bit install of Windows.

Here is the 32-bit package I made for Windows, someone please try it and let me know if it works:

https://github.com/phrack/ShootOFF/releases/tag/untagged-056952e09b0d811781fb

If it works, this issue is closed.

If you get an error saying something like, "The application has failed to start because its side-by-side configuration is incorrect", install this: http://www.microsoft.com/en-us/download/details.aspx?id=29

EzySetup commented 10 years ago

Wow. Interesting. Although launching one of the .py files opens a command window I get the following message. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Home>cd C:\Python27\ShootOFF-master C:\Python27\ShootOFF-master>python shootoff.py 'python' is not recognized as an internal or external command, operable program or batch file.

I checked my file associations and python is associated to .py extensions. Odd.

I don't have time right now to check your package. But I should be able to do so sometime tomorrow morning. I'll let you know how it goes.

Thanks again, Andrew C:\Python27\ShootOFF-master>

phrack commented 10 years ago

Yea, so the issue here is that python isn't in your PATH, the file association doesn't help you when you're running from the command line. There are instructions for updating your PATH here:

http://www.java.com/en/download/help/path.xml

You need to append C:\Python27\ to whatever your PATH currently is. You will need to close then re-open the command prompt for the PATH change to take effect.

I suspect as a result of this that you don't have pyttsx installed, which is probably causing your ShootOFF issue. You can install it by downloading https://github.com/parente/pyttsx/archive/master.zip, unzipping it, cd'ing to the directory that contains setup.py, and running: python setup.py install.

Testing the package I made is probably a better use of your resources, but if you have time you might as well do both just for personal enrichment.

EzySetup commented 10 years ago

Hi again. It turns out my netbook just wasn't installing software correctly (and many other things). It seems the OS just went south. I've reinstalled Win7 and all appears to be well now (other than I'm still catching up on all the updates for Win7). But I just tried to download the 32 bit package you created and then link gives me a 404 error. Has the file been removed? I'd like to give it a try. Thanks, Andrew

phrack commented 10 years ago

Here you go:

https://github.com/phrack/ShootOFF/releases/tag/1.3-FINAL

The release system was acting a bit weird this weekend, but they fixed it.

EzySetup commented 10 years ago

Okay. I guess I'm even slower than I thought. I've downloaded the zip file for the 32-bit version and extracted the contents. However, I'm not seeing the installer I expected. When I go to to simply run shootoff.exe then I receive the error, "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. I'm not sure where to go from here. Thanks again, Andrew

phrack commented 10 years ago

You just forgot about this part in the shuffle:

"If you get an error saying something like, "The application has failed to start because its side-by-side configuration is incorrect", install this: http://www.microsoft.com/en-us/download/details.aspx?id=29"

I'll add that little bit to the instructions on the release page if it works. The fact that you are even getting that error is a really good sign.

EzySetup commented 10 years ago

Bingo! That did it. The application runs.

I need to run off to work, so I haven't checked it out beyond opening the application. With all we have going on, that may be a few days. But this is very encouraging progress. Perhaps leave this issue open until I can fully check it out. For example, I did receive the notice to download and install the latest service packs for the redistributable C++. I haven't done that yet, as it looks like I need to visit a web site and 'follow instructions'. Depending on the complexity and intended audience of the instructions, we may want to add and translate the instructions where they can be followed by the average PC user.

Anyway, I need to run. I'll get back as quickly as I can.

Thanks again, Andrew

phrack commented 10 years ago

I am totally with and some of this is in open issues that I've neglected for months.

So first of all, expecting average PC users to come to this page isn't optimal because this page is primarily meant for programmers and technical people who know enough to participate in the development process even if they don't know how to write code. Github does allow us to make a more simple landing page for average user where they can just get the information they need without seeing all of the complexity:

https://github.com/phrack/ShootOFF/issues/27

I just haven't done this because I generally don't like making websites and any time I get motivation to work on one I inevitably burn that motivation up updating my professional site.

Second of all, there are two things that can be done to make the Windows install easier. There is no real technical reason these haven't been done, I've just been dragging my feet because Mac doesn't have a package yet. However, there isn't really a good reason to wait for that honestly because Mac users have several avenues Windows users don't have that make the manual install much easier.

Option 1: the dependency on the C++ redistributable is annoying and not entirely necessary. It comes from pyinstaller and there are ways to prevent the dependency, but it looks like I'd have to do a custom build of pyinstaller: https://groups.google.com/forum/#!topic/pyinstaller/4a9Nb2zgteo. Assuming they are responsive, it's probably worth it to just do this then contribute it to the next version of pyinstaller because I am 100% sure ShootOFF isn't the only project that suffers from this annoyance. Making this go away once and for all would make the install literally as easy as unzipping and running the exe, however, installing the redistributable IS a one time process.

Option 2: a more traditional installer could be made for the pyinstaller project where the user just has to hit next a few times then gets an icon for ShootOFF on their desktop. I am sure there are open source tools to do this, I just haven't researched it. This still has the annoyance for the project that we'd have to include the C++ redistributable, we'd just be automating it for the users.

An ideal solution might be to do both, but option 1 would be higher priority to me in any case.

Either way, no progress will be made on these issues until at least another week and a half. I've been working on a proposal for work since October and while I got the text version of that done a month or so ago, I need to actually present it on Tuesday so that will be consuming most of my weekend.

EzySetup commented 10 years ago

Regarding a project page, I did a quick whois lookup and see that the shootoff domain is registered. I don't know if it is by you or another. But I do have a simple WordPress personal hunting/fishing site that I use sporadically (fshrmen.net). I'm open to using an area there where instructions could be posted and users could retrieve the application. I wouldn't have an issue with giving you access. Just let me know if that would be of interest.

I agree, option 1 is the better priority. It just isn't that hard to run the redistributable. Clear instructions would easily cover the issue. (IMHO) Time would be better spent on features, instructions, and promotion. One thing might be to consider building a Linux package. It seems to me that this is just begging for an RPi, phone, or tablet implementation.

I'm going to be swamped with my day job for awhile too and this weekend I'll be with family. But I'll try and spend some time to see if I can get at least a little familiar with the application. Once I can use it myself, I'll be more than happy to promote it on the forums to which I belong.

Thanks again, Andrew

phrack commented 10 years ago

Github will let us put whatever we want as a subdomain if we use them to make a landing page, so that shouldn't be an issue. I am also not worried about a Linux package because most Linux distros come with python already and it's crazy easy to install the other dependencies (makes Mac and Windows look unusable). Anyway, I think the other priorities you stated are right on.

A mobile version is certainly possible without huge effort, at least for Android. It would just be a matter of changing the UI to be mobile friendly. I personally will probably always prioritize the desktop version because the ergonomics are so much better for this type of app (easier to get camera placement just right, easier to see everything stats wise all at once, easier to adjust lighting conditions as far as the camera is concerned, etc.). As such, it would take a better designer than me to have a mobile version of ShootOFF be anything more than ShootOFF Lite.

I'd be happy to see it get a bit more attention on some forums. I posted it around a bit to get some more users, and was generally successful, but promotion also didn't mean as much coming from me because I wasn't an established member of most of the boards.

EzySetup commented 10 years ago

Well, I finally was able to drag out the netbook, stick on a webcam, put up a target, align the ShootOFF target, and shoot. It worked! Whoohoo! I think this ticket for a 32-bit install can be closed.

I have had some trouble getting the laser intensity and milliseconds tweaked correctly. However that may be because my batteries were dying and I (later) found the intensity was varying depending on how quickly I was taking my shots. (I'm using the LaserLyte rifle adapter in a .22LR rifle; not one of their chamber lasers.) When I get the chance to do it again then I'll be using fresh batteries, so maybe the defaults will work. I'll let you know.

That said, I'm wondering/thinking... 1) A well organized set of end user pages really needs to be a priority. Maybe the top priority. 2) I don't see a lot of point in spending much time on doing more than you have with a 32-bit installer. 3) A lite Android version would be the bees knees. I don't see that it would need target creation or modification at all; as long as the user could import targets from a desktop version. With the screen mirroring that the Galaxy and other devices support, a user could set up one for the camera and then mirror the screen to their TV, another phone, or a PC that is next to them. That gives them immediate feedback on their shots. How cool. I don't see camera placement being that big of an issue. But maybe that's just me. I've already purchased a cheap ($4) case for my phone and glued on a nut and shade so that I can use it as a viewer for my spotting scope. I'll just use the same case and screw a mini tripod onto the nut. I don't see it as being any more difficult than sticking a webcam on a tripod, chair, or whatever. 4) I didn't try it, but I wonder if the application would recognize an IP camera, whether wired or wireless. Probably a very low priority, but it would be useful for some.

Anyway, I'm thinking this issue can be closed.

As for promotion, would you like me to bring this up in the forums to which I belong now or wait until you have a more end user friendly landing page?

Thanks again for all you are doing for the shooting sports.

Andrew

phrack commented 10 years ago

I'll go ahead and close this issue. We can carry on promotion discussion and such on the open landing page issue if we need to.

My take is that if you have a particular forum you think would be especially receptive to this type of project, go ahead and do some promoting there. I say that for two reasons:

  1. My proposal was accepted contingent on me making several revisions so I am not out of the woods yet and crunch time carries on...
  2. Every time I've advertised ShootOFF I've received a spike in contributions. More often than not, those contributions have been fixes for pain points people had that made ShootOFF better for everyone. Who knows, we may attract the right person to deal with one of the open and known pain points.