win32olerot 0.0.3-x86-mswin32 → 0.0.4-x86-mswin32
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/ext/win32olerot/extconf.rb +51 -0
- data/ext/win32olerot/win32olerot.cpp +20 -2
- data/lib/win32olerot.so +0 -0
- metadata +27 -10
@@ -0,0 +1,51 @@
|
|
1
|
+
# Lovingly ripped off from win32ole extconf.rb
|
2
|
+
|
3
|
+
require 'mkmf'
|
4
|
+
|
5
|
+
dir_config("win32")
|
6
|
+
|
7
|
+
def append_manifest(extension_name)
|
8
|
+
case CONFIG["target_os"]
|
9
|
+
when "mswin32"
|
10
|
+
|
11
|
+
File.open("Makefile", "a") << "
|
12
|
+
|
13
|
+
# Add manifest for windows targets
|
14
|
+
site-install: manifest-stamp
|
15
|
+
install: manifest-stamp
|
16
|
+
all: manifest-stamp
|
17
|
+
|
18
|
+
manifest-stamp: $(DLLIB)
|
19
|
+
mt -manifest $(DLLIB).manifest -outputresource:$(DLLIB);2
|
20
|
+
\ttouch $@
|
21
|
+
"
|
22
|
+
else
|
23
|
+
# no need for manifest step
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
def create_win32olerot_makefile
|
30
|
+
if have_library("ole32") and
|
31
|
+
have_library("oleaut32") and
|
32
|
+
have_library("uuid") and
|
33
|
+
have_library("user32") and
|
34
|
+
have_library("kernel32") and
|
35
|
+
have_library("advapi32") and
|
36
|
+
have_header("windows.h")
|
37
|
+
create_makefile("win32olerot")
|
38
|
+
append_manifest("win32olerot")
|
39
|
+
else
|
40
|
+
## TODO
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
case RUBY_PLATFORM
|
45
|
+
when /mswin32/
|
46
|
+
$CFLAGS += ' /W3'
|
47
|
+
end
|
48
|
+
|
49
|
+
$cleanfiles << "manifest-stamp $(DLLIB).manifest $(DEFFILE)" if CONFIG["target_os"] == "mswin32"
|
50
|
+
|
51
|
+
create_win32olerot_makefile
|
@@ -4,7 +4,6 @@
|
|
4
4
|
// Force retail VS2005 version linkage
|
5
5
|
#define _USE_RTM_VERSION
|
6
6
|
|
7
|
-
#include <atlbase.h>
|
8
7
|
#include "ruby.h"
|
9
8
|
#include <windows.h>
|
10
9
|
#include <ocidl.h>
|
@@ -12,6 +11,25 @@
|
|
12
11
|
#include <ole2.h>
|
13
12
|
#include <stdarg.h>
|
14
13
|
|
14
|
+
// Grrr CComPtr isn't in the Win32 Platform SDK
|
15
|
+
// #include <atlbase.h>
|
16
|
+
template<typename T>
|
17
|
+
class GwCComPtr
|
18
|
+
{
|
19
|
+
public:
|
20
|
+
GwCComPtr() : mPtr(0) {}
|
21
|
+
GwCComPtr(T* aPtr) : mPtr(aPtr) {}
|
22
|
+
~GwCComPtr() { if (mPtr) mPtr->Release(); }
|
23
|
+
|
24
|
+
operator T*() { return mPtr; }
|
25
|
+
T& operator *() { return mPtr; }
|
26
|
+
T** operator &() { return &mPtr; }
|
27
|
+
T* operator ->() { return mPtr; }
|
28
|
+
private:
|
29
|
+
T* mPtr;
|
30
|
+
};
|
31
|
+
#define CComPtr GwCComPtr
|
32
|
+
|
15
33
|
class HRESULTDecode
|
16
34
|
{
|
17
35
|
public:
|
@@ -268,7 +286,7 @@ static VALUE rot_each_display_name(VALUE rot)
|
|
268
286
|
return pRot->eachDisplayName();
|
269
287
|
}
|
270
288
|
|
271
|
-
void
|
289
|
+
extern "C" void
|
272
290
|
Init_win32olerot()
|
273
291
|
{
|
274
292
|
(void)rb_require("win32ole");
|
data/lib/win32olerot.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32olerot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
5
11
|
platform: x86-mswin32
|
6
12
|
authors:
|
7
13
|
- G Whiteley
|
@@ -9,21 +15,25 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-03-20 00:00:00 +11:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: rake-compiler
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
25
35
|
description: win32olerot provides an adjunct to the standard WIN32OLE Ruby library for access to the win32 RunningObjectTable (ROT). The RunningObjectTable contains the list of registered monikers that can be connected to using WIN32OLE.connect().
|
26
|
-
email:
|
36
|
+
email: whitty@users.sourceforge.net
|
27
37
|
executables: []
|
28
38
|
|
29
39
|
extensions: []
|
@@ -35,6 +45,7 @@ files:
|
|
35
45
|
- LICENSE.txt
|
36
46
|
- ext/win32olerot/win32olerot.cpp
|
37
47
|
- tests/tc_basic.rb
|
48
|
+
- ext/win32olerot/extconf.rb
|
38
49
|
- lib/win32olerot.so
|
39
50
|
has_rdoc: true
|
40
51
|
homepage: http://win32olerot.rubyforge.org/
|
@@ -46,21 +57,27 @@ rdoc_options: []
|
|
46
57
|
require_paths:
|
47
58
|
- lib
|
48
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
49
61
|
requirements:
|
50
62
|
- - ">="
|
51
63
|
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
65
|
+
segments:
|
66
|
+
- 0
|
52
67
|
version: "0"
|
53
|
-
version:
|
54
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
55
70
|
requirements:
|
56
71
|
- - ">="
|
57
72
|
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
58
76
|
version: "0"
|
59
|
-
version:
|
60
77
|
requirements: []
|
61
78
|
|
62
79
|
rubyforge_project: win32olerot
|
63
|
-
rubygems_version: 1.3.
|
80
|
+
rubygems_version: 1.3.7
|
64
81
|
signing_key:
|
65
82
|
specification_version: 3
|
66
83
|
summary: win32olerot provides access to the win32 RunningObjectTable (ROT).
|