Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
7ab5353f
Unverified
Commit
7ab5353f
authored
4 years ago
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
4 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4960 from Reckordp/BuildAndroid
Validate windows by Dir testing
parents
3cef380b
d7df30bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
35 deletions
+14
-35
lib/mruby/gem.rb
lib/mruby/gem.rb
+9
-0
mrbgems/mruby-io/mrbgem.rake
mrbgems/mruby-io/mrbgem.rake
+2
-20
mrbgems/mruby-socket/mrbgem.rake
mrbgems/mruby-socket/mrbgem.rake
+3
-15
No files found.
lib/mruby/gem.rb
View file @
7ab5353f
...
@@ -106,6 +106,15 @@ module MRuby
...
@@ -106,6 +106,15 @@ module MRuby
define_gem_init_builder
if
@generate_functions
define_gem_init_builder
if
@generate_functions
end
end
def
for_windows?
if
build
.
kind_of?
(
MRuby
::
CrossBuild
)
return
%w(x86_64-w64-mingw32 i686-w64-mingw32)
.
include?
(
build
.
host_target
)
elsif
build
.
kind_of?
(
MRuby
::
Build
)
return
(
'A'
..
'Z'
).
to_a
.
any?
{
|
vol
|
Dir
.
exist?
(
"
#{
vol
}
:"
)
}
end
return
false
end
def
add_dependency
(
name
,
*
requirements
)
def
add_dependency
(
name
,
*
requirements
)
default_gem
=
requirements
.
last
.
kind_of?
(
Hash
)
?
requirements
.
pop
:
nil
default_gem
=
requirements
.
last
.
kind_of?
(
Hash
)
?
requirements
.
pop
:
nil
requirements
=
[
'>= 0.0.0'
]
if
requirements
.
empty?
requirements
=
[
'>= 0.0.0'
]
if
requirements
.
empty?
...
...
This diff is collapsed.
Click to expand it.
mrbgems/mruby-io/mrbgem.rake
View file @
7ab5353f
...
@@ -5,26 +5,8 @@ MRuby::Gem::Specification.new('mruby-io') do |spec|
...
@@ -5,26 +5,8 @@ MRuby::Gem::Specification.new('mruby-io') do |spec|
spec
.
cc
.
include_paths
<<
"
#{
build
.
root
}
/src"
spec
.
cc
.
include_paths
<<
"
#{
build
.
root
}
/src"
case
RUBY_PLATFORM
if
for_windows?
when
/mingw|mswin|msys/
spec
.
linker
.
libraries
<<
"ws2_32"
really_for_window
=
true
if
build
.
kind_of?
(
MRuby
::
CrossBuild
)
if
%w(x86_64-w64-mingw32 i686-w64-mingw32)
.
include?
(
build
.
host_target
)
really_for_window
=
true
else
really_for_window
=
false
end
end
if
really_for_window
spec
.
linker
.
libraries
+=
[
'Ws2_32'
]
#spec.cc.include_paths += ["C:/Windows/system/include"]
spec
.
linker
.
library_paths
+=
[
"C:/Windows/system"
]
end
end
if
build
.
kind_of?
(
MRuby
::
CrossBuild
)
&&
%w(x86_64-w64-mingw32 i686-w64-mingw32)
.
include?
(
build
.
host_target
)
spec
.
linker
.
libraries
+=
[
'ws2_32'
]
end
end
spec
.
add_test_dependency
'mruby-time'
,
core:
'mruby-time'
spec
.
add_test_dependency
'mruby-time'
,
core:
'mruby-time'
end
end
This diff is collapsed.
Click to expand it.
mrbgems/mruby-socket/mrbgem.rake
View file @
7ab5353f
...
@@ -7,22 +7,10 @@ MRuby::Gem::Specification.new('mruby-socket') do |spec|
...
@@ -7,22 +7,10 @@ MRuby::Gem::Specification.new('mruby-socket') do |spec|
#spec.cc.defines << "HAVE_SA_LEN=0"
#spec.cc.defines << "HAVE_SA_LEN=0"
# If Windows, use winsock
# If Windows, use winsock
if
(
/mswin|mingw|win32/
=~
RUBY_PLATFORM
)
then
if
for_windows?
really_for_window
=
true
if
build
.
kind_of?
(
MRuby
::
CrossBuild
)
if
%w(x86_64-w64-mingw32 i686-w64-mingw32)
.
include?
(
build
.
host_target
)
really_for_window
=
true
else
really_for_window
=
false
end
end
if
really_for_window
spec
.
linker
.
libraries
<<
"wsock32"
spec
.
linker
.
libraries
<<
"wsock32"
spec
.
linker
.
libraries
<<
"ws2_32"
spec
.
linker
.
libraries
<<
"ws2_32"
end
end
end
spec
.
add_dependency
(
'mruby-io'
,
:core
=>
'mruby-io'
)
spec
.
add_dependency
(
'mruby-io'
,
:core
=>
'mruby-io'
)
spec
.
add_dependency
(
'mruby-pack'
,
:core
=>
'mruby-pack'
)
spec
.
add_dependency
(
'mruby-pack'
,
:core
=>
'mruby-pack'
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment