Commit 97b1f6e6 authored by jan.koester's avatar jan.koester
Browse files

msi support

parent 5e16e7b7
Loading
Loading
Loading
Loading
+0 −0

File moved.

+44 −0
Original line number Diff line number Diff line
@@ -118,7 +118,51 @@ public:
        if(sysdiv)
            /*append table to dom element sysdiv*/
            sysdiv->appendChild(div);
        #else

        /*create htmltable widget*/
        libhtmlpp::HtmlTable htmltable;

        OSVERSIONINFOW info;
        memset(&info,0,sizeof(OSVERSIONINFOW));
        info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
        GetVersionExW(&info);

        SYSTEM_INFO usysinfo;
        memset(&usysinfo, 0, sizeof(SYSTEM_INFO));
        GetSystemInfo(&usysinfo);

        libhtmlpp::HtmlString rver;

        rver  << (size_t)info.dwMajorVersion
              << "." << (size_t)info.dwMinorVersion << "(" 
              << (size_t)info.dwBuildNumber << ")";

        /*create table rows*/
        htmltable << libhtmlpp::HtmlTable::Row() << "Operating system: " << "Windows";
        htmltable << libhtmlpp::HtmlTable::Row() << "Release Version: " << rver;
        htmltable << libhtmlpp::HtmlTable::Row() << "Hardware: " << usysinfo.wProcessorArchitecture;

        libhtmlpp::HtmlElement table;
        /*convert htmltable to dom HtmlElement*/
        htmltable.insert(&table);
        /*set css class for the table*/
        table.setAttribute("class", "kinfo");

        /*HtmlString Accepts Html Raw input*/
        libhtmlpp::HtmlString html;
        html << "<div><span>KernelInfo:</span> <br/> </div> ";
        /*convert Htmlstring to Html Dom element*/
        libhtmlpp::HtmlElement* div = (libhtmlpp::HtmlElement*)html.parse();

        /*append table to dom element div*/
        div->appendChild(&table);

        /* search HtmlElement with id sysinfo */
        libhtmlpp::HtmlElement* sysdiv = index.getElementbyID("sysinfo");
        if (sysdiv)
            /*append table to dom element sysdiv*/
            sysdiv->appendChild(div);
        #endif
    }

+14 −0
Original line number Diff line number Diff line
@@ -94,3 +94,17 @@ install(
  COMPONENT
    Devel
)

if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
    set(CPACK_GENERATOR WIX)
    set(CPACK_PACKAGE_NAME "libhttppp")
    set(CPACK_PACKAGE_VENDOR "tuxist.de")
    set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libhttppp - A C++ Http Library")
    set(CPACK_PACKAGE_VERSION "1.0.0")
    set(CPACK_PACKAGE_VERSION_MAJOR "1")
    set(CPACK_PACKAGE_VERSION_MINOR "0")
    set(CPACK_PACKAGE_VERSION_PATCH "0")
    set(CPACK_PACKAGE_INSTALL_DIRECTORY "libhttppp")
    INCLUDE(CPack)
endif()
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ size_t libhttppp::HttpResponse::parse(const char *data,size_t inlen){

  --ve;

  std::copy(data+v,data+ve,std::begin(_State));
  std::copy(data+v,data+ve,std::back_inserter(_State));

  ++ve;