Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible fix for windows 7 x64 and PIL replacedment with Pillow #35

Open
GoogleCodeExporter opened this issue Apr 27, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi, 
Sorry I do not know if this is the correct way, but found a way how to install 
and get the Demo testsuite running on my Win7 x64 with python 2.9.4 amd64.
I do not know if this works 100% but the Demo Test do and I want to share my 
way, maybe it can help someone else.


Steps to get it running:
x64 support:
- Download and extract the Autoit Library
- Download the Autoit3.zip from 
https://www.autoitscript.com/site/autoit/downloads/
- copy the AutoItX3_x64.dll to .....\AutoItLibrary-1.1\3rdPartyTools\AutoIt\ 
folder

- edit setup.py and replace the "AutoItX3.dll" with "AutoIt3X_x64.dll"

or make it platform dependend:
~~~~~~~~~~~snip~~~~~~~~~~
    import platfrom
    if sys.argv[1].lower() == "install" :
        if os.name == "nt" :
            if platform.machine().endswith('AMD64'):
                dllFile = "AutoItX3_x64.dll"
            else:
                dllFile = "AutoItX3.dll"

            #
            # Install and register AutoItX
            #

            if os.path.isfile(os.path.join(get_python_lib(), "AutoItLibrary/lib/" + dllFile)) :
                print "Don't think we need to unregister the old one..."

            instDir = os.path.normpath(os.path.join(get_python_lib(), "AutoItLibrary/lib"))
            if not os.path.isdir(instDir) :
                os.makedirs(instDir)
            instFile = os.path.normpath(os.path.join(instDir, dllFile))
            shutil.copyfile("3rdPartyTools/AutoIt/"+ dllFile, instFile)
~~~~~~~~~~~snip~~~~~~~~~~


Use Replace PIL with Pillow:
- edit __init__.py, I edited both file in src and build, not sure if needed or  
why there are 2 copies.

- simply add "from PIL " before the "import ImageGrab"

~~~~~~~~~~~snip~~~~~~~~~~
try :
    from PIL import ImageGrab
~~~~~~~~~~~snip~~~~~~~~~~


And after pywin install, autoit setup was successful and the Demo Calculator 
Test  with "screecshot on fail" was running without a problem.

Original issue reported on code.google.com by stefansc...@gmail.com on 6 May 2015 at 3:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant