YiannisBourkelis / Andama-Remote-Desktop

Andama is an open source remote desktop software, with client side encryption and privacy in mind
GNU General Public License v3.0
59 stars 47 forks source link

Compile Andama in Windows 10 with QT 5.14.1 #43

Open marcelodias1806 opened 4 years ago

marcelodias1806 commented 4 years ago

Dear Yiannis, how are you?

I'm trying compile the Andama Remote Desktop for Windows, using the Windows 10 with Qt 5.14.1. I already configure the project in Qt and when I try build and run, sho the following 1 error with the following message.

C:\Users\marcelo.dias\Documents\GitHub\Andama-Remote-Desktop\src\Andama\mainwindow.cpp:445: error: cast from 'Qt::HANDLE {aka void*}' to 'long int' loses precision [-fpermissive] qDebug("Thread id inside mymessageRecieved %li", (long)QThread::currentThreadId()); ^

You can help for this? I already researched in several places for this, but I can't solve this issue.

Best Regards and Congratulations for this project.

marcelodias1806 commented 4 years ago

In code show the error in line 445 of mainwindow.cpp.

The part of code is:

if (msgType == protocol.MSG_ID){
           //AppNapController::EnableAppNap();

           setDisabledRemoteControlWidgets(false);

            qDebug("Thread id inside mymessageRecieved %li", (long)QThread::currentThreadId());
            std::string strID(vdata.begin(),vdata.end());
            QString qs = QString::fromStdString(strID);
            ui->lblID->setText(qs);
            qDebug() << std::string(vdata.begin(),vdata.end()).c_str();

            ui->widgetStatus->setStyleSheet("background-image: url(:/images/images/status_green.png)");
            ui->lblStatus->setText("Ready!");
        }
YiannisBourkelis commented 4 years ago

@marcelodias1806 try compiling the development branch. I have not got a windows machine close to me at the moment but on Windows I am using the visual studio c++ compiler. What is your development setup?

marcelodias1806 commented 4 years ago

I managed to compile it now, I did it with Visual Studio 2019 and it worked!

I installed the QT Tools plugin for VS and opened the project and managed to compile and execute it.

What I have a problem with now is running it without Visual Studio, when I try to run Andama.exe directly from the 'release' folder it gives me 4 error messages from Qt files, Qt5Core.dll, Qt5Gui.dll, QtWidgets .dll and Qt5Widgetsd.dll, when I copy the files directly to the 'release' folder, it doesn't run and shows the error below.

Anotação 2020-03-31 200331

marcelodias1806 commented 4 years ago

It worked, I did it!

I copied the platforms folder from the path below into the 'release' folder and run ok. Now I will do tests on other machines.

C:\Qt\5.14.1\msvc2017_64\plugins

Best Regards

YiannisBourkelis commented 4 years ago

@marcelodias1806 that's great!

marcelodias1806 commented 4 years ago

I run it on 2 different computers, running AndamaProxy and Andama on my computer and Andama on another computer, the 2 go online, accept each other's connection, but the desktop of the computer I ask for the connection does not appear when I type the ID and password to connect it simply minimizes the window and nothing else appears, on the other computer it says that the connection was accepted.

YiannisBourkelis commented 4 years ago

@marcelodias1806 looks like a dependency is missing. probably in the plugins folder. Try to debug Andama on both computers from Qt to view the errors or run Andama.exe from within cmd.exe to output possible error messages in the console window.

marcelodias1806 commented 4 years ago

Dear Yiannis,

Fantastic! It's running!

If you contribute to this project as much as you can, it will not be a program like you in C ++, but you will study hard to be able to contribute to this sensational project.

Thank you so much for sharing with us!

Best Regards