Skip to content

Commit

Permalink
Merge pull request #1 from BDisp/master
Browse files Browse the repository at this point in the history
Some little changes per Visual Studio compatible
  • Loading branch information
paolo-projects authored Oct 22, 2019
2 parents 974cf2f + 19bb399 commit 6e214ff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ if(LINUX)
target_link_libraries (Unlocker -lpthread)
endif()

target_link_libraries (Unlocker "${ZLIB_LIBRARIES}")
target_link_libraries (Unlocker "${CURL_LIBRARIES}")
target_link_libraries (Unlocker "${LibArchive_LIBRARIES}")
target_link_libraries (Unlocker ${ZLIB_LIBRARIES})
target_link_libraries (Unlocker ${CURL_LIBRARIES})
target_link_libraries (Unlocker ${LibArchive_LIBRARIES})

if(MSVC)
target_link_libraries (Unlocker "ws2_32.lib" "Wldap32.lib")
Expand Down
3 changes: 2 additions & 1 deletion src/servicestoputils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ bool ServiceStopper::KillProcess(std::string procName)
::GetExitCodeProcess(hHandle, &dwExitCode);
return ::TerminateProcess(hHandle, dwExitCode);
}
else throw ServiceStopException("Couldn't kill %s, process not found.", procName.c_str());
// There is no need to inform the user that the process cannot be killed if it is the VMware Player version or it not running.
//else throw ServiceStopException("Couldn't kill %s, process not found.", procName.c_str());
#endif
return false;
}
9 changes: 7 additions & 2 deletions src/unlocker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ int main(int argc, const char* argv[])
} else install();
}

system("pause");

return 0;
}

Expand Down Expand Up @@ -468,7 +470,8 @@ void stopServices()
}
catch (const ServiceStopper::ServiceStopException& ex)
{
logerr("Couldn't stop service \"" + service + "\", " + std::string(ex.what()));
// There is no need to inform the user that the service cannot be stopped if that service does not exist in the current version.
//logerr("Couldn't stop service \"" + service + "\", " + std::string(ex.what()));
}

}
Expand Down Expand Up @@ -500,10 +503,12 @@ void restartServices()
try
{
ServiceStopper::StartService_s(*it);
logd("Service \"" + *it + "\" started successfully.");
}
catch (const ServiceStopper::ServiceStopException & ex)
{
logerr("Couldn't start service " + *it);
// There is no need to inform the user that the service cannot be started if that service does not exist in the current version.
//logerr("Couldn't start service " + *it);
}
}
#endif
Expand Down

0 comments on commit 6e214ff

Please sign in to comment.