-
Notifications
You must be signed in to change notification settings - Fork 228
Conversation
8cb6aeb
to
b084ed5
Compare
int nLastSeparatorIndex = LastPathSeparatorIndex(pszPath); | ||
if (nLastSeparatorIndex < 0) | ||
{ | ||
StringCchCopyW(pszParentDir, MAX_PATH, L"."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strcpy_s() works for char arrays but we need the version for wide char (WCHAR) arrays. The secure version of lstrcpy() is StringCchCopyW()
:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647490(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647527(v=vs.85).aspx
One thing we need to do is merge the help between the lower layer and apphost, klr -> Shows help for the klr.exe The latter is kind of weird so we should try to make this transparent so that klr --help just shows all the options. |
@@ -59,6 +59,7 @@ public Task<int> Main(string[] args) | |||
#else | |||
string applicationBaseDirectory = AppContext.BaseDirectory; | |||
#endif | |||
Console.WriteLine("!!! AppBase: " + applicationBaseDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, we really want to print three !
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a temporary backup and that line was for testing & debugging. Please check the latest commit.
61345d3
to
f4a9521
Compare
c7d05e3
to
1e37c80
Compare
Nice! |
I would suggest that we do #1071 in this PR because help info of klr on Mono now is
|
b5cb622
to
531b91b
Compare
Added --appbase for klr on Mono.
@davidfowl , please check the latest commit and sign off. |
531b91b
to
a1f1a8e
Compare
- klr /path/App.dll --> klr --appbase /path/ /path/App.dll - klr /path/project.json run --> klr --appbase /path/ Microsoft.Framework.ApplicationHost run - klr /path/ run --> klr --appbase /path/ Microsoft.Framework.ApplicationHost run - Fix formatted output of WCHAR strings - Avoid empty string in lib search paths - Merge help info of klr and ApplicationHost - Add '--appbase' for klr on Mono
a1f1a8e
to
5d8e121
Compare
parent #1013 #1071
RuntimeBootstrapper
already does the following expansion:klr /path/to/MyApplication.dll
--->klr --lib /path/to/ MyApplication
.So we only need to generate
--appbase /path/to/
part in this case(See https://github.com/aspnet/KRuntime/blob/dev/src/klr.hosting.shared/RuntimeBootstrapper.cs#L298)
src/klr.mono.managed/EntryPoint.cs
to do the expansion on Mono is much more easier. We can even add--appbase
for klr on Mono inEntryPoint.cs
if we want it.