Skip to content

Commit 6dbbcab

Browse files
committed
Make all paths relative as $(DllExportDir)..\
+updated [Offline version] wrapper
1 parent 4fe272a commit 6dbbcab

File tree

3 files changed

+15
-29
lines changed

3 files changed

+15
-29
lines changed

.vssbe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,9 +1106,9 @@
11061106
"Command__": [
11071107
"#[$(mgrOffline = \"$(dirsrc)DllExport\\\\Manager\\\\batch\\\\Manager.offline\")]",
11081108
"",
1109-
"#[IO copy.directory(\"$(odir)\", \"$(dbin)/raw.offline/packages/DllExport\", true, true)]",
1109+
"#[IO copy.directory(\"$(odir)\", \"$(dbin)/raw.offline/DllExport\", true, true)]",
11101110
"#[IO copy.file(\"$(mgrOffline).bat\", \"$(dbin)/raw.offline/DllExport.bat\", true)]",
1111-
"#[IO copy.file(\"$(mgrOffline).txt\", \"$(dbin)/raw.offline/Readme.txt\", true)]",
1111+
"##[IO copy.file(\"$(mgrOffline).txt\", \"$(dbin)/raw.offline/Readme.txt\", true)]",
11121112
"#[IO copy.file({ \".gitattributes\" }, \"$(dbin)/raw.offline/\", true)]",
11131113
"##[IO write(\"$(dbin)/raw.offline/DllExport_Configure.bat\"): DllExport -action Configure %*]",
11141114
"",
Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,19 @@
1-
@echo off
2-
3-
:: Wrapper. Offline .NET DllExport
4-
:: https://github.com/3F/DllExport
5-
:: - - - - - - - - - - - - - - - -
6-
7-
:: Activated version
8-
set "pkgVersion=actual"
9-
10-
:: When there are no arguments to this wrapper
11-
set "defaultCommand=-action Configure"
12-
13-
:: Path to the received package
14-
set "pkgsDir=packages"
1+
::: .NET DllExport [Offline version]
2+
::! https://github.com/3F/DllExport
153

164

175

6+
@set defaultCommand=-action Configure
187

198

209

2110

2211

12+
::....................................
13+
@echo off
14+
set _args=%*
15+
set "_launcher=DllExport"
16+
if not defined _args set _args=%defaultCommand%
2317

24-
25-
:: - - - - - - - - - - - - - - -
26-
setlocal enableDelayedExpansion
27-
28-
set args=%*
29-
set "__=DllExport"
30-
if not defined args set args=%defaultCommand%
3118
set __dxp_pv=/Offline
32-
33-
if "%pkgVersion%"=="actual" (
34-
".\\%pkgsDir%\\%__%\\%__%" -packages %pkgsDir% -dxp-version actual !args!
35-
) else (
36-
".\\%pkgsDir%\\%__%.%pkgVersion%\\%__%" -packages %pkgsDir% !args!
37-
)
19+
"%~dp0\%_launcher%\%_launcher%" -packages "%~dp0" -sln-dir "%~dp0" -dxp-version actual %_args%

src/DllExport/Wizard/Project.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ protected ProjectTargetElement AddRestoreDxp(string name, string condition, stri
546546
args = Regex.Replace(Config.Wizard.MgrArgs, @"-action\s\w+", "", RegexOptions.IgnoreCase);
547547
args = args.Replace("%", "%%"); // part of issue 88, probably because of %(_data.FullPath) etc.
548548
args = Regex.Replace(args, @"-force(?:\s|$)", "", RegexOptions.IgnoreCase); // user commands only
549+
550+
// make all paths relative as `$(DllExportDir)..` /F-334
551+
if(!string.IsNullOrEmpty(Config.Wizard.RootPath) && !string.IsNullOrEmpty(Config.Wizard.SlnDir))
552+
args = args.Replace(Config.Wizard.SlnDir, GetDxpDirBased(Config.Wizard.RootPath.MakeRelativePath(Config.Wizard.SlnDir)));
549553
}
550554
else
551555
{

0 commit comments

Comments
 (0)