Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
Enabling implicit appbase (dnx . run -> dnx run)
Browse files Browse the repository at this point in the history
Before providing appbase folder was necessary. Now we don't expect a folder anymore but assume that the current folder is the appbase folder. The only exception is where for backwards compatibility we continue to recognize `.` (so `dnx . run` continues to work). If the user really wants to provide a folder that is not the current folder they need to use the --appbase parameter.

Fixes #1403
  • Loading branch information
moozzyk committed Jul 22, 2015
1 parent 3636913 commit 4020269
Show file tree
Hide file tree
Showing 16 changed files with 367 additions and 270 deletions.
2 changes: 0 additions & 2 deletions makefile.shade
Expand Up @@ -364,7 +364,6 @@ var CAN_BUILD_ONECORE = '${Directory.Exists(WIN10_SDK_LIB) && Directory.GetFiles
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "pal.unix.cpp"),
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "pal.linux.cpp"),
Path.Combine("src", BOOTSTRAPPER_COMMON_FOLDER_NAME, "utils.cpp"),
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "tchar.cpp"),
};

Directory.CreateDirectory(soOutputDir);
Expand Down Expand Up @@ -405,7 +404,6 @@ var CAN_BUILD_ONECORE = '${Directory.Exists(WIN10_SDK_LIB) && Directory.GetFiles
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "pal.unix.cpp"),
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "pal.darwin.cpp"),
Path.Combine("src", BOOTSTRAPPER_COMMON_FOLDER_NAME, "utils.cpp"),
Path.Combine("src", BOOTSTRAPPER_FOLDER_NAME, "tchar.cpp"),
};

Directory.CreateDirectory(soOutputDir);
Expand Down
2 changes: 0 additions & 2 deletions src/dnx.common/include/utils.h
Expand Up @@ -16,8 +16,6 @@ namespace dnx
dnx::xstring_t to_xstring_t(const std::wstring& s);
std::wstring to_wstring(const std::string& s);

bool strings_equal_ignore_case(const char_t* s1, const char_t* s2);

dnx::xstring_t path_combine(const dnx::xstring_t& path1, const dnx::xstring_t& path2);
bool file_exists(const dnx::xstring_t& path);
dnx::xstring_t remove_file_from_path(const dnx::xstring_t& path);
Expand Down
4 changes: 4 additions & 0 deletions src/dnx.common/include/xplat.h
Expand Up @@ -18,6 +18,8 @@ typedef std::wstring xstring_t;

#define PATH_SEPARATOR L"\\"

#define x_strlen wcslen

#else // non-windows

typedef char char_t;
Expand All @@ -27,5 +29,7 @@ typedef std::string xstring_t;

#define PATH_SEPARATOR "/"

#define x_strlen strlen

#endif
}
11 changes: 0 additions & 11 deletions src/dnx.common/utils.cpp
Expand Up @@ -11,8 +11,6 @@
#if defined(_WIN32)
#include <locale>
#include <codecvt>
#else
#include <string.h>
#endif

namespace dnx
Expand Down Expand Up @@ -53,15 +51,6 @@ namespace dnx
}
#endif

bool strings_equal_ignore_case(const char_t* s1, const char_t* s2)
{
#if defined(_WIN32)
return _wcsicmp(s1, s2) == 0;
#else
return strcasecmp(s1, s2) == 0;
#endif
}

bool ends_with_slash(const xstring_t& path)
{
if (path.length() > 0)
Expand Down

0 comments on commit 4020269

Please sign in to comment.