From 4cb812b408d75c0e2941106c2e525611e6ffdc89 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 23 Aug 2019 16:14:33 +0800 Subject: fix path resolve --- xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props index df0b5f9e5..f0ee8495e 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props @@ -7,9 +7,9 @@ $(XmakeScriptDir) + $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProgramDirResolved)')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProjectDirResolved)')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeScriptDirResolved)')) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeBuilDirResolved)')) $([System.IO.Path]::GetFullPath('$(XmakeProgramDirResolved)')) -- cgit v1.3.1 From 64b44bca46aa238b9135053bec990fe4f6f74855 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 23 Aug 2019 16:25:36 +0800 Subject: add show output --- xmake/plugins/project/vsxmake/vsproj/Xmake.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets index 81efe2b9b..811a00b1d 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets @@ -155,6 +155,7 @@ MSBuild Properties: XmakeVerbose: $(XmakeVerbose) XmakeDiagnosis: $(XmakeDiagnosis) XmakeRebuildFile: $(XmakeRebuildFile) + XmakeCleanAll: $(XmakeCleanAll) XmakeCommonFlags: $(XmakeCommonFlags) XmakeConfigFlags: $(XmakeConfigFlags) XmakeBuildFlags: $(XmakeBuildFlags) -- cgit v1.3.1 From dbfd0769b9d840da2b3ec38bcc80bb3aa977fc31 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 23 Aug 2019 16:40:18 +0800 Subject: fix escape; remove duplicate resolve --- xmake/plugins/project/vsxmake/getinfo.lua | 2 +- xmake/plugins/project/vsxmake/vsproj/Xmake.targets | 13 +++++-------- .../vsxmake/vsproj/templates/vcxproj/#target#.vcxproj | 12 +++++++----- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 8cfe46591..149df6721 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -267,7 +267,7 @@ function main(outputdir, vsinfo) -- init solution directory vsinfo.solution_dir = path.absolute(path.join(outputdir, "vsxmake" .. vsinfo.vstudio_version)) - vsinfo.programdir = xmake.programdir() + vsinfo.programdir = _make_dirs(xmake.programdir()) vsinfo.projectdir = project.directory() vsinfo.sln_projectfile = path.relative(project.file(), vsinfo.solution_dir) local projectfile = path.filename(project.file()) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets index 811a00b1d..62639139d 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets @@ -8,9 +8,6 @@ - $(XmakeProgramDir) - $(XmakeProjectDir) - $(XmakeScriptDir) $(XmakeBuilDir) $(XmakeTargetDir) $(XmakeConfigDir) @@ -18,8 +15,6 @@ $(XmakeRunDir) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProjectDirResolved)')) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeScriptDirResolved)')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeBuilDirResolved)')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeTargetDirResolved)')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeConfigDirResolved)')) @@ -27,14 +22,16 @@ $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeRunDirResolved)')) - $([System.IO.Path]::GetFullPath('$(XmakeProgramDirResolved)/')) - $([System.IO.Path]::GetFullPath('$(XmakeProjectDirResolved)/')) - $([System.IO.Path]::GetFullPath('$(XmakeScriptDirResolved)/')) $([System.IO.Path]::GetFullPath('$(XmakeBuilDirResolved)/')) $([System.IO.Path]::GetFullPath('$(XmakeTargetDirResolved)/')) $([System.IO.Path]::GetFullPath('$(XmakeConfigDirResolved)/')) $([System.IO.Path]::GetFullPath('$(XmakeConfigFileDirResolved)/')) $([System.IO.Path]::GetFullPath('$(XmakeRunDirResolved)/')) + + + $([System.IO.Path]::GetFullPath('$(XmakeProgramDir)/')) + $([System.IO.Path]::GetFullPath('$(XmakeProjectDir)/')) + $([System.IO.Path]::GetFullPath('$(XmakeScriptDir)/')) diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj index cb47d68db..45fcab98b 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj @@ -16,8 +16,6 @@ {#target_id#} - $(XMAKE_PROGRAM_DIR) - #programdir# release Win32 #scriptdir# @@ -25,10 +23,14 @@ #projectfile# #target# - + + $(XMAKE_PROGRAM_DIR) + #programdir# + + #Import(XmakeConfig)# #Import(XmakePath)# - + #Import(Include)# @@ -50,5 +52,5 @@ - + -- cgit v1.3.1 From 9943cbae2e39a219cd5f889802d9db11aaefda5c Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 23 Aug 2019 16:42:13 +0800 Subject: use privete var --- .../project/vsxmake/vsproj/Xmake.Defaults.props | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props index f0ee8495e..29359c951 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.Defaults.props @@ -2,19 +2,19 @@ - $(XmakeProgramDir) - $(XmakeProjectDir) - $(XmakeScriptDir) + <_XmakeProgramDir>$(XmakeProgramDir) + <_XmakeProjectDir>$(XmakeProjectDir) + <_XmakeScriptDir>$(XmakeScriptDir) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProgramDirResolved)')) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProjectDirResolved)')) - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeScriptDirResolved)')) + <_XmakeProgramDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeProgramDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeProgramDir)')) + <_XmakeProjectDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeProjectDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeProjectDir)')) + <_XmakeScriptDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeScriptDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeScriptDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeProgramDirResolved)')) - $([System.IO.Path]::GetFullPath('$(XmakeProjectDirResolved)')) - $([System.IO.Path]::GetFullPath('$(XmakeScriptDirResolved)')) + $([System.IO.Path]::GetFullPath('$(_XmakeProgramDir)')) + $([System.IO.Path]::GetFullPath('$(_XmakeProjectDir)')) + $([System.IO.Path]::GetFullPath('$(_XmakeScriptDir)')) -- cgit v1.3.1