Commit 72c990cb authored by captainwong's avatar captainwong

win32 path helper

parent eca7450b
#include "ThreadCtrl.h"
JLIB_QT_NAMESPACE_BEGIN
namespace jlib
{
namespace qt
{
ThreadCtrl::ThreadCtrl(QObject* parent, int proto_type)
: QThread(parent)
......@@ -22,4 +25,5 @@ void ThreadCtrl::run()
emit sig_done(tag_, result_code_);
}
JLIB_QT_NAMESPACE_END
}
}
......@@ -4,7 +4,10 @@
#include <QThread>
#include "../Model/ThreadModel.h"
JLIB_QT_NAMESPACE_BEGIN
namespace jlib
{
namespace qt
{
class ThreadCtrl : public QThread
{
......@@ -41,4 +44,5 @@ private:
int tag_ = -1;
};
JLIB_QT_NAMESPACE_END
}
}
#pragma once
#include "qt_global.h"
#include <system_error>
#include <QString>
namespace jlib
{
namespace qt
{
JLIBQT_NAMESPACE_BEGIN
//! 获取错误码文字描述
inline QString ecString(const std::error_code& ec) {
......@@ -33,8 +30,7 @@ enum class CommonErrorCode {
};
}
}
JLIBQT_NAMESPACE_END
namespace std
{
......@@ -43,8 +39,7 @@ namespace std
template <> struct is_error_code_enum<type> : true_type {}; \
std::error_code make_error_code(type);
ENABLE_ENUM_AS_ERROR_CODE(jlib::qt::CommonErrorCode)
ENABLE_ENUM_AS_ERROR_CODE(JLIBQT_NAMESPACE CommonErrorCode)
}
......@@ -58,12 +53,12 @@ struct CommonErrorCatagory : public std::error_category
}
std::string message(int ev) const override {
switch (static_cast<jlib::qt::CommonErrorCode>(ev)) {
case jlib::qt::CommonErrorCode::OpenDbFailed:
switch (static_cast<JLIBQT_NAMESPACE CommonErrorCode>(ev)) {
case JLIBQT_NAMESPACE CommonErrorCode::OpenDbFailed:
return QObject::tr("Failed to open database").toLocal8Bit().toStdString();
case jlib::qt::CommonErrorCode::CreateDbTableFailed:
case JLIBQT_NAMESPACE CommonErrorCode::CreateDbTableFailed:
return QObject::tr("Failed to create table").toLocal8Bit().toStdString();
case jlib::qt::CommonErrorCode::QueryDbFailed:
case JLIBQT_NAMESPACE CommonErrorCode::QueryDbFailed:
return QObject::tr("Failed to query database").toLocal8Bit().toStdString();
default:
return QObject::tr("Unkown Error").toLocal8Bit().toStdString();
......@@ -75,7 +70,7 @@ static const CommonErrorCatagory theCommonErrorCatagory = {};
}
inline std::error_code std::make_error_code(jlib::qt::CommonErrorCode ec)
inline std::error_code std::make_error_code(JLIBQT_NAMESPACE CommonErrorCode ec)
{
return { static_cast<int>(ec), theCommonErrorCatagory };
}
......
#pragma once
#include "qt_global.h"
//#include <system_error>
#include <QString>
#include <functional>
......
#pragma once
#include "qt_global.h"
#include <QString>
#include <QColor>
namespace jlib {
namespace qt {
JLIBQT_NAMESPACE_BEGIN
namespace def_sizes {
......@@ -378,5 +378,4 @@ QCheckBox::indicator:unchecked
} // end of namespace def_style_sheets
} // end of namespace qt
} // end of namespace jlib
JLIBQT_NAMESPACE_END
#pragma once
#include "qt_global.h"
#include <cassert>
#include <QString>
#include <QColor>
......@@ -14,8 +15,7 @@
#include "QtPathHelper.h"
namespace jlib {
namespace qt {
JLIBQT_NAMESPACE_BEGIN
/**
* @brief 不阻塞UI响应的情况下,等待一段时间
......@@ -48,6 +48,10 @@ static inline bool warn_if_load_pixmap_failed(QPixmap& pixmap, QString icon_path
/*if (!QDir().isAbsolutePath(icon_path)) {
icon_path = PathHelper::program() + "/" + icon_path;
}*/
if (!icon_path.startsWith(":/")) {
icon_path = ":/" + icon_path;
}
if (!pixmap.load(icon_path) && !pixmap.load(icon_path, "png")) {
qCritical() << file_line << "load pixmap failed: " << icon_path;
......@@ -57,7 +61,7 @@ static inline bool warn_if_load_pixmap_failed(QPixmap& pixmap, QString icon_path
return true;
}
#define LOAD_PIXMAP_EX(icon_path) jlib::qt::warn_if_load_pixmap_failed(pixmap, icon_path, JLIBQT_QDEBUG_FILE_LINE_VALUE)
#define LOAD_PIXMAP_EX(icon_path) JLIBQT_NAMESPACE warn_if_load_pixmap_failed(pixmap, icon_path, JLIBQT_QDEBUG_FILE_LINE_VALUE)
static QIcon icon_from_path(QString path, QSize icon_sz) {
QPixmap pixmap;
......@@ -121,7 +125,4 @@ static inline void center_to_desktop(QWidget* widget, int new_width, int new_hei
}
}
}
JLIBQT_NAMESPACE_END
#pragma once
#include "qt_global.h"
#include <qstring.h>
#include <Windows.h>
#include <qrect.h>
......@@ -7,10 +8,7 @@
#include <assert.h>
#include <qdebug.h>
namespace jlib
{
namespace qt
{
JLIBQT_NAMESPACE_BEGIN
struct MonitorInfo {
......@@ -454,5 +452,4 @@ std::list<DisplayDevice> dev_list;
#endif
} // end namespace qt
} // end namespace jlib
JLIBQT_NAMESPACE_END
......@@ -13,12 +13,14 @@
#endif
// #define ENABLE_JLIBQT_NAMESPACE
#define ENABLE_JLIBQT_NAMESPACE
#ifdef ENABLE_JLIBQT_NAMESPACE
#define JLIBQT_NAMESPACE_BEGIN namespace jlib { namespace qt {
#define JLIBQT_NAMESPACE_END } }
#define JLIBQT_NAMESPACE jlib::qt::
#else
#define JLIBQT_NAMESPACE_BEGIN
#define JLIBQT_NAMESPACE_END
#define JLIBQT_NAMESPACE
#endif
#pragma once
#ifdef WIN32
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif // _CRT_SECURE_NO_WARNINGS
#endif // WIN32
#include "../base/config.h"
#include <chrono>
#include <string>
#include <ctime>
......
#pragma once
#include "../base/config.h"
#include <string>
#include "path_op.h"
#include "../util/chrono_wrapper.h"
namespace jlib {
namespace win32 {
struct PathHelper
{
static inline bool mkpath(const std::string& path) {
return folderExists(path) ? true : createDirectory(path);
}
static inline bool mkpath(const std::wstring& path) {
return folderExists(path) ? true : createDirectory(path);
}
static inline std::wstring currentTimeString() {
return integrateFileName(nowToWString());
}
static inline std::string currentTimeStringA() {
return integrateFileName(nowToString());
}
virtual ~PathHelper() {}
virtual std::string program() const { return programPath_; }
virtual std::string exe() const { return exePath_; }
virtual std::string bin() const { return program() + "/bin"; }
virtual std::string data() const { return program() + "/data"; }
virtual std::string log() const { return program() + "/log"; }
virtual std::string dumps() const { return program() + "/dumps"; }
virtual std::string config() const { return data() + "/config"; }
virtual std::string db() const { return data() + "/db"; }
protected:
// disable constructor
explicit PathHelper() {}
//! 应用程序安装目录
std::string programPath_ = {};
//! 应用程序目录
std::string exePath_ = {};
};
struct AutoSwithToBin {
AutoSwithToBin(PathHelper* helper) : helper(helper) {}
AutoSwithToBin(PathHelper* helper, const std::string& path) : helper(helper) {
::SetCurrentDirectoryA(path.c_str());
}
~AutoSwithToBin() {
if (helper) { ::SetCurrentDirectoryA(helper->bin().c_str()); }
}
PathHelper* helper = nullptr;
};
/*
* @brief 路径辅助类,数据保存在安装目录,程序和dll在bin文件夹
* @note 大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
* @note | | |-- *.dlls
* @note | |-- dumps
* @note | |-- log
* @note | |-- data
* @note | |-- config
* @note | |-- db
*/
struct PathHelperLocal : PathHelper
{
PathHelperLocal() : PathHelper() {
exePath_ = getExePathA();
programPath_ = getFolder(getFolder(exePath_));
}
};
/*
* @brief 路径辅助类,数据保存在安装目录,程序和dll也在安装目录
* @note 大致结构树为:
* @note |-- program-install-dir
* @note | |-- dumps
* @note | |-- log
* @note | |-- data
* @note | | |-- config
* @note | | |-- db
* @note | |-- program.exe
* @note | |-- *.dlls
*/
struct PathHelperLocalWithoutBin : PathHelper
{
PathHelperLocalWithoutBin() : PathHelper() {
exePath_ = getExePathA();
programPath_ = getFolder(exePath_);
}
virtual std::string bin() const override { return program(); }
};
/*
* @brief 路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note 大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
* @note | | |-- *.dlls
* @note
* @note |-- C:/Users/[USER]/AppData/Roaming
* @note | |-- program-name
* @note | |-- log
* @note | |-- dumps
* @note | |-- config
* @note | |-- db
*/
struct PathHelperDataSeperated : PathHelperLocal
{
PathHelperDataSeperated(const std::string& appName, bool useTmpAsLogFolder = false)
: PathHelperLocal(), appName(appName), useTmpAsLogFolder(useTmpAsLogFolder)
{}
virtual std::string data() const override {
auto path = getAppDataPathA() + "/" + appName;
mkpath(path); return path;
}
virtual std::string log() const override { return useTmpAsLogFolder ? getTempPathA() : (data() + "/log"); }
virtual std::string dumps() const override { return data() + "/dumps"; }
virtual std::string config() const override { return data() + "/config"; }
virtual std::string db() const override { return data() + "/db"; }
protected:
std::string appName = {};
bool useTmpAsLogFolder = false;
};
/*
* @brief 路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note 大致结构树为:
* @note |-- program-install-dir
* @note | |-- program.exe
* @note | |-- *.dlls
* @note
* @note |-- C:/Users/[USER]/AppData/Roaming
* @note | |-- program-name
* @note | |-- log
* @note | |-- dumps
* @note | |-- config
* @note | |-- db
*/
struct PathHelperDataSeperatedWithoutBin : PathHelperLocalWithoutBin
{
PathHelperDataSeperatedWithoutBin(const std::string& appName, bool useTmpAsLogFolder = false)
: PathHelperLocalWithoutBin(), appName(appName), useTmpAsLogFolder(useTmpAsLogFolder)
{}
virtual std::string data() const override {
auto path = getAppDataPathA() + "/" + appName;
mkpath(path); return path;
}
virtual std::string log() const override { return useTmpAsLogFolder ? getTempPathA() : (data() + "/log"); }
virtual std::string dumps() const override { return data() + "/dumps"; }
virtual std::string config() const override { return data() + "/config"; }
virtual std::string db() const override { return data() + "/db"; }
protected:
std::string appName = {};
bool useTmpAsLogFolder = false;
};
}
}
#pragma once
#include "../base/config.h"
#include <ShlObj.h>
#include <string>
#include <algorithm>
......
......@@ -58,6 +58,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "win32", "win32", "{B5D9E71E
..\jlib\win32\memory_micros.h = ..\jlib\win32\memory_micros.h
..\jlib\win32\MyWSAError.h = ..\jlib\win32\MyWSAError.h
..\jlib\win32\odbccp32.lib = ..\jlib\win32\odbccp32.lib
..\jlib\win32\path_helper.h = ..\jlib\win32\path_helper.h
..\jlib\win32\path_op.h = ..\jlib\win32\path_op.h
..\jlib\win32\process.h = ..\jlib\win32\process.h
..\jlib\win32\rect.h = ..\jlib\win32\rect.h
......@@ -268,6 +269,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{44FC
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "barrulerplugin", "..\jlib\qt\Plugins\BarRuler\barrulerplugin.vcxproj", "{C1066CE5-C22E-3BC0-A99A-9E37E3DB9724}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_path_helper_local", "test_path_helper_local\test_path_helper_local.vcxproj", "{5BAC792A-2FC6-4E53-8C0B-3267778F8981}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_path_helper_local_without_bin", "test_path_helper_local_without_bin\test_path_helper_local_without_bin.vcxproj", "{2DABB64E-7965-40BA-A81A-8AFACF648AC8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPathHelperDataSeperated", "testPathHelperDataSeperated\testPathHelperDataSeperated.vcxproj", "{33173172-E8FB-403B-8D49-28F4E026C3BB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPathHelperDataSeperatedWithoutBin", "testPathHelperDataSeperatedWithoutBin\testPathHelperDataSeperatedWithoutBin.vcxproj", "{D11505A8-228C-4450-9674-08D993962615}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
......@@ -494,6 +503,38 @@ Global
{C1066CE5-C22E-3BC0-A99A-9E37E3DB9724}.Release|x64.ActiveCfg = Release|Win32
{C1066CE5-C22E-3BC0-A99A-9E37E3DB9724}.Release|x86.ActiveCfg = Release|Win32
{C1066CE5-C22E-3BC0-A99A-9E37E3DB9724}.Release|x86.Build.0 = Release|Win32
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Debug|x64.ActiveCfg = Debug|x64
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Debug|x64.Build.0 = Debug|x64
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Debug|x86.ActiveCfg = Debug|Win32
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Debug|x86.Build.0 = Debug|Win32
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Release|x64.ActiveCfg = Release|x64
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Release|x64.Build.0 = Release|x64
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Release|x86.ActiveCfg = Release|Win32
{5BAC792A-2FC6-4E53-8C0B-3267778F8981}.Release|x86.Build.0 = Release|Win32
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Debug|x64.ActiveCfg = Debug|x64
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Debug|x64.Build.0 = Debug|x64
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Debug|x86.ActiveCfg = Debug|Win32
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Debug|x86.Build.0 = Debug|Win32
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Release|x64.ActiveCfg = Release|x64
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Release|x64.Build.0 = Release|x64
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Release|x86.ActiveCfg = Release|Win32
{2DABB64E-7965-40BA-A81A-8AFACF648AC8}.Release|x86.Build.0 = Release|Win32
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Debug|x64.ActiveCfg = Debug|x64
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Debug|x64.Build.0 = Debug|x64
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Debug|x86.ActiveCfg = Debug|Win32
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Debug|x86.Build.0 = Debug|Win32
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Release|x64.ActiveCfg = Release|x64
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Release|x64.Build.0 = Release|x64
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Release|x86.ActiveCfg = Release|Win32
{33173172-E8FB-403B-8D49-28F4E026C3BB}.Release|x86.Build.0 = Release|Win32
{D11505A8-228C-4450-9674-08D993962615}.Debug|x64.ActiveCfg = Debug|x64
{D11505A8-228C-4450-9674-08D993962615}.Debug|x64.Build.0 = Debug|x64
{D11505A8-228C-4450-9674-08D993962615}.Debug|x86.ActiveCfg = Debug|Win32
{D11505A8-228C-4450-9674-08D993962615}.Debug|x86.Build.0 = Debug|Win32
{D11505A8-228C-4450-9674-08D993962615}.Release|x64.ActiveCfg = Release|x64
{D11505A8-228C-4450-9674-08D993962615}.Release|x64.Build.0 = Release|x64
{D11505A8-228C-4450-9674-08D993962615}.Release|x86.ActiveCfg = Release|Win32
{D11505A8-228C-4450-9674-08D993962615}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -549,6 +590,10 @@ Global
{B12702AD-ABFB-343A-A199-8E24837244A3} = {729A65CE-3F07-4C2E-ACDC-F9EEC6477F2A}
{44FC9BE2-8C8B-4A84-9C3A-28DA3F6C2DC1} = {F118E1C9-F461-4CAA-A0F1-75F5A5C8ADF3}
{C1066CE5-C22E-3BC0-A99A-9E37E3DB9724} = {44FC9BE2-8C8B-4A84-9C3A-28DA3F6C2DC1}
{5BAC792A-2FC6-4E53-8C0B-3267778F8981} = {0E6598D3-602D-4552-97F7-DC5AB458D553}
{2DABB64E-7965-40BA-A81A-8AFACF648AC8} = {0E6598D3-602D-4552-97F7-DC5AB458D553}
{33173172-E8FB-403B-8D49-28F4E026C3BB} = {0E6598D3-602D-4552-97F7-DC5AB458D553}
{D11505A8-228C-4450-9674-08D993962615} = {0E6598D3-602D-4552-97F7-DC5AB458D553}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A8EBEA58-739C-4DED-99C0-239779F57D5D}
......
#include "../../jlib/win32/path_helper.h"
using namespace jlib::win32;
int main()
{
{
printf("useTmpAsLogFolder is false\n");
PathHelperDataSeperated helper("testPathHelperDataSeperated", false);
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
{
printf("\nuseTmpAsLogFolder is true\n");
PathHelperDataSeperated helper("testPathHelperDataSeperated", true);
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{33173172-E8FB-403B-8D49-28F4E026C3BB}</ProjectGuid>
<RootNamespace>testPathHelperDataSeperated</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\bin\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="testPathHelperDataSeperated.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="testPathHelperDataSeperated.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
#include "../../jlib/win32/path_helper.h"
using namespace jlib::win32;
int main()
{
{
printf("useTmpAsLogFolder is false\n");
PathHelperDataSeperatedWithoutBin helper("PathHelperDataSeperatedWithoutBin", false);
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
{
printf("\nuseTmpAsLogFolder is true\n");
PathHelperDataSeperatedWithoutBin helper("PathHelperDataSeperatedWithoutBin", true);
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{D11505A8-228C-4450-9674-08D993962615}</ProjectGuid>
<RootNamespace>testPathHelperDataSeperatedWithoutBin</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="testPathHelperDataSeperatedWithoutBin.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="testPathHelperDataSeperatedWithoutBin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
#include "../../jlib/win32/path_helper.h"
using namespace jlib::win32;
int main()
{
PathHelperLocal helper;
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{5BAC792A-2FC6-4E53-8C0B-3267778F8981}</ProjectGuid>
<RootNamespace>testpathhelperlocal</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\bin\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="test_path_helper_local.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="test_path_helper_local.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
#include "../../jlib/win32/path_helper.h"
using namespace jlib::win32;
int main()
{
PathHelperLocalWithoutBin helper;
printf("exe=%s\n", helper.exe().data());
printf("program=%s\n", helper.program().data());
printf("bin=%s\n", helper.bin().data());
printf("data=%s\n", helper.data().data());
printf("config=%s\n", helper.config().data());
printf("db=%s\n", helper.db().data());
printf("log=%s\n", helper.log().data());
printf("dumps=%s\n", helper.dumps().data());
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{2DABB64E-7965-40BA-A81A-8AFACF648AC8}</ProjectGuid>
<RootNamespace>testpathhelperlocalwithoutbin</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="test_path_helper_local_without_bin.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="test_path_helper_local_without_bin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment