reveal

Check-in [9e755d3a4f]
Login

Check-in [9e755d3a4f]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Gtk+ linkage tweaks
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk | v1.2.1
Files: files | file ages | folders
SHA3-256: 9e755d3a4f406e3b0b174b462207f52377121d98ae2d5e0e7168dcdc5035b0e9
User & Date: murphy 2023-09-28 15:36:49.500
Context
2023-10-05
17:54
Conan 2 compatibility check-in: f445e8b648 user: chust tags: trunk
2023-09-28
15:36
Gtk+ linkage tweaks check-in: 9e755d3a4f user: murphy tags: trunk, v1.2.1
2023-06-16
14:00
Improved command line processing for help and switching flags check-in: b3bcce9d5f user: chust tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to conanfile.py.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38






39
40
41
42
43
44
45
# limitations under the License.

from conans import ConanFile, CMake


class RevealConan(ConanFile):
    name = "reveal"
    version = "1.2.0"
    license = "Apache-2.0"
    author = "Thomas C. Chust <chust@web.de>"
    url = "https://chust.org/repos/reveal"
    description = "reveal is a small utility to launch or reveal files using your desktop environment."
    topics = ("os", "fs", "gui", "desktop", "util")
    settings = "os", "compiler", "build_type", "arch"
    options = {"shared": [True, False], "fPIC": [True, False]}
    default_options = {"shared": False, "fPIC": True}
    generators = "cmake"
    exports_sources = (
        "*.cxx", "*.h", "README.txt", "LICENSE.txt", "CMakeLists.txt",
        "!build"
    )

    def config_options(self):
        if self.settings.os == "Windows":
            del self.options.fPIC







    def build(self):
        cmake = CMake(self)

        cmake.definitions["CMAKE_INSTALL_PREFIX"] = "../stage"
        cmake.definitions["CMAKE_BUILD_TYPE"] = self.settings.build_type
        cmake.definitions["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF"
        cmake.configure(build_dir="build")







|


















>
>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# limitations under the License.

from conans import ConanFile, CMake


class RevealConan(ConanFile):
    name = "reveal"
    version = "1.2.1"
    license = "Apache-2.0"
    author = "Thomas C. Chust <chust@web.de>"
    url = "https://chust.org/repos/reveal"
    description = "reveal is a small utility to launch or reveal files using your desktop environment."
    topics = ("os", "fs", "gui", "desktop", "util")
    settings = "os", "compiler", "build_type", "arch"
    options = {"shared": [True, False], "fPIC": [True, False]}
    default_options = {"shared": False, "fPIC": True}
    generators = "cmake"
    exports_sources = (
        "*.cxx", "*.h", "README.txt", "LICENSE.txt", "CMakeLists.txt",
        "!build"
    )

    def config_options(self):
        if self.settings.os == "Windows":
            del self.options.fPIC

    def requirements(self):
        if self.settings.os == "Windows":
            pass # see package_info
        else:
            self.requires("gtk/system")

    def build(self):
        cmake = CMake(self)

        cmake.definitions["CMAKE_INSTALL_PREFIX"] = "../stage"
        cmake.definitions["CMAKE_BUILD_TYPE"] = self.settings.build_type
        cmake.definitions["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF"
        cmake.configure(build_dir="build")
56
57
58
59
60
61
62


        self.cpp_info.libs = ["uishell"]
        for cmake in "cmake", "cmake_multi", "cmake_find_package", "cmake_find_package_multi", "cmake_paths":
            self.cpp_info.names[cmake] = "uishell"
        if not self.options.shared:
            self.cpp_info.defines += ["UISHELL_STATIC"]
            if self.settings.os == "Windows":
                self.cpp_info.system_libs += ["shlwapi", "shell32", "ole32"]









>
>
62
63
64
65
66
67
68
69
70
        self.cpp_info.libs = ["uishell"]
        for cmake in "cmake", "cmake_multi", "cmake_find_package", "cmake_find_package_multi", "cmake_paths":
            self.cpp_info.names[cmake] = "uishell"
        if not self.options.shared:
            self.cpp_info.defines += ["UISHELL_STATIC"]
            if self.settings.os == "Windows":
                self.cpp_info.system_libs += ["shlwapi", "shell32", "ole32"]
            else:
                pass # see requirements
Changes to uishell.h.
48
49
50
51
52
53
54




55
56
57
58
59
60
61
62
63
64
65


66
67
68
69
70
71
72
#   define UISHELL_API UISHELL_ATTRIBUTE((visibility("default")))
#   define UISHELL_INLINE_API UISHELL_API
# else
#   define UISHELL_API
#   define UISHELL_INLINE_API UISHELL_API
# endif
#endif





/// Functionality interacting with the operating system user interface shell.
namespace UIShell {

/// Native window handle type.
#if defined(_WX_WINDOW_H_BASE_) && !defined(__WXQT__)
typedef WXWidget window_t;
#elif defined(QWIDGET_H)
typedef WId window_t;
#elif defined(_WIN32)
typedef HWND window_t;


#else
typedef void *window_t;
#endif

/// Perform minimal operating system initialization to use the user interface
/// shell functions. Returns a native window handle useable as an argument to
/// LaunchFile (or a NULL pointer). Calling this function is likely unnecessary







>
>
>
>











>
>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#   define UISHELL_API UISHELL_ATTRIBUTE((visibility("default")))
#   define UISHELL_INLINE_API UISHELL_API
# else
#   define UISHELL_API
#   define UISHELL_INLINE_API UISHELL_API
# endif
#endif

#if defined(USE_GTK)
struct _GtkWidget;
#endif

/// Functionality interacting with the operating system user interface shell.
namespace UIShell {

/// Native window handle type.
#if defined(_WX_WINDOW_H_BASE_) && !defined(__WXQT__)
typedef WXWidget window_t;
#elif defined(QWIDGET_H)
typedef WId window_t;
#elif defined(_WIN32)
typedef HWND window_t;
#elif defined(USE_GTK)
typedef struct _GtkWidget *window_t;
#else
typedef void *window_t;
#endif

/// Perform minimal operating system initialization to use the user interface
/// shell functions. Returns a native window handle useable as an argument to
/// LaunchFile (or a NULL pointer). Calling this function is likely unnecessary