wwine 0.1 → 0.1.1.1
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.
- data/wwine +19 -10
- metadata +4 -2
data/wwine
CHANGED
@@ -20,7 +20,7 @@ require 'getoptlong'
|
|
20
20
|
# To read info for --debuginfo
|
21
21
|
require 'open3'
|
22
22
|
# Application version
|
23
|
-
$version = 0.1
|
23
|
+
$version = '0.1.1'
|
24
24
|
# The wine flavour to use
|
25
25
|
$wine = nil
|
26
26
|
# The bottle to use
|
@@ -87,7 +87,7 @@ def killWine (dryRun = false, signal = 15)
|
|
87
87
|
# If wine is not a part of the process name, check if the
|
88
88
|
# name either includes a \ (which most likely means it is a windows
|
89
89
|
# path because it has already matched one of the above) or exe/dll.
|
90
|
-
if
|
90
|
+
if name !~ /wine/i && (name !~ /\// || name !~ /\.(exe|dll)/i)
|
91
91
|
next
|
92
92
|
end
|
93
93
|
else
|
@@ -95,9 +95,18 @@ def killWine (dryRun = false, signal = 15)
|
|
95
95
|
end
|
96
96
|
# At least on Linux kernels, /proc/ will include useful info, we use it to
|
97
97
|
# check if the exe actually is wine
|
98
|
-
|
98
|
+
|
99
|
+
# /exe test
|
100
|
+
if File.readable?('/proc/'+pid+'/exe') and File.symlink?('/proc/'+pid+'/exe')
|
99
101
|
linkValue = File.readlink('/proc/'+pid+'/exe')
|
100
|
-
if File.readlink('/proc/'+pid+'/exe') !~
|
102
|
+
if File.readlink('/proc/'+pid+'/exe') !~ /\/[^\/]*wine[^\/]*$/i
|
103
|
+
next
|
104
|
+
end
|
105
|
+
# /cmdline test (for when /exe isn't readable)
|
106
|
+
elsif File.readable?('/proc/'+pid+'/cmdline')
|
107
|
+
cmdline = IO.read('/proc/'+pid+'/cmdline')
|
108
|
+
cmdline.sub!(/\0.*/,'');
|
109
|
+
if cmdline !~ /\/[^\/]*wine[^\/]*$/i && cmdline !~ /^[A-Z]:\\[^\\]+\\/
|
101
110
|
next
|
102
111
|
end
|
103
112
|
end
|
@@ -210,7 +219,7 @@ def writeWrapper (targetFile, wwineCommand, otherCommand, cwd, wwineInfo, args,
|
|
210
219
|
end
|
211
220
|
|
212
221
|
file.puts('#!/bin/sh')
|
213
|
-
file.puts('# Script autogenerated by wwine '+$version
|
222
|
+
file.puts('# Script autogenerated by wwine '+$version+' (http://random.zerodogg.org/wwine)')
|
214
223
|
file.puts('# Licensed under the GNU General Public License version 3 or later')
|
215
224
|
file.puts('#')
|
216
225
|
file.puts('# You should have received a copy of the GNU General Public License')
|
@@ -332,7 +341,7 @@ def loadWwineDataFromFile (file,dryRun = false)
|
|
332
341
|
|
333
342
|
if info[0] != 'v1'
|
334
343
|
puts "This version of wwine only supports info format v1."
|
335
|
-
puts "This file is
|
344
|
+
puts "This file is version "+info[0]
|
336
345
|
puts "Unable to continue."
|
337
346
|
exit(0)
|
338
347
|
end
|
@@ -407,7 +416,7 @@ end
|
|
407
416
|
|
408
417
|
# Purpose: Print the help output
|
409
418
|
def Help ()
|
410
|
-
puts "wwine "+$version
|
419
|
+
puts "wwine "+$version
|
411
420
|
puts ""
|
412
421
|
puts "Usage: wwine (WWINE PARAMETERS) PROGRAM -- [PROGRAM ARGUMENTS]"
|
413
422
|
puts ""
|
@@ -581,7 +590,7 @@ end
|
|
581
590
|
# Purpose: Print debugging info
|
582
591
|
def debugInfo ()
|
583
592
|
outFormat = '%-20s: %s'+"\n"
|
584
|
-
puts "wwine "+$version
|
593
|
+
puts "wwine "+$version
|
585
594
|
# Load a --from file if it is set
|
586
595
|
if $wwineDataFrom
|
587
596
|
loadWwineDataFromFile($wwineDataFrom,true)
|
@@ -643,7 +652,7 @@ def handleException(ex)
|
|
643
652
|
puts()
|
644
653
|
puts('An exception has occurred and wwine can not continue.')
|
645
654
|
puts('This almost certainly reflects a bug in wwine.')
|
646
|
-
puts('Please check that you have the latest version
|
655
|
+
puts('Please check that you have the latest version of wwine,')
|
647
656
|
puts('and if you do, report this issue along with the text between the "---" above');
|
648
657
|
puts('to http://random.zerodogg.org/wwine/bugs')
|
649
658
|
exit(1)
|
@@ -931,7 +940,7 @@ begin
|
|
931
940
|
when '--cxinstalldir'
|
932
941
|
$cxPath = arg
|
933
942
|
when '--version'
|
934
|
-
puts('wwine version '+$version
|
943
|
+
puts('wwine version '+$version+' (for wine version info, run wwine --debuginfo)')
|
935
944
|
exit(0)
|
936
945
|
when '--wrap'
|
937
946
|
$wrapperPath = arg
|
metadata
CHANGED
@@ -5,7 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 0.1.1.1
|
9
11
|
platform: ruby
|
10
12
|
authors:
|
11
13
|
- Eskild Hustvedt
|
@@ -13,7 +15,7 @@ autorequire:
|
|
13
15
|
bindir: .
|
14
16
|
cert_chain: []
|
15
17
|
|
16
|
-
date: 2010-
|
18
|
+
date: 2010-06-12 00:00:00 +02:00
|
17
19
|
default_executable:
|
18
20
|
dependencies: []
|
19
21
|
|