Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Small modifications to allow windows to compile
  • Loading branch information
yquemener committed Aug 19, 2020
1 parent 4750247 commit f1dd3a9
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Expand Up @@ -6,7 +6,7 @@
set(GRPC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Mumble.proto")

option(client "Build the client (Mumble)" ON)
option(server "Build the server (Murmur)" ON)
option(server "Build the server (Murmur)" OFF)

option(qssldiffiehellmanparameters "Build support for custom Diffie-Hellman parameters." OFF)

Expand All @@ -23,10 +23,10 @@ find_pkg(Qt5
)

find_pkg(OpenSSL
COMPONENTS
Crypto
SSL
REQUIRED
COMPONENTS
Crypto
SSL
REQUIRED
)

find_pkg(Protobuf REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions src/HostAddress.cpp
@@ -1,3 +1,5 @@
#pragma comment(lib, "Ws2_32.lib")

// Copyright 2005-2020 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
Expand Down
2 changes: 2 additions & 0 deletions src/crypto/CryptStateOCB2.cpp
@@ -1,3 +1,5 @@
#pragma comment(lib, "Ws2_32.lib")

// Copyright 2005-2020 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
Expand Down
23 changes: 21 additions & 2 deletions src/mumble/CMakeLists.txt
Expand Up @@ -12,7 +12,7 @@ set(MUMBLE_ICNS "${CMAKE_SOURCE_DIR}/icons/mumble.icns")

include(qt-utils)

option(update "Check for updates by default." ON)
option(update "Check for updates by default." OFF)

option(translations "Include languages other than English." OFF)

Expand Down Expand Up @@ -53,7 +53,7 @@ if(NOT APPLE)
endif()

if(WIN32 OR APPLE)
option(crash-report "Include support for reporting crashes to the Mumble developers." ON)
option(crash-report "Include support for reporting crashes to the Mumble developers." OFF)
endif()

if(MSVC)
Expand Down Expand Up @@ -322,6 +322,25 @@ else()
target_link_libraries(mumble PRIVATE ${sndfile_LIBRARIES})
endif()


#message("SNDFILE libs:${sndfile_FOUND}")
#message("SNDFILE libs:${LibSndFile_FOUND}")
#message("SNDFILE libs:${sndfile_LIBRARIES}")

if(LibSndFile_FOUND)
# VCPKG just sucks... (or I am not understanding it well)
target_link_libraries(mumble PRIVATE E:/softs/vcpkg/installed/x64-windows/lib/libsndfile-1.lib)

endif()


# get_cmake_property(_variableNames VARIABLES)
# list (SORT _variableNames)
# foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()


target_link_libraries(mumble
PRIVATE
shared
Expand Down
10 changes: 6 additions & 4 deletions src/mumble/MainWindow.cpp
Expand Up @@ -1000,10 +1000,11 @@ void MainWindow::setOnTop(bool top) {
wf |= Qt::WindowStaysOnTopHint;
else
wf &= ~Qt::WindowStaysOnTopHint;
wf |= Qt::FramelessWindowHint;// | Qt::MSWindowsFixedSizeDialogHint | Qt::X11BypassWindowManagerHint;
// wf |= Qt::FramelessWindowHint;// | Qt::MSWindowsFixedSizeDialogHint | Qt::X11BypassWindowManagerHint;
setWindowFlags(wf);

setAttribute(Qt::WA_TranslucentBackground);
//setAttribute(Qt::WA_NoSystemBackground);
show();
}
}
Expand Down Expand Up @@ -1055,8 +1056,8 @@ void MainWindow::setupView(bool toggle_minimize) {
}
}

// Qt::WindowFlags f = Qt::Window;
Qt::WindowFlags f = Qt::ToolTip;
Qt::WindowFlags f = Qt::Window;
// Qt::WindowFlags f = Qt::ToolTip;
if (!showit) {
if (g.s.bHideFrame) {
f |= Qt::FramelessWindowHint;
Expand All @@ -1068,11 +1069,12 @@ void MainWindow::setupView(bool toggle_minimize) {
(!g.s.bMinimalView && g.s.aotbAlwaysOnTop == Settings::OnTopInNormal)) {
f |= Qt::WindowStaysOnTopHint;
}
f |= Qt::FramelessWindowHint;// | Qt::MSWindowsFixedSizeDialogHint | Qt::X11BypassWindowManagerHint;
// f |= Qt::FramelessWindowHint;// | Qt::MSWindowsFixedSizeDialogHint | Qt::X11BypassWindowManagerHint;

if (! graphicsProxyWidget())
setWindowFlags(f);

//setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TranslucentBackground);


Expand Down
3 changes: 3 additions & 0 deletions src/mumble/os_win.cpp
@@ -1,3 +1,6 @@
// I'm not even pretending to be clean...
#pragma comment(lib, "Crypt32.lib")

// Copyright 2005-2020 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
Expand Down

0 comments on commit f1dd3a9

Please sign in to comment.