Skip to content

Commit

Permalink
Merge pull request #5 from srilakshmikanthanp/auth
Browse files Browse the repository at this point in the history
Attempt to auto connect the device
  • Loading branch information
srilakshmikanthanp authored Sep 3, 2023
2 parents 25a12ee + bc0f2fc commit dcf3305
Show file tree
Hide file tree
Showing 41 changed files with 1,557 additions and 973 deletions.
2 changes: 1 addition & 1 deletion .installer/configuration/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<TargetDir>@HomeDir@/.clipbird</TargetDir>
<Title>Clipbird Installer</Title>
<Name>Clipbird</Name>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Publisher>Sri Lakshmi Kanthan P</Publisher>
<StartMenuDir>Clipbird</StartMenuDir>
</Installer>
2 changes: 1 addition & 1 deletion .installer/packages/clipbird/meta/install.qs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Component.prototype.createOperations = function () {
"@TargetDir@/clipbird.exe",
"@StartMenuDir@/ClipBird.lnk",
"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/logo.png",
"iconPath=@TargetDir@/logo.ico",
"IconId=0",
"description=ClipBird"
);
Expand Down
2 changes: 1 addition & 1 deletion .installer/packages/clipbird/meta/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
on your network.
</Description>
<ReleaseDate>2023-07-29</ReleaseDate>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Script>install.qs</Script>
<Licenses>
<License name="MIT LICENSE" file="LICENSE" />
Expand Down
6 changes: 3 additions & 3 deletions .scripts/package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Remove-Item -Recurse -Force $ClipbirDir/* -Exclude .gitignore

# Copy All openssl dlls to the package directory
Write-Host "Copying $env:OPENSSL_ROOT_DIR /bin/*.dll to $ClipbirDir" -ForegroundColor Green
Copy-Item "$env:OPENSSL_ROOT_DIR /bin/*.dll" $ClipbirDir
Copy-Item "$env:OPENSSL_ROOT_DIR/bin/*.dll" $ClipbirDir

# copy the Logo to the package directory
Write-Host "Copying ./assets/images/logo.png to $ClipbirDir" -ForegroundColor Green
Copy-Item ./assets/images/logo.png $ClipbirDir
Write-Host "Copying ./assets/images/* to $ClipbirDir" -ForegroundColor Green
Copy-Item ./assets/images/* $ClipbirDir

# Create the package as BuildType (to lower) version
Write-Host "Creating the package as Release version" -ForegroundColor Green
Expand Down
29 changes: 1 addition & 28 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
{
"configurations": [
{
"compilerPath": "/usr/bin/gcc",
"name": "linux",
"includePath": [
"${workspaceFolder}/build/_deps/singleapplication-src",
"${workspaceFolder}/build",
"${workspaceFolder}/",
"${workspaceFolder}/build/_deps/**",
"/opt/Qt/6.5.2/gcc_64/include/QtGui",
"/opt/Qt/6.5.2/gcc_64/include/QtCore",
"/opt/Qt/6.5.2/gcc_64/include/**",
"${HOME}/.kderoot/include/KF6/KDNSSD"
],
"defines": [
"_UNICODE",
"_DEBUG",
"UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "ms-vscode.cpptools"
},
{
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe",
"name": "Win32",
Expand All @@ -38,11 +15,7 @@
"C:\\Program Files\\Bonjour SDK\\Include",
"C:\\kderoot\\include\\KF6\\KGuiAddons\\**"
],
"defines": [
"_UNICODE",
"_DEBUG",
"UNICODE"
],
"defines": [ "_UNICODE", "_DEBUG", "UNICODE" ],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64",
Expand Down
10 changes: 8 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"pubkey",
"qobject",
"qvariant",
"SSLCONFIG"
"SSLCONFIG",
"unauthed"
],
"files.associations": {
".env*": "dotenv",
Expand Down Expand Up @@ -148,6 +149,11 @@
"*.qs": "javascript",
".qs": "javascript",
"qsystemtrayicon": "cpp",
"qsettings": "cpp"
"qsettings": "cpp",
"queue": "cpp",
"stack": "cpp",
"qsslcertificate": "cpp",
"qapplication": "cpp",
"singleapplication": "cpp"
},
}
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

# set project name and version
project(clipbird VERSION 0.0.1 LANGUAGES CXX)
project(clipbird VERSION 1.1.0 LANGUAGES CXX)

# set c++ standard 17
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -105,6 +105,11 @@ qt_standard_project_setup()
qt_add_resources(RESOURCES
${PROJECT_SOURCE_DIR}/assets/resources.qrc)

# Add windows.rc to project
if (WIN32)
set (RESOURCES ${RESOURCES} ${PROJECT_SOURCE_DIR}/assets/windows.rc)
endif()

# Add executable
qt_add_executable(clipbird
${main_cpp} ${RESOURCES})
Expand All @@ -114,7 +119,6 @@ target_link_libraries(clipbird
PRIVATE SingleApplication::SingleApplication
PRIVATE Qt6::Widgets
PRIVATE Qt6::Network
PRIVATE Qt6::Sql
PRIVATE OpenSSL::SSL
PRIVATE OpenSSL::Crypto)

Expand Down Expand Up @@ -146,10 +150,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(clipbird PRIVATE -std=c++17)
endif()

# add target linker options MSVC /NODEFAULTLIB:library
# add target compiler options MSVC /std:c++17
if(MSVC)
target_link_options(clipbird PRIVATE /NODEFAULTLIB:library)
target_compile_options(clipbird PRIVATE /std:c++17)
endif()

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ In the following steps, we will see how to build the project in the Windows plat
* Qt6
* OpenSSL

#### Installing Qt6

Go to [Qt](https://www.qt.io/download-qt-installer) and download the Qt installer for windows, then install it in your system. After installing Qt, you need to set the environment variable `QT_CMAKE_DIR` to the Qt cmake directory.

#### Installing Bonjour

Just go to [bonjour](https://developer.apple.com/bonjour/) and downlod the bonjour SDK for windows, then install it in your system. It should set the environment variable `BONJOUR_SDK_HOME` to the Bonjour SDK directory.

#### Installing OpenSSL

Install OpenSSL using the following command and set the environment variable `OPENSSL_ROOT_DIR` to the OpenSSL installation directory.
Expand All @@ -126,6 +118,14 @@ Install OpenSSL using the following command and set the environment variable `OP
choco install openssl
~~~

#### Installing Qt6

Go to [Qt](https://www.qt.io/download-qt-installer) and download the Qt installer for windows, then install it in your system. After installing Qt, you need to set the environment variable `QT_CMAKE_DIR` to the Qt cmake directory.

#### Installing Bonjour

Just go to [bonjour](https://developer.apple.com/bonjour/) and downlod the bonjour SDK for windows, then install it in your system. It should set the environment variable `BONJOUR_SDK_HOME` to the Bonjour SDK directory.

#### Environment Variables

| Variable | Value |
Expand Down
Binary file added assets/images/logo.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions assets/windows.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) 2023 Sri Lakshmi Kanthan P
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

appIcon ICON "./assets/images/logo.ico"
1 change: 0 additions & 1 deletion constants/constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ std::string getAppIssuePage() {
* @return std::string
*/
std::string getMDnsServiceName() {
std::cout << QSysInfo::machineHostName().toStdString() << std::endl;
return QSysInfo::machineHostName().toStdString();
}

Expand Down
Loading

0 comments on commit dcf3305

Please sign in to comment.