win32-api 1.8.0-universal-mingw32 → 1.9.1-universal-mingw32
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 +5 -5
- data/CHANGES +8 -0
- data/Dockerfile +99 -0
- data/Dockerfile.trunk +17 -0
- data/MANIFEST +1 -1
- data/{README → README.md} +21 -16
- data/RELEASE.md +32 -0
- data/Rakefile +13 -3
- data/appveyor.yml +2 -2
- data/build-gem.bat +3 -0
- data/ext/win32/api.c +11 -1
- data/lib/win32/api.rb +8 -0
- data/lib/win32/ruby21_32/win32/api.so +0 -0
- data/lib/win32/ruby21_64/win32/api.so +0 -0
- data/lib/win32/ruby22_32/win32/api.so +0 -0
- data/lib/win32/ruby22_64/win32/api.so +0 -0
- data/lib/win32/ruby23_32/win32/api.so +0 -0
- data/lib/win32/ruby23_64/win32/api.so +0 -0
- data/lib/win32/ruby24_32/win32/api.so +0 -0
- data/lib/win32/ruby24_64/win32/api.so +0 -0
- data/lib/win32/ruby25_32/win32/api.so +0 -0
- data/lib/win32/ruby25_64/win32/api.so +0 -0
- data/lib/win32/ruby26_32/win32/api.so +0 -0
- data/lib/win32/ruby26_64/win32/api.so +0 -0
- data/lib/win32/ruby27_32/win32/api.so +0 -0
- data/lib/win32/ruby27_64/win32/api.so +0 -0
- data/lib/win32/ruby28_64/win32/api.so +0 -0
- data/lib/win32/ruby2_32/win32/api.so +0 -0
- data/lib/win32/ruby2_64/win32/api.so +0 -0
- data/test/test_win32_api.rb +1 -1
- data/win32-api.gemspec +2 -2
- metadata +9 -7
- data/Gemfile.lock +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 50f2020c700c00a8f72649d59a580d017a3418c42db26dc79cd6d379ba589239
|
4
|
+
data.tar.gz: d591539fa8826a781bb96131f7a79cc018e2bf4f8bb38b132bdc3d93d1236c86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f2db91230d8b7a4c360fb698d75a2e30106aa7786b63d9d0536b87d938f1c9771a5d6d8516002ac3ddc0b03086c72b15780ab8ffbc2ca3d28bee8be3dad5fbb
|
7
|
+
data.tar.gz: 879067f098f0f684925eaa592009c77e638447ad738935106775f857a81aefe4afc9b2500e5108645fc7e3dbb73866473d8112df00af9628f149f6559b165f56
|
data/CHANGES
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 1.9.1 - 14-Jul-2020
|
2
|
+
* Handle whether tainted support or not.
|
3
|
+
|
4
|
+
== 1.9.0 - 6-Jan-2020
|
5
|
+
* Add Ruby 2.8 snapshot support.
|
6
|
+
* Now includes binaries for Ruby 2.8 both 32 and 64 bit versions.
|
7
|
+
* Use RubyInstaller 2.7.0-1 for Ruby 2.7 binaries.
|
8
|
+
|
1
9
|
== 1.8.0 - 6-Jan-2019
|
2
10
|
* Add Ruby 2.7 snapshot support.
|
3
11
|
* Now includes binaries for Ruby 2.7 both 32 and 64 bit versions.
|
data/Dockerfile
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
FROM mcr.microsoft.com/windows/servercore:1903
|
2
|
+
LABEL maintainer "Hiroshi Hatake <cosmo0920.wp@gmail.com>"
|
3
|
+
LABEL Description="win32-api building docker image"
|
4
|
+
|
5
|
+
# Do not split this into multiple RUN!
|
6
|
+
# Docker creates a layer for every RUN-Statement
|
7
|
+
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
|
8
|
+
|
9
|
+
# Ruby 2.0.0
|
10
|
+
RUN powershell \
|
11
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
12
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.0.0-p648.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p648.exe
|
13
|
+
RUN cmd /c "C:\rubyinstaller-2.0.0-p648.exe" /silent /dir=c:\ruby200
|
14
|
+
RUN powershell \
|
15
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
16
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.0.0-p648-x64.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p648-x64.exe
|
17
|
+
RUN cmd /c "C:\rubyinstaller-2.0.0-p648-x64.exe" /silent /dir=c:\ruby200-x64
|
18
|
+
# Ruby 2.1
|
19
|
+
RUN powershell \
|
20
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
21
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.1.9.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.9.exe
|
22
|
+
RUN cmd /c "C:\rubyinstaller-2.1.9.exe" /silent /dir=c:\ruby21
|
23
|
+
RUN powershell \
|
24
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
25
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.1.9-x64.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.9-x64.exe
|
26
|
+
RUN cmd /c "C:\rubyinstaller-2.1.9-x64.exe" /silent /dir=c:\ruby21-x64
|
27
|
+
# Ruby 2.2
|
28
|
+
RUN powershell \
|
29
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
30
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.2.6.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.6.exe
|
31
|
+
RUN cmd /c "C:\rubyinstaller-2.2.6.exe" /silent /dir=c:\ruby22
|
32
|
+
RUN powershell \
|
33
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
34
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.2.6-x64.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.6-x64.exe
|
35
|
+
RUN cmd /c "C:\rubyinstaller-2.2.6-x64.exe" /silent /dir=c:\ruby22-x64
|
36
|
+
# Ruby 2.3
|
37
|
+
RUN powershell \
|
38
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
39
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.3.3.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3.exe
|
40
|
+
RUN cmd /c "C:\rubyinstaller-2.3.3.exe" /silent /dir=c:\ruby23
|
41
|
+
RUN powershell \
|
42
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
43
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.3.3-x64.exe https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3-x64.exe
|
44
|
+
RUN cmd /c "C:\rubyinstaller-2.3.3-x64.exe" /silent /dir=c:\ruby23-x64
|
45
|
+
# Ruby 2.4
|
46
|
+
RUN powershell \
|
47
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
48
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.4.9-1-x86.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.4.9-1/rubyinstaller-2.4.9-1-x86.exe
|
49
|
+
RUN cmd /c "C:\rubyinstaller-2.4.9-1-x86.exe" /silent /dir=c:\ruby24
|
50
|
+
RUN powershell \
|
51
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
52
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.4.9-1-x64.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.4.9-1/rubyinstaller-2.4.9-1-x64.exe
|
53
|
+
RUN cmd /c "C:\rubyinstaller-2.4.9-1-x64.exe" /silent /dir=c:\ruby24-x64
|
54
|
+
# Ruby 2.5
|
55
|
+
RUN powershell \
|
56
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
57
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.5.7-1-x86.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.7-1/rubyinstaller-2.5.7-1-x86.exe
|
58
|
+
RUN cmd /c "C:\rubyinstaller-2.5.7-1-x86.exe" /silent /dir=c:\ruby25
|
59
|
+
RUN powershell \
|
60
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
61
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.5.7-1-x64.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.7-1/rubyinstaller-2.5.7-1-x64.exe
|
62
|
+
RUN cmd /c "C:\rubyinstaller-2.5.7-1-x64.exe" /silent /dir=c:\ruby25-x64
|
63
|
+
# Ruby 2.6
|
64
|
+
RUN powershell \
|
65
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
66
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.6.5-1-x86.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.5-1/rubyinstaller-2.6.5-1-x86.exe
|
67
|
+
RUN cmd /c "C:\rubyinstaller-2.6.5-1-x86.exe" /silent /dir=c:\ruby26
|
68
|
+
RUN powershell \
|
69
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
70
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.6.5-1-x64.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.5-1/rubyinstaller-2.6.5-1-x64.exe
|
71
|
+
RUN cmd /c "C:\rubyinstaller-2.6.5-1-x64.exe" /silent /dir=c:\ruby26-x64
|
72
|
+
|
73
|
+
# Ruby 2.7
|
74
|
+
RUN powershell \
|
75
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
76
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.7.0-1-x86.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/rubyinstaller-2.7.0-1-x86.exe
|
77
|
+
RUN cmd /c "C:\rubyinstaller-2.7.0-1-x86.exe" /silent /dir=c:\ruby27
|
78
|
+
RUN powershell \
|
79
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
80
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-2.7.0-1-x64.exe https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/rubyinstaller-2.7.0-1-x64.exe
|
81
|
+
RUN cmd /c "C:\rubyinstaller-2.7.0-1-x64.exe" /silent /dir=c:\ruby27-x64
|
82
|
+
|
83
|
+
# DevKit
|
84
|
+
RUN powershell \
|
85
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
86
|
+
Invoke-WebRequest -OutFile C:\DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
|
87
|
+
RUN cmd /c C:\DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe -o"c:\DevKit" -y
|
88
|
+
RUN powershell \
|
89
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
90
|
+
Invoke-WebRequest -OutFile C:\DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
|
91
|
+
RUN cmd /c C:\DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe -o"c:\DevKit64" -y
|
92
|
+
|
93
|
+
RUN choco install -y git \
|
94
|
+
&& choco install -y msys2 --params "'/NoPath /NoUpdate /InstallDir:C:\msys64'"
|
95
|
+
RUN refreshenv \
|
96
|
+
&& C:\ruby27\bin\ridk install 2 3 \
|
97
|
+
&& C:\ruby27-x64\bin\ridk install 2 3
|
98
|
+
|
99
|
+
ENTRYPOINT ["cmd"]
|
data/Dockerfile.trunk
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
FROM cosmo0920/win32-api:latest
|
2
|
+
LABEL maintainer "Hiroshi Hatake <cosmo0920.wp@gmail.com>"
|
3
|
+
LABEL Description="win32-api building docker image"
|
4
|
+
|
5
|
+
# Ruby 2.8
|
6
|
+
RUN powershell \
|
7
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
8
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x86-20200106.exe https://ci.appveyor.com/api/buildjobs/n7m98ejuhuu2rn4g/artifacts/packages%2Fri%2Frecipes%2Finstaller-inno%2Frubyinstaller-head-x64.exe
|
9
|
+
RUN cmd /c "C:\rubyinstaller-head-x86-20200106.exe" /silent /dir=c:\ruby28
|
10
|
+
RUN powershell \
|
11
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
12
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x64-20200106.exe https://ci.appveyor.com/api/buildjobs/n7m98ejuhuu2rn4g/artifacts/packages%2Fri%2Frecipes%2Finstaller-inno%2Frubyinstaller-head-x64.exe
|
13
|
+
RUN cmd /c "C:\rubyinstaller-head-x64-20200106.exe" /silent /dir=c:\ruby28-x64
|
14
|
+
|
15
|
+
RUN mkdir C:\pkg
|
16
|
+
COPY build-gem.bat C:\\build-gem.bat
|
17
|
+
ENTRYPOINT ["cmd"]
|
data/MANIFEST
CHANGED
data/{README → README.md}
RENAMED
@@ -1,8 +1,10 @@
|
|
1
|
-
|
1
|
+
# Description
|
2
2
|
This is a drop-in replacement for the Win32API library currently part of
|
3
3
|
Ruby's standard library.
|
4
4
|
|
5
|
-
|
5
|
+
# Synopsis
|
6
|
+
|
7
|
+
```ruby
|
6
8
|
require 'win32/api'
|
7
9
|
include Win32
|
8
10
|
|
@@ -35,8 +37,9 @@
|
|
35
37
|
addr = GetProcAddress.call(hlib, 'MessageBeep')
|
36
38
|
func = Win32::API::Function.new(addr, 'L', 'L')
|
37
39
|
func.call(0)
|
40
|
+
```
|
38
41
|
|
39
|
-
|
42
|
+
# Differences between win32-api and Win32API
|
40
43
|
* This library has callback support
|
41
44
|
* This library supports raw function pointers.
|
42
45
|
* This library supports a separate string type for const char* (S).
|
@@ -48,9 +51,9 @@
|
|
48
51
|
* Removed the support for lower case prototype and return types. Always
|
49
52
|
use capital letters.
|
50
53
|
|
51
|
-
|
52
|
-
|
53
|
-
motivation at the time the project was originally created
|
54
|
+
# Developer's Notes
|
55
|
+
NOTE: **Some of the information below is now out of date, but explains my
|
56
|
+
motivation at the time the project was originally created.**
|
54
57
|
|
55
58
|
The current Win32API library that ships with the standard library has been
|
56
59
|
slated for removal from Ruby 2.0 and it will not receive any updates in the
|
@@ -76,7 +79,7 @@
|
|
76
79
|
Most importantly, we can now add, modify and fix any features that we feel
|
77
80
|
best benefit our end users.
|
78
81
|
|
79
|
-
|
82
|
+
# Multiple Binaries
|
80
83
|
As of win32-api 1.4.8 a binary gem is shipped that contains binaries for
|
81
84
|
both Ruby 1.8, Ruby 1.9, and 2.x. For Ruby 2.x, both 32 and 64 bit binaries
|
82
85
|
are included as of release 1.5.0.
|
@@ -84,29 +87,29 @@
|
|
84
87
|
The file under lib/win32 dynamically requires the correct binary based on
|
85
88
|
your version of Ruby.
|
86
89
|
|
87
|
-
|
90
|
+
# Documentation
|
88
91
|
The source file contains inline RDoc documentation. If you installed
|
89
92
|
this file as a gem, then you have the docs. Run "gem server" and point
|
90
93
|
your browser at http://localhost:8808 to see them.
|
91
94
|
|
92
|
-
|
95
|
+
# Warranty
|
93
96
|
This package is provided "as is" and without any express or
|
94
97
|
implied warranties, including, without limitation, the implied
|
95
98
|
warranties of merchantability and fitness for a particular purpose.
|
96
99
|
|
97
|
-
|
100
|
+
# Known Issues
|
98
101
|
Possible callback issues when dealing with multi-threaded applications.
|
99
102
|
|
100
103
|
Please submit any bug reports to the project page at
|
101
104
|
https://github.com/cosmo0920/win32-api
|
102
105
|
|
103
|
-
|
106
|
+
## Contributions
|
104
107
|
Although this library is free, please consider having your company
|
105
108
|
setup a gittip if used by your company professionally.
|
106
109
|
|
107
110
|
http://www.gittip.com/djberg96/
|
108
111
|
|
109
|
-
|
112
|
+
# Future Plans
|
110
113
|
I really don't have future plans for this library since you should use FFI
|
111
114
|
as your preferred C interface going forward. All of my own projects have
|
112
115
|
since been converted to either use FFI or an analogous OLE interface.
|
@@ -115,15 +118,17 @@
|
|
115
118
|
there who are still using it, but I strongly encourage you to convert
|
116
119
|
your projects to FFI when possible.
|
117
120
|
|
118
|
-
|
121
|
+
# Copyright
|
119
122
|
(C) 2003-2015 Daniel J. Berger
|
120
|
-
|
123
|
+
|
124
|
+
(C) 2016-2020 Hiroshi Hatake
|
125
|
+
|
121
126
|
All Rights Reserved
|
122
127
|
|
123
|
-
|
128
|
+
# License
|
124
129
|
Artistic 2.0
|
125
130
|
|
126
|
-
|
131
|
+
# Authors
|
127
132
|
Daniel J. Berger
|
128
133
|
Park Heesob
|
129
134
|
Hiroshi Hatake
|
data/RELEASE.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
## Prerequisites
|
2
|
+
|
3
|
+
* Docker for Windows
|
4
|
+
|
5
|
+
### Release step
|
6
|
+
|
7
|
+
Check the latest ruby-head-YYYYmmDD image:
|
8
|
+
https://hub.docker.com/r/cosmo0920/win32-api/tags?page=1&name=ruby-head
|
9
|
+
|
10
|
+
```powershell
|
11
|
+
PS> mkdir pkg
|
12
|
+
PS> docker run -it -v $PWD\pkg:C:\pkg cosmo0920/win32-api:ruby-head-AWESOMEDATE
|
13
|
+
```
|
14
|
+
|
15
|
+
Build universal gem:
|
16
|
+
|
17
|
+
```cmd
|
18
|
+
> .\build-gem.bat
|
19
|
+
```
|
20
|
+
|
21
|
+
Copy built universal gem into mounted directory:
|
22
|
+
|
23
|
+
```cmd
|
24
|
+
> copy C:\win32-api\win32-api-*.gem C:\pkg
|
25
|
+
```
|
26
|
+
|
27
|
+
Then, exit and push built gem:
|
28
|
+
|
29
|
+
```cmd
|
30
|
+
> exit
|
31
|
+
> gem push win32-api-*.gem
|
32
|
+
```
|
data/Rakefile
CHANGED
@@ -59,7 +59,7 @@ namespace 'gem' do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
desc 'Build a binary gem'
|
62
|
-
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64, :ruby23_32, :ruby23_64, :ruby24_32, :ruby24_64, :ruby25_32, :ruby25_64, :ruby_26_32, :ruby26_64, :ruby27_32, :ruby27_64 do |task, args|
|
62
|
+
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64, :ruby23_32, :ruby23_64, :ruby24_32, :ruby24_64, :ruby25_32, :ruby25_64, :ruby_26_32, :ruby26_64, :ruby27_32, :ruby27_64, :ruby28_32, :ruby28_64 do |task, args|
|
63
63
|
# These are just what's on my system at the moment. Adjust as needed.
|
64
64
|
# ri refers to RubyInstaller, ruby 2.3 and prev were built with RubyInstaller (:ri),
|
65
65
|
# 2.4 and later with RubyInstaller2 (:ri2)
|
@@ -94,10 +94,12 @@ namespace 'gem' do
|
|
94
94
|
:ruby24_64 => {:path => "#{pre}/ruby24-x64/bin", :ri => :ri2_64, :omit => false},
|
95
95
|
:ruby25_32 => {:path => "#{pre}/ruby25/bin", :ri => :ri2, :omit => false},
|
96
96
|
:ruby25_64 => {:path => "#{pre}/ruby25-x64/bin", :ri => :ri2_64, :omit => false},
|
97
|
-
:ruby26_32 => {:path => "#{pre}/ruby26/bin", :ri => :ri2, :omit =>
|
98
|
-
:ruby26_64 => {:path => "#{pre}/ruby26-x64/bin", :ri => :ri2_64, :omit =>
|
97
|
+
:ruby26_32 => {:path => "#{pre}/ruby26/bin", :ri => :ri2, :omit => false},
|
98
|
+
:ruby26_64 => {:path => "#{pre}/ruby26-x64/bin", :ri => :ri2_64, :omit => false},
|
99
99
|
:ruby27_32 => {:path => "#{pre}/ruby27/bin", :ri => :ri2, :omit => true},
|
100
100
|
:ruby27_64 => {:path => "#{pre}/ruby27-x64/bin", :ri => :ri2_64, :omit => true},
|
101
|
+
:ruby28_32 => {:path => "#{pre}/ruby28/bin", :ri => :ri2, :omit => true},
|
102
|
+
:ruby28_64 => {:path => "#{pre}/ruby28-x64/bin", :ri => :ri2_64, :omit => true},
|
101
103
|
}
|
102
104
|
)
|
103
105
|
|
@@ -195,6 +197,14 @@ begin
|
|
195
197
|
end
|
196
198
|
end
|
197
199
|
|
200
|
+
if RbConfig::CONFIG['MINOR'] == '8'
|
201
|
+
if RbConfig::CONFIG['arch'] =~ /x64/i
|
202
|
+
require File.join(File.dirname(__FILE__), 'ruby28_64/win32/api')
|
203
|
+
else
|
204
|
+
require File.join(File.dirname(__FILE__), 'ruby28_32/win32/api')
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
198
208
|
end
|
199
209
|
rescue LoadError
|
200
210
|
require File.join(File.dirname(__FILE__), '../../ext/api')
|
data/appveyor.yml
CHANGED
@@ -26,6 +26,8 @@ test_script:
|
|
26
26
|
environment:
|
27
27
|
matrix:
|
28
28
|
- ruby_version: _trunk
|
29
|
+
- ruby_version: 26-x64
|
30
|
+
- ruby_version: 26
|
29
31
|
- ruby_version: 25-x64
|
30
32
|
- ruby_version: 25
|
31
33
|
- ruby_version: 24-x64
|
@@ -42,5 +44,3 @@ environment:
|
|
42
44
|
matrix:
|
43
45
|
allow_failures:
|
44
46
|
- ruby_version: _trunk
|
45
|
-
- ruby_version: 25-x64
|
46
|
-
- ruby_version: 25
|
data/build-gem.bat
ADDED
data/ext/win32/api.c
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
|
39
39
|
#define MAX_BUF 1024
|
40
|
-
#define WINDOWS_API_VERSION "1.
|
40
|
+
#define WINDOWS_API_VERSION "1.9.1"
|
41
41
|
|
42
42
|
#define _T_VOID 0
|
43
43
|
#define _T_LONG 1
|
@@ -288,8 +288,10 @@ static VALUE api_init(int argc, VALUE* argv, VALUE self)
|
|
288
288
|
if(NIL_P(v_return))
|
289
289
|
v_return = rb_str_new2("L");
|
290
290
|
|
291
|
+
#if defined TAINTING_SUPPORT
|
291
292
|
SafeStringValue(v_dll);
|
292
293
|
SafeStringValue(v_proc);
|
294
|
+
#endif
|
293
295
|
|
294
296
|
hLibrary = LoadLibrary(TEXT(RSTRING_PTR(v_dll)));
|
295
297
|
|
@@ -356,7 +358,9 @@ static VALUE api_init(int argc, VALUE* argv, VALUE self)
|
|
356
358
|
// Push the numeric prototypes onto our int array for later use.
|
357
359
|
|
358
360
|
for(i = 0; i < RARRAY_LEN(v_proto); i++){
|
361
|
+
#if defined TAINTING_SUPPORT
|
359
362
|
SafeStringValue(RARRAY_PTR(v_proto)[i]);
|
363
|
+
#endif
|
360
364
|
switch(*(TCHAR*)StringValuePtr(RARRAY_PTR(v_proto)[i])){
|
361
365
|
case 'L':
|
362
366
|
ptr->prototype[i] = _T_LONG;
|
@@ -391,7 +395,9 @@ static VALUE api_init(int argc, VALUE* argv, VALUE self)
|
|
391
395
|
ptr->return_type = _T_VOID;
|
392
396
|
}
|
393
397
|
else{
|
398
|
+
#if defined TAINTING_SUPPORT
|
394
399
|
SafeStringValue(v_return);
|
400
|
+
#endif
|
395
401
|
switch(*RSTRING_PTR(v_return)){
|
396
402
|
case 'L':
|
397
403
|
ptr->return_type = _T_LONG;
|
@@ -482,7 +488,9 @@ static VALUE func_init(int argc, VALUE* argv, VALUE self){
|
|
482
488
|
// Push the numeric prototypes onto our int array for later use.
|
483
489
|
|
484
490
|
for(i = 0; i < RARRAY_LEN(v_proto); i++){
|
491
|
+
#if defined TAINTING_SUPPORT
|
485
492
|
SafeStringValue(RARRAY_PTR(v_proto)[i]);
|
493
|
+
#endif
|
486
494
|
switch(*(char*)StringValuePtr(RARRAY_PTR(v_proto)[i])){
|
487
495
|
case 'L':
|
488
496
|
ptr->prototype[i] = _T_LONG;
|
@@ -517,7 +525,9 @@ static VALUE func_init(int argc, VALUE* argv, VALUE self){
|
|
517
525
|
ptr->return_type = _T_VOID;
|
518
526
|
}
|
519
527
|
else{
|
528
|
+
#if defined TAINTING_SUPPORT
|
520
529
|
SafeStringValue(v_return);
|
530
|
+
#endif
|
521
531
|
switch(*RSTRING_PTR(v_return)){
|
522
532
|
case 'L':
|
523
533
|
ptr->return_type = _T_LONG;
|
data/lib/win32/api.rb
CHANGED
@@ -66,6 +66,14 @@ begin
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
if RbConfig::CONFIG['MINOR'] == '8'
|
70
|
+
if RbConfig::CONFIG['arch'] =~ /x64/i
|
71
|
+
require File.join(File.dirname(__FILE__), 'ruby28_64/win32/api')
|
72
|
+
else
|
73
|
+
require File.join(File.dirname(__FILE__), 'ruby28_32/win32/api')
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
69
77
|
end
|
70
78
|
rescue LoadError
|
71
79
|
require File.join(File.dirname(__FILE__), '../../ext/api')
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_win32_api.rb
CHANGED
data/win32-api.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'win32-api'
|
5
|
-
spec.version = '1.
|
5
|
+
spec.version = '1.9.1'
|
6
6
|
spec.authors = ['Daniel J. Berger', 'Park Heesob', 'Hiroshi Hatake']
|
7
7
|
spec.license = 'Artistic-2.0'
|
8
8
|
spec.email = 'djberg96@gmail.com'
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
14
14
|
|
15
15
|
spec.required_ruby_version = '>= 1.8.2'
|
16
|
-
spec.extra_rdoc_files = ['
|
16
|
+
spec.extra_rdoc_files = ['CHANGES', 'MANIFEST', 'ext/win32/api.c']
|
17
17
|
|
18
18
|
spec.add_development_dependency('test-unit', '>= 2.5.0')
|
19
19
|
spec.add_development_dependency('rake')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: test-unit
|
@@ -49,18 +49,20 @@ email: djberg96@gmail.com
|
|
49
49
|
executables: []
|
50
50
|
extensions: []
|
51
51
|
extra_rdoc_files:
|
52
|
-
- README
|
53
52
|
- CHANGES
|
54
53
|
- MANIFEST
|
55
54
|
- ext/win32/api.c
|
56
55
|
files:
|
57
56
|
- CHANGES
|
57
|
+
- Dockerfile
|
58
|
+
- Dockerfile.trunk
|
58
59
|
- Gemfile
|
59
|
-
- Gemfile.lock
|
60
60
|
- MANIFEST
|
61
|
-
- README
|
61
|
+
- README.md
|
62
|
+
- RELEASE.md
|
62
63
|
- Rakefile
|
63
64
|
- appveyor.yml
|
65
|
+
- build-gem.bat
|
64
66
|
- ext/win32/api.c
|
65
67
|
- lib/win32/api.rb
|
66
68
|
- lib/win32/ruby21_32/win32/api.so
|
@@ -77,6 +79,7 @@ files:
|
|
77
79
|
- lib/win32/ruby26_64/win32/api.so
|
78
80
|
- lib/win32/ruby27_32/win32/api.so
|
79
81
|
- lib/win32/ruby27_64/win32/api.so
|
82
|
+
- lib/win32/ruby28_64/win32/api.so
|
80
83
|
- lib/win32/ruby2_32/win32/api.so
|
81
84
|
- lib/win32/ruby2_64/win32/api.so
|
82
85
|
- test/test_win32_api.rb
|
@@ -102,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
105
|
- !ruby/object:Gem::Version
|
103
106
|
version: '0'
|
104
107
|
requirements: []
|
105
|
-
|
106
|
-
rubygems_version: 2.6.13
|
108
|
+
rubygems_version: 3.1.2
|
107
109
|
signing_key:
|
108
110
|
specification_version: 4
|
109
111
|
summary: A superior replacement for Win32API
|
data/Gemfile.lock
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
win32-api (1.8.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
power_assert (1.0.2)
|
10
|
-
rake (12.0.0)
|
11
|
-
test-unit (3.2.5)
|
12
|
-
power_assert
|
13
|
-
|
14
|
-
PLATFORMS
|
15
|
-
x64-mingw32
|
16
|
-
x86-mingw32
|
17
|
-
|
18
|
-
DEPENDENCIES
|
19
|
-
rake
|
20
|
-
test-unit (>= 2.5.0)
|
21
|
-
win32-api!
|
22
|
-
|
23
|
-
BUNDLED WITH
|
24
|
-
1.17.2
|