wwine 0.6 → 0.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/wwine +38 -71
  3. data/wwine.1 +4 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dc80c72bd69e1e4dfb94f59970ac9a0d13e33dae01aaf045e78bb3aa5d0b7b5
4
- data.tar.gz: 7782fb91245eee5dc068c890326e538b8707a9cdedede3e3ae22e7b3236f3264
3
+ metadata.gz: c2323d7ed7648e49e680ce65ae04ee9e6363c6f9516bd7c8032bd4850cb9807f
4
+ data.tar.gz: 17356c8bdd57a12adf24089f875f6dd3aac574a3489208daa5890c60aa1aee1e
5
5
  SHA512:
6
- metadata.gz: a69c8a650eb88a1815a3c6e08915a762036d85618b14a2eb82290396abe08d4cb9f50c60485f350e2191279933ba96b6e1b17722e043660021c7457cdf99f609
7
- data.tar.gz: 31b4af75ed1a7fc8cd251271d78e4f6b3ed5ee2c76000c0570088c2f3d77345b888399c74b208e0ba56b736c989d4b0150825d00e3cde92ee51b2d5fb37d39fa
6
+ metadata.gz: 2d597a5c884adf20c67f6eb667ab88c19a0886aabf1c2b8d0a0b8b22a8244fa9997497ef19a670e7e37dda1c2751587bcadda87d278d8b4fa50128a78e9a9e05
7
+ data.tar.gz: dc868c092a9403199990a9c82500002a20925e2ee2a81b4d41881f56a0c6c47cc9d6a0c71be07d23bd233069ca6dda9a1161dee555cf1b6276bbe409f0f183f0
data/wwine CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # wwine
3
- # Copyright (C) Eskild Hustvedt 2009, 2010, 2011, 2012, 2013
3
+ # Copyright (C) Eskild Hustvedt 2009-2013, 2016-2019
4
4
  #
5
5
  # This program is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ require 'open3'
22
22
  # Needed to make symlinks
23
23
  require 'fileutils'
24
24
  # Application version
25
- $version = '0.6'
25
+ $version = '0.7'
26
26
  # The wine flavour to use
27
27
  $wine = nil
28
28
  # The bottle to use
@@ -312,19 +312,6 @@ def unShellQuote(target)
312
312
  return fixedTarget
313
313
  end
314
314
 
315
- # Purpose: Unquote a full line of shellQuoted strings
316
- def unquoteShellArray (source,targetarr)
317
- source.split(/ '/).each do |part|
318
- part.sub!(/'$/,'')
319
- part.sub!(/^'/,'')
320
- part.chomp!
321
- if part.match(/\S/)
322
- targetarr.push(unShellQuote(part))
323
- end
324
- end
325
- return targetarr
326
- end
327
-
328
315
  # Purpose: Write a wrapper script
329
316
  def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args, wineprefix = nil)
330
317
  # Open the file for writing
@@ -620,25 +607,18 @@ def loadWwineDataFromFile (file,dryRun = false)
620
607
  puts "Unable to continue."
621
608
  exit(0)
622
609
  end
623
- # FIXME: Should convert info version to an integer and just check that
624
- if info['Info'] == 'v2' || info['Info'] == 'v3' || info['Info'] == 'v4' || info['Info'] == 'v5' || info['Info'] == 'v6'
610
+
611
+ info['Version'] = info['Info'].sub(/^\s*v(\d+)\s*.*/,'\1').to_i
612
+
613
+ if info['Version'] > 1 && info['Version'] <= 6
625
614
  vputs(V_DBG,'File contains wwine metadata '+info['Info'])
626
- info = parseWwineDataV2(info);
627
- elsif info['Info'].match(/^v1/)
628
- if ! $wrapperPath
629
- puts "ERROR: Unsupported wwine metadata format (v1)"
630
- puts ""
631
- puts "This format is no longer supported directly, and even upgrade support will"
632
- puts "be removed in a later version of wwine. To upgrade the file to the new"
633
- puts "wwine format, run this command:"
634
- puts " wwine --from "+shellQuote(file)+" --wrap "+shellQuote(file+'.new')+" && mv "+shellQuote(file)+" "+shellQuote(file+'.old')+' && mv '+shellQuote(file+'.new')+' '+shellQuote(file)
635
- puts ""
636
- puts "This will upgrade the file, while leaving an old backup copy in place with a"
637
- puts ".old-extension. You may delete the .old file if you have never edited the"
638
- puts "script directly, or after you have copied over your changes."
639
- exit(1)
640
- end
641
- info = parseWwineDataV1(info)
615
+ info = parseWwineData(info);
616
+ elsif info['Version'] == 1
617
+ puts "ERROR: Unsupported wwine metadata format (v1)"
618
+ puts ""
619
+ puts "This format is no longer supported. You will have to create a new wrapper script"
620
+ puts "using --wrap."
621
+ exit(1)
642
622
  else
643
623
  version = info['Info'].sub(/^(v\S+).+/,'\1').chomp
644
624
  puts "This version of wwine supports info format v2, v3, v4, v5 and v6."
@@ -676,14 +656,17 @@ def loadWwineDataFromFile (file,dryRun = false)
676
656
  # Get the --wine to use
677
657
  if $wine == nil && info['Wine'] != 'nil'
678
658
  $wine = info['Wine']
679
- # Support for legacy Cx*installdir
680
- if info['Cxinstalldir'] != 'nil' && info['Cxinstalldir'] != nil
681
- vputs(V_DBG,'Converting Cxinstalldir entry to a Wine entry')
682
- $wine = info['Cxinstalldir']
683
- end
684
- if info['CxGamesinstalldir'] != 'nil' && info['CxGamesinstalldir'] != nil
685
- vputs(V_DBG,'Converting CxGamesinstalldir entry to a Wine entry')
686
- $wine = info['CxGamesinstalldir']
659
+ # Convert Cx*installdir to $wine if present in v2/v3 files
660
+ if info['Version'] < 4
661
+ # Support for legacy Cx*installdir
662
+ if info['Cxinstalldir'] != 'nil' && info['Cxinstalldir'] != nil
663
+ vputs(V_DBG,'Converting Cxinstalldir entry to a Wine entry')
664
+ $wine = info['Cxinstalldir']
665
+ end
666
+ if info['CxGamesinstalldir'] != 'nil' && info['CxGamesinstalldir'] != nil
667
+ vputs(V_DBG,'Converting CxGamesinstalldir entry to a Wine entry')
668
+ $wine = info['CxGamesinstalldir']
669
+ end
687
670
  end
688
671
  printf(outFormat,outMessage+'--wine',$wine)
689
672
  end
@@ -726,31 +709,8 @@ def loadWwineDataFromFile (file,dryRun = false)
726
709
  end
727
710
  end
728
711
 
729
- # Parses wwine metadata version 1 (wwine 0.1.x)
730
- def parseWwineDataV1 (rawData)
731
- data = []
732
- unquoteShellArray(rawData['Info'],data)
733
- info = Hash.new
734
- info['Dir'] = data[1]
735
- info['Wine'] = resolveWine(data[2])
736
- info['Bottle'] = data[3]
737
- info['Cxinstalldir'] = data[4]
738
-
739
- if info['Wine'] == 'crossover' || info['Wine'] == 'cxgames'
740
- if info['Cxinstalldir']
741
- info['Wine'] = info['Cxinstalldir']
742
- end
743
- end
744
-
745
- cmd = []
746
-
747
- unquoteShellArray(rawData['Cmd'],cmd)
748
- info['Cmd'] = cmd
749
- return info
750
- end
751
-
752
712
  # Parses wwine metadata version 2+ (wwine 0.2+)
753
- def parseWwineDataV2 (data)
713
+ def parseWwineData (data)
754
714
  cmd = []
755
715
  currNo = 0
756
716
  while currNo < 999
@@ -1348,6 +1308,8 @@ def getGameTreeWithParams (wine,bottle, missingIsFatal = true)
1348
1308
  final = []
1349
1309
  gametreeBin = nil
1350
1310
 
1311
+ puts("WARNING: gametree/cedega support will be deprecated in wwine 0.8")
1312
+
1351
1313
  if inPath('gametree')
1352
1314
  gametreeBin = 'gametree'
1353
1315
  elsif inPath('gametree')
@@ -1505,7 +1467,7 @@ def getProtonWithParams(wine,bottle, missingIsFatal = true, multiReturn = false)
1505
1467
 
1506
1468
  vputs(V_DBG,'Detected proton: '+command.join(' '))
1507
1469
  if multiReturn
1508
- return command,bottleRoot+bottle
1470
+ return command,bottle+'/pfx'
1509
1471
  else
1510
1472
  return command
1511
1473
  end
@@ -1699,8 +1661,8 @@ def runWine (wine,bottle,args)
1699
1661
  puts(wine+' does not appear to be the path to a crossover installation directory')
1700
1662
  puts('')
1701
1663
  end
1702
- puts('Must be one of: wine, crossover, cxgames, cedega, or the path to a wine executable')
1703
- puts('or a crossover installation directory')
1664
+ puts('Must be one of the wine versions listed by `wwine --list` or the path to either a')
1665
+ puts('wine executeable or a crossover installation directory')
1704
1666
  exit(1)
1705
1667
  end
1706
1668
  end
@@ -1927,9 +1889,14 @@ begin
1927
1889
  end
1928
1890
  end
1929
1891
 
1930
- # Default WINEARCH to win32 if we're not being launched by a script and not
1931
- # being run with --from
1932
- if $wineArch == nil && $wwineDataFrom == nil && ENV['__WWINE_SCRIPT'] == nil && $wine !~ /64$/
1892
+ # Set a default WINEARCH to win32 unless:
1893
+ # - one is already set with --arch
1894
+ # - the wine version ends in 64
1895
+ # - we're being launched by a script
1896
+ # - we're running with --from
1897
+ # - the wine is proton
1898
+ if $wineArch == nil && $wwineDataFrom == nil && ENV['__WWINE_SCRIPT'] == nil && $wine !~ /64$/ && $wine !~ /^proton/
1899
+ vputs(V_DBG,"Using a default (guessed) wineArch of win32")
1933
1900
  $wineArch = 'win32'
1934
1901
  end
1935
1902
  rescue => ex
data/wwine.1 CHANGED
@@ -1,5 +1,5 @@
1
1
  .IX Title "WWINE 1"
2
- .TH WWINE 1 "2018-11-12" "wwine 0.6" ""
2
+ .TH WWINE 1 "2019-07-05" "wwine 0.7" ""
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
@@ -47,6 +47,9 @@ wwine will act as if \-\-wine is \*(L"crossover\*(R" (or cxgames), but use the C
47
47
  installation at that path instead of its autodetected one. If you supply the
48
48
  path to a wine binary then it will use that as the \*(L"wine\*(R" command instead of
49
49
  the one in your \s-1PATH.\s0
50
+
51
+ Note that cedega support has been deprecated as of wwine 0.7 and will be
52
+ removed in wwine 0.8.
50
53
  .IP "\fB\-b, \-\-bottle\fR \fI\s-1NAME\s0\fR" 4
51
54
  .IX Item "-b, --bottle NAME"
52
55
  Use the bottle with the name supplied. For crossover, cxgames, cxoffice or
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: '0.6'
4
+ version: '0.7'
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-12 00:00:00.000000000 Z
11
+ date: 2019-07-05 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
@@ -43,8 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []
46
- rubyforge_project:
47
- rubygems_version: 2.7.7
46
+ rubygems_version: 3.0.4
48
47
  signing_key:
49
48
  specification_version: 4
50
49
  summary: wwine is a simple wine wrapper.