Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
5633ef53
Commit
5633ef53
authored
Jun 06, 2017
by
Guolin Ke
Browse files
[R] change the search order of lib_lightgbm.dll .
parent
2c9ce598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
R-package/src/install.libs.R
R-package/src/install.libs.R
+9
-9
No files found.
R-package/src/install.libs.R
View file @
5633ef53
...
@@ -7,7 +7,7 @@ use_mingw <- FALSE
...
@@ -7,7 +7,7 @@ use_mingw <- FALSE
if
(
!
use_precompile
)
{
if
(
!
use_precompile
)
{
# Check repository content
# Check repository content
source_dir
<-
paste0
(
R_PACKAGE_SOURCE
,
"/src"
)
source_dir
<-
paste0
(
R_PACKAGE_SOURCE
,
"/src
/
"
)
setwd
(
source_dir
)
setwd
(
source_dir
)
if
(
!
file.exists
(
"_IS_FULL_PACKAGE"
))
{
if
(
!
file.exists
(
"_IS_FULL_PACKAGE"
))
{
...
@@ -29,14 +29,14 @@ if (!use_precompile) {
...
@@ -29,14 +29,14 @@ if (!use_precompile) {
}
}
# Prepare building package
# Prepare building package
build_dir
<-
paste0
(
source_dir
,
"
/
build"
)
build_dir
<-
paste0
(
source_dir
,
"build
/
"
)
dir.create
(
build_dir
,
recursive
=
TRUE
,
showWarnings
=
FALSE
)
dir.create
(
build_dir
,
recursive
=
TRUE
,
showWarnings
=
FALSE
)
setwd
(
build_dir
)
setwd
(
build_dir
)
# Prepare installatio nsteps
# Prepare installatio nsteps
cmake_cmd
<-
"cmake"
cmake_cmd
<-
"cmake"
build_cmd
<-
"make -j"
build_cmd
<-
"make -j"
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"/src"
)
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"/src
/
"
)
if
(
WINDOWS
)
{
if
(
WINDOWS
)
{
if
(
use_mingw
)
{
if
(
use_mingw
)
{
...
@@ -45,7 +45,7 @@ if (!use_precompile) {
...
@@ -45,7 +45,7 @@ if (!use_precompile) {
}
else
{
}
else
{
cmake_cmd
<-
paste0
(
cmake_cmd
,
" -DCMAKE_GENERATOR_PLATFORM=x64 "
)
cmake_cmd
<-
paste0
(
cmake_cmd
,
" -DCMAKE_GENERATOR_PLATFORM=x64 "
)
build_cmd
<-
"cmake --build . --target _lightgbm --config Release"
build_cmd
<-
"cmake --build . --target _lightgbm --config Release"
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"
/
src/Release"
)
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"src/Release
/
"
)
}
}
}
}
...
@@ -56,18 +56,18 @@ if (!use_precompile) {
...
@@ -56,18 +56,18 @@ if (!use_precompile) {
# Install
# Install
system
(
paste0
(
cmake_cmd
,
" .."
))
system
(
paste0
(
cmake_cmd
,
" .."
))
system
(
build_cmd
)
system
(
build_cmd
)
src
<-
paste0
(
lib_folder
,
"
/
lib_lightgbm"
,
SHLIB_EXT
)
src
<-
paste0
(
lib_folder
,
"lib_lightgbm"
,
SHLIB_EXT
)
}
else
{
}
else
{
# Has precompiled package
# Has precompiled package
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"/../"
)
lib_folder
<-
paste0
(
R_PACKAGE_SOURCE
,
"/../"
)
if
(
file.exists
(
paste0
(
lib_folder
,
"lib_lightgbm"
,
SHLIB_EXT
)))
{
if
(
file.exists
(
paste0
(
lib_folder
,
"lib_lightgbm"
,
SHLIB_EXT
)))
{
src
<-
paste0
(
lib_folder
,
"lib_lightgbm"
,
SHLIB_EXT
)
src
<-
paste0
(
lib_folder
,
"lib_lightgbm"
,
SHLIB_EXT
)
}
else
if
(
file.exists
(
paste0
(
lib_folder
,
"
windows/x64/DLL
/lib_lightgbm"
,
SHLIB_EXT
)))
{
}
else
if
(
file.exists
(
paste0
(
lib_folder
,
"
Release
/lib_lightgbm"
,
SHLIB_EXT
))){
src
<-
paste0
(
lib_folder
,
"
windows/x64/DLL
/lib_lightgbm"
,
SHLIB_EXT
)
src
<-
paste0
(
lib_folder
,
"
Release
/lib_lightgbm"
,
SHLIB_EXT
)
}
else
{
}
else
{
src
<-
paste0
(
lib_folder
,
"
Release
/lib_lightgbm"
,
SHLIB_EXT
)
# Expected result: installation will fail if it is not here or any other
src
<-
paste0
(
lib_folder
,
"
windows/x64/DLL
/lib_lightgbm"
,
SHLIB_EXT
)
# Expected result: installation will fail if it is not here or any other
}
}
}
}
...
...
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