Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lua-language-server-srb2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LJ Sonic
lua-language-server-srb2
Commits
cb85a216
Commit
cb85a216
authored
6 years ago
by
actboy168
Browse files
Options
Downloads
Patches
Plain Diff
修正若干的编译问题
parent
d3f8aa2f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
make.lua
+1
-1
1 addition, 1 deletion
make.lua
make/install.lua
+11
-32
11 additions, 32 deletions
make/install.lua
make/msvc_crt.lua
+0
-56
0 additions, 56 deletions
make/msvc_crt.lua
with
12 additions
and
89 deletions
make.lua
+
1
−
1
View file @
cb85a216
...
...
@@ -56,7 +56,7 @@ if lm.plat ~= 'macos' and lm.plat ~= 'linux' then
end
lm
:
build
'install'
{
'$luamake'
,
'lua'
,
'make/install.lua'
,
'$luamake'
,
'lua'
,
'make/install.lua'
,
lm
.
plat
,
deps
=
{
'lua'
,
'lni'
,
...
...
This diff is collapsed.
Click to expand it.
make/install.lua
+
11
−
32
View file @
cb85a216
local
platform
=
...
local
fs
=
require
'bee.filesystem'
local
sp
=
require
'bee.subprocess'
local
is_macos
=
package.cpath
:
sub
(
-
3
)
==
'.so'
local
platform
=
require
"bee.platform"
local
CWD
=
fs
.
current_path
()
local
output
=
CWD
/
'server'
/
'bin'
local
bindir
=
CWD
/
'build'
/
'msvc'
/
'bin'
local
lib_ext
=
".dll"
local
exc_ext
=
".exe"
if
is_macos
then
bindir
=
CWD
/
'build'
/
'macos'
/
'bin'
lib_ext
=
".so"
exc_ext
=
""
end
if
platform
.
OS
==
"Linux"
then
bindir
=
CWD
/
'build'
/
'linux'
/
'bin'
lib_ext
=
".so"
exc_ext
=
""
end
local
bindir
=
CWD
/
'build'
/
platform
/
'bin'
local
exe
=
platform
==
'msvc'
and
".exe"
or
""
local
dll
=
platform
==
'msvc'
and
".dll"
or
".so"
fs
.
create_directories
(
output
)
fs
.
copy_file
(
bindir
/
'lni'
..
lib_ext
,
output
/
'lni'
..
lib_ext
,
true
)
fs
.
copy_file
(
bindir
/
'lpeglabel'
..
lib_ext
,
output
/
'lpeglabel'
..
lib_ext
,
true
)
fs
.
copy_file
(
bindir
/
'bee'
..
lib_ext
,
output
/
'bee'
..
lib_ext
,
true
)
fs
.
copy_file
(
bindir
/
'lua'
..
ex
c_ext
,
output
/
'lua-language-server'
..
ex
c_ext
,
true
)
fs
.
copy_file
(
bindir
/
'lni'
..
dll
,
output
/
'lni'
..
dll
,
true
)
fs
.
copy_file
(
bindir
/
'lpeglabel'
..
dll
,
output
/
'lpeglabel'
..
dll
,
true
)
fs
.
copy_file
(
bindir
/
'bee'
..
dll
,
output
/
'bee'
..
dll
,
true
)
fs
.
copy_file
(
bindir
/
'lua'
..
ex
e
,
output
/
'lua-language-server'
..
ex
e
,
true
)
if
not
is_macos
and
platform
.
OS
~=
"Linux"
then
fs
.
copy_file
(
bindir
/
'lua54'
..
lib_ext
,
output
/
'lua54'
..
lib_ext
,
true
)
end
if
platform
==
'msvc'
then
fs
.
copy_file
(
bindir
/
'lua54'
..
dll
,
output
/
'lua54'
..
dll
,
true
)
require
'msvc'
.
copy_crtdll
(
'x64'
,
output
)
if
not
is_macos
and
platform
.
OS
~=
"Linux"
then
local
process
=
assert
(
sp
.
spawn
{
bindir
/
'rcedit.exe'
,
output
/
'lua-language-server.exe'
,
...
...
@@ -43,7 +25,4 @@ if not is_macos and platform.OS ~= "Linux" then
CWD
/
'images'
/
'icon.ico'
})
assert
(
process
:
wait
())
local
msvc_crt
=
dofile
'make/msvc_crt.lua'
msvc_crt
(
'x86'
,
output
)
end
This diff is collapsed.
Click to expand it.
make/msvc_crt.lua
deleted
100644 → 0
+
0
−
56
View file @
d3f8aa2f
require
'bee'
local
sp
=
require
'bee.subprocess'
local
fs
=
require
'bee.filesystem'
local
registry
=
require
'bee.registry'
local
vswhere
=
fs
.
path
(
os.getenv
(
'ProgramFiles(x86)'
))
/
'Microsoft Visual Studio'
/
'Installer'
/
'vswhere.exe'
local
function
strtrim
(
str
)
return
str
:
gsub
(
"^%s*
(
.-
)
%s*$"
,
"%1"
)
end
local
InstallDir
=
(
function
()
local
process
=
assert
(
sp
.
spawn
{
vswhere
,
'-latest'
,
'-products'
,
'*'
,
'-requires'
,
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
,
'-property'
,
'installationPath'
,
stdout
=
true
,
})
local
result
=
strtrim
(
process
.
stdout
:
read
'a'
)
process
.
stdout
:
close
()
process
:
wait
()
assert
(
result
~=
""
,
"can't find msvc."
)
return
fs
.
path
(
result
)
end
)()
local
RedistVersion
=
(
function
()
local
verfile
=
InstallDir
/
'VC'
/
'Auxiliary'
/
'Build'
/
'Microsoft.VCRedistVersion.default.txt'
local
f
=
assert
(
io.open
(
verfile
:
string
(),
'r'
))
local
r
=
f
:
read
'a'
f
:
close
()
return
strtrim
(
r
)
end
)()
local
function
crtpath
(
platform
)
return
InstallDir
/
'VC'
/
'Redist'
/
'MSVC'
/
RedistVersion
/
platform
/
'Microsoft.VC142.CRT'
end
local
function
sdkpath
()
local
reg
=
registry
.
open
[[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots]]
return
fs
.
path
(
reg
.
KitsRoot10
)
end
local
function
ucrtpath
(
platform
)
return
sdkpath
()
/
'Redist'
/
'ucrt'
/
'DLLs'
/
platform
end
return
function
(
platform
,
target
)
fs
.
create_directories
(
target
)
fs
.
copy_file
(
crtpath
(
platform
)
/
'msvcp140.dll'
,
target
/
'msvcp140.dll'
,
true
)
fs
.
copy_file
(
crtpath
(
platform
)
/
'vcruntime140.dll'
,
target
/
'vcruntime140.dll'
,
true
)
for
dll
in
ucrtpath
(
platform
):
list_directory
()
do
fs
.
copy_file
(
dll
,
target
/
dll
:
filename
(),
true
)
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment