1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-06 15:54:57 +03:00

18 Commits

Author SHA1 Message Date
974f18505b v5.01.9665
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-11-28 10:34:59 +00:00
b65ebce4d6 Merge pull request #821 from chipitsine/master
Merge PR #821: AppVeyor refactor
2018-11-28 03:00:38 +05:00
557d0a02d9 AppVeyor: do not upload ubuntu packages (we will swtich to Launchpad instead),
make vs2017 and vs2015 names different from each other, rename linux test script
2018-11-28 02:33:52 +05:00
28e9b46634 Merge PR #820: travis-ci: do not do anything on tag, source is packed automatically 2018-11-27 20:51:56 +01:00
bc1070a7fd travis-ci: do not do anything on tag, source is packed automatically 2018-11-28 00:34:18 +05:00
dbfc990701 Merge PR #819: CMake: build targets with versioning info on Windows 2018-11-27 17:03:36 +01:00
8d37f3fa0f BuildUtil: use new variables 2018-11-27 05:26:28 +01:00
6903f9b89f CMake: build targets with versioning info on Windows 2018-11-27 05:26:21 +01:00
0642427080 BuildFiles: edit "ver.rc" so that it uses CMake's variables syntax 2018-11-27 05:00:30 +01:00
04188f8606 CMake: change project name to "SoftEther VPN", create and use "TOP_DIRECTORY" variable 2018-11-27 05:00:30 +01:00
70ee8abae8 Merge pull request #818 from chipitsine/cleanup
Merge PR #818: src/Mayaqua/Cfg: remove unused functions, variables
2018-11-27 02:13:10 +05:00
e143873337 Merge PR #816: Cedar: add new "UsernameHubSeparator" configuration option for the server, to specify a different character from '@' 2018-11-26 21:59:52 +01:00
d72329c007 src/Mayaqua/Cfg: remove unused functions, variables
found by cppcheck

[src/Mayaqua/Cfg.c:669]: (style) Variable 'invalid_file' is assigned a value that is never used.
[src/Mayaqua/Cfg.c:2111]: (style) Variable 'v' is assigned a value that is never used.
[src/Mayaqua/Cfg.c:1114]: (style) The function 'CfgFolderToBufText' is never used.
[src/Mayaqua/Cfg.c:539]: (style) The function 'CfgRead' is never used.
[src/Mayaqua/Cfg.c:418]: (style) The function 'CfgSave' is never used.
[src/Mayaqua/Cfg.c:1425]: (style) The function 'CfgStrToType' is never used.
[src/Mayaqua/Cfg.c:708]: (style) The function 'CfgTest' is never used.
[src/Mayaqua/Cfg.c:704]: (style) The function 'CfgTest2' is never used.
[src/Mayaqua/Cfg.c:247]: (style) The function 'NewCfgRwW' is never used.
2018-11-27 01:52:27 +05:00
4cbb8a8560 Merge pull request #817 from chipitsine/appveyor_pwsh
Merge PR #817: AppVeyor: renew github token, renamed APPVEYOR_REPO_TAG to upper case,
2018-11-27 01:20:29 +05:00
6640f05233 AppVeyor: renew github token, renamed APPVEYOR_REPO_TAG to upper case,
added vpntest.exe to test memory
2018-11-27 01:01:30 +05:00
8a58af86b1 Cedar: add new "UsernameHubSeparator" configuration option for the server, to specify a different character from '@' 2018-11-25 20:50:14 +01:00
b8629f324f Merge PR #814: travis-ci: run Coverity only after openssl is built 2018-11-20 16:07:40 +01:00
2d30d718a0 travis-ci: run Coverity only after openssl is built 2018-11-20 09:34:17 +05:00
25 changed files with 204 additions and 235 deletions

View File

@ -25,14 +25,14 @@ for:
- src\BuildAll.cmd
- exit %errorlevel%
after_build:
- 7z a "%APPVEYOR_BUILD_FOLDER%\src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\Win32_Release\*.pdb"
- 7z a "%APPVEYOR_BUILD_FOLDER%\src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\x64_Release\*.pdb"
- 7z a "%APPVEYOR_BUILD_FOLDER%\src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\Win32_Release\*.pdb"
- 7z a "%APPVEYOR_BUILD_FOLDER%\src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\x64_Release\*.pdb"
artifacts:
- path: output\pkg\*\*
name: Release
- path: src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs.zip
- path: src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip
name: PDBs (x86)
- path: src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs.zip
- path: src\bin\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip
name: PDBs (x64)
-
matrix:
@ -44,14 +44,17 @@ for:
- configure
build_script:
- nmake
test_script:
- ps: cd $env:APPVEYOR_BUILD_FOLDER
- ps: .\.ci\appveyor-vpntest.ps1
after_build:
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.exe"
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%.zip" "%APPVEYOR_BUILD_FOLDER%\build\hamcore.se2"
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.pdb"
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.exe"
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\hamcore.se2"
- 7z a "%APPVEYOR_BUILD_FOLDER%\build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.pdb"
artifacts:
- path: build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%.zip
- path: build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip
name: Release
- path: build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs.zip
- path: build\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip
name: PDBs
-
matrix:
@ -61,11 +64,8 @@ for:
- ./configure
build_script:
- make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4)
after_build:
- .ci/appveyor_afterbuild.sh
artifacts:
- path: build/*.deb
name: Ubuntu
test_script:
- .ci/appveyor-deb-install-test.sh
-
matrix:
only:
@ -75,16 +75,13 @@ for:
build_script:
- make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4)
- .ci/memory-leak-test.sh
after_build:
- .ci/appveyor_afterbuild.sh
artifacts:
- path: build/*.deb
name: Ubuntu
test_script:
- .ci/appveyor-deb-install-test.sh
deploy:
description: 'automatic release'
provider: GitHub
auth_token:
secure: FJU1W6Li4W7h3mYJj206ybyhRvBqdSeiSoFJ4lhCkQl6n92ljSVnZiPKPtaSuP6i
secure: AMFTEsa7hI1osVhKFo+e8ueIWyzP7dITIGVWkhCoOfHEnHaYBzz7acqrJD/qB0H8
on:
appveyor_repo_tag: true
APPVEYOR_REPO_TAG: true

18
.ci/appveyor-vpntest.ps1 Normal file
View File

@ -0,0 +1,18 @@
$ErrorActionPreference = 'Stop'
# ('s', 'c', 'b', 'sm', 'cm') ??
('s', 'c', 'b') | % {
[String] $mode = $_
Write-Host "testing: $mode"
$t = (Write-Output "q\n" | & .\build\vpntest.exe $mode | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
if( ($t).Count -ne 1){
Write-Error 'failed'
return $false
}else{
Write-Host 'ok'
}
}

View File

@ -32,27 +32,9 @@ matrix:
dotnet: 2.1.300
before_install:
- true
before_script:
- true
script:
- cd developer_tools/stbchecker
- dotnet run ../../src/bin/hamcore
- env: LABEL="create release from tag"
os: linux
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file: se.tar.gz
skip_cleanup: true
on:
tags: true
repo: SoftEtherVPN/SoftEtherVPN
before_install:
- true
before_script:
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
script:
- true
- os: osx
compiler: clang
before_install:
@ -71,14 +53,12 @@ cache:
before_install:
- bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
before_script:
- .ci/coverity.sh
script:
- export OPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR}
- export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"
- export CFLAGS="-I${HOME}/opt/include"
- export LDFLAGS="-L${HOME}/opt/lib"
- .ci/coverity.sh
- ./configure
- make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver

View File

@ -1,10 +1,13 @@
cmake_minimum_required(VERSION 3.7)
project(SoftEtherVPN
VERSION 5.01.9664
project("SoftEther VPN"
VERSION 5.01.9665
LANGUAGES C
)
set(TOP_DIRECTORY ${CMAKE_SOURCE_DIR})
set(BUILD_DIRECTORY ${TOP_DIRECTORY}/build)
# We define a dedicated variable because CMAKE_BUILD_TYPE can have different
# configurations than "Debug" and "Release", such as "RelWithDebInfo".
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -14,12 +17,12 @@ else()
endif()
# Check that submodules are present only if source was downloaded with git
if(EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURCE_DIR}/src/Mayaqua/3rdparty/cpu_features/CMakeLists.txt")
if(EXISTS "${TOP_DIRECTORY}/.git" AND NOT EXISTS "${TOP_DIRECTORY}/src/Mayaqua/3rdparty/cpu_features/CMakeLists.txt")
message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive")
endif()
# Compare ${PROJECT_VERSION} and src/CurrentBuild.txt
file(READ ${SoftEtherVPN_SOURCE_DIR}/src/CurrentBuild.txt CurrentBuild)
file(READ ${TOP_DIRECTORY}/src/CurrentBuild.txt CurrentBuild)
string(REGEX MATCH "VERSION_MAJOR ([0-9]+)" temp ${CurrentBuild})
string(REGEX REPLACE "VERSION_MAJOR ([0-9]+)" "\\1" CurrentBuild_MAJOR ${temp})
@ -40,9 +43,19 @@ if(UNIX)
Check_Include_File(sys/auxv.h HAVE_SYS_AUXV)
endif()
configure_file("${SoftEtherVPN_SOURCE_DIR}/AUTHORS.TXT" "${SoftEtherVPN_SOURCE_DIR}/src/bin/hamcore/authors.txt" COPYONLY)
configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY)
# Date and time
string(TIMESTAMP DATE_DAY "%d" UTC)
string(TIMESTAMP DATE_MONTH "%m" UTC)
string(TIMESTAMP DATE_YEAR "%Y" UTC)
string(TIMESTAMP TIME_HOUR "%H" UTC)
string(TIMESTAMP TIME_MINUTE "%M" UTC)
string(TIMESTAMP TIME_SECOND "%S" UTC)
message(STATUS "Build date: ${DATE_DAY}/${DATE_MONTH}/${DATE_YEAR}")
message(STATUS "Build time: ${TIME_HOUR}:${TIME_MINUTE}:${TIME_SECOND}")
set(BUILD_DIRECTORY ${SoftEtherVPN_SOURCE_DIR}/build)
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
add_subdirectory(src)
@ -54,11 +67,11 @@ if(UNIX)
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VENDOR "SoftEther")
set(CPACK_PACKAGE_NAME "softether")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${SoftEtherVPN_SOURCE_DIR}/description")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_DIRECTORY}/description")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftEther VPN is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba.")
# DEB
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(BUILD_TYPE STREQUAL "Debug")
set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
endif()

View File

@ -1,8 +1,8 @@
#pragma code_page(932)
1 VERSIONINFO
FILEVERSION $VER_MAJOR$,$VER_MINOR$,0,$VER_BUILD$
PRODUCTVERSION $VER_MAJOR$,$VER_MINOR$,0,$VER_BUILD$
FILEVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},0,${PROJECT_VERSION_PATCH}
PRODUCTVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},0,${PROJECT_VERSION_PATCH}
FILEFLAGSMASK 0x17L
FILEOS 0x4L
FILETYPE 0x1L
@ -12,15 +12,15 @@ BEGIN
BEGIN
BLOCK "041104b0"
BEGIN
VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan. (Developer Edition)"
VALUE "FileDescription", "$PRODUCTNAME$ (Developer Edition)"
VALUE "FileVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$"
VALUE "InternalName", "$INTERNALNAME$ (Developer Edition)"
VALUE "LegalCopyright", "Copyright (C) 2012-$YEAR$ SoftEther VPN Project. All Rights Reserved. (Developer Edition)"
VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan."
VALUE "FileDescription", "${PROJECT_NAME} ${COMPONENT_NAME} (Developer Edition)"
VALUE "FileVersion", "${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 0, ${PROJECT_VERSION_PATCH}"
VALUE "InternalName", "${COMPONENT_INTERNAL_NAME}"
VALUE "LegalCopyright", "Copyright (C) 2012-${DATE_YEAR} SoftEther VPN Project. All Rights Reserved."
VALUE "LegalTrademarks", "SoftEther(R) is a registered trademark of SoftEther Corporation in Japan, United Status and People's Republic of China. SoftEther Corporation is a company founded at University of Tsukuba, Japan."
VALUE "OriginalFilename", "$FILENAME$"
VALUE "ProductName", "$PRODUCTNAME$ (Developer Edition)"
VALUE "ProductVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$"
VALUE "OriginalFilename", "${COMPONENT_FILE_NAME}"
VALUE "ProductName", "${PROJECT_NAME} ${COMPONENT_NAME}"
VALUE "ProductVersion", "${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 0, ${PROJECT_VERSION_PATCH}"
END
END
BLOCK "VarFileInfo"

View File

@ -199,24 +199,19 @@ namespace BuildUtil
string exeFileName = Path.GetFileName(targetExeName);
string internalName = Path.GetFileNameWithoutExtension(exeFileName);
if (Str.IsEmptyStr(product_name) == false)
{
body = Str.ReplaceStr(body, "$PRODUCTNAME$", product_name);
}
else
{
#if !BU_SOFTETHER
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "PacketiX VPN");
body = Str.ReplaceStr(body, "${PROJECT_NAME}", "PacketiX VPN");
#else
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "SoftEther VPN");
body = Str.ReplaceStr(body, "${PROJECT_NAME}", "SoftEther VPN");
#endif
}
body = Str.ReplaceStr(body, "$INTERNALNAME$", internalName);
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString());
body = Str.ReplaceStr(body, "$FILENAME$", exeFileName);
body = Str.ReplaceStr(body, "$VER_MAJOR$", versionMajor.ToString());
body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString());
body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString());
body = Str.ReplaceStr(body, "${COMPONENT_NAME}", product_name);
body = Str.ReplaceStr(body, "${COMPONENT_INTERNAL_NAME}", internalName);
body = Str.ReplaceStr(body, "${DATE_YEAR}", date.Year.ToString());
body = Str.ReplaceStr(body, "${COMPONENT_FILE_NAME}", exeFileName);
body = Str.ReplaceStr(body, "${PROJECT_VERSION_MAJOR}", versionMajor.ToString());
body = Str.ReplaceStr(body, "${PROJECT_VERSION_MINOR}", versionMinor.ToString());
body = Str.ReplaceStr(body, "${PROJECT_VERSION_PATCH}", versionBuild.ToString());
IO f = IO.CreateTempFileByExt(".rc");
string filename = f.Name;

View File

@ -4,11 +4,11 @@ if(UNIX)
macro(install_wrapper_script component target)
get_filename_component(file_name ${target} NAME)
file(WRITE ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "#!/bin/sh\n")
file(APPEND ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "${target} \"$@\"\n")
file(APPEND ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "exit $?\n")
file(WRITE ${TOP_DIRECTORY}/tmp/script/${file_name} "#!/bin/sh\n")
file(APPEND ${TOP_DIRECTORY}/tmp/script/${file_name} "${target} \"$@\"\n")
file(APPEND ${TOP_DIRECTORY}/tmp/script/${file_name} "exit $?\n")
install(FILES ${CMAKE_SOURCE_DIR}/tmp/script/${file_name}
install(FILES ${TOP_DIRECTORY}/tmp/script/${file_name}
COMPONENT ${component}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
@ -100,7 +100,7 @@ add_subdirectory(vpntest)
# hamcore.se2 archive file
add_custom_target(hamcore-archive-build
ALL
COMMAND hamcorebuilder "${CMAKE_SOURCE_DIR}/src/bin/hamcore/" "${BUILD_DIRECTORY}/hamcore.se2"
COMMAND hamcorebuilder "${TOP_DIRECTORY}/src/bin/hamcore/" "${BUILD_DIRECTORY}/hamcore.se2"
DEPENDS hamcorebuilder
COMMENT "Building hamcore.se2 archive file..."
VERBATIM

View File

@ -54,24 +54,13 @@ cmake_host_system_information(RESULT BUILDER_HOSTNAME QUERY HOSTNAME)
add_definitions(-DBUILD_PLACE="${BUILDER_HOSTNAME}")
# Date and time
string(TIMESTAMP BUILD_DAY "%d" UTC)
string(TIMESTAMP BUILD_MONTH "%m" UTC)
string(TIMESTAMP BUILD_YEAR "%Y" UTC)
string(TIMESTAMP BUILD_HOUR "%H" UTC)
string(TIMESTAMP BUILD_MINUTE "%M" UTC)
string(TIMESTAMP BUILD_SECOND "%S" UTC)
## Remove leading 0
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_DAY "${BUILD_DAY}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MONTH "${BUILD_MONTH}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_YEAR "${BUILD_YEAR}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_HOUR "${BUILD_HOUR}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MINUTE "${BUILD_MINUTE}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_SECOND "${BUILD_SECOND}")
message(STATUS "Build date: ${BUILD_DAY}/${BUILD_MONTH}/${BUILD_YEAR}")
message(STATUS "Build time: ${BUILD_HOUR}:${BUILD_MINUTE}:${BUILD_SECOND}")
# Remove leading 0 from date and time
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_DAY "${DATE_DAY}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MONTH "${DATE_MONTH}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_YEAR "${DATE_YEAR}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_HOUR "${TIME_HOUR}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MINUTE "${TIME_MINUTE}")
string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_SECOND "${TIME_SECOND}")
add_definitions(-DBUILD_DATE_D=${BUILD_DAY} -DBUILD_DATE_M=${BUILD_MONTH} -DBUILD_DATE_Y=${BUILD_YEAR})
add_definitions(-DBUILD_DATE_HO=${BUILD_HOUR} -DBUILD_DATE_MI=${BUILD_MINUTE} -DBUILD_DATE_SE=${BUILD_SECOND})

View File

@ -209,6 +209,9 @@
// Hidden password string of 8 characters
#define HIDDEN_PASSWORD "********"
// Default separator character for the hub name in the username
#define DEFAULT_USERNAME_HUB_SEPARATOR '@'
//////////////////////////////////////////////////////////////////////
//
@ -1024,6 +1027,7 @@ typedef struct CEDAR
COUNTER *ConnectionIncrement; // Connection increment counter
X *ServerX; // Server certificate
K *ServerK; // Private key of the server certificate
char UsernameHubSeparator; // Character which separates the username from the hub name
char *CipherList; // List of encryption algorithms
UINT Version; // Version information
UINT Build; // Build Number

View File

@ -807,14 +807,14 @@ bool PPPParseUsername(CEDAR *cedar, char *src_username, ETHERIP_ID *dst)
}
else
{
// Search for the last "@" in the string
// Search for the separator character's last position in the string
len = StrLen(src);
last_at = INFINITE;
for (i = 0;i < len;i++)
{
char c = src[i];
if (c == '@')
if (c == cedar->UsernameHubSeparator)
{
last_at = i;
}
@ -825,12 +825,11 @@ bool PPPParseUsername(CEDAR *cedar, char *src_username, ETHERIP_ID *dst)
if (last_at == INFINITE)
{
// "@" is not specified
// The separator character is not specified
StrCpy(token1, sizeof(token1), src);
}
else
{
// Split with last "@"
StrCpy(token1, sizeof(token1), src);
token1[last_at] = 0;

View File

@ -2540,6 +2540,9 @@ void SiLoadInitialConfiguration(SERVER *s)
// Set the server certificate to default
SiInitDefaultServerCert(s);
// Set the character which separates the username from the hub name
s->Cedar->UsernameHubSeparator = DEFAULT_USERNAME_HUB_SEPARATOR;
// Create a default HUB
{
SiInitDefaultHubList(s);
@ -5936,6 +5939,12 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
FreeK(k);
}
// Character which separates the username from the hub name
if (CfgGetStr(f, "UsernameHubSeparator", tmp, sizeof(tmp)))
{
c->UsernameHubSeparator = IsPrintableAsciiChar(tmp[0]) ? tmp[0] : DEFAULT_USERNAME_HUB_SEPARATOR;
}
// Cipher Name
if (CfgGetStr(f, "CipherName", tmp, sizeof(tmp)))
{
@ -6313,6 +6322,13 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
CfgAddBuf(f, "ServerKey", b);
FreeBuf(b);
{
// Character which separates the username from the hub name
char str[2];
StrCpy(str, sizeof(str), &c->UsernameHubSeparator);
CfgAddStr(f, "UsernameHubSeparator", str);
}
// Traffic information
Lock(c->TrafficLock);
{

View File

@ -1,5 +1,5 @@
VERSION_MAJOR 5
VERSION_MINOR 1
VERSION_BUILD 9664
VERSION_BUILD 9665
BUILD_NAME unstable
BUILD_DATE 20181120_041910
BUILD_DATE 20181128_103328

View File

@ -31,22 +31,22 @@ if(WIN32)
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
find_library(LIB_SSL
NAMES libssl ssleay32
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
)
find_library(LIB_CRYPTO
NAMES libcrypto libeay32
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
)
else()
find_library(LIB_SSL
NAMES libssl ssleay32
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
)
find_library(LIB_CRYPTO
NAMES libcrypto libeay32
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
)
endif()

View File

@ -244,10 +244,6 @@ CFG_RW *NewCfgRw(FOLDER **root, char *cfg_name)
{
return NewCfgRwEx(root, cfg_name, false);
}
CFG_RW *NewCfgRwW(FOLDER **root, wchar_t *cfg_name)
{
return NewCfgRwExW(root, cfg_name, false);
}
CFG_RW *NewCfgRwEx(FOLDER **root, char *cfg_name, bool dont_backup)
{
wchar_t *cfg_name_w = CopyStrToUni(cfg_name);
@ -556,7 +552,6 @@ FOLDER *CfgReadW(wchar_t *name)
FOLDER *f;
bool delete_new = false;
bool binary_file = false;
bool invalid_file = false;
UCHAR header[8];
bool has_eof = false;
// Validate arguments
@ -613,11 +608,6 @@ FOLDER *CfgReadW(wchar_t *name)
{
// Read the original file too if the size of temporary file is 0
if (FileSize(o) == 0)
{
invalid_file = true;
}
if (invalid_file)
{
FileClose(o);
o = FileOpenW(name, false);
@ -666,7 +656,6 @@ FOLDER *CfgReadW(wchar_t *name)
if (Cmp(hash1, hash2, SHA1_SIZE) != 0)
{
// Corrupted file
invalid_file = true;
FreeBuf(b);
return NULL;
}
@ -700,46 +689,6 @@ FOLDER *CfgReadW(wchar_t *name)
return f;
}
// Test of Cfg
void CfgTest2(FOLDER *f, UINT n)
{
}
void CfgTest()
{
#if 0
FOLDER *root;
BUF *b;
Debug("\nCFG Test Begin\n");
root = CfgCreateFolder(NULL, TAG_ROOT);
CfgTest2(root, 5);
b = CfgFolderToBufText(root);
//Print("%s\n", b->Buf);
SeekBuf(b, 0, 0);
CfgDeleteFolder(root);
DumpBuf(b, "test1.config");
root = CfgBufTextToFolder(b);
FreeBuf(b);
b = CfgFolderToBufText(root);
// Print("%s\n", b->Buf);
DumpBuf(b, "test2.config");
FreeBuf(b);
CfgSave(root, "test.txt");
CfgDeleteFolder(root);
Debug("\nCFG Test End\n");
#endif
}
// Read one line
char *CfgReadNextLine(BUF *b)
{
@ -1111,10 +1060,6 @@ BUF *CfgFolderToBufBin(FOLDER *f)
}
// Convert the folder to a stream text
BUF *CfgFolderToBufText(FOLDER *f)
{
return CfgFolderToBufTextEx(f, false);
}
BUF *CfgFolderToBufTextEx(FOLDER *f, bool no_banner)
{
BUF *b;
@ -1421,17 +1366,6 @@ void CfgAddData(BUF *b, UINT type, char *name, char *data, char *sub, UINT depth
Free(tmp);
}
// Convert the data type string to an integer value
UINT CfgStrToType(char *str)
{
if (!StrCmpi(str, TAG_INT)) return ITEM_TYPE_INT;
if (!StrCmpi(str, TAG_INT64)) return ITEM_TYPE_INT64;
if (!StrCmpi(str, TAG_BYTE)) return ITEM_TYPE_BYTE;
if (!StrCmpi(str, TAG_STRING)) return ITEM_TYPE_STRING;
if (!StrCmpi(str, TAG_BOOL)) return ITEM_TYPE_BOOL;
return 0;
}
// Convert the type of data to a string
char *CfgTypeToStr(UINT type)
{
@ -2101,14 +2035,12 @@ ITEM *CfgAddInt(FOLDER *f, char *name, UINT i)
// Adding a bool type
ITEM *CfgAddBool(FOLDER *f, char *name, bool b)
{
bool v;
// Validate arguments
if (f == NULL || name == NULL)
{
return NULL;
}
v = b ? 1 : 0;
return CfgCreateItem(f, name, ITEM_TYPE_BOOL, &b, sizeof(bool));
}

View File

@ -210,14 +210,11 @@ BUF *CfgGetBuf(FOLDER *f, char *name);
bool CfgGetStr(FOLDER *f, char *name, char *str, UINT size);
bool CfgGetUniStr(FOLDER *f, char *name, wchar_t *str, UINT size);
bool CfgIsItem(FOLDER *f, char *name);
void CfgTest();
void CfgTest2(FOLDER *f, UINT n);
char *CfgEscape(char *name);
bool CfgCheckCharForName(char c);
char *CfgUnescape(char *str);
BUF *CfgFolderToBuf(FOLDER *f, bool textmode);
BUF *CfgFolderToBufEx(FOLDER *f, bool textmode, bool no_banner);
BUF *CfgFolderToBufText(FOLDER *f);
BUF *CfgFolderToBufTextEx(FOLDER *f, bool no_banner);
BUF *CfgFolderToBufBin(FOLDER *f);
void CfgOutputFolderText(BUF *b, FOLDER *f, UINT depth);
@ -226,7 +223,6 @@ void CfgAddLine(BUF *b, char *str, UINT depth);
void CfgAddDeclare(BUF *b, char *name, UINT depth);
void CfgAddEnd(BUF *b, UINT depth);
void CfgAddData(BUF *b, UINT type, char *name, char *data, char *sub, UINT depth);
UINT CfgStrToType(char *str);
char *CfgTypeToStr(UINT type);
void CfgAddItemText(BUF *b, ITEM *t, UINT depth);
bool CfgEnumFolderProc(FOLDER *f, void *param);
@ -248,7 +244,6 @@ FOLDER *CfgCreateRoot();
void CfgTest();
void CfgTest2(FOLDER *f, UINT n);
CFG_RW *NewCfgRw(FOLDER **root, char *cfg_name);
CFG_RW *NewCfgRwW(FOLDER **root, wchar_t *cfg_name);
CFG_RW *NewCfgRwEx(FOLDER **root, char *cfg_name, bool dont_backup);
CFG_RW *NewCfgRwExW(FOLDER **root, wchar_t *cfg_name, bool dont_backup);
CFG_RW *NewCfgRwEx2W(FOLDER **root, wchar_t *cfg_name, bool dont_backup, wchar_t *template_name);

View File

@ -6,9 +6,9 @@ add_library(PenCore SHARED pencore.c pencore.rc)
set_target_properties(PenCore
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
ARCHIVE_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
LIBRARY_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
RUNTIME_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)

View File

@ -2,15 +2,15 @@ add_executable(hamcorebuilder hamcorebuilder.c)
set_target_properties(hamcorebuilder
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
ARCHIVE_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp"
LIBRARY_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp"
RUNTIME_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp"
)
if(WIN32)
set_target_properties(hamcorebuilder
PROPERTIES
PDB_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
PDB_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp"
)
endif()

View File

@ -1,10 +1,7 @@
set(VPNBRIDGE_SOURCES vpnbridge.c)
set(COMPONENT_NAME "Bridge")
set(COMPONENT_INTERNAL_NAME "vpnbridge")
if(WIN32)
set(VPNBRIDGE_SOURCES ${VPNBRIDGE_SOURCES} vpnbridge.rc)
endif()
add_executable(vpnbridge ${VPNBRIDGE_SOURCES})
add_executable(vpnbridge vpnbridge.c)
set_target_properties(vpnbridge
PROPERTIES
@ -18,6 +15,12 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpnbridge NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnbridge.rc")
target_sources(vpnbridge PRIVATE vpnbridge.rc "${CMAKE_BINARY_DIR}/VerScript/vpnbridge.rc")
endif()
target_link_libraries(vpnbridge cedar mayaqua)
@ -38,7 +41,7 @@ if(UNIX)
install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge")
if(EXISTS "/lib/systemd/system")
configure_file(${CMAKE_SOURCE_DIR}/systemd/softether-vpnbridge.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service)
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnbridge.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service)
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service
COMPONENT "vpnbridge"
DESTINATION "/lib/systemd/system"

View File

@ -1,10 +1,7 @@
set(VPNCLIENT_SOURCES vpncsvc.c vpncsvc.h)
set(COMPONENT_NAME "Client")
set(COMPONENT_INTERNAL_NAME "vpnclient")
if(WIN32)
set(VPNCLIENT_SOURCES ${VPNCLIENT_SOURCES} vpnclient.rc)
endif()
add_executable(vpnclient ${VPNCLIENT_SOURCES})
add_executable(vpnclient vpncsvc.c vpncsvc.h)
set_target_properties(vpnclient
PROPERTIES
@ -18,6 +15,12 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpnclient NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnclient.rc")
target_sources(vpnclient PRIVATE vpnclient.rc "${CMAKE_BINARY_DIR}/VerScript/vpnclient.rc")
endif()
target_link_libraries(vpnclient cedar mayaqua)
@ -38,7 +41,7 @@ if(UNIX)
install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient")
if(EXISTS "/lib/systemd/system")
configure_file(${CMAKE_SOURCE_DIR}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service)
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service)
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service
COMPONENT "vpnclient"
DESTINATION "/lib/systemd/system"

View File

@ -1,10 +1,7 @@
set(VPNCMD_SOURCES vpncmd.c)
set(COMPONENT_NAME "Command Line Management Utility")
set(COMPONENT_INTERNAL_NAME "vpncmd")
if(WIN32)
set(VPNCMD_SOURCES ${VPNCMD_SOURCES} vpncmd.rc)
endif()
add_executable(vpncmd ${VPNCMD_SOURCES})
add_executable(vpncmd vpncmd.c)
set_target_properties(vpncmd
PROPERTIES
@ -18,6 +15,12 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpncmd NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpncmd.rc")
target_sources(vpncmd PRIVATE vpncmd.rc "${CMAKE_BINARY_DIR}/VerScript/vpncmd.rc")
endif()
target_link_libraries(vpncmd cedar mayaqua)

View File

@ -2,16 +2,23 @@ if(NOT WIN32)
message(FATAL_ERROR "VPN Client Manager is available only for Windows.")
endif()
set(VPNCMGR_SOURCES vpncmgr.c vpncmgr.rc)
set(COMPONENT_NAME "Client Manager")
set(COMPONENT_INTERNAL_NAME "vpncmgr")
add_executable(vpncmgr WIN32 vpncmgr.c vpncmgr.rc)
get_filename_component(COMPONENT_FILE_NAME vpncmgr NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpncmgr.rc")
target_sources(vpncmgr PRIVATE "${CMAKE_BINARY_DIR}/VerScript/vpncmgr.rc")
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
set(VPNCMGR_SOURCES ${VPNCMGR_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x64_user.manifest)
target_sources(vpncmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest")
else()
set(VPNCMGR_SOURCES ${VPNCMGR_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x86_user.manifest)
target_sources(vpncmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest")
endif()
add_executable(vpncmgr WIN32 ${VPNCMGR_SOURCES})
set_target_properties(vpncmgr
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"

View File

@ -1,10 +1,7 @@
set(VPNSERVER_SOURCES vpnserver.c)
set(COMPONENT_NAME "Server")
set(COMPONENT_INTERNAL_NAME "vpnserver")
if(WIN32)
set(VPNSERVER_SOURCES ${VPNSERVER_SOURCES} vpnserver.rc)
endif()
add_executable(vpnserver ${VPNSERVER_SOURCES})
add_executable(vpnserver vpnserver.c)
set_target_properties(vpnserver
PROPERTIES
@ -18,6 +15,12 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpnserver NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc")
target_sources(vpnserver PRIVATE vpnserver.rc "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc")
endif()
target_link_libraries(vpnserver cedar mayaqua)
@ -38,7 +41,7 @@ if(UNIX)
install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver")
if(EXISTS "/lib/systemd/system")
configure_file(${CMAKE_SOURCE_DIR}/systemd/softether-vpnserver.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service)
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnserver.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service)
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service
COMPONENT "vpnserver"
DESTINATION "/lib/systemd/system"

View File

@ -2,16 +2,23 @@ if(NOT WIN32)
message(FATAL_ERROR "VPN Server Manager is available only for Windows.")
endif()
set(VPNSMGR_SOURCES vpnsmgr.c vpnsmgr.rc)
set(COMPONENT_NAME "Server Manager")
set(COMPONENT_INTERNAL_NAME "vpnsmgr")
add_executable(vpnsmgr WIN32 vpnsmgr.c vpnsmgr.rc)
get_filename_component(COMPONENT_FILE_NAME vpnsmgr NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnsmgr.rc")
target_sources(vpnsmgr PRIVATE "${CMAKE_BINARY_DIR}/VerScript/vpnsmgr.rc")
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
set(VPNSMGR_SOURCES ${VPNSMGR_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x64_user.manifest)
target_sources(vpnsmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest")
else()
set(VPNSMGR_SOURCES ${VPNSMGR_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x86_user.manifest)
target_sources(vpnsmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest")
endif()
add_executable(vpnsmgr WIN32 ${VPNSMGR_SOURCES})
set_target_properties(vpnsmgr
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"

View File

@ -1,14 +1,7 @@
set(VPNTEST_SOURCES vpntest.c vpntest.h)
set(COMPONENT_NAME "Testing Utility")
set(COMPONENT_INTERNAL_NAME "vpntest")
if(WIN32)
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
set(VPNTEST_SOURCES ${VPNTEST_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x64_user.manifest)
else()
set(VPNTEST_SOURCES ${VPNTEST_SOURCES} ${CMAKE_SOURCE_DIR}/src/BuildFiles/Manifests/x86_user.manifest)
endif()
endif()
add_executable(vpntest ${VPNTEST_SOURCES})
add_executable(vpntest vpntest.c vpntest.h)
set_target_properties(vpntest
PROPERTIES
@ -22,6 +15,18 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpntest NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpntest.rc")
target_sources(vpntest PRIVATE vpntest.rc "${CMAKE_BINARY_DIR}/VerScript/vpntest.rc")
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
target_sources(vpntest PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest")
else()
target_sources(vpntest PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest")
endif()
endif()
target_link_libraries(vpntest cedar mayaqua)