diff options
author | akshay-c | 2019-05-13 09:38:33 +0530 |
---|---|---|
committer | akshay-c | 2019-05-13 09:38:33 +0530 |
commit | 8aeb1edb1da821e47f3d497dcce1c25dbbb3c6ed (patch) | |
tree | 57b309dfc70d93aa1d08f280ff7a113ca4b17cb9 /ldmicro | |
parent | 3a860d665bf30156d88151998da71e6aebf3f11c (diff) | |
download | LDMicroGtk-master.tar.gz LDMicroGtk-master.tar.bz2 LDMicroGtk-master.zip |
Diffstat (limited to 'ldmicro')
-rw-r--r-- | ldmicro/CMakeLists.txt | 16 | ||||
-rw-r--r-- | ldmicro/lib/freezeLD/freezeLD.cpp | 8 |
2 files changed, 22 insertions, 2 deletions
diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt index 023d17a..b1772a8 100644 --- a/ldmicro/CMakeLists.txt +++ b/ldmicro/CMakeLists.txt @@ -30,6 +30,20 @@ IF(UNIX) add_definitions ("-g") add_definitions(-D__UNIX__) add_definitions(-DLDLANG_EN) + execute_process(COMMAND lsb_release -cs + OUTPUT_VARIABLE RELEASE_CODENAME + OUTPUT_STRIP_TRAILING_WHITESPACE) + STRING(TOLOWER ${RELEASE_CODENAME} RELEASE_LOWER) + message("-- os_version_suffix:${RELEASE_CODENAME}") + if(${RELEASE_LOWER} MATCHES "trusty") + MESSAGE("Add flag to compile for Ubuntu 14") + add_definitions(-D__UBUNTU_14_) + SET(CMAKE_BUILD_TYPE Debug) + MESSAGE("Build type is " ${CMAKE_BUILD_TYPE}) + else() + MESSAGE("Add flag to compile for Ubuntu 16") + add_definitions(-D__UBUNTU_16_) + endif() use_cxx11() # set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/build/") @@ -158,7 +172,7 @@ IF(UNIX) set(CPACK_GENERATOR "DEB") set(CPACK_PACKAGE_VERSION_MAJOR "2") set(CPACK_PACKAGE_VERSION_MINOR "2") - set(CPACK_PACKAGE_VERSION_PATCH "4") + set(CPACK_PACKAGE_VERSION_PATCH "5") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_PACKAGE_DESCRIPTION "Ladder Logic editor, simulator and compiler for 8 bit microcontrollers") diff --git a/ldmicro/lib/freezeLD/freezeLD.cpp b/ldmicro/lib/freezeLD/freezeLD.cpp index 75bbb30..e577f13 100644 --- a/ldmicro/lib/freezeLD/freezeLD.cpp +++ b/ldmicro/lib/freezeLD/freezeLD.cpp @@ -117,7 +117,13 @@ void FreezeWindowPosF(HWID hwid, char *subKey, char *name) return; } newKey.type = 'b'; - newKey.val.b = gtk_window_is_maximized(GTK_WINDOW(hwid)); + + #if defined(__UBUNTU_16_) + newKey.val.b = gtk_window_is_maximized(GTK_WINDOW(hwid)); + #elif defined(__UBUNTU_14_) + newKey.val.b = false; + #endif + Register.write((char*) &newKey, sizeof(newKey)); Register.close(); |