wwine 0.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/COPYING +12 -14
- data/README.md +20 -0
- data/wwine +158 -26
- data/wwine.1 +12 -3
- metadata +4 -4
- data/README +0 -11
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7894308cde683c0f748cb6d99aff493061300abc648b593d5b660b0ebe3a8df6
         | 
| 4 | 
            +
              data.tar.gz: f93f04f10160712750868fb4f78499c0d1cd825fb741352265bc3b7a267b41f6
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: '068d62047e7c777409859e99758d372cfbf2be563956a88e738ee3f0aef2a103b1096686e2d9cd304e61fe12543bc22a13fd391d6fabb07607687af17ef1e9ed'
         | 
| 7 | 
            +
              data.tar.gz: 840ac03026a7f696950d0c2f31fb8e07dcc55bd056d8ff65c1dcfb52d83335ffbaaa106e708fcf6a6f6d97b7406d6342cfe88e198d6ce6f878e66cf0279723c4
         | 
    
        data/COPYING
    CHANGED
    
    | @@ -1,12 +1,11 @@ | |
| 1 | 
            +
                                GNU GENERAL PUBLIC LICENSE
         | 
| 2 | 
            +
                                   Version 3, 29 June 2007
         | 
| 1 3 |  | 
| 2 | 
            -
             | 
| 3 | 
            -
            		       Version 3, 29 June 2007
         | 
| 4 | 
            -
             | 
| 5 | 
            -
             Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
         | 
| 4 | 
            +
             Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
         | 
| 6 5 | 
             
             Everyone is permitted to copy and distribute verbatim copies
         | 
| 7 6 | 
             
             of this license document, but changing it is not allowed.
         | 
| 8 7 |  | 
| 9 | 
            -
             | 
| 8 | 
            +
                                        Preamble
         | 
| 10 9 |  | 
| 11 10 | 
             
              The GNU General Public License is a free, copyleft license for
         | 
| 12 11 | 
             
            software and other kinds of works.
         | 
| @@ -69,7 +68,7 @@ patents cannot be used to render the program non-free. | |
| 69 68 | 
             
              The precise terms and conditions for copying, distribution and
         | 
| 70 69 | 
             
            modification follow.
         | 
| 71 70 |  | 
| 72 | 
            -
             | 
| 71 | 
            +
                                   TERMS AND CONDITIONS
         | 
| 73 72 |  | 
| 74 73 | 
             
              0. Definitions.
         | 
| 75 74 |  | 
| @@ -77,7 +76,7 @@ modification follow. | |
| 77 76 |  | 
| 78 77 | 
             
              "Copyright" also means copyright-like laws that apply to other kinds of
         | 
| 79 78 | 
             
            works, such as semiconductor masks.
         | 
| 80 | 
            -
             | 
| 79 | 
            +
             | 
| 81 80 | 
             
              "The Program" refers to any copyrightable work licensed under this
         | 
| 82 81 | 
             
            License.  Each licensee is addressed as "you".  "Licensees" and
         | 
| 83 82 | 
             
            "recipients" may be individuals or organizations.
         | 
| @@ -510,7 +509,7 @@ actual knowledge that, but for the patent license, your conveying the | |
| 510 509 | 
             
            covered work in a country, or your recipient's use of the covered work
         | 
| 511 510 | 
             
            in a country, would infringe one or more identifiable patents in that
         | 
| 512 511 | 
             
            country that you have reason to believe are valid.
         | 
| 513 | 
            -
             | 
| 512 | 
            +
             | 
| 514 513 | 
             
              If, pursuant to or in connection with a single transaction or
         | 
| 515 514 | 
             
            arrangement, you convey, or propagate by procuring conveyance of, a
         | 
| 516 515 | 
             
            covered work, and grant a patent license to some of the parties
         | 
| @@ -619,9 +618,9 @@ an absolute waiver of all civil liability in connection with the | |
| 619 618 | 
             
            Program, unless a warranty or assumption of liability accompanies a
         | 
| 620 619 | 
             
            copy of the Program in return for a fee.
         | 
| 621 620 |  | 
| 622 | 
            -
             | 
| 621 | 
            +
                                 END OF TERMS AND CONDITIONS
         | 
| 623 622 |  | 
| 624 | 
            -
             | 
| 623 | 
            +
                        How to Apply These Terms to Your New Programs
         | 
| 625 624 |  | 
| 626 625 | 
             
              If you develop a new program, and you want it to be of the greatest
         | 
| 627 626 | 
             
            possible use to the public, the best way to achieve this is to make it
         | 
| @@ -646,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. | |
| 646 645 | 
             
                GNU General Public License for more details.
         | 
| 647 646 |  | 
| 648 647 | 
             
                You should have received a copy of the GNU General Public License
         | 
| 649 | 
            -
                along with this program.  If not, see < | 
| 648 | 
            +
                along with this program.  If not, see <https://www.gnu.org/licenses/>.
         | 
| 650 649 |  | 
| 651 650 | 
             
            Also add information on how to contact you by electronic and paper mail.
         | 
| 652 651 |  | 
| @@ -665,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box". | |
| 665 664 | 
             
              You should also get your employer (if you work as a programmer) or school,
         | 
| 666 665 | 
             
            if any, to sign a "copyright disclaimer" for the program, if necessary.
         | 
| 667 666 | 
             
            For more information on this, and how to apply and follow the GNU GPL, see
         | 
| 668 | 
            -
            < | 
| 667 | 
            +
            <https://www.gnu.org/licenses/>.
         | 
| 669 668 |  | 
| 670 669 | 
             
              The GNU General Public License does not permit incorporating your program
         | 
| 671 670 | 
             
            into proprietary programs.  If your program is a subroutine library, you
         | 
| 672 671 | 
             
            may consider it more useful to permit linking proprietary applications with
         | 
| 673 672 | 
             
            the library.  If this is what you want to do, use the GNU Lesser General
         | 
| 674 673 | 
             
            Public License instead of this License.  But first, please read
         | 
| 675 | 
            -
            < | 
| 676 | 
            -
             | 
| 674 | 
            +
            <https://www.gnu.org/licenses/why-not-lgpl.html>.
         | 
    
        data/README.md
    ADDED
    
    | @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            # wwine - a wrapper for wine
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            wwine (wrapped wine) is a wrapper for the Windows compatibility layer
         | 
| 4 | 
            +
            [wine](http://www.winehq.com/). It wraps various flavours of wine into a
         | 
| 5 | 
            +
            single unified interface, complete with full bottle support for all of them.
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            It integrates well with how the various flavours mange their bottles, so for
         | 
| 8 | 
            +
            instance applications isntalled using crossover will be manageable through the
         | 
| 9 | 
            +
            usual crossover interface.
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            For vanilla wine, lutris and PlayOnLinux it uses WINEPREFIX to achieve bottle
         | 
| 12 | 
            +
            support, creating bottles as ~/.wwinebottles/[BOTTLE NAME]
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            It supports the following flavours of wine:
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            - [vanilla wine (winehq)](http://www.winehq.com/)
         | 
| 17 | 
            +
            - [wine-staging](https://github.com/wine-staging/wine-staging)
         | 
| 18 | 
            +
            - [Crossover](https://codeweavers.com/)
         | 
| 19 | 
            +
            - [wine from lutris](https://lutris.net/)
         | 
| 20 | 
            +
            - [wine from PlayOnLinux](https://www.playonlinux.com/en/)
         | 
    
        data/wwine
    CHANGED
    
    | @@ -19,8 +19,10 @@ | |
| 19 19 | 
             
            require 'getoptlong'
         | 
| 20 20 | 
             
            # To read info for --debuginfo
         | 
| 21 21 | 
             
            require 'open3'
         | 
| 22 | 
            +
            # Needed to make symlinks
         | 
| 23 | 
            +
            require 'fileutils'
         | 
| 22 24 | 
             
            # Application version
         | 
| 23 | 
            -
            $version = '0. | 
| 25 | 
            +
            $version = '0.5'
         | 
| 24 26 | 
             
            # The wine flavour to use
         | 
| 25 27 | 
             
            $wine = nil
         | 
| 26 28 | 
             
            # The bottle to use
         | 
| @@ -58,8 +60,10 @@ def killWine (signal) | |
| 58 60 | 
             
            	end
         | 
| 59 61 | 
             
            	# Open a pipe to ps to read processes
         | 
| 60 62 | 
             
            	wines = IO.popen('ps uxw')
         | 
| 61 | 
            -
            	#  | 
| 62 | 
            -
            	 | 
| 63 | 
            +
            	# The result of our ps parsing
         | 
| 64 | 
            +
            	wineResult = []
         | 
| 65 | 
            +
            	# The length of the "wine" name, used to format the output well
         | 
| 66 | 
            +
            	wineLength = 10
         | 
| 63 67 | 
             
            	# The name of the signal being sent
         | 
| 64 68 | 
             
            	sigName = 'SIGTERM'
         | 
| 65 69 | 
             
            	# Get an integer version of signal parameter
         | 
| @@ -85,8 +89,6 @@ def killWine (signal) | |
| 85 89 | 
             
            	if !dryRun
         | 
| 86 90 | 
             
            		print 'Sending '+sigName+' to the following processes:'+"\n\n"
         | 
| 87 91 | 
             
            	end
         | 
| 88 | 
            -
            	format = "%-10s %-12s %-8s %-20s\n"
         | 
| 89 | 
            -
            	printf(format,'Wine','Bottle','PID','Command')
         | 
| 90 92 | 
             
            	# Go through each line in the 'ps' output
         | 
| 91 93 | 
             
            	wines.each do |line|
         | 
| 92 94 | 
             
            		# True if we *require* /proc to be read for this process.
         | 
| @@ -149,19 +151,36 @@ def killWine (signal) | |
| 149 151 | 
             
            		elsif $bottle && $bottle != extra['bottle']
         | 
| 150 152 | 
             
            			next
         | 
| 151 153 | 
             
            		end
         | 
| 154 | 
            +
            		resolvedWine = resolveWine(extra['wine'])
         | 
| 152 155 | 
             
            		# Output information
         | 
| 153 | 
            -
            		 | 
| 156 | 
            +
            		wineResult.push({
         | 
| 157 | 
            +
            			'wine' => resolvedWine,
         | 
| 158 | 
            +
            			'bottle' => extra['bottle'],
         | 
| 159 | 
            +
            			'pid' => pid,
         | 
| 160 | 
            +
            			'name' => name
         | 
| 161 | 
            +
            		})
         | 
| 162 | 
            +
             | 
| 163 | 
            +
            		if resolvedWine.length > wineLength
         | 
| 164 | 
            +
            			wineLength = resolvedWine.length
         | 
| 165 | 
            +
            		end
         | 
| 166 | 
            +
            	end
         | 
| 167 | 
            +
            	# The format of the output
         | 
| 168 | 
            +
            	format = "%-"+wineLength.to_s+"s %-12s %-8s %-20s\n"
         | 
| 169 | 
            +
            	# Header
         | 
| 170 | 
            +
            	printf(format,'Wine','Bottle','PID','Command')
         | 
| 171 | 
            +
            	# Display or send signals to each entry
         | 
| 172 | 
            +
            	wineResult.each do |entry|
         | 
| 173 | 
            +
            		printf(format,entry['wine'],entry['bottle'],entry['pid'],entry['name'])
         | 
| 154 174 | 
             
            		# Send SIGTERM (or output information if in dryRun mode)
         | 
| 155 175 | 
             
            		if !dryRun
         | 
| 156 176 | 
             
            			begin
         | 
| 157 | 
            -
            				Process.kill(signal,pid.to_i)
         | 
| 158 | 
            -
            			rescue | 
| 159 | 
            -
            				puts('Error while attempting to send signal to '+pid+': '+$!)
         | 
| 177 | 
            +
            				Process.kill(signal,entry['pid'].to_i)
         | 
| 178 | 
            +
            			rescue
         | 
| 179 | 
            +
            				puts('Error while attempting to send signal to '+entry['pid']+': '+$!)
         | 
| 160 180 | 
             
            			end
         | 
| 161 181 | 
             
            		end
         | 
| 162 | 
            -
            		killed = true
         | 
| 163 182 | 
             
            	end
         | 
| 164 | 
            -
            	if  | 
| 183 | 
            +
            	if wineResult.length < 0
         | 
| 165 184 | 
             
            		puts 'No wine processes found.'
         | 
| 166 185 | 
             
            	end
         | 
| 167 186 | 
             
            end
         | 
| @@ -180,27 +199,32 @@ def getFromEnviron(path) | |
| 180 199 | 
             
            			env[key] = value
         | 
| 181 200 | 
             
            		end
         | 
| 182 201 |  | 
| 183 | 
            -
            		if env[' | 
| 184 | 
            -
            			info[' | 
| 185 | 
            -
            		elsif env[' | 
| 186 | 
            -
            			info['bottle'] = File.basename(env['WINEPREFIX'])
         | 
| 187 | 
            -
            		elsif env['__WWINE_INT_XBOTTLE']
         | 
| 188 | 
            -
            			info['bottle'] = env['__WWINE_INT_XBOTTLE']
         | 
| 189 | 
            -
            		else
         | 
| 190 | 
            -
            			info['bottle'] = '(default)'
         | 
| 191 | 
            -
            		end
         | 
| 192 | 
            -
            		if env['CX_ROOT'] && env['CX_ROOT'].match(/cxoffice/)
         | 
| 202 | 
            +
            		if env['__WWINE_INT_XWINE']
         | 
| 203 | 
            +
            			info['wine'] = env['__WWINE_INT_XWINE']
         | 
| 204 | 
            +
            		elsif env['CX_ROOT'] && env['CX_ROOT'].match(/cxoffice/)
         | 
| 193 205 | 
             
            			info['wine'] = 'crossover'
         | 
| 194 206 | 
             
            		elsif env['CX_ROOT'] && env['CX_ROOT'].match(/cxgames/)
         | 
| 195 207 | 
             
            			info['wine'] = 'cxgames'
         | 
| 196 | 
            -
            		elsif env[' | 
| 197 | 
            -
            			info['wine'] = env[' | 
| 208 | 
            +
            		elsif env['WINE']
         | 
| 209 | 
            +
            			info['wine'] = env['WINE']
         | 
| 198 210 | 
             
            		elsif env['WINELOADER']
         | 
| 199 211 | 
             
            			info['wine'] = 'wine'
         | 
| 200 212 | 
             
            		elsif info['bottle'] == '.wine-pipelight'
         | 
| 201 213 | 
             
            			info['wine'] = 'pipelight'
         | 
| 202 214 | 
             
            			info['bottle'] = '(pipelight)'
         | 
| 203 215 | 
             
            		end
         | 
| 216 | 
            +
            		if env['CX_BOTTLE']
         | 
| 217 | 
            +
            			info['bottle'] = env['CX_BOTTLE']
         | 
| 218 | 
            +
            		elsif env['__WWINE_INT_XBOTTLE']
         | 
| 219 | 
            +
            			info['bottle'] = env['__WWINE_INT_XBOTTLE']
         | 
| 220 | 
            +
            		elsif env['WINEPREFIX']
         | 
| 221 | 
            +
            			info['bottle'] = File.basename(env['WINEPREFIX'])
         | 
| 222 | 
            +
            			if info['bottle'] == 'pfx' && info['wine'] =~ /proton/i
         | 
| 223 | 
            +
            				info['bottle'] = File.basename(File.dirname(ENV['WINEPREFIX']))
         | 
| 224 | 
            +
            			end
         | 
| 225 | 
            +
            		else
         | 
| 226 | 
            +
            			info['bottle'] = '(default)'
         | 
| 227 | 
            +
            		end
         | 
| 204 228 | 
             
            	end
         | 
| 205 229 | 
             
            	return info
         | 
| 206 230 | 
             
            end
         | 
| @@ -360,6 +384,8 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args, | |
| 360 384 | 
             
            		file.puts("\t"+'export WINESERVER='+shellQuote(path+'/bin/wineserver'))
         | 
| 361 385 | 
             
            		file.puts("\t"+'export WINELOADER='+shellQuote(path+'/bin/wine'))
         | 
| 362 386 | 
             
            		file.puts("\t"+'export WINEDLLPATH='+shellQuote(path+'/lib/wine'))
         | 
| 387 | 
            +
            	elsif wwineInfo['Wine'] =~ /^proton/
         | 
| 388 | 
            +
            		file.puts("\t"+'export STEAM_COMPAT_DATA_PATH='+shellQuote(ENV['STEAM_COMPAT_DATA_PATH']))
         | 
| 363 389 | 
             
            	elsif wwineInfo['Wine'] == 'wine' || wineprefix
         | 
| 364 390 | 
             
            		if ENV['WINEDEBUG'] != nil
         | 
| 365 391 | 
             
            			file.puts("\t"+"export WINEDEBUG="+shellQuote(ENV['WINEDEBUG']))
         | 
| @@ -669,7 +695,7 @@ def parseWwineDataV1 (rawData) | |
| 669 695 | 
             
            			info['Wine'] = info['Cxinstalldir']
         | 
| 670 696 | 
             
            		end
         | 
| 671 697 | 
             
            	end
         | 
| 672 | 
            -
             | 
| 698 | 
            +
             | 
| 673 699 | 
             
            	cmd = []
         | 
| 674 700 |  | 
| 675 701 | 
             
            	unquoteShellArray(rawData['Cmd'],cmd)
         | 
| @@ -868,7 +894,7 @@ end | |
| 868 894 | 
             
            def getCXVersionsFrom (source,wantString = false)
         | 
| 869 895 | 
             
            	cxVer = nil
         | 
| 870 896 | 
             
            	cxwVer = nil
         | 
| 871 | 
            -
            	if source != nil | 
| 897 | 
            +
            	if source != nil
         | 
| 872 898 | 
             
            		begin
         | 
| 873 899 | 
             
            			# Store the binfile for use later
         | 
| 874 900 | 
             
            			binFile = source[0]
         | 
| @@ -1011,6 +1037,12 @@ def listWines(debug = false) | |
| 1011 1037 | 
             
            			end
         | 
| 1012 1038 | 
             
            		end
         | 
| 1013 1039 |  | 
| 1040 | 
            +
            		protons = getProtons()
         | 
| 1041 | 
            +
            		protons.each do |entry,path|
         | 
| 1042 | 
            +
            		  version = entry.sub(/^proton-/,'')
         | 
| 1043 | 
            +
            		  printf(outFormat,'proton-'+version,getWineVersion(path+'/dist/bin/wine'))
         | 
| 1044 | 
            +
            		end
         | 
| 1045 | 
            +
             | 
| 1014 1046 | 
             
            		if $wine != nil && debug
         | 
| 1015 1047 | 
             
            			version = nil
         | 
| 1016 1048 | 
             
            			if File.directory?($wine)
         | 
| @@ -1044,7 +1076,7 @@ def handleException(ex) | |
| 1044 1076 | 
             
            end
         | 
| 1045 1077 |  | 
| 1046 1078 | 
             
            # Purpose: Get parameters for wine
         | 
| 1047 | 
            -
            def getWineWithParams (wine,bottle, missingIsFatal = true, playOnLinux = false)
         | 
| 1079 | 
            +
            def getWineWithParams (wine,bottle, missingIsFatal = true, playOnLinux = false, proton = false)
         | 
| 1048 1080 | 
             
            	final = []
         | 
| 1049 1081 | 
             
            	possibleWines = []
         | 
| 1050 1082 | 
             
            	if wine =~ /^wine(64|32|-unstable(32|64)?)$/
         | 
| @@ -1326,6 +1358,100 @@ def getCustomwithParams(wine,bottle, type = 'POL', missingIsFatal = true, return | |
| 1326 1358 | 
             
            	return getWineWithParams(detectedWine,bottle,missingIsFatal,polMode)
         | 
| 1327 1359 | 
             
            end
         | 
| 1328 1360 |  | 
| 1361 | 
            +
            # Purpose: Get parameters for Proton
         | 
| 1362 | 
            +
            def getProtonWithParams(wine,bottle, missingIsFatal = true)
         | 
| 1363 | 
            +
            	command = []
         | 
| 1364 | 
            +
            	protons = getProtons()
         | 
| 1365 | 
            +
            	if !protons[wine]
         | 
| 1366 | 
            +
            		if missingIsFatal
         | 
| 1367 | 
            +
            			puts("Could not find a proton version matching \""+wine+"\"")
         | 
| 1368 | 
            +
            			exit(1)
         | 
| 1369 | 
            +
            		else
         | 
| 1370 | 
            +
            			return nil
         | 
| 1371 | 
            +
            		end
         | 
| 1372 | 
            +
            	end
         | 
| 1373 | 
            +
             | 
| 1374 | 
            +
            	if bottle == nil
         | 
| 1375 | 
            +
            		bottle = 'wwine-proton-default-bottle'
         | 
| 1376 | 
            +
            	end
         | 
| 1377 | 
            +
             | 
| 1378 | 
            +
            	runtimeWrapper = ENV['HOME']+'/.steam/root/ubuntu12_32/steam-runtime/run.sh'
         | 
| 1379 | 
            +
             | 
| 1380 | 
            +
            	if ENV.has_key?('STEAM_RUNTIME') && ENV['STEAM_RUNTIME'] == "0"
         | 
| 1381 | 
            +
            		vputs(V_DBG,"Skipping Steam runtime for proton because of the STEAM_RUNTIME env var")
         | 
| 1382 | 
            +
            	elsif !File.exists?(runtimeWrapper)
         | 
| 1383 | 
            +
            		vputs(V_DBG, "Did not find Steam runtime wrapper script, skipping steam runtime")
         | 
| 1384 | 
            +
            	else
         | 
| 1385 | 
            +
            		command.push(runtimeWrapper)
         | 
| 1386 | 
            +
            	end
         | 
| 1387 | 
            +
             | 
| 1388 | 
            +
            	command.push( protons[wine]+'/proton','run')
         | 
| 1389 | 
            +
             | 
| 1390 | 
            +
            	bottleRoot = ENV['HOME']+'/.wwinebottles/'
         | 
| 1391 | 
            +
            	if !File.exists?(bottleRoot)
         | 
| 1392 | 
            +
            		vputs(V_INFO,bottleRoot+': does not exist, creating')
         | 
| 1393 | 
            +
            		begin
         | 
| 1394 | 
            +
            			Dir.mkdir(bottleRoot)
         | 
| 1395 | 
            +
            		rescue SystemCallError
         | 
| 1396 | 
            +
            			puts('Failed to create directory "'+bottleRoot+": "+$!)
         | 
| 1397 | 
            +
            			puts('Unable to continue.')
         | 
| 1398 | 
            +
            			exit(1)
         | 
| 1399 | 
            +
            		end
         | 
| 1400 | 
            +
            	end
         | 
| 1401 | 
            +
            	if !File.exists?(bottleRoot+bottle)
         | 
| 1402 | 
            +
            		vputs(V_INFO,bottleRoot+bottle+': does not exist, creating')
         | 
| 1403 | 
            +
            		begin
         | 
| 1404 | 
            +
            			Dir.mkdir(bottleRoot)
         | 
| 1405 | 
            +
            		rescue SystemCallError
         | 
| 1406 | 
            +
            			puts('Failed to create directory "'+bottleRoot+": "+$!)
         | 
| 1407 | 
            +
            			puts('Unable to continue.')
         | 
| 1408 | 
            +
            			exit(1)
         | 
| 1409 | 
            +
            		end
         | 
| 1410 | 
            +
            	end
         | 
| 1411 | 
            +
            	# Proton always uses /pfx, we make that a symlink to the base bottle
         | 
| 1412 | 
            +
            	if !File.exists?(bottleRoot+bottle+'/pfx')
         | 
| 1413 | 
            +
            		FileUtils.ln_s(bottleRoot+bottle,bottleRoot+bottle+'/pfx')
         | 
| 1414 | 
            +
            	end
         | 
| 1415 | 
            +
            	# Proton uses STEAM_COMPAT_DATA_PATH to point to the bottle location
         | 
| 1416 | 
            +
            	envPut('STEAM_COMPAT_DATA_PATH',bottleRoot+bottle)
         | 
| 1417 | 
            +
             | 
| 1418 | 
            +
            	# Disable wineArch support. Proton uses its own.
         | 
| 1419 | 
            +
            	$wineArch = nil
         | 
| 1420 | 
            +
             | 
| 1421 | 
            +
            	vputs(V_DBG,'Detected proton: '+command.join(' '))
         | 
| 1422 | 
            +
            	return command
         | 
| 1423 | 
            +
            end
         | 
| 1424 | 
            +
             | 
| 1425 | 
            +
            # Purpose: Get a list of installed proton versions
         | 
| 1426 | 
            +
            def getProtons ()
         | 
| 1427 | 
            +
            	# Proton gets installed in the same "steam library" directory that the first game
         | 
| 1428 | 
            +
            	# that used said version of Proton is installed to. Thus we need to parse out where
         | 
| 1429 | 
            +
            	# all of Steam's library directories are to be able to produce a complete list.
         | 
| 1430 | 
            +
            	dirs = [ ENV['HOME']+'/.steam/root/SteamApps/common' ]
         | 
| 1431 | 
            +
            	steamConfigFile = ENV['HOME']+'/.steam/root/config/config.vdf'
         | 
| 1432 | 
            +
            	if File.exists?(steamConfigFile)
         | 
| 1433 | 
            +
            		source = File.open(steamConfigFile)
         | 
| 1434 | 
            +
            		source.each("\n") do |entry|
         | 
| 1435 | 
            +
            			if entry =~ /\s*\"BaseInstallFolder_\d+\"\s*/
         | 
| 1436 | 
            +
            				dir = entry.sub(/^\s*\"BaseInstallFolder_\d+\"\s*\"(.*)\"/,'\1').chomp
         | 
| 1437 | 
            +
            				dirs.push(dir+'/steamapps/common')
         | 
| 1438 | 
            +
            			end
         | 
| 1439 | 
            +
            		end
         | 
| 1440 | 
            +
            	end
         | 
| 1441 | 
            +
            	protons = {}
         | 
| 1442 | 
            +
            	# Note: In the case of several identical proton versions we'll just use the last one
         | 
| 1443 | 
            +
            	# we find
         | 
| 1444 | 
            +
            	dirs.each do |entry|
         | 
| 1445 | 
            +
            		Dir.glob(entry+'/Proton*') do |instance|
         | 
| 1446 | 
            +
            			if File.executable?(instance+'/proton')
         | 
| 1447 | 
            +
            				version = instance.sub(/.*Proton\s+(\d+\.\d+).*/,'\1')
         | 
| 1448 | 
            +
            				protons['proton-'+version] = instance
         | 
| 1449 | 
            +
            			end
         | 
| 1450 | 
            +
            		end
         | 
| 1451 | 
            +
            	end
         | 
| 1452 | 
            +
            	return protons
         | 
| 1453 | 
            +
            end
         | 
| 1454 | 
            +
             | 
| 1329 1455 | 
             
            # Purpose: Detect which wine to use and get parameters for that one
         | 
| 1330 1456 | 
             
            # Returns: type,cmd
         | 
| 1331 1457 | 
             
            def getAutoWithParams (bottle, missingIsFatal = true, returnFlavour = false)
         | 
| @@ -1397,6 +1523,8 @@ def runWine (wine,bottle,args) | |
| 1397 1523 | 
             
            		elsif wine =~ /^(pol|lutris)[-:]?/i
         | 
| 1398 1524 | 
             
            			realWine = wine.sub(/^(pol|lutris)[-:]?/i,'')
         | 
| 1399 1525 | 
             
            			cmd = getCustomwithParams(realWine,bottle,wine)
         | 
| 1526 | 
            +
            		elsif wine =~ /^proton-/
         | 
| 1527 | 
            +
            			cmd = getProtonWithParams(wine,bottle)
         | 
| 1400 1528 | 
             
            		else
         | 
| 1401 1529 | 
             
            			puts('Unknown --wine: '+wine)
         | 
| 1402 1530 | 
             
            			if File.directory?(wine)
         | 
| @@ -1515,6 +1643,10 @@ def resolveWine(wine) | |
| 1515 1643 | 
             
            	if(map[wine])
         | 
| 1516 1644 | 
             
            		wine = map[wine]
         | 
| 1517 1645 | 
             
            	end
         | 
| 1646 | 
            +
            	if wine =~ /\.local\/share\/lutris/
         | 
| 1647 | 
            +
            		remapped = wine.sub!(/^.*\.local\/share\/lutris\/runners\/wine\/([^\/]+).*/,'\1')
         | 
| 1648 | 
            +
            		return 'lutris-'+remapped
         | 
| 1649 | 
            +
            	end
         | 
| 1518 1650 | 
             
            	return wine
         | 
| 1519 1651 | 
             
            end
         | 
| 1520 1652 |  | 
    
        data/wwine.1
    CHANGED
    
    | @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            .IX Title "WWINE 1"
         | 
| 2 | 
            -
            .TH WWINE 1 "2018- | 
| 2 | 
            +
            .TH WWINE 1 "2018-08-28" "wwine 0.5" ""
         | 
| 3 3 | 
             
            .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
         | 
| 4 4 | 
             
            .\" way too many mistakes in technical documents.
         | 
| 5 5 | 
             
            .if n .ad l
         | 
| @@ -11,7 +11,7 @@ wwine \- a simple wine(1) wrapper | |
| 11 11 | 
             
            wwine \fI(\s-1WWINE PARAMETERS\s0)\fR \fI\s-1PROGRAM\s0\fR \*(-- \fI[\s-1PROGRAM ARGUMENTS\s0]\fR
         | 
| 12 12 | 
             
            .SH "DESCRIPTION"
         | 
| 13 13 | 
             
            .IX Header "DESCRIPTION"
         | 
| 14 | 
            -
            \&\fBwwine\fR is a a \ | 
| 14 | 
            +
            \&\fBwwine\fR is a a \fBwine\fR\|(1) wrapper. It wraps various flavours of wine
         | 
| 15 15 | 
             
            (including vanilla wine and crossover) into a single
         | 
| 16 16 | 
             
            unified interface, complete with full bottle support for all
         | 
| 17 17 | 
             
            of them (including vanilla wine).
         | 
| @@ -174,7 +174,7 @@ to enable wwine debugging output). | |
| 174 174 | 
             
            .IX Item "--man"
         | 
| 175 175 | 
             
            Show the manpage. Normally 'man wwine' would do, but when wwine is
         | 
| 176 176 | 
             
            installed from a rubygem the wwine manpage isn't placed anywhere
         | 
| 177 | 
            -
            in \ | 
| 177 | 
            +
            in \fBman\fR\|(1)'s path, this will autodetect its location and issue man
         | 
| 178 178 | 
             
            directly on the wwine.1 file (and thus work even when 'man wwine'
         | 
| 179 179 | 
             
            does not).
         | 
| 180 180 | 
             
            .IP "\fB\-\-debuginfo\fR" 4
         | 
| @@ -247,6 +247,15 @@ Regular wine. <http://www.winehq.org/> | |
| 247 247 | 
             
            .IX Item "Crossover and Crossover Office/Games"
         | 
| 248 248 | 
             
            The commercial Crossover release from Codeweavers, as well as the legacy
         | 
| 249 249 | 
             
            versions \*(L"Crossover Office\*(R" and \*(L"Crossover Games\*(R". <http://www.codeweavers.com/>
         | 
| 250 | 
            +
            .IP "\fBProton\fR (Steam Play)" 4
         | 
| 251 | 
            +
            .IX Item "Proton (Steam Play)"
         | 
| 252 | 
            +
            The wine version used by Steam Play to run Windows games in the native Steam
         | 
| 253 | 
            +
            client. Note that this does not obey \-\-winearch or \-\-debug, since proton uses
         | 
| 254 | 
            +
            its own builtin arch detection and debug method. <https://steampowered.com>
         | 
| 255 | 
            +
            and <https://github.com/ValveSoftware/Proton>.
         | 
| 256 | 
            +
            .IP "\fBLutris\fR" 4
         | 
| 257 | 
            +
            .IX Item "Lutris"
         | 
| 258 | 
            +
            Wine packages installed via Lutris. <https://lutris.net/>
         | 
| 250 259 | 
             
            .IP "\fBPlayOnLinux\fR" 4
         | 
| 251 260 | 
             
            .IX Item "PlayOnLinux"
         | 
| 252 261 | 
             
            Wine packages installed via PlayOnLinux. <http://www.playonlinux.com/>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: wwine
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version:  | 
| 4 | 
            +
              version: 0.5.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Eskild Hustvedt
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: "."
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018- | 
| 11 | 
            +
            date: 2018-08-28 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: wwine is a a wine(1) wrapper. It wraps various flavours of wine (including
         | 
| 14 14 | 
             
              vanilla wine and crossover) into a single unified interface, complete with full
         | 
| @@ -21,7 +21,7 @@ extra_rdoc_files: [] | |
| 21 21 | 
             
            files:
         | 
| 22 22 | 
             
            - "./wwine"
         | 
| 23 23 | 
             
            - COPYING
         | 
| 24 | 
            -
            - README
         | 
| 24 | 
            +
            - README.md
         | 
| 25 25 | 
             
            - wwine
         | 
| 26 26 | 
             
            - wwine.1
         | 
| 27 27 | 
             
            homepage: http://random.zerodogg.org/wwine
         | 
| @@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 44 44 | 
             
                  version: '0'
         | 
| 45 45 | 
             
            requirements: []
         | 
| 46 46 | 
             
            rubyforge_project: 
         | 
| 47 | 
            -
            rubygems_version: 2.7. | 
| 47 | 
            +
            rubygems_version: 2.7.7
         | 
| 48 48 | 
             
            signing_key: 
         | 
| 49 49 | 
             
            specification_version: 4
         | 
| 50 50 | 
             
            summary: wwine is a simple wine wrapper.
         | 
    
        data/README
    DELETED
    
    | @@ -1,11 +0,0 @@ | |
| 1 | 
            -
            wwine (wrapped wine) is a a wine wrapper. It wraps various flavours of wine
         | 
| 2 | 
            -
            (including vanilla wine and crossover office/games) into a single
         | 
| 3 | 
            -
            unified interface, complete with full bottle support for all
         | 
| 4 | 
            -
            of them (including vanilla wine).
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            It integrates well with all flavours, so for instance applications
         | 
| 7 | 
            -
            installed using crossover will be managable through the usual crossover
         | 
| 8 | 
            -
            interface.
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            For vanilla wine it uses WINEPREFIX to achieve bottle support,
         | 
| 11 | 
            -
            creating bottles as ~/.wwinebottles/[BOTTLE_NAME]
         |