WineHQ
Wine Forums

Board index » WineHQ » Wine Help » Linux




 Page 1 of 1 [ 3 posts ] 



 
Author Message
 Post Posted: Thu Jun 13, 2019 5:45 am 
Offline
Level 1
Level 1

Joined: Sun Mar 15, 2015 6:32 am
Posts: 9
As Photoshop CC 2019 in now fully working (using this method: https://appdb.winehq.org/objectManager. ... &iId=37541), a friend of mine wrote me a little Python 3 script to get a 100% boot rate.

Using the "taskset" method only allows you to use 1 processor. This script will boot you PS CC 2019 with all CPUs working.

What does it do: The script will read and identity the CC 2019 boot process. If failure lines are found, kills the .exe and relaunch it. Another state doesn't return any errors, just a standy of the boot process. In this case the script start a countdown of 3 seconds to monitor if the process continues to boot. If not, kills the .exe and start it again.

Photoshop will 100% boot using the script. Your PS CC path (line 21) must be adapted to your configuration. The script can also be adapted to Photoshop CS 6. Enjoy it, and feel free to update it or make it better.

Code:
#!/usr/bin/env python3

import subprocess, re, sys, signal

error_keywords = re.compile('^.*(Assertion|0x65372a0).*$')
success_keywords = re.compile('^.*(list_manager_QueryInterface).*$')

exited = False
process = None
successful_launch = False
timeout = 3

def kill_photoshop(signalnum, frame):
   if not successful_launch:
      print("No successful launch withing %d seconds, killing photoshop ..."%timeout, file=sys.stderr)
      process.kill()

signal.signal(signal.SIGALRM, kill_photoshop)

while not exited:
   process = subprocess.Popen(["wine64", "/home/artik/.wine/drive_c/Program Files/Adobe/Adobe Photoshop CC 2019/Photoshop.exe"], stderr=subprocess.PIPE)
   successful_launch = False
   signal.alarm(timeout)
   while True:
      if process.poll():
         break
      line = process.stderr.readline()
      # print("got line %d and process %s"%(len(line),process.poll()))
      if len(line) == 0 and process.poll() is not None:
         if process.poll() == 0:
            exited = True
         break
      if line:
         print(line.strip())
         if success_keywords.match(str(line)):
            print("Successful photoshop launch detected", file=sys.stderr)
            successful_launch = True
         if error_keywords.match(str(line)):
            print("Error keyword match, killing process", file=sys.stderr)
            process.kill()
            break
   print("Process return code %d"%process.wait())


Top 
 Post Posted: Fri Jun 14, 2019 4:38 pm 
Offline
Level 7
Level 7
User avatar

Joined: Tue Nov 22, 2016 5:39 pm
Posts: 783
That will get lost here, I guess you could post it in an appdb report though.


Top 
 Post Posted: Fri Jun 14, 2019 5:45 pm 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2637
Location: Cambridge
artik wrote:
...
Photoshop will 100% boot using the script. Your PS CC path (line 21) must be adapted to your configuration. The script can also be adapted to Photoshop CS 6. Enjoy it, and feel free to update it or make it better.
...


I've added the script, as a Wiki Note, to the Photoshop CC 2109 WineHQ AppDB page.
I'm pretty sure it's correct (I fixed a couple of minor items) but you might want to double check!

I've also linked the CC 2019 version of Photoshop against the bug you've (/ your friend) worked around:
Bug 35041 - Multiple apps and games crash with heap corruption or live-lock in libX11 (EA Origin, Garmin Express Fit, SMPlayer, LotRO launcher, Kindle for PC, Conan Exiles)('taskset -c 0 wine ./foo.exe' is a workaround)

Bob


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 3 posts ] 




Board index » WineHQ » Wine Help » Linux


Who is online

Users browsing this forum: No registered users and 11 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: