wwine 0.3 → 0.4

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 +5 -5
  2. data/wwine +306 -142
  3. data/wwine.1 +105 -37
  4. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e0c1328444909d1ab568f2290bc792a4ed4a790f
4
- data.tar.gz: 07934726e9f51a60865e240a0edab85f3b850b6f
2
+ SHA256:
3
+ metadata.gz: ddfd32972c75b495e5bbbbe50ae199142e9f9d362602fca83f2c41264e894690
4
+ data.tar.gz: 8685c5b8731666a8ff21c263278c1714c78f9d71220d452241dcbb3a79365e8f
5
5
  SHA512:
6
- metadata.gz: b6b535f272c338396857e9e619a258b3d668aacce073153b0ed0c06945e2b410f0e042bb79f92596ceeeb686a12dba384a2e87e4988d2388a3e511a7ad0dc51c
7
- data.tar.gz: 9907eca8940177e1ff09500e2af83b06d91abcacbfecea8a3de0ed018ccd50026a2d8115f7fd63a2fff2e7bf2c49e5880afcc7ee802ccc333658678e908139a2
6
+ metadata.gz: 684934489489f1d4cd122efe06c08b69a9733c556fb035b09f3d7a396b15744e8b6bace63820b24eee7cc55bd0feb034f26bf03d34cc6ef33a3bd467e76172a8
7
+ data.tar.gz: 2d10e6dcc66feb60791f0f45a720f93d3ecf1ec7fcfece501074512a746d873dd14512470f9730c1a66798d0d8bcb7e5de75672098e61c3d9f1b9c1febe2a5ef
data/wwine CHANGED
@@ -20,15 +20,11 @@ require 'getoptlong'
20
20
  # To read info for --debuginfo
21
21
  require 'open3'
22
22
  # Application version
23
- $version = '0.3'
23
+ $version = '0.4'
24
24
  # The wine flavour to use
25
25
  $wine = nil
26
26
  # The bottle to use
27
27
  $bottle = nil
28
- # CX path
29
- $cxPath = nil
30
- # CXG path
31
- $cxgPath = nil
32
28
  # Path to write wrapper to
33
29
  $wrapperPath = nil
34
30
  # Directory to cd to in a wrapper
@@ -39,9 +35,15 @@ $wwineDataFrom = nil
39
35
  $envMode = false
40
36
  # true if we're in --tricks mode
41
37
  $tricksMode = false
38
+ # Wether to enable (LD_PRELOAD) the Feral Interactive GameMode library
39
+ $preloadGameMode = false
42
40
  # A positive integer if we're in --kill or --drykill mode
43
41
  # (--drykill = 9999)
44
42
  $killMode = nil
43
+ # Wine debugging levels
44
+ $wineDebug = nil
45
+ # The wine architecture
46
+ $wineArch = nil
45
47
  # Verbosity level
46
48
  $verbosity = 0
47
49
  V_INFO=1
@@ -82,8 +84,6 @@ def killWine (signal)
82
84
  end
83
85
  if !dryRun
84
86
  print 'Sending '+sigName+' to the following processes:'+"\n\n"
85
- else
86
- print 'Would send '+sigName+' to the following processes:'+"\n\n"
87
87
  end
88
88
  format = "%-10s %-12s %-8s %-20s\n"
89
89
  printf(format,'Wine','Bottle','PID','Command')
@@ -176,14 +176,14 @@ def getFromEnviron(path)
176
176
  env = Hash.new
177
177
  source.each("\0") do |entry|
178
178
  key = entry.sub(/^([^=]+)=.*$/,'\1').chomp
179
- value = entry.sub(/^[^=]+=(.*)$/,'\1').chomp
179
+ value = entry.sub(/^[^=]+=(.*)$/,'\1').sub(/\0/,'').chomp
180
180
  env[key] = value
181
181
  end
182
182
 
183
183
  if env['CX_BOTTLE']
184
184
  info['bottle'] = env['CX_BOTTLE']
185
185
  elsif env['WINEPREFIX']
186
- info['bottle'] = env['WINEPREFIX'].sub(/^.*\/([^\/]+)$/,'\1').chomp
186
+ info['bottle'] = File.basename(env['WINEPREFIX'])
187
187
  elsif env['__WWINE_INT_XBOTTLE']
188
188
  info['bottle'] = env['__WWINE_INT_XBOTTLE']
189
189
  else
@@ -197,9 +197,10 @@ def getFromEnviron(path)
197
197
  info['wine'] = env['__WWINE_INT_XWINE']
198
198
  elsif env['WINELOADER']
199
199
  info['wine'] = 'wine'
200
+ elsif info['bottle'] == '.wine-pipelight'
201
+ info['wine'] = 'pipelight'
202
+ info['bottle'] = '(pipelight)'
200
203
  end
201
- info['wine'].sub!(/\0/,'')
202
- info['bottle'].sub!(/\0/,'')
203
204
  end
204
205
  return info
205
206
  end
@@ -292,11 +293,13 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
292
293
  exit(1)
293
294
  end
294
295
 
295
- # If CxGamesinstalldir is present, use format v3, otherwise
296
- # v2 is fine.
297
- metaFormat = 'v2'
298
- if wwineInfo['CxGamesinstalldir']
299
- metaFormat = 'v3'
296
+ # --gamemode requires v6, --arch requires v5, otherwise we are v4 compatible
297
+ if $preloadGameMode
298
+ metaFormat = 'v6'
299
+ elsif $wineArch
300
+ metaFormat = 'v5'
301
+ else
302
+ metaFormat = 'v4'
300
303
  end
301
304
 
302
305
  file.puts('#!/bin/sh')
@@ -311,9 +314,6 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
311
314
  wwineInfo.each do |key,value|
312
315
  file.puts('# wwine'+key+': '+value)
313
316
  end
314
- # wwineCmd isn't used in v2 or v3, but v1 outputs an invalid message if it
315
- # doesn't exist. wwineCmd (unnumbered) will be dropped in a later version.
316
- file.puts('# wwineCmd: nil')
317
317
 
318
318
  subN = 0
319
319
  args.each do |sub|
@@ -329,10 +329,10 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
329
329
  file.puts("\t"+'wwine="`which wwine 2> /dev/null`"')
330
330
  file.puts('fi')
331
331
  file.puts('if [ "x$wwine" != "x" ]; then')
332
- # _WWINE_SCRIPT is currently unused, but is present so that wwine can try
333
- # to use '--from' automatically in the future if for some reason there are
334
- # backwards-incompatible changes to one of the command-line parameters used
335
- # by scripts.
332
+ # _WWINE_SCRIPT is currently just used to detect if a wrapper script is
333
+ # being used. But is intended to help wwine use '--from' automatically in
334
+ # the future if for some reason there are backwards-incompatible changes to
335
+ # one of the command-line parameters used by scripts.
336
336
  file.puts("\t"+'export _WWINE_SCRIPT="$0"')
337
337
  file.puts("\t"+'exec "$wwine" '+shellQuote(wwineCommand).join(" ")+' "$@"')
338
338
  file.puts('else')
@@ -342,8 +342,18 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
342
342
  wineprefix.sub!(/'/,'\\')
343
343
  file.puts("\t"+'export WINEPREFIX='+shellQuote(wineprefix))
344
344
  end
345
- if wwineInfo['Wine'] =~ /^pol/i
346
- path = getPOLwithParams(wwineInfo['Wine'].sub(/^pol[-:]?/i,''),nil,false,true)
345
+ if $wineArch
346
+ file.puts("\t"+'export WINEARCH='+shellQuote($wineArch))
347
+ end
348
+ if wwineInfo['Wine'] =~ /^(pol|lutris)/i
349
+ type = 'POL'
350
+ if wwineInfo['Wine'] =~ /^lutris/
351
+ type = 'lutris'
352
+ end
353
+ path = getCustomwithParams(wwineInfo['Wine'].sub(/^(pol|lutris)[-:]?/i,''),nil,type,false,true)
354
+ if path == nil
355
+ abort("getCustomwithParams returned nil wine. This is a bug")
356
+ end
347
357
  if ENV['WINEDEBUG'] != nil
348
358
  file.puts("\t"+"export WINEDEBUG="+shellQuote(ENV['WINEDEBUG']))
349
359
  end
@@ -355,6 +365,9 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
355
365
  file.puts("\t"+"export WINEDEBUG="+shellQuote(ENV['WINEDEBUG']))
356
366
  end
357
367
  end
368
+ if $preloadGameMode
369
+ file.puts("\t"+'export LD_PRELOAD="/usr/\$LIB/libgamemodeauto.so:$LD_PRELOAD"')
370
+ end
358
371
  file.puts("\t"+"exec "+shellQuote(otherCommand).join(" ")+' "$@"')
359
372
  file.puts('fi')
360
373
  file.puts('echo "Launch script failed. No wwine found and wine command failed to exec."')
@@ -370,23 +383,27 @@ end
370
383
  def generateWwineCmd (wine,bottle,wineCommand,type = nil)
371
384
  wwineCmd = []
372
385
  wwineInfo = {
373
- 'Cxinstalldir' => 'nil',
374
386
  'Dir' => 'nil',
375
387
  'Bottle' => 'nil',
376
- 'Wine' => 'nil'
388
+ 'Wine' => 'nil',
389
+ 'GameMode' => 'nil',
377
390
  }
378
391
 
379
392
  # Generate a wwine command-line
380
393
  if $verbosity > 0
381
394
  wwineCmd.push('--verbose')
382
395
  end
383
- if $cxPath
384
- wwineCmd.push('--cxinstalldir',$cxPath)
385
- wwineInfo['Cxinstalldir'] = $cxPath
396
+ if $wineDebug
397
+ wwineCmd.push('--debug',$wineDebug)
398
+ wwineInfo['Debug'] = $wineDebug
386
399
  end
387
- if $cxgPath
388
- wwineCmd.push('--cxg-installdir',$cxgPath)
389
- wwineInfo['CxGamesinstalldir'] = $cxgPath
400
+ if $wineArch
401
+ wwineCmd.push('--arch',$wineArch)
402
+ wwineInfo['Arch'] = $wineArch
403
+ end
404
+ if $preloadGameMode
405
+ wwineCmd.push('--gamemode')
406
+ wwineInfo['GameMode'] = 'true'
390
407
  end
391
408
  if wine
392
409
  wwineCmd.push('--wine',wine)
@@ -427,7 +444,7 @@ def generateWrapper (wine,bottle,targetFile,wineCommand,args,type = nil)
427
444
 
428
445
  # For wine there is no --bottle definition in the wine command itself,
429
446
  # so we need to export a wineprefix in the launch script
430
- if (type == 'wine' || type =~ /^pol[-:]/) && ENV['WINEPREFIX']
447
+ if (type == 'wine' || type =~ /^(pol|lutris)[-:]/) && ENV['WINEPREFIX']
431
448
  wineprefix = ENV['WINEPREFIX'].dup
432
449
  end
433
450
 
@@ -440,9 +457,9 @@ def setEnvAndExec (wine,bottle,cmd,args,type)
440
457
  if wine == nil
441
458
  type,cmd = getAutoWithParams(bottle)
442
459
  end
443
- envPut('_WWINE_INT_WINE',wine)
460
+ envPut('__WWINE_INT_WINE',wine)
444
461
 
445
- if wine == 'cxoffice' || wine == 'cxgames' || wine == 'crossover'
462
+ if type == 'crossover'
446
463
  cxdir = getCXwithParams(wine,bottle,true,false,true)
447
464
  if File.executable?(cxdir+'/bin/wineserver')
448
465
  envPut('WINESERVER',cxdir+'/bin/wineserver')
@@ -458,21 +475,26 @@ def setEnvAndExec (wine,bottle,cmd,args,type)
458
475
  if $verbosity > 0
459
476
  envPut('__WWINE_INT_VERBOSITY',$verbosity.to_s)
460
477
  end
461
- if $cxPath
462
- envPut('__WWINE_INT_CXPATH',$cxPath);
463
- end
464
- if $cxgPath
465
- envPut('__WWINE_INT_CXGPATH',$cxgPath);
466
- end
467
478
 
468
- if wine == 'wine' || File.exists?(wine)
479
+ if type == 'wine' || wine == 'wine' || (File.exists?(wine) && !File.directory?(wine)) || wine =~ /^(pol|lutris)[-:]?/i
480
+ vputs(V_DBG,"Used ENV/WINEPREFIX method to get bottle")
469
481
  bottlePath = ENV['WINEPREFIX']
470
482
  elsif resolveWine(wine) == 'gametree'
483
+ vputs(V_DBG,"Used ENV/cedega method to get bottle")
471
484
  bottlePath = ENV['HOME']+'/.cedega/'+bottle
472
485
  else
486
+ vputs(V_DBG,"Used CX method to get bottle")
473
487
  bottlePath = getCXwithParams(wine,bottle,true,true)
474
488
  end
489
+ if $wineArch
490
+ envPut('WINEARCH',$wineArch)
491
+ envPut('__WWINE_INT_WINEARCH',$wineArch)
492
+ end
475
493
 
494
+ if bottlePath == nil
495
+ puts "ERROR: setEnvAndExec() has no bottlePath"
496
+ exit 1
497
+ end
476
498
  envPut('WINEPREFIX',bottlePath)
477
499
  envPut('WINE',File.expand_path($0))
478
500
  if args.length > 0
@@ -512,9 +534,6 @@ def loadWwineDataFromFile (file,dryRun = false)
512
534
  end
513
535
 
514
536
  info = Hash.new
515
- # Default entries
516
- info['CxGamesinstalldir'] = 'nil'
517
- info['Cxinstalldir'] = 'nil'
518
537
 
519
538
  source.each do |line|
520
539
  if line.match(/^#\s+wwine/)
@@ -529,22 +548,28 @@ def loadWwineDataFromFile (file,dryRun = false)
529
548
  puts "Unable to continue."
530
549
  exit(0)
531
550
  end
532
- if info['Info'] == 'v2' || info['Info'] == 'v3'
551
+ # FIXME: Should convert info version to an integer and just check that
552
+ if info['Info'] == 'v2' || info['Info'] == 'v3' || info['Info'] == 'v4' || info['Info'] == 'v5' || info['Info'] == 'v6'
553
+ vputs(V_DBG,'File contains wwine metadata '+info['Info'])
533
554
  info = parseWwineDataV2(info);
534
555
  elsif info['Info'].match(/^v1/)
535
- info = parseWwineDataV1(info)
536
556
  if ! $wrapperPath
537
- puts "-- Note: --"
538
- puts "This file is using the wwine metadata format v1."
539
- puts "This format has been deprecated and support for it will be dropped in"
540
- puts "a later version of wwine. You may upgrade it with this command:"
541
- puts "wwine --from "+shellQuote(file)+" --wrap "+shellQuote(file+'.new')+" && mv "+shellQuote(file)+" "+shellQuote(file+'.old')+' && mv '+shellQuote(file+'.new')+' '+shellQuote(file)
542
- puts "-- --"
557
+ puts "ERROR: Unsupported wwine metadata format (v1)"
558
+ puts ""
559
+ puts "This format is no longer supported directly, and even upgrade support will"
560
+ puts "be removed in a later version of wwine. To upgrade the file to the new"
561
+ puts "wwine format, run this command:"
562
+ puts " wwine --from "+shellQuote(file)+" --wrap "+shellQuote(file+'.new')+" && mv "+shellQuote(file)+" "+shellQuote(file+'.old')+' && mv '+shellQuote(file+'.new')+' '+shellQuote(file)
543
563
  puts ""
564
+ puts "This will upgrade the file, while leaving an old backup copy in place with a"
565
+ puts ".old-extension. You may delete the .old file if you have never edited the"
566
+ puts "script directly, or after you have copied over your changes."
567
+ exit(1)
544
568
  end
569
+ info = parseWwineDataV1(info)
545
570
  else
546
571
  version = info['Info'].sub(/^(v\S+).+/,'\1').chomp
547
- puts "This version of wwine supports info format v1, v2 and v3."
572
+ puts "This version of wwine supports info format v2, v3, v4, v5 and v6."
548
573
  puts "This file is version "+version
549
574
  puts "Unable to continue."
550
575
  exit(0)
@@ -579,6 +604,15 @@ def loadWwineDataFromFile (file,dryRun = false)
579
604
  # Get the --wine to use
580
605
  if $wine == nil && info['Wine'] != 'nil'
581
606
  $wine = info['Wine']
607
+ # Support for legacy Cx*installdir
608
+ if info['Cxinstalldir'] != 'nil' && info['Cxinstalldir'] != nil
609
+ vputs(V_DBG,'Converting Cxinstalldir entry to a Wine entry')
610
+ $wine = info['Cxinstalldir']
611
+ end
612
+ if info['CxGamesinstalldir'] != 'nil' && info['CxGamesinstalldir'] != nil
613
+ vputs(V_DBG,'Converting CxGamesinstalldir entry to a Wine entry')
614
+ $wine = info['CxGamesinstalldir']
615
+ end
582
616
  printf(outFormat,outMessage+'--wine',$wine)
583
617
  end
584
618
 
@@ -588,14 +622,21 @@ def loadWwineDataFromFile (file,dryRun = false)
588
622
  printf(outFormat,outMessage+'--bottle',$bottle)
589
623
  end
590
624
 
591
- # Get the --cxinstalldir to use
592
- if $cxPath == nil && info['Cxinstalldir'] != 'nil'
593
- $cxPath = info['Cxinstalldir']
594
- printf(outFormat,outMessage+'--cxinstalldir',$cxPath)
625
+ # Set wineArch
626
+ if info['Arch']
627
+ if info['Arch'] == 'win32' || info['Arch'] == 'win64'
628
+ $wineArch = info['Arch']
629
+ printf(outFormat,outMessage+'--arch ',$wineArch)
630
+ else
631
+ puts('WARNING: Arch: '+info['Arch']+' is invalid, ignoring!')
632
+ end
595
633
  end
596
- if $cxgPath == nil && info['CxGamesinstalldir'] != 'nil'
597
- $cxgPath = info['CxGamesinstalldir']
598
- printf(outFormat,outMessage+'--cxg-installdir',$cxgPath)
634
+
635
+ # Enable GameMode if needed
636
+ if info['GameMode'] && info['GameMode'] == 'true'
637
+ $preloadGameMode = true
638
+ # FIXME: Drop the 'true'
639
+ printf(outFormat,outMessage+'--gamemode','true')
599
640
  end
600
641
 
601
642
  # Set the command to run
@@ -619,10 +660,16 @@ def parseWwineDataV1 (rawData)
619
660
  unquoteShellArray(rawData['Info'],data)
620
661
  info = Hash.new
621
662
  info['Dir'] = data[1]
622
- info['Wine'] = data[2]
663
+ info['Wine'] = resolveWine(data[2])
623
664
  info['Bottle'] = data[3]
624
665
  info['Cxinstalldir'] = data[4]
625
666
 
667
+ if info['Wine'] == 'crossover' || info['Wine'] == 'cxgames'
668
+ if info['Cxinstalldir']
669
+ info['Wine'] = info['Cxinstalldir']
670
+ end
671
+ end
672
+
626
673
  cmd = []
627
674
 
628
675
  unquoteShellArray(rawData['Cmd'],cmd)
@@ -630,7 +677,7 @@ def parseWwineDataV1 (rawData)
630
677
  return info
631
678
  end
632
679
 
633
- # Parses wwine metadata version 2 (wwine 0.2+)
680
+ # Parses wwine metadata version 2+ (wwine 0.2+)
634
681
  def parseWwineDataV2 (data)
635
682
  cmd = []
636
683
  currNo = 0
@@ -679,6 +726,10 @@ end
679
726
 
680
727
  # Purpose: Set an environment variable
681
728
  def envPut (name,value)
729
+ if value == nil
730
+ puts "ERROR: Tried to set nil env var: '"+name+"'"
731
+ exit 1
732
+ end
682
733
  vputs(V_DBG,'Set '+name+'='+value)
683
734
  ENV[name] = value;
684
735
  end
@@ -690,14 +741,14 @@ def Help ()
690
741
  puts "Usage: wwine (WWINE PARAMETERS) PROGRAM -- [PROGRAM ARGUMENTS]"
691
742
  puts ""
692
743
  printHelp('-h','--help','Display this help text')
693
- printHelp('-w','--wine','Select the wine to use. Any wine listed in "wwine --list" or the path to a wine binary.')
744
+ printHelp('-w','--wine','Select the wine to use. Any wine listed in "wwine --list" or the path to a wine binary or crossover installation directory.')
694
745
  printHelp('-b','--bottle','Use the selected bottle (~/.wwinebottles/[NAME] for wine, CX bottle or cedega folder, depending on the --wine in use). The bottle will be created if it does not exist.')
746
+ printHelp('','--debug','Enable wine debugging output with the supplied levels (using the format of the WINEDEBUG environment variable)')
695
747
  printHelp('','--env','Set the WINE and WINEPREFIX environment variables to match the parameters provided to wwine and optionally run a program with those variables set.')
748
+ printHelp('','--arch','Set the wine architecture. Accepts win32 and win64. The default is win32 if --wine does not end with "64"')
696
749
  printHelp('-l','--list','List all available wine versions')
697
750
  printHelp('-k','--kill','Attempt to kill all running wine processes')
698
751
  printHelp('','--drykill','Print what --kill would have done, but don\'t actually do anything')
699
- printHelp('-c','--cxinstalldir','Use the supplied path as the install path for Crossover (default: autodetect).')
700
- printHelp('-C','--cxg-installdir','Use the supplied path as the install path for CXGames (default: autodetect)')
701
752
  printHelp('','--wrap','Write a wrapper script of your current wwine command to the path supplied')
702
753
  printHelp('','--wrapdir','Use the supplied directory as the working directory for the script created by --wrap (default: current directory)')
703
754
  printHelp('-s','--from','Load parameters and program from the wrapper script supplied. Command-line arguments overrides settings from wrapper script.')
@@ -808,8 +859,6 @@ def getGameTreeVersionString ()
808
859
  if cedegaVer == nil
809
860
  cedegaVer = 'present'
810
861
  end
811
- else
812
- cedegaVer = '(not present)'
813
862
  end
814
863
 
815
864
  return cedegaVer
@@ -852,7 +901,7 @@ def getCXVersionsFrom (source,wantString = false)
852
901
  return cxVer
853
902
  end
854
903
  else
855
- return '(not present)'
904
+ return nil
856
905
  end
857
906
  else
858
907
  return cxVer,cxwVer
@@ -906,7 +955,7 @@ def listWines(debug = false)
906
955
  if inPath('wine')
907
956
  wineVer = getWineVersion()
908
957
  printf(outFormat,'wine',wineVer)
909
- if defaultWine == 'wine'
958
+ if defaultWine == 'wine' && !debug
910
959
  puts " (default when no --wine is specified)"
911
960
  end
912
961
  end
@@ -922,29 +971,57 @@ def listWines(debug = false)
922
971
  cxoBin = getCXwithParams('cxoffice',nil,false)
923
972
  cxoVer = getCXVersionsFrom(cxoBin,true)
924
973
 
925
- if (cxgBin || !cxoBin)
926
- printf(outFormat,'cxgames',cxgVer)
927
- puts " (aliases for cxgames: cxg, cxgames)"
974
+ if (cxgBin || !cxoBin || debug)
975
+ printf(outFormat,'cxgames',cxgVer || '(not present)')
976
+ if !debug
977
+ puts " (aliases for cxgames: cxg, cxgames)"
978
+ end
928
979
  end
929
980
 
930
- if cxoVer
981
+ if cxoVer || debug
931
982
  printf(outFormat,'crossover',cxoVer)
932
- if !cxgBin
933
- puts " (aliases for crossover: cx, cxo, cxg, cxoffice, cxgames)"
934
- else
935
- puts " (aliases for crossover: cx, cxo, cxoffice)"
983
+ if !debug
984
+ if !cxgBin
985
+ puts " (aliases for crossover: cx, cxo, cxg, cxoffice, cxgames)"
986
+ else
987
+ puts " (aliases for crossover: cx, cxo, cxoffice)"
988
+ end
936
989
  end
937
990
  end
938
991
 
939
992
  cedegaVer = getGameTreeVersionString()
940
- if cedegaVer
941
- printf(outFormat,'gametree',cedegaVer)
942
- puts " (aliases for gametree: cedega)"
993
+ if cedegaVer || debug
994
+ printf(outFormat,'gametree',cedegaVer || '(not present)')
995
+ if ! debug
996
+ puts " (aliases for gametree: cedega)"
997
+ end
943
998
  end
944
999
 
945
1000
  Dir.glob(ENV['HOME']+'/.PlayOnLinux/wine/linux-*/*') do |dir|
946
- name = dir.sub(/^.*\/([^\/]+)/,'\1')
947
- printf(outFormat,'pol-'+name,getWineVersion(dir+'/bin/wine'))
1001
+ if File.executable?(dir+'/bin/wine')
1002
+ name = dir.sub(/^.*\/([^\/]+)/,'\1')
1003
+ printf(outFormat,'pol-'+name,getWineVersion(dir+'/bin/wine'))
1004
+ end
1005
+ end
1006
+
1007
+ Dir.glob(ENV['HOME']+'/.local/share/lutris/runners/wine/*') do |dir|
1008
+ if File.executable?(dir+'/bin/wine')
1009
+ name = dir.sub(/^.*\/([^\/]+)/,'\1')
1010
+ printf(outFormat,'lutris-'+name,getWineVersion(dir+'/bin/wine'))
1011
+ end
1012
+ end
1013
+
1014
+ if $wine != nil && debug
1015
+ version = nil
1016
+ if File.directory?($wine)
1017
+ cxBin = getCXwithParams($wine,nil,false)
1018
+ version = getCXVersionsFrom(cxBin,true)
1019
+ elsif File.executable?($wine)
1020
+ version = getWineVersion($wine)
1021
+ end
1022
+ if version != nil
1023
+ printf(outFormat,$wine,version)
1024
+ end
948
1025
  end
949
1026
  rescue => ex
950
1027
  handleException(ex)
@@ -969,7 +1046,16 @@ end
969
1046
  # Purpose: Get parameters for wine
970
1047
  def getWineWithParams (wine,bottle, missingIsFatal = true, playOnLinux = false)
971
1048
  final = []
972
- possibleWines = [ 'wine32','wine','wine64','wine.bin','wine.real','wine-unstable','wine32-unstable' ]
1049
+ possibleWines = []
1050
+ if wine =~ /^wine(64|32|-unstable(32|64)?)$/
1051
+ possibleWines = [ wine ]
1052
+ else
1053
+ if $wineArch && $wineArch == 'win64'
1054
+ possibleWines = [ 'wine64','wine-unstable64','wine','wine.bin','wine.real','wine-unstable' ]
1055
+ else
1056
+ possibleWines = [ 'wine32','wine','wine64','wine.bin','wine.real','wine-unstable','wine32-unstable' ]
1057
+ end
1058
+ end
973
1059
  # Manual search path, in the odd case none of the above are in $PATH.
974
1060
  # Ie. /usr/lib32/wine/wine.bin is the real wine binary on Debian
975
1061
  searchPath = [ '/usr/lib32/wine/','/usr/bin','/usr/lib/i386-linux-gnu/wine-unstable','/usr/lib/i386-linux-gnu/wine', ]
@@ -1046,8 +1132,11 @@ def getWineWithParams (wine,bottle, missingIsFatal = true, playOnLinux = false)
1046
1132
  envPut('WINEPREFIX',bottle)
1047
1133
  end
1048
1134
 
1049
- # Default to no debugging output if WINEDEBUG is not set yet
1050
- if ! ENV.has_key?('WINEDEBUG')
1135
+ # Enable debugging if requested
1136
+ if $wineDebug
1137
+ envPut('WINEDEBUG',$wineDebug)
1138
+ # Default to no debugging output if WINEDEBUG is not set yet
1139
+ elsif ! ENV.has_key?('WINEDEBUG')
1051
1140
  envPut('WINEDEBUG','-all')
1052
1141
  end
1053
1142
 
@@ -1059,30 +1148,33 @@ end
1059
1148
  def getCXwithParams (wine,bottle, missingIsFatal = true, getBottleDir = false, getCXpath = false)
1060
1149
  final = []
1061
1150
  cxdir = nil
1151
+ pathMode = nil
1062
1152
 
1063
- installName = wine
1064
- if wine == 'crossover'
1065
- installName = 'cxoffice'
1066
- end
1067
- mode = wine
1068
- bottleDir = '.'+installName
1069
-
1070
- # Various crossover install paths
1071
- wines = ['/opt/'+installName, ENV['HOME']+'/'+installName, ENV['HOME']+'/.local/'+installName, ENV['HOME']+'/games/'+installName]
1153
+ if File.directory?(wine)
1154
+ if Dir.glob(wine+'/etc/cxgames*.conf').length > 0
1155
+ installName = 'cxgames'
1156
+ mode = 'cxgames'
1157
+ else
1158
+ installName = 'cxoffice'
1159
+ mode = 'crossover'
1160
+ end
1161
+ pathMode = wine
1162
+ wines = [ wine ]
1163
+ else
1164
+ installName = wine
1165
+ if wine == 'crossover'
1166
+ installName = 'cxoffice'
1167
+ end
1168
+ mode = wine
1072
1169
 
1073
- pathMode = nil
1074
- # If cxpath is set then overwrite the default paths
1075
- if wine == 'cxgames' && $cxgPath != nil
1076
- pathMode = $cxgPath
1077
- wines = [ $cxgPath+'/'+installName, $cxgPath ]
1078
- elsif $cxPath != nil
1079
- pathMode = $cxPath
1080
- wines = [ $cxPath+'/'+installName, $cxPath ]
1170
+ # Various crossover install paths
1171
+ wines = ['/opt/'+installName, ENV['HOME']+'/'+installName, ENV['HOME']+'/.local/'+installName, ENV['HOME']+'/games/'+installName]
1081
1172
  end
1173
+ bottleDir = '.'+installName
1082
1174
 
1083
1175
  wines.each do |path|
1084
1176
  if File.exists?(path)
1085
- if ( File.executable?(path+'/bin/cximportbottles') || File.executable?(path+'/bin/crossover') ) and wine != 'cxgames'
1177
+ if ( File.executable?(path+'/bin/cximportbottles') || File.executable?(path+'/bin/crossover') ) and installName != 'cxgames'
1086
1178
  # Perform additional detection of dotDir, as that one tends to change
1087
1179
  dotDir = Dir.glob(path+'/etc/cxoffice*.conf').shift
1088
1180
  if( dotDir != nil && dotDir.sub!(/^.*(cxoffice\d*)\.conf$/,'\1') )
@@ -1100,7 +1192,7 @@ def getCXwithParams (wine,bottle, missingIsFatal = true, getBottleDir = false, g
1100
1192
 
1101
1193
  # If we're using $cx*Path, perform some additional detection
1102
1194
  if pathMode != nil and mode != 'crossover'
1103
- if File.exists?(pathMode+'/etc/'+wine+'.conf')
1195
+ if File.exists?(pathMode+'/etc/'+installName+'.conf')
1104
1196
  cxdir = pathMode
1105
1197
  else
1106
1198
  cxdir = nil
@@ -1110,7 +1202,7 @@ def getCXwithParams (wine,bottle, missingIsFatal = true, getBottleDir = false, g
1110
1202
  # If the dir does not exist, give up
1111
1203
  if not cxdir
1112
1204
  if !missingIsFatal
1113
- vputs(V_DBG,'Failed to detect cxdir')
1205
+ vputs(V_DBG,'Failed to detect cxdir for '+mode)
1114
1206
  return nil
1115
1207
  end
1116
1208
  if pathMode != nil
@@ -1121,20 +1213,10 @@ def getCXwithParams (wine,bottle, missingIsFatal = true, getBottleDir = false, g
1121
1213
  else
1122
1214
  reverse = 'cxgames'
1123
1215
  end
1124
- if $cxPath != nil && pathMode == $cxPath
1125
- if File.exists?($cxPath+'/'+reverse) || File.exists?($cxPath+'/etc/'+reverse+'.conf')
1126
- puts('The directory looks like a '+reverse+' directory. Maybe you wanted')
1127
- puts('--wine '+reverse+' instead?')
1128
- end
1129
- end
1130
1216
  else
1131
- puts('Failed to locate '+wine)
1217
+ puts('Failed to locate '+wine+ ' (cx)')
1132
1218
  puts('You could try to explicitly tell wwine where '+wine+' is installed')
1133
- if wine == 'cxgames'
1134
- puts('by supplying --cxg-installdir')
1135
- else
1136
- puts('by supplying --cxinstalldir')
1137
- end
1219
+ puts('by supplying the full path to --wine')
1138
1220
  end
1139
1221
  exit(1)
1140
1222
  elsif getCXpath
@@ -1145,10 +1227,13 @@ def getCXwithParams (wine,bottle, missingIsFatal = true, getBottleDir = false, g
1145
1227
  if(bottle != nil && bottle.length > 0)
1146
1228
  final.push('--bottle',bottle)
1147
1229
  end
1230
+ if $wineDebug
1231
+ final.push('--debugmsg',$wineDebug)
1232
+ end
1148
1233
  final.push('--');
1149
1234
 
1150
1235
  # Create the bottle if it does not exist
1151
- if bottle != nil and ! File.exists?(ENV['HOME']+'/'+bottleDir+'/'+bottle)
1236
+ if bottle != nil && !File.exists?(ENV['HOME']+'/'+bottleDir+'/'+bottle)
1152
1237
  vputs(V_DBG,ENV['HOME']+'/'+bottleDir+'/'+bottle+' did not exist')
1153
1238
  puts 'The bottle '+bottle+' did not exist, creating...'
1154
1239
  runcmd([ cxdir+'/bin/cxbottle', '--bottle',bottle,'--create','--template','winxp'],'system')
@@ -1186,6 +1271,10 @@ def getGameTreeWithParams (wine,bottle, missingIsFatal = true)
1186
1271
 
1187
1272
  final.push(gametreeBin,'--install')
1188
1273
 
1274
+ if $wineDebug
1275
+ finalpush('--debugmsg',$wineDebug)
1276
+ end
1277
+
1189
1278
  # Use wwineFolder as the folder if no bottle was supplied
1190
1279
  if (bottle == nil || bottle.length == 0)
1191
1280
  bottle = 'wwineFolder'
@@ -1196,9 +1285,16 @@ def getGameTreeWithParams (wine,bottle, missingIsFatal = true)
1196
1285
  return final
1197
1286
  end
1198
1287
 
1199
- # Purpose: Get parameters for PlayOnLinux
1200
- def getPOLwithParams(wine,bottle, missingIsFatal = true, returnDetected = false)
1201
- winePaths = [ ENV['HOME']+'/.PlayOnLinux/wine/linux-x86', ENV['HOME']+'/.PlayOnLinux/wine/linux-amd64' ]
1288
+ # Purpose: Get parameters for PlayOnLinux or Lutris
1289
+ def getCustomwithParams(wine,bottle, type = 'POL', missingIsFatal = true, returnDetected = false)
1290
+ winePaths = []
1291
+ polMode = true
1292
+ if type =~ /^pol/i
1293
+ winePaths = [ ENV['HOME']+'/.PlayOnLinux/wine/linux-x86', ENV['HOME']+'/.PlayOnLinux/wine/linux-amd64' ]
1294
+ else
1295
+ polMode = false
1296
+ winePaths = [ ENV['HOME']+'/.local/share/lutris/runners/wine/' ]
1297
+ end
1202
1298
  detectedWine = nil
1203
1299
  detectedWineDir = nil
1204
1300
  winePaths.each do |path|
@@ -1227,7 +1323,7 @@ def getPOLwithParams(wine,bottle, missingIsFatal = true, returnDetected = false)
1227
1323
  envPut('WINELOADER',detectedWine)
1228
1324
  envPut('WINEDLLPATH',detectedWineDir+'/lib/wine:'+ENV['WINEDLLPATH'].to_s)
1229
1325
  envPut('LD_LIBRARY_PATH',detectedWineDir+'/lib:'+ENV['LD_LIBRARY_PATH'].to_s)
1230
- getWineWithParams(detectedWine,bottle,missingIsFatal,true)
1326
+ return getWineWithParams(detectedWine,bottle,missingIsFatal,polMode)
1231
1327
  end
1232
1328
 
1233
1329
  # Purpose: Detect which wine to use and get parameters for that one
@@ -1273,7 +1369,15 @@ def runWine (wine,bottle,args)
1273
1369
  wine = resolveWine(wine)
1274
1370
  type = wine
1275
1371
 
1276
- if wine == 'cxgames' || wine == 'cxoffice' || wine == 'crossover'
1372
+ if File.directory?(wine)
1373
+ if File.executable?(wine+'/bin/cxstart')
1374
+ vputs(V_DBG,wine+': looks like a cx directory, assuming type=cx')
1375
+ type = 'crossover'
1376
+ end
1377
+ end
1378
+
1379
+ if type == 'crossover' || wine == 'cxgames' || wine == 'cxoffice' || wine == 'crossover'
1380
+ type = 'crossover'
1277
1381
  missingIsFatal = true
1278
1382
  if wine == 'cxgames'
1279
1383
  missingIsFatal = false
@@ -1285,17 +1389,22 @@ def runWine (wine,bottle,args)
1285
1389
  puts('Converting --wine cxgames to --wine crossover since cxgames is not installed')
1286
1390
  end
1287
1391
  end
1288
- elsif wine == 'wine' || File.executable?(wine)
1392
+ elsif wine =~ /^wine(64|32|-unstable(32|64)?)?$/ || ( File.executable?(wine) && !File.directory?(wine) )
1289
1393
  type = 'wine'
1290
1394
  cmd = getWineWithParams(wine,bottle)
1291
1395
  elsif resolveWine(wine) == 'gametree'
1292
1396
  cmd = getGameTreeWithParams(wine,bottle)
1293
- elsif wine =~ /^pol[-:]?/i
1294
- realWine = wine.sub(/^pol[-:]?/i,'')
1295
- cmd = getPOLwithParams(realWine,bottle)
1397
+ elsif wine =~ /^(pol|lutris)[-:]?/i
1398
+ realWine = wine.sub(/^(pol|lutris)[-:]?/i,'')
1399
+ cmd = getCustomwithParams(realWine,bottle,wine)
1296
1400
  else
1297
1401
  puts('Unknown --wine: '+wine)
1402
+ if File.directory?(wine)
1403
+ puts(wine+' does not appear to be the path to a crossover installation directory')
1404
+ puts('')
1405
+ end
1298
1406
  puts('Must be one of: wine, crossover, cxgames, cedega, or the path to a wine executable')
1407
+ puts('or a crossover installation directory')
1299
1408
  exit(1)
1300
1409
  end
1301
1410
  end
@@ -1340,6 +1449,16 @@ def runWine (wine,bottle,args)
1340
1449
  if bottle
1341
1450
  envPut('__WWINE_INT_XBOTTLE',bottle);
1342
1451
  end
1452
+ if $wineArch
1453
+ envPut('WINEARCH',$wineArch)
1454
+ end
1455
+ if $preloadGameMode
1456
+ preload = '/usr/$LIB/libgamemodeauto.so'
1457
+ if ENV['LD_PRELOAD']
1458
+ preload = preload+':'+ENV['LD_PRELOAD']
1459
+ end
1460
+ envPut('LD_PRELOAD',preload)
1461
+ end
1343
1462
  runcmd(cmd)
1344
1463
  end
1345
1464
  end
@@ -1355,17 +1474,21 @@ if ENV['__WWINE_INT_ENVMODE'] == $version
1355
1474
  if ENV['__WWINE_INT_VERBOSITY'] && ENV['__WWINE_INT_VERBOSITY'].to_i > 0
1356
1475
  $verbosity = ENV['__WWINE_INT_VERBOSITY'].to_i
1357
1476
  end
1358
- if ENV['__WWINE_INT_CXPATH']
1359
- opts['--cxinstalldir'] = ENV['__WWINE_INT_CXPATH']
1360
- end
1361
1477
  opts['--bottle'] = ENV['__WWINE_INT_BOTTLE']
1478
+ if ENV['__WWINE_INT_WINEARCH']
1479
+ opts['--arch'] = ENV['__WWINE_INT_WINEARCH']
1480
+ end
1362
1481
  else
1363
1482
  opts = GetoptLong.new(
1364
1483
  [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
1365
1484
  [ '--wine', '-w', GetoptLong::REQUIRED_ARGUMENT ],
1366
1485
  [ '--bottle', '-b', GetoptLong::REQUIRED_ARGUMENT ],
1486
+ [ '--arch', GetoptLong::REQUIRED_ARGUMENT ],
1367
1487
  [ '--kill', '-k', GetoptLong::OPTIONAL_ARGUMENT ],
1368
- [ '--drykill', GetoptLong::NO_ARGUMENT ],
1488
+ [ '--gamemode','-g', GetoptLong::NO_ARGUMENT ],
1489
+ [ '--no-gamemode', GetoptLong::NO_ARGUMENT ],
1490
+ [ '--running','--drykill', GetoptLong::NO_ARGUMENT ],
1491
+ [ '--debug',GetoptLong::REQUIRED_ARGUMENT ],
1369
1492
  [ '--cxinstalldir','-c',GetoptLong::REQUIRED_ARGUMENT ],
1370
1493
  [ '--cxg-installdir','--cxgamesinstalldir','-C',GetoptLong::REQUIRED_ARGUMENT ],
1371
1494
  [ '--version',GetoptLong::NO_ARGUMENT ],
@@ -1397,21 +1520,41 @@ end
1397
1520
 
1398
1521
  # Handle command-line arguments
1399
1522
  begin
1523
+ overrideCX = nil
1524
+ overrideCXG = nil
1400
1525
  opts.each do |opt, arg|
1401
1526
  case opt
1402
1527
  when '--help'
1403
1528
  Help()
1404
1529
  exit(0)
1530
+ when '--gamemode'
1531
+ $preloadGameMode = true
1532
+ when '--no-gamemode'
1533
+ $preloadGameMode = false
1405
1534
  when '--wine'
1406
1535
  $wine = arg
1407
1536
  when '--bottle'
1408
1537
  $bottle = arg
1409
1538
  when '--verbose'
1410
1539
  $verbosity = $verbosity+1
1411
- when '--drykill'
1540
+ when '--running'
1412
1541
  $killMode = 9999
1413
1542
  when '--debuginfo'
1414
1543
  debugInfo()
1544
+ when '--debug'
1545
+ $wineDebug = arg
1546
+ when '--arch'
1547
+ if arg == '32' || arg == '32bit' || arg == 'i386'
1548
+ arg = 'win32'
1549
+ elsif arg == '64' || arg == '64bit' || arg == 'x86_64'
1550
+ arg = 'win64'
1551
+ end
1552
+ if arg == 'win32' || arg == 'win64'
1553
+ $wineArch = arg
1554
+ else
1555
+ puts('Invalid --arch parameter"'+arg+'". Must be one of: win32, win64')
1556
+ puts('(accepted aliases: 32, 32bit, i386, 64, 64bit, x86_64)')
1557
+ end
1415
1558
  when '--list-wines'
1416
1559
  listWines()
1417
1560
  exit(0)
@@ -1421,15 +1564,21 @@ begin
1421
1564
  end
1422
1565
  $killMode = arg
1423
1566
  when '--cxinstalldir'
1424
- $cxPath = arg
1425
- if ! File.exists?($cxPath)
1426
- puts('The supplied --cxinstalldir "'+$cxPath+'" does not exist')
1567
+ if ENV['_WWINE_SCRIPT'] == nil
1568
+ puts('--cx-installdir is deprecated. Use "--wine '+arg+'" instead')
1569
+ end
1570
+ overrideCX = arg
1571
+ if ! File.exists?(arg)
1572
+ puts('The supplied --cxinstalldir "'+arg+'" does not exist')
1427
1573
  exit(1)
1428
1574
  end
1429
1575
  when '--cxg-installdir'
1430
- $cxgPath = arg
1431
- if ! File.exists?($cxgPath)
1432
- puts('The supplied --cxg-installdir "'+$cxgPath+'" does not exist')
1576
+ if ENV['_WWINE_SCRIPT'] == nil
1577
+ puts('--cxg-installdir is deprecated. Use "--wine '+arg+'" instead')
1578
+ end
1579
+ overrideCXG = arg
1580
+ if ! File.exists?(arg)
1581
+ puts('The supplied --cxg-installdir "'+arg+'" does not exist')
1433
1582
  exit(1)
1434
1583
  end
1435
1584
  when '--version'
@@ -1456,6 +1605,21 @@ begin
1456
1605
  puts('--verbose assumed because the environment variable WWINE_VERBOSE is set to 1')
1457
1606
  $verbosity = 1
1458
1607
  end
1608
+
1609
+ if $wine != nil
1610
+ resolvedWine = resolveWine($wine)
1611
+ if resolvedWine == 'crossover' && overrideCX != nil
1612
+ $wine = overrideCX
1613
+ elsif resolvedWine == 'cxgames' && overrideCXG != nil
1614
+ $wine = overrideCXG
1615
+ end
1616
+ end
1617
+
1618
+ # Default WINEARCH to win32 if we're not being launched by a script and not
1619
+ # being run with --from
1620
+ if $wineArch == nil && $wwineDataFrom == nil && ENV['__WWINE_SCRIPT'] == nil && $wine !~ /64$/
1621
+ $wineArch = 'win32'
1622
+ end
1459
1623
  rescue => ex
1460
1624
  if opts.error?
1461
1625
  puts('See --help for more inforation')
@@ -1472,8 +1636,8 @@ end
1472
1636
  if $killMode != nil
1473
1637
  begin
1474
1638
  killWine($killMode)
1475
- rescue
1476
- puts "Error while attempting to kill processes: "+$!
1639
+ rescue => ex
1640
+ handleException(ex)
1477
1641
  end
1478
1642
  exit(0)
1479
1643
  end
data/wwine.1 CHANGED
@@ -1,5 +1,5 @@
1
1
  .IX Title "WWINE 1"
2
- .TH WWINE 1 "2011-12-03" "wwine 0.2" ""
2
+ .TH WWINE 1 "2018-04-21" "wwine 0.4" ""
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
@@ -8,11 +8,11 @@
8
8
  wwine \- a simple wine(1) wrapper
9
9
  .SH "SYNOPSIS"
10
10
  .IX Header "SYNOPSIS"
11
- wwine \fI(\s-1WWINE\s0 \s-1PARAMETERS\s0)\fR \fI\s-1PROGRAM\s0\fR \*(-- \fI[\s-1PROGRAM\s0 \s-1ARGUMENTS\s0]\fR
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
14
  \&\fBwwine\fR is a a \fIwine\fR\|(1) wrapper. It wraps various flavours of wine
15
- (including vanilla wine and crossover office/games) into a single
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).
18
18
  .PP
@@ -35,28 +35,64 @@ Display the help screen
35
35
  .IX Item "-w, --wine FLAVOUR"
36
36
  Use the supplied flavour of wine. The default is to use vanilla wine.
37
37
 
38
- Possible parameters: wine, cxgames, cxoffice, cedega, cxg (alias for cxgames),
39
- cxo (alias for cxoffice) or /path/to/a/wine.binary
38
+ Possible parameters: wine, wine64, wine-unstable, wine\-unstable64, crossover,
39
+ cxgames, cxoffice, cedega, cx (alias for crossover), cxg (alias for cxgames),
40
+ cxo (alias for cxoffice), /path/to/a/wine.binary or
41
+ /path/to/a/crossover\-installation. Note that if you have crossover, but not
42
+ cxgames installed, wwine will alias cxgames to crossover, to provide a simple
43
+ upgrade path where wrapper scripts 'just work'.
40
44
 
41
- If this parameter is not supplied, wwine will attempt to autodetect which
42
- wine to use, checking for the existance of flavours in the following order,
43
- using the first one found: wine, cxgames, cxoffice, cedega. To see the
45
+ If this parameter is not supplied, wwine will attempt to autodetect which wine
46
+ to use, checking for the existance of flavours in the following order, using
47
+ the first one found: wine, crossover, cxoffice, cxgames, cedega. To see the
44
48
  default flavour wwine will use, run \fIwwine \-\-debuginfo\fR.
45
49
 
46
- See also \fI\-\-cxinstalldir\fR.
50
+ If you supply a path to a crossover installation (or a cxgames installation),
51
+ wwine will act as if \-\-wine is \*(L"crossover\*(R" (or cxgames), but use the Crossover
52
+ installation at that path instead of its autodetected one. If you supply the
53
+ path to a wine binary then it will use that as the \*(L"wine\*(R" command instead of
54
+ the one in your \s-1PATH.\s0
47
55
  .IP "\fB\-b, \-\-bottle\fR \fI\s-1NAME\s0\fR" 4
48
56
  .IX Item "-b, --bottle NAME"
49
- Use the bottle with the name supplied. For cxgames, cxoffice or cedega
50
- it uses the flavours builtin bottle support. For vanilla wine it sets
51
- \&\s-1WINEPREFIX\s0 to use ~/.wwinebottles/<\s-1NAME\s0>. It defaults to no bottle,
52
- in which case vanilla wine will use ~/.wine, cxoffice/cxgames will
53
- use the bottle defined as default and for cedega a bottle named 'wwineFolder'
54
- will be used.
57
+ Use the bottle with the name supplied. For crossover, cxgames, cxoffice or
58
+ cedega it uses the flavours builtin bottle support. For vanilla wine it sets
59
+ \&\s-1WINEPREFIX\s0 to use ~/.wwinebottles/<\s-1NAME\s0>. It defaults to no bottle, in which
60
+ case vanilla wine will use ~/.wine, crossover/cxoffice/cxgames will use the
61
+ bottle defined as default and for cedega a bottle named 'wwineFolder' will be
62
+ used.
63
+
64
+ PlayOnLinux wines are a special case. If a bottle with the name supplied exists
65
+ in ~/.PlayOnLinux/wineprefixes/ then wwine will use that bottle (ie. the existing
66
+ PlayOnLinux bottle), otherwise it will use a bottle in ~/.wwinebottles.
67
+ .IP "\fB\-\-arch\fR \fI\s-1ARCH\s0\fR" 4
68
+ .IX Item "--arch ARCH"
69
+ Set the wine architecture to use. Accepts win32 and win64. If \fI\-\-wine\fR ends
70
+ with 64, then it defaults to win64, otherwise it defaults to win32. Usually you
71
+ won't need to explicitly provied an \fI\-\-arch\fR since wwine will infer it from
72
+ \&\fI\-\-wine\fR.
73
+ .IP "\fB\-g, \-\-gamemode\fR" 4
74
+ .IX Item "-g, --gamemode"
75
+ Enables Feral Interactive's GameMode library, if it is installed. GameMode will
76
+ enable certain performance features while the program is running, and then
77
+ reset them once it exits. Can be used to get a bit of extra performance for
78
+ games
79
+ .IP "\fB\-\-no\-gamemode\fR" 4
80
+ .IX Item "--no-gamemode"
81
+ Disable GameMode if enabled.
82
+ .IP "\fB\-l, \-\-list\fR" 4
83
+ .IX Item "-l, --list"
84
+ List all available wine versions. This will list the names that can be supplied
85
+ to \fI\-\-wine\fR as well as the actual wine version in question.
55
86
  .IP "\fB\-k, \-\-kill\fR" 4
56
87
  .IX Item "-k, --kill"
57
- Attempt to kill all running wine processes. See also \fI\-\-drykill\fR
88
+ Attempt to kill running wine processes. See also \fI\-\-drykill\fR.
89
+
90
+ By default it will kill all running wine processes. If you are on Linux then
91
+ you can combine this option with the \fI\-\-bottle\fR and/or \fI\-\-wine\fR (or even
92
+ \&\fI\-\-from\fR) options to limit it to killing only processes in a specific bottle
93
+ and/or running under a specific wine.
58
94
 
59
- The default signal is \s-1SIGTERM\s0, however you can supply any signal number
95
+ The default signal is \s-1SIGTERM,\s0 however you can supply any signal number
60
96
  you want (ie. \*(L"wwine \-k9\*(R").
61
97
  .IP "\fB\-\-drykill\fR" 4
62
98
  .IX Item "--drykill"
@@ -67,7 +103,7 @@ Print what \fI\-\-kill\fR would have done, without actually doing anything.
67
103
  variables, and (optionally) run a native program with those variables
68
104
  set. This lets you run any program that uses the \s-1WINE\s0 and \s-1WINEPREFIX\s0
69
105
  variables with wwine instead of wine (effectively giving you bottle
70
- support, as well as support for using cxgames/cxoffice/.. instead
106
+ support, as well as support for using crossover/cxgames/cxoffice/.. instead
71
107
  of wine).
72
108
 
73
109
  When you use \-\-env, wwine will obey \-\-bottle and \-\-wine (or \-\-from) and set
@@ -77,14 +113,23 @@ have been set.
77
113
 
78
114
  See the \s-1EXAMPLES\s0 section for an example of how to use winetricks
79
115
  with cxgames using wwine's \fB\-\-env\fR
80
- .IP "\fB\-\-env\-bottle\fR" 4
81
- .IX Item "--env-bottle"
82
- This option is primarily for internal use. It causes wwine to parse which
83
- \&\-\-bottle to use from the \s-1WINEPREFIX\s0 variable.
84
- .IP "\fB\-c, \-\-cxinstalldir\fR \fI\s-1PATH\s0\fR" 4
85
- .IX Item "-c, --cxinstalldir PATH"
86
- Use the supplied path as the path to either a crossover office/games install
87
- directory, or as a directory that contains a cxoffice and/or cxgames directory.
116
+ .IP "\fB\-\-tricks\fR" 4
117
+ .IX Item "--tricks"
118
+ Run winetricks with the wine/bottle combination supplied. This is \fIalmost\fR
119
+ equivalent to \fI\-\-env winetricks \*(-- \-\-no\-isolate\fR (the \fI\-\-\fR would be required
120
+ if you used \-\-env, and would stop processing the rest of the \fIwwine\fR command-line,
121
+ \&\-\-tricks does not add the \-\-, so it can be supplied anywhere on the command-line)
122
+ \&\fI\-\-tricks\fR can be used to quickly call winetricks in a bottle. Examples:
123
+ .RS 4
124
+ .IP "Install package (ie. corefonts)" 4
125
+ .IX Item "Install package (ie. corefonts)"
126
+ \&\fI\-\-tricks corefonts\fR
127
+ .IP "Get winetricks help" 4
128
+ .IX Item "Get winetricks help"
129
+ \&\fI\-\-tricks \*(-- \-\-help\fR
130
+ .RE
131
+ .RS 4
132
+ .RE
88
133
  .IP "\fB\-\-wrap\fR \fI\s-1PATH\s0\fR" 4
89
134
  .IX Item "--wrap PATH"
90
135
  Generate a wrapper script of the current command-line and write it to
@@ -123,7 +168,8 @@ applied.
123
168
  .IP "\fB\-v, \-\-verbose\fR" 4
124
169
  .IX Item "-v, --verbose"
125
170
  Increase verbosity. When this is present wwine will tell you the exact
126
- commands it is running.
171
+ commands it is running. Supply multiple times to increase verbosity (ie.
172
+ to enable wwine debugging output).
127
173
  .IP "\fB\-\-man\fR" 4
128
174
  .IX Item "--man"
129
175
  Show the manpage. Normally 'man wwine' would do, but when wwine is
@@ -145,14 +191,14 @@ Runs file.exe in wine, using the 'file' bottle.
145
191
  .IP "\fIwwine \-w cxg \-b file file.exe\fR" 4
146
192
  .IX Item "wwine -w cxg -b file file.exe"
147
193
  Runs file.exe in crossover games using the cxgames 'file' bottle
148
- .IP "\fIwwine \-\-cxinstalldir ~/cxgames7.0/ \-w cxg \-b file file.exe\fR" 4
149
- .IX Item "wwine --cxinstalldir ~/cxgames7.0/ -w cxg -b file file.exe"
194
+ .IP "\fIwwine \-\-wine ~/cxgames7.0/ \-b file file.exe\fR" 4
195
+ .IX Item "wwine --wine ~/cxgames7.0/ -b file file.exe"
150
196
  Runs file.exe in the version of crossover games that is installed at
151
197
  \&\fI~/cxgames7.0\fR, using the cxgames 'file' bottle.
152
198
 
153
- \&\-\-cxinstalldir can be useful to run something in a version of cxgames/cxoffice
154
- other than your primary one. Ie. if a regression causes it to not run in a
155
- later version.
199
+ Providing a path to a Crossover installation to \-\-wine can be useful to run
200
+ something in a version of cxgames/cxoffice other than your primary one. Ie. if
201
+ a regression causes it to not run in a later version.
156
202
  .IP "\fIwwine \-w cxg \-b file file.exe \-\-wrap ~/bin/startFile\fR" 4
157
203
  .IX Item "wwine -w cxg -b file file.exe --wrap ~/bin/startFile"
158
204
  This causes wwine to create a wrapper shell script at ~/bin/startFile.
@@ -171,12 +217,15 @@ using the parameters specified in ~/bin/startFile, with the exception of
171
217
  \&\-\-wine, which would be wine instead of cxgames (here assuming this
172
218
  is the file created by the above example).
173
219
  .IP "\fIwwine \-w cxg \-b file \-\-env \*(-- winetricks \-\-no\-isolate vcrun6\fR" 4
174
- .IX Item "wwine -w cxg -b file --env winetricks --no-isolate vcrun6"
175
- This causes wwine to set the environment variables \s-1WINE\s0 and \s-1WINEPREFIX\s0,
220
+ .IX Item "wwine -w cxg -b file --env winetricks --no-isolate vcrun6"
221
+ This causes wwine to set the environment variables \s-1WINE\s0 and \s-1WINEPREFIX,\s0
176
222
  and then execute the command supplied. In this case it would run
177
223
  winetricks, which would be told to install \*(L"vcrun6\*(R". Because it is running
178
224
  under wwine's \-\-env parameter, winetricks will use wwine to perform
179
225
  the actions, thus allowing you to use winetricks with cxgames.
226
+ .IP "\fIwwine \-w cxg \-b file \-\-tricks vcrun6\fR" 4
227
+ .IX Item "wwine -w cxg -b file --tricks vcrun6"
228
+ This is the same as the above, but using wwine's builtin support for winetricks.
180
229
  .IP "\fIwwine \-k\fR" 4
181
230
  .IX Item "wwine -k"
182
231
  Will make wwine attempt to kill all running wine processes on this system by
@@ -185,9 +234,28 @@ sending them the \s-1TERM\s0 signal.
185
234
  .IX Item "wwine -k9"
186
235
  Will make wwine attempt to kill all running wine processes on this system by
187
236
  sending them the \s-1KILL\s0 signal. Should only be used if \*(L"wwine \-k\*(R" fails.
237
+ .IP "\fIwwine \-\-bottle test \-\-wine cx \-\-kill\fR" 4
238
+ .IX Item "wwine --bottle test --wine cx --kill"
239
+ Kill any crossover processes running in the bottle \*(L"test\*(R".
240
+ .SH "SUPPORTED WINE FLAVOURS"
241
+ .IX Header "SUPPORTED WINE FLAVOURS"
242
+ The following flavours of wine are supported:
243
+ .IP "\fBWine\fR" 4
244
+ .IX Item "Wine"
245
+ Regular wine. <http://www.winehq.org/>
246
+ .IP "\fBCrossover\fR and \fBCrossover Office/Games\fR" 4
247
+ .IX Item "Crossover and Crossover Office/Games"
248
+ The commercial Crossover release from Codeweavers, as well as the legacy
249
+ versions \*(L"Crossover Office\*(R" and \*(L"Crossover Games\*(R". <http://www.codeweavers.com/>
250
+ .IP "\fBPlayOnLinux\fR" 4
251
+ .IX Item "PlayOnLinux"
252
+ Wine packages installed via PlayOnLinux. <http://www.playonlinux.com/>
253
+ .IP "\fBGameTree Linux/Cedega\fR" 4
254
+ .IX Item "GameTree Linux/Cedega"
255
+ The unmaintained Cedega flavour of wine.
188
256
  .SH "DEPENDENCIES"
189
257
  .IX Header "DEPENDENCIES"
190
- Requires at least one of wine, cxoffice, cxgames or cedega.
258
+ Requires at least one of wine, crossover, cxoffice, cxgames or cedega.
191
259
  .SH "ENVIRONMENT VARIABLES"
192
260
  .IX Header "ENVIRONMENT VARIABLES"
193
261
  .IP "\fB\s-1WWINE_VERBOSE\s0\fR" 4
@@ -202,7 +270,7 @@ If this is not set, wwine will set it to \-all when using \-w wine.
202
270
  .IX Item "WINEPREFIX"
203
271
  wwine uses the \s-1WINEPREFIX\s0 environment variable to add bottle support when
204
272
  in \-w wine mode. If \s-1WINEPREFIX\s0 is set and a \-\-bottle is supplied, wwine will override
205
- the existing \s-1WINEPREFIX\s0. If no bottle is supplied, wwine will respect \s-1WINEPREFIX\s0.
273
+ the existing \s-1WINEPREFIX.\s0 If no bottle is supplied, wwine will respect \s-1WINEPREFIX.\s0
206
274
  .PP
207
275
  Any environment variables that wwine sets while it is running will be output
208
276
  by wwine when in \-\-verbose mode.
@@ -221,4 +289,4 @@ submit feature requests there as well.
221
289
  Copyright (C) Eskild Hustvedt 2009, 2010, 2011
222
290
  .PP
223
291
  This is free software; see the source for copying conditions. There is \s-1NO\s0
224
- warranty; not even for \s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.
292
+ warranty; not even for \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0
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.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eskild Hustvedt
8
8
  autorequire:
9
- bindir: .
9
+ bindir: "."
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2018-04-21 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
@@ -19,11 +19,11 @@ executables:
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
- - wwine
23
- - README
22
+ - "./wwine"
24
23
  - COPYING
24
+ - README
25
+ - wwine
25
26
  - wwine.1
26
- - ./wwine
27
27
  homepage: http://random.zerodogg.org/wwine
28
28
  licenses:
29
29
  - GPLv3
@@ -34,17 +34,17 @@ require_paths:
34
34
  - lib
35
35
  required_ruby_version: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  required_rubygems_version: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []
46
46
  rubyforge_project:
47
- rubygems_version: 2.0.10
47
+ rubygems_version: 2.7.6
48
48
  signing_key:
49
49
  specification_version: 4
50
50
  summary: wwine is a simple wine wrapper.