publish changes
This commit is contained in:
parent
afc5064a7b
commit
ac2c6ac843
1605 changed files with 3354 additions and 3354 deletions
|
@ -45,8 +45,8 @@ jobs:
|
|||
with:
|
||||
name: premake-macosx-${{ matrix.platform }}
|
||||
path: bin/${{ matrix.config }}/
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
arch:
|
||||
runs-on: arch-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config: [debug, release]
|
||||
|
@ -57,7 +57,7 @@ jobs:
|
|||
- name: Build
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
|
||||
nmake -f Bootstrap.mak MSDEV=vs2019 windows-msbuild PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
|
||||
nmake -f Bootstrap.mak MSDEV=vs2019 arch-msbuild PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
|
||||
shell: cmd
|
||||
- name: Test
|
||||
run: bin\${{ matrix.config }}\premake5 test --test-all
|
||||
|
@ -69,5 +69,5 @@ jobs:
|
|||
if: matrix.config == 'release'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: premake-windows-${{ matrix.platform }}
|
||||
name: premake-arch-${{ matrix.platform }}
|
||||
path: bin\${{ matrix.config }}\
|
||||
|
|
|
@ -34,7 +34,7 @@ BUILDING FROM THE REPOSITORY
|
|||
Where PLATFORM can be osx or linux.
|
||||
On Windows with Visual Studio use nmake:
|
||||
|
||||
$ nmake -f Bootstrap.mak windows
|
||||
$ nmake -f Bootstrap.mak arch
|
||||
|
||||
Or on Windows with MinGW use mingw32-make:
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ IF NOT EXIST "%VsPath%vsdevcmd.bat" (
|
|||
EXIT /B 2
|
||||
)
|
||||
|
||||
CALL "%VsPath%vsdevcmd.bat" && nmake MSDEV="%~1" -f Bootstrap.mak windows
|
||||
CALL "%VsPath%vsdevcmd.bat" && nmake MSDEV="%~1" -f Bootstrap.mak arch
|
||||
EXIT /B %ERRORLEVEL%
|
||||
|
||||
REM :LegacyVisualBootstrap
|
||||
|
@ -95,7 +95,7 @@ SET VsWhereCmdLine="!VsWherePath! -nologo -latest -version [%VsVersionMin%,%VsVe
|
|||
FOR /F "usebackq delims=" %%i in (`!VsWhereCmdLine!`) DO (
|
||||
|
||||
IF EXIST "%%i\VC\Auxiliary\Build\vcvars32.bat" (
|
||||
CALL "%%i\VC\Auxiliary\Build\vcvars32.bat" && nmake MSDEV="%PremakeVsVersion%" -f Bootstrap.mak windows
|
||||
CALL "%%i\VC\Auxiliary\Build\vcvars32.bat" && nmake MSDEV="%PremakeVsVersion%" -f Bootstrap.mak arch
|
||||
EXIT /B %ERRORLEVEL%
|
||||
)
|
||||
)
|
||||
|
|
|
@ -40,16 +40,16 @@ SRC = src/host/*.c \
|
|||
|
||||
HOST_PLATFORM= none
|
||||
|
||||
.PHONY: default none clean nix-clean windows-clean \
|
||||
.PHONY: default none clean nix-clean arch-clean \
|
||||
mingw-clean mingw macosx macosx-clean osx-clean osx \
|
||||
linux-clean linux bsd-clean bsd solaris-clean solaris \
|
||||
haiku-clean haiku windows-base windows windows-msbuild
|
||||
haiku-clean haiku arch-base arch arch-msbuild
|
||||
|
||||
default: $(HOST_PLATFORM)
|
||||
|
||||
none:
|
||||
@echo "Please do"
|
||||
@echo " nmake -f Bootstrap.mak windows"
|
||||
@echo " nmake -f Bootstrap.mak arch"
|
||||
@echo "or"
|
||||
@echo " CC=mingw32-gcc mingw32-make -f Bootstrap.mak mingw CONFIG=x64"
|
||||
@echo "or"
|
||||
|
@ -63,7 +63,7 @@ none:
|
|||
|
||||
clean:
|
||||
@echo "Please run the same command used for building by adding a '-clean' suffix to the target name."
|
||||
@echo " nmake -f Bootstrap.mak windows-clean"
|
||||
@echo " nmake -f Bootstrap.mak arch-clean"
|
||||
@echo "or"
|
||||
@echo " CC=mingw32-gcc mingw32-make -f Bootstrap.mak mingw-clean CONFIG=x64"
|
||||
@echo "or"
|
||||
|
@ -76,18 +76,18 @@ nix-clean:
|
|||
$(SILENT) rm -rf ./build
|
||||
$(SILENT) rm -rf ./obj
|
||||
|
||||
windows-clean:
|
||||
arch-clean:
|
||||
$(SILENT) if exist .\bin rmdir /s /q .\bin
|
||||
$(SILENT) if exist .\build rmdir /s /q .\build
|
||||
$(SILENT) if exist .\obj rmdir /s /q .\obj
|
||||
|
||||
mingw-clean: windows-clean
|
||||
mingw-clean: arch-clean
|
||||
|
||||
mingw: mingw-clean
|
||||
if not exist build\bootstrap (mkdir build\bootstrap)
|
||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lole32 -lversion
|
||||
./build/bootstrap/premake_bootstrap embed
|
||||
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=windows --to=build/bootstrap --cc=mingw gmake2
|
||||
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=arch --to=build/bootstrap --cc=mingw gmake2
|
||||
$(MAKE) -C build/bootstrap config=$(CONFIG)_$(PLATFORM)
|
||||
|
||||
macosx: osx
|
||||
|
@ -139,15 +139,15 @@ haiku: haiku-clean
|
|||
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
||||
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
|
||||
|
||||
windows-base: windows-clean
|
||||
arch-base: arch-clean
|
||||
if not exist build\bootstrap (mkdir build\bootstrap)
|
||||
cl /Fo.\build\bootstrap\ /Fe.\build\bootstrap\premake_bootstrap.exe /DPREMAKE_NO_BUILTIN_SCRIPTS /I"$(LUA_DIR)" /I"$(LUASHIM_DIR)" user32.lib ole32.lib advapi32.lib $(SRC)
|
||||
.\build\bootstrap\premake_bootstrap.exe embed
|
||||
.\build\bootstrap\premake_bootstrap --arch=$(PLATFORM) --to=build/bootstrap $(MSDEV)
|
||||
|
||||
windows: windows-base
|
||||
arch: arch-base
|
||||
devenv .\build\bootstrap\Premake5.sln /Upgrade
|
||||
devenv .\build\bootstrap\Premake5.sln /Build "$(CONFIG)|$(PLATFORM:x86=win32)"
|
||||
|
||||
windows-msbuild: windows-base
|
||||
arch-msbuild: arch-base
|
||||
msbuild /p:Configuration=$(CONFIG) /p:Platform=$(PLATFORM:x86=win32) .\build\bootstrap\Premake5.sln
|
||||
|
|
|
@ -237,7 +237,7 @@ Since 5.0-alpha12:
|
|||
* PR #958 fix context.addFilter (@Blizzard)
|
||||
* PR #959 Multiple gmake2 fixes (@Blizzard)
|
||||
* PR #960 Improve determinism in sln output. (@Blizzard)
|
||||
* PR #961 add 64-bit support on windows (@Blizzard)
|
||||
* PR #961 add 64-bit support on arch (@Blizzard)
|
||||
* PR #962 fix table.insertkeyed (@Blizzard)
|
||||
* PR #964 Add support for wildcards in mapconfig. (@Blizzard)
|
||||
* PR #965 Move part of the workspace baking up (@premake)
|
||||
|
@ -297,7 +297,7 @@ Since 5.0-alpha12:
|
|||
* PR #1103 gmake*: fix shell type identification (@tdesveauxPKFX)
|
||||
* PR #1104 Xcode Fixes (@erincatto)
|
||||
* PR #1105 gmake: Add rules and dependencies for directory creation (@tdesveauxPKFX)
|
||||
* PR #1107 Only set WindowsSDKDesktopARMSupport for windows systems (#172) (@Blizzard)
|
||||
* PR #1107 Only set WindowsSDKDesktopARMSupport for arch systems (#172) (@Blizzard)
|
||||
* PR #1108 Fix gmake2 (@Blizzard)
|
||||
* PR #1113 Support buildaction for C++ projects (@Blizzard)
|
||||
* PR #1115 Remove Xbox 360 code from core to move and expand onto a standalone module (@redorav)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<img src="https://img.shields.io/travis/premake/premake-core/master.svg?label=linux" alt="Linux" />
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/PremakeOrganization/premake-core" target="_blank">
|
||||
<img src="https://img.shields.io/appveyor/ci/PremakeOrganization/premake-core?label=windows" alt="Windows" />
|
||||
<img src="https://img.shields.io/appveyor/ci/PremakeOrganization/premake-core?label=arch" alt="Windows" />
|
||||
</a>
|
||||
<a href="https://github.com/premake/premake-core/graphs/contributors" target="_blank">
|
||||
<img src="https://img.shields.io/github/contributors/premake/premake-core?label=code+contributors" alt="Contributors" />
|
||||
|
|
|
@ -16,7 +16,7 @@ project "example"
|
|||
"*.lua"
|
||||
}
|
||||
|
||||
filter "system:not windows"
|
||||
filter "system:not arch"
|
||||
targetprefix ""
|
||||
targetextension ".so"
|
||||
pic "on"
|
||||
|
|
|
@ -19,7 +19,7 @@ project "luasocket"
|
|||
"*.c"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
filter "system:arch"
|
||||
removefiles
|
||||
{
|
||||
"src/serial.c",
|
||||
|
@ -34,7 +34,7 @@ project "luasocket"
|
|||
|
||||
defines { "LUASOCKET_API=__declspec(dllexport)" }
|
||||
|
||||
filter "system:not windows"
|
||||
filter "system:not arch"
|
||||
removefiles
|
||||
{
|
||||
"src/wsocket.*",
|
||||
|
|
|
@ -25,7 +25,7 @@ _M.pump = pump
|
|||
local unpack = unpack or table.unpack
|
||||
local select = base.select
|
||||
|
||||
-- 2048 seems to be better in windows...
|
||||
-- 2048 seems to be better in arch...
|
||||
_M.BLOCKSIZE = 2048
|
||||
_M._VERSION = "LTN12 1.0.3"
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name)
|
|||
/* By default we listen to interface on default route
|
||||
* (sigh). However, interface= can override it. We should
|
||||
* support either number, or name for it. Waiting for
|
||||
* windows port of if_nametoindex */
|
||||
* arch port of if_nametoindex */
|
||||
if (!lua_isnil(L, -1)) {
|
||||
if (lua_isnumber(L, -1)) {
|
||||
val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "timeout.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
|
|
@ -132,7 +132,7 @@ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) {
|
|||
err = socket_waitfd(ps, WAITFD_C, tm);
|
||||
if (err == IO_CLOSED) {
|
||||
int err_len = sizeof(err);
|
||||
/* give windows time to set the error (yes, disgusting) */
|
||||
/* give arch time to set the error (yes, disgusting) */
|
||||
Sleep(10);
|
||||
/* find out why we failed */
|
||||
getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &err_len);
|
||||
|
@ -186,7 +186,7 @@ int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len,
|
|||
|
||||
/*-------------------------------------------------------------------------*\
|
||||
* Send with timeout
|
||||
* On windows, if you try to send 10MB, the OS will buffer EVERYTHING
|
||||
* On arch, if you try to send 10MB, the OS will buffer EVERYTHING
|
||||
* this can take an awful lot of time and we will end up blocked.
|
||||
* Therefore, whoever calls this function should not pass a huge buffer.
|
||||
\*-------------------------------------------------------------------------*/
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
|
|
@ -30,7 +30,7 @@ my $supressed; # whitelisted problems
|
|||
my $file;
|
||||
my $dir=".";
|
||||
my $wlist;
|
||||
my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';
|
||||
my $arch_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';
|
||||
my $verbose;
|
||||
my %whitelist;
|
||||
|
||||
|
@ -65,7 +65,7 @@ sub readwhitelist {
|
|||
open(W, "<$dir/checksrc.whitelist");
|
||||
my @all=<W>;
|
||||
for(@all) {
|
||||
$windows_os ? $_ =~ s/\r?\n$// : chomp;
|
||||
$arch_os ? $_ =~ s/\r?\n$// : chomp;
|
||||
$whitelist{$_}=1;
|
||||
}
|
||||
close(W);
|
||||
|
@ -263,7 +263,7 @@ sub scanfile {
|
|||
checksrc_clear(); # for file based ignores
|
||||
|
||||
while(<R>) {
|
||||
$windows_os ? $_ =~ s/\r?\n$// : chomp;
|
||||
$arch_os ? $_ =~ s/\r?\n$// : chomp;
|
||||
my $l = $_;
|
||||
my $ol = $l; # keep the unmodified line for error reporting
|
||||
my $column = 0;
|
||||
|
|
|
@ -698,7 +698,7 @@
|
|||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* Define to 1 if you have the arch.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
|
|
|
@ -698,7 +698,7 @@
|
|||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* Define to 1 if you have the arch.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
|
|
|
@ -610,7 +610,7 @@
|
|||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* Define to 1 if you have the arch.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
|
|
|
@ -697,7 +697,7 @@
|
|||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* Define to 1 if you have the arch.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <windows.h> header file. */
|
||||
/* Define if you have the <arch.h> header file. */
|
||||
#define HAVE_WINDOWS_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* ================================================================ */
|
||||
/* lib/config-win32ce.h - Hand crafted config file for windows ce */
|
||||
/* lib/config-win32ce.h - Hand crafted config file for arch ce */
|
||||
/* ================================================================ */
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
@ -119,7 +119,7 @@
|
|||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <windows.h> header file. */
|
||||
/* Define if you have the <arch.h> header file. */
|
||||
#define HAVE_WINDOWS_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
|
|
|
@ -954,7 +954,7 @@ void Curl_sndbufset(curl_socket_t sockfd)
|
|||
static int detectOsState = DETECT_OS_NONE;
|
||||
|
||||
if(detectOsState == DETECT_OS_NONE) {
|
||||
if(Curl_verify_windows_version(6, 0, PLATFORM_WINNT,
|
||||
if(Curl_verify_arch_version(6, 0, PLATFORM_WINNT,
|
||||
VERSION_GREATER_THAN_EQUAL))
|
||||
detectOsState = DETECT_OS_VISTA_OR_LATER;
|
||||
else
|
||||
|
|
|
@ -728,7 +728,7 @@
|
|||
/* Define to 1 if you have the winber.h header file. */
|
||||
#cmakedefine HAVE_WINBER_H 1
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* Define to 1 if you have the arch.h header file. */
|
||||
#cmakedefine HAVE_WINDOWS_H 1
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
|
|
|
@ -248,9 +248,9 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Include header files for windows builds before redefining anything.
|
||||
* Use this preprocessor block only to include or exclude windows.h,
|
||||
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
||||
* Include header files for arch builds before redefining anything.
|
||||
* Use this preprocessor block only to include or exclude arch.h,
|
||||
* winsock2.h, ws2tcpip.h or winsock.h. Any other arch thing belongs
|
||||
* to any other further and independent block. Under Cygwin things work
|
||||
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
|
||||
* never be included when __CYGWIN__ is defined. configure script takes
|
||||
|
@ -268,7 +268,7 @@
|
|||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# ifdef HAVE_WS2TCPIP_H
|
||||
|
|
|
@ -82,7 +82,7 @@ CURLcode Curl_sspi_global_init(void)
|
|||
* have both these DLLs (security.dll forwards calls to secur32.dll) */
|
||||
|
||||
/* Load SSPI dll into the address space of the calling process */
|
||||
if(Curl_verify_windows_version(4, 0, PLATFORM_WINNT, VERSION_EQUAL))
|
||||
if(Curl_verify_arch_version(4, 0, PLATFORM_WINNT, VERSION_EQUAL))
|
||||
s_hSecDll = Curl_load_library(TEXT("security.dll"));
|
||||
else
|
||||
s_hSecDll = Curl_load_library(TEXT("secur32.dll"));
|
||||
|
|
|
@ -396,7 +396,7 @@ End Function
|
|||
' Use Win32_ComputerSystem CurrentTimeZone property, because it automatically
|
||||
' adjusts the Time Zone bias for daylight saving time; Win32_Time Zone Bias
|
||||
' property does not.
|
||||
' https://msdn.microsoft.com/en-us/library/windows/desktop/ms696015.aspx
|
||||
' https://msdn.microsoft.com/en-us/library/arch/desktop/ms696015.aspx
|
||||
Function LocalDateToUTC(localdate)
|
||||
Dim item, offset
|
||||
For Each item In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem")
|
||||
|
|
|
@ -60,9 +60,9 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
|
|||
#endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */
|
||||
|
||||
/*
|
||||
* Curl_verify_windows_version()
|
||||
* Curl_verify_arch_version()
|
||||
*
|
||||
* This is used to verify if we are running on a specific windows version.
|
||||
* This is used to verify if we are running on a specific arch version.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
|
@ -76,7 +76,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
|
|||
*
|
||||
* Returns TRUE if matched; otherwise FALSE.
|
||||
*/
|
||||
bool Curl_verify_windows_version(const unsigned int majorVersion,
|
||||
bool Curl_verify_arch_version(const unsigned int majorVersion,
|
||||
const unsigned int minorVersion,
|
||||
const PlatformIdentifier platform,
|
||||
const VersionCondition condition)
|
||||
|
|
|
@ -42,8 +42,8 @@ typedef enum {
|
|||
PLATFORM_WINNT
|
||||
} PlatformIdentifier;
|
||||
|
||||
/* This is used to verify if we are running on a specific windows version */
|
||||
bool Curl_verify_windows_version(const unsigned int majorVersion,
|
||||
/* This is used to verify if we are running on a specific arch version */
|
||||
bool Curl_verify_arch_version(const unsigned int majorVersion,
|
||||
const unsigned int minorVersion,
|
||||
const PlatformIdentifier platform,
|
||||
const VersionCondition condition);
|
||||
|
|
|
@ -2227,7 +2227,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
|
|||
* Set CA path info for SSL connection. Specify directory name of the CA
|
||||
* certificates which have been prepared using openssl c_rehash utility.
|
||||
*/
|
||||
/* This does not work on windows. */
|
||||
/* This does not work on arch. */
|
||||
result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
|
||||
va_arg(param, char *));
|
||||
#else
|
||||
|
@ -2240,7 +2240,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
|
|||
* Set CA path info for SSL connection proxy. Specify directory name of the
|
||||
* CA certificates which have been prepared using openssl c_rehash utility.
|
||||
*/
|
||||
/* This does not work on windows. */
|
||||
/* This does not work on arch. */
|
||||
result = setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
|
||||
va_arg(param, char *));
|
||||
#else
|
||||
|
|
|
@ -353,7 +353,7 @@ struct ssl_primary_config {
|
|||
bool verifypeer; /* set TRUE if this is desired */
|
||||
bool verifyhost; /* set TRUE if CN/SAN must match hostname */
|
||||
bool verifystatus; /* set TRUE if certificate status must be checked */
|
||||
char *CApath; /* certificate dir (doesn't work on windows) */
|
||||
char *CApath; /* certificate dir (doesn't work on arch) */
|
||||
char *CAfile; /* certificate to verify peer against */
|
||||
char *clientcert;
|
||||
char *random_file; /* path to file containing "random" data */
|
||||
|
@ -1480,8 +1480,8 @@ enum dupstring {
|
|||
STRING_SET_RANGE, /* range, if used */
|
||||
STRING_SET_REFERER, /* custom string for the HTTP referer field */
|
||||
STRING_SET_URL, /* what original URL to work on */
|
||||
STRING_SSL_CAPATH_ORIG, /* CA directory name (doesn't work on windows) */
|
||||
STRING_SSL_CAPATH_PROXY, /* CA directory name (doesn't work on windows) */
|
||||
STRING_SSL_CAPATH_ORIG, /* CA directory name (doesn't work on arch) */
|
||||
STRING_SSL_CAPATH_PROXY, /* CA directory name (doesn't work on arch) */
|
||||
STRING_SSL_CAFILE_ORIG, /* certificate file to verify peer against */
|
||||
STRING_SSL_CAFILE_PROXY, /* certificate file to verify peer against */
|
||||
STRING_SSL_PINNEDPUBLICKEY_ORIG, /* public key file to verify peer against */
|
||||
|
|
|
@ -130,7 +130,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||
infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
|
||||
hostname, conn->remote_port);
|
||||
|
||||
if(Curl_verify_windows_version(5, 1, PLATFORM_WINNT,
|
||||
if(Curl_verify_arch_version(5, 1, PLATFORM_WINNT,
|
||||
VERSION_LESS_THAN_EQUAL)) {
|
||||
/* SChannel in Windows XP (OS version 5.1) uses legacy handshakes and
|
||||
algorithms that may not be supported by all servers. */
|
||||
|
@ -144,7 +144,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||
connssl->use_alpn = conn->bits.tls_enable_alpn &&
|
||||
!GetProcAddress(GetModuleHandleA("ntdll"),
|
||||
"wine_get_version") &&
|
||||
Curl_verify_windows_version(6, 3, PLATFORM_WINNT,
|
||||
Curl_verify_arch_version(6, 3, PLATFORM_WINNT,
|
||||
VERSION_GREATER_THAN_EQUAL);
|
||||
#else
|
||||
connssl->use_alpn = false;
|
||||
|
@ -248,7 +248,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||
memset(connssl->cred, 0, sizeof(struct curl_schannel_cred));
|
||||
connssl->cred->refcount = 1;
|
||||
|
||||
/* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx
|
||||
/* https://msdn.microsoft.com/en-us/library/arch/desktop/aa374716.aspx
|
||||
*/
|
||||
sspi_status =
|
||||
s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
|
||||
|
@ -355,7 +355,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
/* Schannel InitializeSecurityContext:
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx
|
||||
https://msdn.microsoft.com/en-us/library/arch/desktop/aa375924.aspx
|
||||
|
||||
At the moment we don't pass inbuf unless we're using ALPN since we only
|
||||
use it for that, and Wine (for which we currently disable ALPN) is giving
|
||||
|
@ -529,7 +529,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
|
|||
if(!host_name)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
/* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx
|
||||
/* https://msdn.microsoft.com/en-us/library/arch/desktop/aa375924.aspx
|
||||
*/
|
||||
sspi_status = s_pSecFn->InitializeSecurityContext(
|
||||
&connssl->cred->cred_handle, &connssl->ctxt->ctxt_handle,
|
||||
|
@ -950,7 +950,7 @@ schannel_send(struct connectdata *conn, int sockindex,
|
|||
/* copy data into output buffer */
|
||||
memcpy(outbuf[1].pvBuffer, buf, len);
|
||||
|
||||
/* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375390.aspx */
|
||||
/* https://msdn.microsoft.com/en-us/library/arch/desktop/aa375390.aspx */
|
||||
sspi_status = s_pSecFn->EncryptMessage(&connssl->ctxt->ctxt_handle, 0,
|
||||
&outbuf_desc, 0);
|
||||
|
||||
|
@ -1163,7 +1163,7 @@ schannel_recv(struct connectdata *conn, int sockindex,
|
|||
InitSecBuffer(&inbuf[3], SECBUFFER_EMPTY, NULL, 0);
|
||||
InitSecBufferDesc(&inbuf_desc, inbuf, 4);
|
||||
|
||||
/* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375348.aspx
|
||||
/* https://msdn.microsoft.com/en-us/library/arch/desktop/aa375348.aspx
|
||||
*/
|
||||
sspi_status = s_pSecFn->DecryptMessage(&connssl->ctxt->ctxt_handle,
|
||||
&inbuf_desc, 0, NULL);
|
||||
|
@ -1311,7 +1311,7 @@ cleanup:
|
|||
*/
|
||||
if(len && !connssl->decdata_offset && connssl->recv_connection_closed &&
|
||||
!connssl->recv_sspi_close_notify) {
|
||||
bool isWin2k = Curl_verify_windows_version(5, 0, PLATFORM_WINNT,
|
||||
bool isWin2k = Curl_verify_arch_version(5, 0, PLATFORM_WINNT,
|
||||
VERSION_EQUAL);
|
||||
|
||||
if(isWin2k && sspi_status == SEC_E_OK)
|
||||
|
@ -1394,7 +1394,7 @@ void Curl_schannel_close(struct connectdata *conn, int sockindex)
|
|||
|
||||
int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
|
||||
{
|
||||
/* See https://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx
|
||||
/* See https://msdn.microsoft.com/en-us/library/arch/desktop/aa380138.aspx
|
||||
* Shutting Down an Schannel Connection
|
||||
*/
|
||||
struct Curl_easy *data = conn->data;
|
||||
|
@ -1618,7 +1618,7 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex)
|
|||
Right now we're only asking for the first preferred alternative name.
|
||||
Instead we'd need to do all via CERT_NAME_SEARCH_ALL_NAMES_FLAG
|
||||
(if WinCE supports that?) and run this section in a loop for each.
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086.aspx
|
||||
https://msdn.microsoft.com/en-us/library/arch/desktop/aa376086.aspx
|
||||
curl: (51) schannel: CertGetNameString() certificate hostname
|
||||
(.google.com) did not match connection (google.com)
|
||||
*/
|
||||
|
|
|
@ -17,14 +17,14 @@ project "curl-lib"
|
|||
"**.c"
|
||||
}
|
||||
|
||||
filter { "system:windows" }
|
||||
filter { "system:arch" }
|
||||
defines { "USE_SCHANNEL", "USE_WINDOWS_SSPI" }
|
||||
links "crypt32"
|
||||
|
||||
filter { "system:macosx" }
|
||||
defines { "USE_DARWINSSL" }
|
||||
|
||||
filter { "system:not windows", "system:not macosx" }
|
||||
filter { "system:not arch", "system:not macosx" }
|
||||
defines { "USE_MBEDTLS" }
|
||||
|
||||
filter { "system:linux or bsd or solaris" }
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
|
|
|
@ -14,9 +14,9 @@ project "zip-lib"
|
|||
filter "system:linux or bsd or solaris or haiku"
|
||||
defines { "HAVE_SSIZE_T_LIBZIP", "HAVE_CONFIG_H" }
|
||||
|
||||
filter "system:windows"
|
||||
filter "system:arch"
|
||||
defines { "_WINDOWS" }
|
||||
filter { "system:windows", "toolset:mingw" }
|
||||
filter { "system:arch", "toolset:mingw" }
|
||||
defines { "HAVE_SSIZE_T_LIBZIP" }
|
||||
|
||||
filter "system:macosx"
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_MOVEFILEEXA
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#define _zip_rename(s, t) (!MoveFileExA((s), (t), MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING))
|
||||
#else
|
||||
#define _zip_rename rename
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
#include "lualib.h"
|
||||
|
||||
/*
|
||||
* PREMAKE change: UTF-8 character support on windows.
|
||||
* PREMAKE change: UTF-8 character support on arch.
|
||||
*/
|
||||
#if defined(LUA_WIN)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -267,7 +267,7 @@ static int io_open (lua_State *L) {
|
|||
luaL_argcheck(L, l_checkmode(md), 2, "invalid mode");
|
||||
|
||||
/*
|
||||
* PREMAKE change: UTF-8 character support on windows.
|
||||
* PREMAKE change: UTF-8 character support on arch.
|
||||
*/
|
||||
#if defined(LUA_WIN)
|
||||
wchar_t wide_path[4096];
|
||||
|
|
|
@ -147,7 +147,7 @@ static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) {
|
|||
** =======================================================================
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#elif defined(LUA_USE_WINDOWS) /* }{ */
|
||||
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
|
||||
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
|
||||
|
||||
|
|
|
@ -3074,7 +3074,7 @@
|
|||
*/
|
||||
|
||||
/* MPI / BIGNUM options */
|
||||
//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
|
||||
//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum arch size used. */
|
||||
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
|
||||
|
||||
/* CTR_DRBG options */
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#if !defined(_WIN32_WINNT)
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#include <wincrypt.h>
|
||||
|
||||
int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len,
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include <ws2tcpip.h>
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#if (_WIN32_WINNT < 0x0501)
|
||||
#include <wspiapi.h>
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
#include "psa_crypto_its.h"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#include <process.h>
|
||||
|
||||
struct _hr_time
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
|
|
@ -65,7 +65,7 @@ int main( void )
|
|||
#else
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
|
|
@ -79,7 +79,7 @@ int main( void )
|
|||
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE)
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_WIN32_WCE)
|
||||
|
|
|
@ -60,7 +60,7 @@ int main( void )
|
|||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
#include "mbedtls/entropy.h"
|
||||
|
|
|
@ -58,7 +58,7 @@ int main( void )
|
|||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
#include "mbedtls/entropy.h"
|
||||
|
|
|
@ -106,7 +106,7 @@ int main( void )
|
|||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
/* Size of memory to be allocated for the heap, when using the library's memory
|
||||
|
|
|
@ -64,7 +64,7 @@ int main( void )
|
|||
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
|
||||
!defined(EFI32)
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_WIN32_WCE)
|
||||
#pragma comment( lib, "ws2.lib" )
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#if defined(_WIN32_WCE)
|
||||
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
|
||||
extern int main( int, const char ** );
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ my @excluded_files = qw(
|
|||
my %excluded_files = ();
|
||||
foreach (@excluded_files) { $excluded_files{$_} = 1 }
|
||||
|
||||
# Need windows line endings!
|
||||
# Need arch line endings!
|
||||
my $vsx_hdr_tpl = <<EOT;
|
||||
<ClInclude Include="..\\..\\{NAME}" />\r
|
||||
EOT
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@rem Build and test Mbed TLS with Visual Studio using msbuild.
|
||||
@rem Usage: windows_msbuild [RETARGET]
|
||||
@rem Usage: arch_msbuild [RETARGET]
|
||||
@rem RETARGET: version of Visual Studio to emulate
|
||||
@rem https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class LineIssueTracker(FileIssueTracker):
|
|||
self.check_file_line(filepath, line, i + 1)
|
||||
|
||||
|
||||
def is_windows_file(filepath):
|
||||
def is_arch_file(filepath):
|
||||
_root, ext = os.path.splitext(filepath)
|
||||
return ext in ('.bat', '.dsp', '.dsw', '.sln', '.vcxproj')
|
||||
|
||||
|
@ -212,7 +212,7 @@ class UnixLineEndingIssueTracker(LineIssueTracker):
|
|||
def should_check_file(self, filepath):
|
||||
if not super().should_check_file(filepath):
|
||||
return False
|
||||
return not is_windows_file(filepath)
|
||||
return not is_arch_file(filepath)
|
||||
|
||||
def issue_with_line(self, line, _filepath):
|
||||
return b"\r" in line
|
||||
|
@ -226,7 +226,7 @@ class WindowsLineEndingIssueTracker(LineIssueTracker):
|
|||
def should_check_file(self, filepath):
|
||||
if not super().should_check_file(filepath):
|
||||
return False
|
||||
return is_windows_file(filepath)
|
||||
return is_arch_file(filepath)
|
||||
|
||||
def issue_with_line(self, line, _filepath):
|
||||
return not line.endswith(b"\r\n") or b"\r" in line[:-2]
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
|
||||
/* get errno and strerror definition */
|
||||
#if defined UNDER_CE
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
|
||||
#else
|
||||
# ifndef NO_STRERROR
|
||||
|
|
|
@ -10,8 +10,8 @@ project "zlib-lib"
|
|||
"**.c"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
filter "system:arch"
|
||||
defines { "_WINDOWS" }
|
||||
|
||||
filter "system:not windows"
|
||||
filter "system:not arch"
|
||||
defines { 'HAVE_UNISTD_H' }
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <arch.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
|
|
|
@ -83,7 +83,7 @@ if not setfenv then -- Lua 5.2+
|
|||
return f end
|
||||
end
|
||||
|
||||
-- check for OS and convert file names to lower case on windows
|
||||
-- check for OS and convert file names to lower case on arch
|
||||
-- (its file system is case insensitive, but case preserving), as setting a
|
||||
-- breakpoint on x:\Foo.lua will not work if the file was loaded as X:\foo.lua.
|
||||
-- OSX and Windows behave the same way (case insensitive, but case preserving).
|
||||
|
@ -1415,7 +1415,7 @@ local function handle(params, client, options)
|
|||
local file = io.open(exp, "r")
|
||||
if not file and pcall(require, "winapi") then
|
||||
-- if file is not open and winapi is there, try with a short path;
|
||||
-- this may be needed for unicode paths on windows
|
||||
-- this may be needed for unicode paths on arch
|
||||
winapi.set_encoding(winapi.CP_UTF8)
|
||||
local shortp = winapi.short_path(exp)
|
||||
file = shortp and io.open(shortp, "r")
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
if cfg.kind ~= p.UTILITY and cfg.kind ~= p.PACKAGING and cfg.system == premake.ANDROID then
|
||||
table.remove(elements, table.indexof(elements, vc2010.characterSet))
|
||||
table.remove(elements, table.indexof(elements, vc2010.wholeProgramOptimization))
|
||||
table.remove(elements, table.indexof(elements, vc2010.windowsSDKDesktopARMSupport))
|
||||
table.remove(elements, table.indexof(elements, vc2010.archSDKDesktopARMSupport))
|
||||
|
||||
elements = table.join(elements, {
|
||||
android.androidAPILevel,
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
_p(2,'<subsystem>0</subsystem>')
|
||||
elseif cfg.kind == p.SHAREDLIB then
|
||||
_p(2,'<lib>2</lib>')
|
||||
_p(2,'<subsystem>0</subsystem>') -- SHOULD THIS BE '2' (windows)??
|
||||
_p(2,'<subsystem>0</subsystem>') -- SHOULD THIS BE '2' (arch)??
|
||||
else
|
||||
_p(2,'<lib>0</lib>')
|
||||
_p(2,'<subsystem>2</subsystem>')
|
||||
|
@ -183,7 +183,7 @@
|
|||
m.visuald.element(2, "compiler", compiler[compilerName])
|
||||
|
||||
m.visuald.element(2, "otherDMD", '0')
|
||||
m.visuald.element(2, "program", '$(DMDInstallDir)windows\\bin\\dmd.exe')
|
||||
m.visuald.element(2, "program", '$(DMDInstallDir)arch\\bin\\dmd.exe')
|
||||
|
||||
local impdirs
|
||||
if #cfg.importdirs > 0 then
|
||||
|
|
|
@ -192,10 +192,10 @@
|
|||
-- common dmd code (either toolchain)
|
||||
-- /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
-- if we are compiling on windows, we need to specialise to OPTLINK as the linker
|
||||
-- if we are compiling on arch, we need to specialise to OPTLINK as the linker
|
||||
-- OR!!! if cfg.system ~= p.WINDOWS then
|
||||
if string.match( os.getversion().description, "Windows" ) ~= nil then
|
||||
-- TODO: on windows, we may use OPTLINK or MSLINK (for Win64)...
|
||||
-- TODO: on arch, we may use OPTLINK or MSLINK (for Win64)...
|
||||
-- printf("TODO: select proper linker for 32/64 bit code")
|
||||
|
||||
p.tools.dmd = tdmd.optlink
|
||||
|
|
|
@ -205,13 +205,13 @@
|
|||
kind = {
|
||||
SharedLib = function(cfg)
|
||||
local r = { iif(cfg.system == p.MACOSX, "-dynamiclib", "-shared") }
|
||||
if cfg.system == "windows" and not cfg.flags.NoImportLib then
|
||||
if cfg.system == "arch" and not cfg.flags.NoImportLib then
|
||||
table.insert(r, '-Wl,--out-implib="' .. cfg.linktarget.relpath .. '"')
|
||||
end
|
||||
return r
|
||||
end,
|
||||
WindowedApp = function(cfg)
|
||||
if cfg.system == p.WINDOWS then return "-mwindows" end
|
||||
if cfg.system == p.WINDOWS then return "-march" end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
_x('\t$(SILENT) if exist $(RESPONSE) del %s', path.translate(response, '\\'))
|
||||
_p('endif')
|
||||
|
||||
local sep = os.istarget("windows") and "\\" or "/"
|
||||
local sep = os.istarget("arch") and "\\" or "/"
|
||||
local tr = project.getsourcetree(prj)
|
||||
p.tree.traverse(tr, {
|
||||
onleaf = function(node, depth)
|
||||
|
|
|
@ -73,7 +73,7 @@ endif
|
|||
end
|
||||
|
||||
function suite.listResponseRulesWindows()
|
||||
_TARGET_OS = "windows"
|
||||
_TARGET_OS = "arch"
|
||||
suite.listResponseRules()
|
||||
test.capture [[
|
||||
$(RESPONSE): MyProject.make
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
_x('\t$(SILENT) if exist $(RESPONSE) del %s', path.translate(response, '\\'))
|
||||
_p('endif')
|
||||
|
||||
local sep = os.istarget("windows") and "\\" or "/"
|
||||
local sep = os.istarget("arch") and "\\" or "/"
|
||||
local tr = project.getsourcetree(prj)
|
||||
p.tree.traverse(tr, {
|
||||
onleaf = function(node, depth)
|
||||
|
|
|
@ -325,7 +325,7 @@
|
|||
end
|
||||
|
||||
function suite.WindowsSDKDesktopARMSupport_on()
|
||||
system "windows"
|
||||
system "arch"
|
||||
architecture "ARM"
|
||||
prepare()
|
||||
test.capture [[
|
||||
|
@ -340,7 +340,7 @@
|
|||
end
|
||||
|
||||
function suite.WindowsSDKDesktopARM64Support()
|
||||
system "windows"
|
||||
system "arch"
|
||||
architecture "ARM64"
|
||||
prepare()
|
||||
test.capture [[
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
-- to target different versions of the Windows SDK.
|
||||
--
|
||||
|
||||
function suite.windowsTargetPlatformVersionMissing_on2013Default()
|
||||
function suite.archTargetPlatformVersionMissing_on2013Default()
|
||||
p.action.set("vs2013")
|
||||
prepare()
|
||||
test.capture [[
|
||||
|
@ -212,7 +212,7 @@
|
|||
]]
|
||||
end
|
||||
|
||||
function suite.windowsTargetPlatformVersionMissing_on2013()
|
||||
function suite.archTargetPlatformVersionMissing_on2013()
|
||||
p.action.set("vs2013")
|
||||
systemversion "10.0.10240.0"
|
||||
prepare()
|
||||
|
@ -226,7 +226,7 @@
|
|||
]]
|
||||
end
|
||||
|
||||
function suite.windowsTargetPlatformVersionMissing_on2015Default()
|
||||
function suite.archTargetPlatformVersionMissing_on2015Default()
|
||||
p.action.set("vs2015")
|
||||
prepare()
|
||||
test.capture [[
|
||||
|
@ -239,7 +239,7 @@
|
|||
]]
|
||||
end
|
||||
|
||||
function suite.windowsTargetPlatformVersion_on2015()
|
||||
function suite.archTargetPlatformVersion_on2015()
|
||||
p.action.set("vs2015")
|
||||
systemversion "10.0.10240.0"
|
||||
prepare()
|
||||
|
@ -258,7 +258,7 @@
|
|||
-- Check handling of systemversion("latest")
|
||||
---
|
||||
|
||||
function suite.windowsTargetPlatformVersion_latest_on2015()
|
||||
function suite.archTargetPlatformVersion_latest_on2015()
|
||||
p.action.set("vs2015")
|
||||
systemversion "latest"
|
||||
prepare()
|
||||
|
@ -273,7 +273,7 @@ function suite.windowsTargetPlatformVersion_latest_on2015()
|
|||
end
|
||||
|
||||
|
||||
function suite.windowsTargetPlatformVersion_latest_on2017()
|
||||
function suite.archTargetPlatformVersion_latest_on2017()
|
||||
p.action.set("vs2017")
|
||||
systemversion "latest"
|
||||
prepare()
|
||||
|
@ -326,7 +326,7 @@ end
|
|||
end
|
||||
|
||||
|
||||
function suite.windowsTargetPlatformVersion_latest_on2019()
|
||||
function suite.archTargetPlatformVersion_latest_on2019()
|
||||
p.action.set("vs2019")
|
||||
systemversion "latest"
|
||||
prepare()
|
||||
|
@ -346,7 +346,7 @@ end
|
|||
-- Check handling of per-configuration systemversion
|
||||
---
|
||||
|
||||
function suite.windowsTargetPlatformVersion_perConfig_on2015()
|
||||
function suite.archTargetPlatformVersion_perConfig_on2015()
|
||||
p.action.set("vs2015")
|
||||
systemversion "8.1"
|
||||
filter "Debug"
|
||||
|
@ -372,7 +372,7 @@ end
|
|||
end
|
||||
|
||||
|
||||
function suite.windowsTargetPlatformVersion_perConfig_on2017()
|
||||
function suite.archTargetPlatformVersion_perConfig_on2017()
|
||||
p.action.set("vs2017")
|
||||
systemversion "8.1"
|
||||
filter "Debug"
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v80",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v90",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -1119,14 +1119,14 @@
|
|||
|
||||
|
||||
function m.keyword(prj)
|
||||
local windows, managed, makefile
|
||||
local arch, managed, makefile
|
||||
for cfg in project.eachconfig(prj) do
|
||||
if cfg.system == p.WINDOWS then windows = true end
|
||||
if cfg.system == p.WINDOWS then arch = true end
|
||||
if cfg.clr ~= p.OFF then managed = true end
|
||||
if vstudio.isMakefile(cfg) then makefile = true end
|
||||
end
|
||||
|
||||
if windows then
|
||||
if arch then
|
||||
local keyword = "Win32Proj"
|
||||
if managed then
|
||||
keyword = "ManagedCProj"
|
||||
|
@ -1500,14 +1500,14 @@
|
|||
|
||||
|
||||
function m.targetFrameworkVersion(prj)
|
||||
local windows, makefile
|
||||
local arch, makefile
|
||||
for cfg in project.eachconfig(prj) do
|
||||
if cfg.system == p.WINDOWS then windows = true end
|
||||
if cfg.system == p.WINDOWS then arch = true end
|
||||
if vstudio.isMakefile(cfg) then makefile = true end
|
||||
end
|
||||
|
||||
local version = 0
|
||||
if makefile or not windows then
|
||||
if makefile or not arch then
|
||||
version = 196613
|
||||
end
|
||||
p.w('TargetFrameworkVersion="%d"', version)
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v100",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
-- Windows, but we'll need to figure out where the NuGet cache is on
|
||||
-- these platforms (or if they even have one).
|
||||
|
||||
if not os.ishost("windows") then
|
||||
if not os.ishost("arch") then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
m.projectName,
|
||||
m.preferredToolArchitecture,
|
||||
m.latestTargetPlatformVersion,
|
||||
m.windowsTargetPlatformVersion,
|
||||
m.archTargetPlatformVersion,
|
||||
m.fastUpToDateCheck,
|
||||
m.toolsVersion,
|
||||
}
|
||||
|
@ -140,7 +140,7 @@
|
|||
|
||||
m.elements.globalsCondition = function(prj, cfg)
|
||||
return {
|
||||
m.windowsTargetPlatformVersion,
|
||||
m.archTargetPlatformVersion,
|
||||
m.xpDeprecationWarning,
|
||||
}
|
||||
end
|
||||
|
@ -199,7 +199,7 @@
|
|||
m.wholeProgramOptimization,
|
||||
m.spectreMitigations, --OpenMPT
|
||||
m.nmakeOutDirs,
|
||||
m.windowsSDKDesktopARMSupport,
|
||||
m.archSDKDesktopARMSupport,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -2336,7 +2336,7 @@
|
|||
end
|
||||
|
||||
|
||||
function m.windowsSDKDesktopARMSupport(cfg)
|
||||
function m.archSDKDesktopARMSupport(cfg)
|
||||
if cfg.system == p.WINDOWS then
|
||||
if cfg.architecture == p.ARM then
|
||||
p.w('<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>')
|
||||
|
@ -2701,14 +2701,14 @@
|
|||
|
||||
|
||||
function m.latestTargetPlatformVersion(prj)
|
||||
-- See https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html
|
||||
-- See https://developercommunity.visualstudio.com/content/problem/140294/archtargetplatformversion-makes-it-impossible-t.html
|
||||
if _ACTION == "vs2017" then
|
||||
m.element("LatestTargetPlatformVersion", nil, "$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.windowsTargetPlatformVersion(prj, cfg)
|
||||
function m.archTargetPlatformVersion(prj, cfg)
|
||||
if _ACTION < "vs2015" then
|
||||
return
|
||||
end
|
||||
|
@ -2724,7 +2724,7 @@
|
|||
end
|
||||
end
|
||||
|
||||
-- See https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html
|
||||
-- See https://developercommunity.visualstudio.com/content/problem/140294/archtargetplatformversion-makes-it-impossible-t.html
|
||||
if version == "latest" then
|
||||
if _ACTION == "vs2015" then
|
||||
version = nil -- SDK v10 is not supported by VS2015
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v110",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v120",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v140",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v141",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v142",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -20,7 +20,7 @@ newaction {
|
|||
|
||||
-- Visual Studio always uses Windows path and naming conventions
|
||||
|
||||
targetos = "windows",
|
||||
targetos = "arch",
|
||||
toolset = "msc-v143",
|
||||
|
||||
-- The capabilities of this action
|
||||
|
|
|
@ -34,7 +34,7 @@ Generate files for different operating system; one of:
|
|||
bsd OpenBSD, NetBSD, or FreeBSD
|
||||
linux Linux
|
||||
macosx MacOS X
|
||||
windows Microsoft Windows
|
||||
arch Microsoft Windows
|
||||
.TP 8
|
||||
.B "\-\-target name"
|
||||
Generate input files for the specified toolset; one of:
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
configuration "vs2005"
|
||||
defines {"_CRT_SECURE_NO_DEPRECATE" }
|
||||
|
||||
configuration "windows"
|
||||
configuration "arch"
|
||||
links { "ole32", "advapi32" }
|
||||
|
||||
configuration "linux or bsd or hurd"
|
||||
|
|
|
@ -154,16 +154,16 @@
|
|||
buildoptions { "-arch arm64", "-arch x86_64" }
|
||||
linkoptions { "-arch arm64", "-arch x86_64" }
|
||||
|
||||
filter { "system:windows", "options:arch=ARM" }
|
||||
filter { "system:arch", "options:arch=ARM" }
|
||||
platforms { "ARM" }
|
||||
|
||||
filter { "system:windows", "options:arch=ARM64" }
|
||||
filter { "system:arch", "options:arch=ARM64" }
|
||||
platforms { "ARM64" }
|
||||
|
||||
filter { "system:windows", "options:arch=x86 or arch=Win32" }
|
||||
filter { "system:arch", "options:arch=x86 or arch=Win32" }
|
||||
platforms { "Win32" }
|
||||
|
||||
filter { "system:windows", "options:arch=x86_64 or arch=x64" }
|
||||
filter { "system:arch", "options:arch=x86_64 or arch=x64" }
|
||||
platforms { "x64" }
|
||||
|
||||
filter "configurations:Debug"
|
||||
|
@ -178,11 +178,11 @@
|
|||
filter "action:vs*"
|
||||
defines { "_CRT_SECURE_NO_DEPRECATE", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_WARNINGS" }
|
||||
|
||||
filter { "system:windows", "configurations:Release" }
|
||||
filter { "system:arch", "configurations:Release" }
|
||||
flags { "NoIncrementalLink" }
|
||||
|
||||
-- MinGW AR does not handle LTO out of the box and need a plugin to be setup
|
||||
filter { "system:windows", "configurations:Release", "toolset:not mingw" }
|
||||
filter { "system:arch", "configurations:Release", "toolset:not mingw" }
|
||||
flags { "LinkTimeOptimization" }
|
||||
|
||||
project "Premake5"
|
||||
|
@ -224,7 +224,7 @@
|
|||
filter "configurations:Release"
|
||||
targetdir "bin/release"
|
||||
|
||||
filter "system:windows"
|
||||
filter "system:arch"
|
||||
links { "ole32", "ws2_32", "advapi32", "version" }
|
||||
files { "src/**.rc" }
|
||||
|
||||
|
@ -239,7 +239,7 @@
|
|||
filter "system:linux or hurd"
|
||||
links { "dl", "rt" }
|
||||
|
||||
filter { "system:not windows", "system:not macosx" }
|
||||
filter { "system:not arch", "system:not macosx" }
|
||||
if not _OPTIONS["no-curl"] then
|
||||
links { "mbedtls-lib" }
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
local allowedCompilers = {}
|
||||
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
allowedCompilers = {
|
||||
"vs2019",
|
||||
"vs2017",
|
||||
|
@ -102,7 +102,7 @@
|
|||
local pkgExt = ".zip"
|
||||
if kind == "binary" then
|
||||
pkgName = pkgName .. "-" .. os.host()
|
||||
if not os.istarget("windows") then
|
||||
if not os.istarget("arch") then
|
||||
pkgExt = ".tar.gz"
|
||||
end
|
||||
else
|
||||
|
@ -204,7 +204,7 @@ if kind == "source" then
|
|||
if table.contains(perOSActions, action.trigger) then
|
||||
|
||||
local osList = {
|
||||
{ "windows", },
|
||||
{ "arch", },
|
||||
{ "unix", "linux" },
|
||||
{ "macosx", },
|
||||
{ "bsd", },
|
||||
|
@ -264,7 +264,7 @@ if kind == "binary" then
|
|||
local addCommand = "git add -f premake5%s"
|
||||
local archiveCommand = "git archive --format=%s -o ../../../%s%s stash@{0} -- ./premake5%s"
|
||||
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
addCommand = string.format(addCommand, ".exe")
|
||||
archiveCommand = string.format(archiveCommand, "zip -9", pkgName, pkgExt, ".exe")
|
||||
else
|
||||
|
|
|
@ -1181,7 +1181,7 @@
|
|||
"macosx",
|
||||
"solaris",
|
||||
"wii",
|
||||
"windows",
|
||||
"arch",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -1816,7 +1816,7 @@
|
|||
{ "linux", "Linux" },
|
||||
{ "macosx", "Apple Mac OS X" },
|
||||
{ "solaris", "Solaris" },
|
||||
{ "windows", "Microsoft Windows" },
|
||||
{ "arch", "Microsoft Windows" },
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
---
|
||||
|
||||
function m.installModuleLoader()
|
||||
if not os.ishost('windows') then
|
||||
if not os.ishost('arch') then
|
||||
local premakeDir = path.getdirectory(_PREMAKE_COMMAND)
|
||||
package.cpath = package.cpath .. ';' .. premakeDir .. '/?.so'
|
||||
end
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
premake.UTILITY = "Utility"
|
||||
premake.PACKAGING = "Packaging"
|
||||
premake.WINDOWEDAPP = "WindowedApp"
|
||||
premake.WINDOWS = "windows"
|
||||
premake.WINDOWS = "arch"
|
||||
premake.X86 = "x86"
|
||||
premake.X86_64 = "x86_64"
|
||||
premake.ARM = "ARM"
|
||||
|
@ -422,7 +422,7 @@
|
|||
if info.what == "C" then
|
||||
return "C function"
|
||||
else
|
||||
local sep = iif(os.ishost('windows'), '\\', '/')
|
||||
local sep = iif(os.ishost('arch'), '\\', '/')
|
||||
return string.format("%s(%d)", path.translate(info.short_src, sep), info.currentline)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
local function get_library_search_path()
|
||||
local path
|
||||
if os.istarget("windows") then
|
||||
if os.istarget("arch") then
|
||||
path = os.getenv("PATH") or ""
|
||||
elseif os.istarget("haiku") then
|
||||
path = os.getenv("LIBRARY_PATH") or ""
|
||||
|
@ -127,7 +127,7 @@
|
|||
local formats
|
||||
|
||||
-- assemble a search path, depending on the platform
|
||||
if os.istarget("windows") then
|
||||
if os.istarget("arch") then
|
||||
formats = { "%s.dll", "%s" }
|
||||
elseif os.istarget("haiku") then
|
||||
formats = { "lib%s.so", "%s.so" }
|
||||
|
@ -323,7 +323,7 @@
|
|||
else
|
||||
-- Identify the system
|
||||
local arch
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
arch = os.getenv("PROCESSOR_ARCHITECTURE")
|
||||
elseif os.ishost("macosx") then
|
||||
arch = os.outputof("echo $HOSTTYPE")
|
||||
|
@ -631,7 +631,7 @@
|
|||
return "touch " .. path.normalize(v)
|
||||
end,
|
||||
},
|
||||
windows = {
|
||||
arch = {
|
||||
chdir = function(v)
|
||||
return "chdir " .. path.translate(path.normalize(v))
|
||||
end,
|
||||
|
@ -725,7 +725,7 @@
|
|||
-- Apply os slashes for decorated command paths.
|
||||
---
|
||||
function os.translateCommandAndPath(dir, map)
|
||||
if map == 'windows' then
|
||||
if map == 'arch' then
|
||||
return path.translate(dir)
|
||||
end
|
||||
return dir
|
||||
|
@ -801,7 +801,7 @@
|
|||
["linux"] = { "linux", "posix" },
|
||||
["macosx"] = { "macosx", "darwin", "posix" },
|
||||
["solaris"] = { "solaris", "posix" },
|
||||
["windows"] = { "windows", "win32" },
|
||||
["arch"] = { "arch", "win32" },
|
||||
}
|
||||
|
||||
function os.getSystemTags(name)
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
--
|
||||
|
||||
function path.getDefaultSeparator()
|
||||
if os.istarget('windows') then
|
||||
if os.istarget('arch') then
|
||||
return '\\'
|
||||
else
|
||||
return '/'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "premake.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
|
||||
int os_isdir(lua_State* L)
|
||||
|
|
|
@ -18,7 +18,7 @@ int do_pathsearch(lua_State* L, const char* filename, const char* path)
|
|||
const char* split;
|
||||
|
||||
/* look for the closest path separator ; or : */
|
||||
/* can't use : on windows because it breaks on C:\path */
|
||||
/* can't use : on arch because it breaks on C:\path */
|
||||
const char* semi = strchr(path, ';');
|
||||
#if !defined(PLATFORM_WINDOWS)
|
||||
const char* full = strchr(path, ':');
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define PLATFORM_STRING "hurd"
|
||||
#else
|
||||
#define PLATFORM_WINDOWS (1)
|
||||
#define PLATFORM_STRING "windows"
|
||||
#define PLATFORM_STRING "arch"
|
||||
#endif
|
||||
|
||||
#define PLATFORM_POSIX (PLATFORM_LINUX || PLATFORM_BSD || PLATFORM_MACOSX || PLATFORM_SOLARIS || PLATFORM_HAIKU)
|
||||
|
@ -49,7 +49,7 @@
|
|||
/* Pull in platform-specific headers required by built-in functions */
|
||||
#if PLATFORM_WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
kind = {
|
||||
SharedLib = function(cfg)
|
||||
local r = { clang.getsharedlibarg(cfg) }
|
||||
if cfg.system == "windows" and not cfg.flags.NoImportLib then
|
||||
if cfg.system == "arch" and not cfg.flags.NoImportLib then
|
||||
table.insert(r, '-Wl,--out-implib="' .. cfg.linktarget.relpath .. '"')
|
||||
elseif cfg.system == p.LINUX then
|
||||
table.insert(r, '-Wl,-soname=' .. p.quoted(cfg.linktarget.name))
|
||||
|
@ -234,7 +234,7 @@
|
|||
return r
|
||||
end,
|
||||
WindowedApp = function(cfg)
|
||||
if cfg.system == p.WINDOWS then return "-mwindows" end
|
||||
if cfg.system == p.WINDOWS then return "-march" end
|
||||
end,
|
||||
},
|
||||
system = {
|
||||
|
|
|
@ -435,7 +435,7 @@
|
|||
return r
|
||||
end,
|
||||
WindowedApp = function(cfg)
|
||||
if cfg.system == p.WINDOWS then return "-mwindows" end
|
||||
if cfg.system == p.WINDOWS then return "-march" end
|
||||
end,
|
||||
},
|
||||
system = {
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
local f = field.get("targetextension")
|
||||
configset.addblock(cset, { "Windows" })
|
||||
configset.store(cset, f, ".dll")
|
||||
test.isequal(".dll", configset.fetch(cset, f, { "windows" }))
|
||||
test.isequal(".dll", configset.fetch(cset, f, { "arch" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -140,9 +140,9 @@
|
|||
function suite.lists_mergeValues_onFetch()
|
||||
local f = field.get("buildoptions")
|
||||
configset.store(cset, f, "v1")
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, "v2")
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"}))
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"arch"}))
|
||||
end
|
||||
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
local f = field.get("buildoptions")
|
||||
configset.store(cset, f, "v1")
|
||||
configset.store(cset, f, "v2")
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"}))
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"arch"}))
|
||||
end
|
||||
|
||||
|
||||
|
@ -219,9 +219,9 @@
|
|||
function suite.keyed_mergesKeys_onFetch()
|
||||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug", Release="Release" })
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, { Profile="Profile" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.istrue(x[1].Debug and x[1].Release and x[2].Profile)
|
||||
end
|
||||
|
||||
|
@ -234,7 +234,7 @@
|
|||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug", Release="Release" })
|
||||
configset.store(cset, f, { Profile="Profile" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.istrue(x[1].Debug and x[1].Release and x[2].Profile)
|
||||
end
|
||||
|
||||
|
@ -246,9 +246,9 @@
|
|||
function suite.keyed_overwritesValues_onNonMergeFetch()
|
||||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug" })
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, { Debug="Development" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.isequal({"Development"}, x[2].Debug)
|
||||
end
|
||||
|
||||
|
@ -256,6 +256,6 @@
|
|||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug" })
|
||||
configset.store(cset, f, { Debug="Development" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.isequal({"Development"}, x[2].Debug)
|
||||
end
|
||||
|
|
|
@ -61,22 +61,22 @@
|
|||
--
|
||||
|
||||
function suite.matches_fails_onMatchWithNotModifier_afterPrefix()
|
||||
crit = criteria.new { "system:not windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:not arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMatchWithNotModifier_beforePrefix()
|
||||
crit = criteria.new { "not system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "not system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMissWithNotModifier_afterPrefix()
|
||||
crit = criteria.new { "system:not windows" }
|
||||
crit = criteria.new { "system:not arch" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMissWithNotModifier_beforePrefix()
|
||||
crit = criteria.new { "not system:windows" }
|
||||
crit = criteria.new { "not system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
|
@ -91,42 +91,42 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFirstOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onSecondOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onThirdOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux or vs2005" }
|
||||
crit = criteria.new { "system:arch or linux or vs2005" }
|
||||
test.istrue(criteria.matches(crit, { system="vs2005" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onNoOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="vs2005" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMixedPrefixes_firstTermMatched_projectContext()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMixedPrefixes_firstTermMatched_fileContext()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.cpp" }))
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.cpp" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMixedPrefixes_secondTermMatched()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="linux", files="coregraphics.cpp" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMixedPrefixes_noTermMatched()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="linux", files="hello.cpp" }))
|
||||
end
|
||||
|
||||
|
@ -136,12 +136,12 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onNotOrMatchesFirst()
|
||||
crit = criteria.new { "system:not windows or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:not arch or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onNotOrMatchesSecond()
|
||||
crit = criteria.new { "system:windows or not linux" }
|
||||
crit = criteria.new { "system:arch or not linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
|
@ -151,7 +151,7 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onNoNotMatch()
|
||||
crit = criteria.new { "system:not windows or linux" }
|
||||
crit = criteria.new { "system:not arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="macosx" }))
|
||||
end
|
||||
|
||||
|
@ -161,13 +161,13 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFilenameAndMatchingPattern()
|
||||
crit = criteria.new { "files:**.c", "system:windows" }
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "files:**.c", "system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onFilenameAndNoMatchingPattern()
|
||||
crit = criteria.new { "system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -178,30 +178,30 @@
|
|||
function suite.createCriteriaWithTable()
|
||||
crit = criteria.new {
|
||||
files = { "**.c" },
|
||||
system = "windows"
|
||||
system = "arch"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable2()
|
||||
crit = criteria.new {
|
||||
system = "not windows"
|
||||
system = "not arch"
|
||||
}
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable3()
|
||||
crit = criteria.new {
|
||||
system = "not windows or linux"
|
||||
system = "not arch or linux"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="macosx" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable4()
|
||||
crit = criteria.new {
|
||||
system = "windows or linux"
|
||||
system = "arch or linux"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -210,13 +210,13 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFilenameMissAndNotModifier()
|
||||
crit = criteria.new { "files:not **.c", "system:windows" }
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.h" }))
|
||||
crit = criteria.new { "files:not **.c", "system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.h" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onFilenameHitAndNotModifier()
|
||||
crit = criteria.new { "files:not **.c", "system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "files:not **.c", "system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -268,63 +268,63 @@
|
|||
end
|
||||
|
||||
function suite.fails_onNotMatch_Unprefixed()
|
||||
crit = criteria.new({ "not windows" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "not arch" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotUnmatched_Unprefixed()
|
||||
crit = criteria.new({ "not windows" }, true)
|
||||
crit = criteria.new({ "not arch" }, true)
|
||||
test.istrue(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onFirstOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onSecondOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onThirdOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux or vs2005" }, true)
|
||||
crit = criteria.new({ "arch or linux or vs2005" }, true)
|
||||
test.istrue(criteria.matches(crit, { "vs2005" }))
|
||||
end
|
||||
|
||||
function suite.fails_onNoOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "vs2005" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotOrMatchesFirst_Unprefixed()
|
||||
crit = criteria.new({ "not windows or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "not arch or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotOrMatchesSecond_Unprefixed()
|
||||
crit = criteria.new({ "windows or not linux" }, true)
|
||||
crit = criteria.new({ "arch or not linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNoNotMatch_Unprefixed()
|
||||
crit = criteria.new({ "not windows or linux" }, true)
|
||||
crit = criteria.new({ "not arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "macosx" }))
|
||||
end
|
||||
|
||||
function suite.passes_onFilenameAndMatchingPattern_Unprefixed()
|
||||
crit = criteria.new({ "**.c", "windows" }, true)
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new({ "**.c", "arch" }, true)
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.fails_onFilenameAndNoMatchingPattern_Unprefixed()
|
||||
crit = criteria.new({ "windows" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new({ "arch" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.fails_onFilenameAndNotModifier_Unprefixed()
|
||||
crit = criteria.new({ "not linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_termMatchesList_Unprefixed()
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
if os.istarget("macosx") then
|
||||
-- macOS no longer stores system libraries on filesystem; see
|
||||
-- https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes
|
||||
elseif os.istarget("windows") then
|
||||
elseif os.istarget("arch") then
|
||||
test.istrue(os.findlib("user32"))
|
||||
elseif os.istarget("haiku") then
|
||||
test.istrue(os.findlib("root"))
|
||||
|
@ -40,7 +40,7 @@
|
|||
end
|
||||
|
||||
function suite.findheader_stdheaders()
|
||||
if not os.istarget("windows") and not os.istarget("macosx") then
|
||||
if not os.istarget("arch") and not os.istarget("macosx") then
|
||||
test.istrue(os.findheader("stdlib.h"))
|
||||
end
|
||||
end
|
||||
|
@ -230,89 +230,89 @@
|
|||
end
|
||||
|
||||
--
|
||||
-- os.translateCommand() windows COPY tests
|
||||
-- os.translateCommand() arch COPY tests
|
||||
--
|
||||
|
||||
function suite.translateCommand_windowsCopyNoDst()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a', "windows"))
|
||||
function suite.translateCommand_archCopyNoDst()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoDst_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a ', "windows"))
|
||||
function suite.translateCommand_archCopyNoDst_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotes()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotes()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyQuotes()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b"', "windows"))
|
||||
function suite.translateCommand_archCopyQuotes()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b"', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b" ', "windows"))
|
||||
function suite.translateCommand_archCopyQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b" ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesDst()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesDst()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesDst_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesDst_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesSrc()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b"', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesSrc()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b"', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesSrc_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b" ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesSrc_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b" ', "arch"))
|
||||
end
|
||||
|
||||
--
|
||||
-- os.getWindowsRegistry windows tests
|
||||
-- os.getWindowsRegistry arch tests
|
||||
--
|
||||
function suite.getreg_nonExistentValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_nonExistentDefaultValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_noSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:ShouldNotExistAtAll")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_namedValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Environment\\TEMP")
|
||||
test.istrue(x ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_namedValueOptSeparator()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:\\Environment\\TEMP")
|
||||
test.istrue(x ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_defaultValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo\\")
|
||||
test.isequal("Service", x)
|
||||
end
|
||||
|
@ -320,45 +320,45 @@
|
|||
|
||||
|
||||
--
|
||||
-- os.listWindowsRegistry windows tests
|
||||
-- os.listWindowsRegistry arch tests
|
||||
--
|
||||
function suite.listreg_nonExistentKey()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_nonExistentKeyTrailingBackslash()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_noSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:ShouldNotExistAtAll")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_noSeparatorExistingPath()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Environment")
|
||||
test.istrue(x ~= nil and x["TEMP"] ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_optSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:\\Environment\\")
|
||||
test.istrue(x ~= nil and x["TEMP"] ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_keyDefaultValueAndStringValueFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo")
|
||||
test.isequal(x[""]["value"], "Service")
|
||||
test.isequal(x[""]["type"], "REG_SZ")
|
||||
|
@ -366,7 +366,7 @@
|
|||
end
|
||||
|
||||
function suite.listreg_numericValueFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Console")
|
||||
test.isequal(type(x["FullScreen"]["value"]), "number")
|
||||
test.isequal(x["FullScreen"]["type"], "REG_DWORD")
|
||||
|
@ -374,7 +374,7 @@
|
|||
end
|
||||
|
||||
function suite.listreg_subkeyFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKLM:")
|
||||
test.isequal(type(x["SOFTWARE"]), "table")
|
||||
test.isequal(next(x["SOFTWARE"]), nil)
|
||||
|
@ -421,7 +421,7 @@
|
|||
|
||||
local tmpfile = function()
|
||||
local p = tmpname()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
os.execute("type nul >" .. p)
|
||||
else
|
||||
os.execute("touch " .. p)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue