added test code for auto run on Windows
This commit is contained in:
parent
9c78e71358
commit
03e39405de
3 changed files with 28 additions and 12 deletions
|
@ -37,6 +37,17 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
|
||||||
setupUi ( this );
|
setupUi ( this );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TEST
|
||||||
|
#ifdef _WIN32
|
||||||
|
/*
|
||||||
|
QSettings RegSettings ( "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
|
||||||
|
QSettings::NativeFormat );
|
||||||
|
RegSettings.setValue ( "llcon server", QCoreApplication::applicationFilePath() );
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Add help text to controls -----------------------------------------------
|
// Add help text to controls -----------------------------------------------
|
||||||
// client list
|
// client list
|
||||||
ListViewClients->setWhatsThis ( tr ( "<b>Client List:</b> The client list "
|
ListViewClients->setWhatsThis ( tr ( "<b>Client List:</b> The client list "
|
||||||
|
@ -210,10 +221,10 @@ ListViewClients->setMinimumHeight ( 140 );
|
||||||
UpdateGUIDependencies();
|
UpdateGUIDependencies();
|
||||||
|
|
||||||
|
|
||||||
// View menu --------------------------------------------------------------
|
// View menu --------------------------------------------------------------
|
||||||
QMenu* pViewMenu = new QMenu ( "&Window", this );
|
QMenu* pViewMenu = new QMenu ( "&Window", this );
|
||||||
|
|
||||||
pViewMenu->addAction ( tr ( "E&xit" ), this,
|
pViewMenu->addAction ( tr ( "E&xit" ), this,
|
||||||
SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_Q ) );
|
SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_Q ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <qmenubar.h>
|
#include <qmenubar.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qsystemtrayicon.h>
|
#include <qsystemtrayicon.h>
|
||||||
|
#include <qsettings.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "multicolorled.h"
|
#include "multicolorled.h"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
; llcon NSIS installer script
|
; llcon NSIS installer script
|
||||||
|
|
||||||
!define APP_NAME "Llcon"
|
!define APP_NAME "Llcon"
|
||||||
!define APP_EXE "llcon.exe"
|
!define REG_AUTO_RUN_NAME "llcon server"
|
||||||
!define UNINSTALL_EXE "Uninstall.exe"
|
!define APP_EXE "llcon.exe"
|
||||||
!define INSTALLER_NAME "llconinstaller.exe"
|
!define UNINSTALL_EXE "Uninstall.exe"
|
||||||
!define VS_REDIST_PATH "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
!define INSTALLER_NAME "llconinstaller.exe"
|
||||||
;!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
!define VS_REDIST_PATH "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
||||||
!define VS_REDIST_EXE "vcredist_x86.exe"
|
;!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
||||||
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
!define VS_REDIST_EXE "vcredist_x86.exe"
|
||||||
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
||||||
|
|
||||||
|
|
||||||
SetCompressor lzma
|
SetCompressor lzma
|
||||||
|
@ -73,6 +74,9 @@ Section "Uninstall"
|
||||||
|
|
||||||
DeleteRegKey HKLM "${UNINST_KEY}"
|
DeleteRegKey HKLM "${UNINST_KEY}"
|
||||||
|
|
||||||
|
; the software may have written an auto run entry in the registry, remove it
|
||||||
|
DeleteRegKey HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Run\${REG_AUTO_RUN_NAME}"
|
||||||
|
|
||||||
Delete "$DESKTOP\${APP_NAME}.lnk"
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
||||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
||||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
||||||
|
|
Loading…
Reference in a new issue