From: konrad Date: Fri, 12 Oct 2007 14:46:19 +0000 (+0000) Subject: added windows icon and NSIS files X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=fd384d1ed6c8c24973ca284c12ecd0239aca929e;p=konrad%2Fsmoke.git added windows icon and NSIS files git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@45 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/nsis_readme.txt b/nsis_readme.txt new file mode 100644 index 0000000..c361faa --- /dev/null +++ b/nsis_readme.txt @@ -0,0 +1,7 @@ +WARNING +=========== + + +This is pre-alpha software! You use it at your own risk! + +Contact the authors for details (eg. konrad at silmor dot de) \ No newline at end of file diff --git a/smoke.nsi b/smoke.nsi new file mode 100644 index 0000000..45b4866 --- /dev/null +++ b/smoke.nsi @@ -0,0 +1,144 @@ +;automaticly generated file, don't change it! +; original Script generated by the HM NIS Edit Script Wizard. +; adapted and scriptified by Konrad Rosenbaum + +; HM NIS Edit Wizard helper defines +!define SMOKEEXE "msmoke.exe" +!define PRODUCT_NAME "MagicSmoke" +!define PRODUCT_VERSION "0.1" +!define PRODUCT_PUBLISHER "MagicSmoke Project" +!define PRODUCT_WEB_SITE "http://silmor.de" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${SMOKEEXE}" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" +!define QTDIR "C:\krosenba\qt" +!define MINGWDIR "C:\MinGW" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "src\icon.ico" +!define MUI_UNICON "src\icon.ico" + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +;!insertmacro MUI_PAGE_LICENSE "nsis_readme.txt" +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Start menu page +var ICONS_GROUP +!define MUI_STARTMENUPAGE_NODISABLE +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "MagicSmoke" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\${SMOKEEXE}" +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "magicsmoke-install.exe" +InstallDir "$PROGRAMFILES\MagicSmoke" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show + +Section "MainSection" SEC01 + SetOutPath "$INSTDIR" + File /oname=README.txt "nsis_readme.txt" + SetOutPath "$INSTDIR\bin" + SetOverwrite on + File "src\${SMOKEEXE}" + File "src\smoke_de.qm" + File "src\smoke_de_SAX.qm" + File "${MINGWDIR}\bin\mingwm10.dll" + File "${QTDIR}\bin\QtCore4.dll" + File "${QTDIR}\bin\QtGui4.dll" + File "${QTDIR}\bin\QtNetwork4.dll" + File "${QTDIR}\bin\QtXml4.dll" + File "${QTDIR}\translations\qt_de.qm" + +; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\MagicSmoke.lnk" "$INSTDIR\bin\${SMOKEEXE}" + CreateShortCut "$DESKTOP\MagicSmoke.lnk" "$INSTDIR\bin\${SMOKEEXE}" + !insertmacro MUI_STARTMENU_WRITE_END + + SetOutPath "$INSTDIR" +SectionEnd + +Section -AdditionalIcons + SetOutPath $INSTDIR + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\${SMOKEEXE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\${SMOKEEXE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "MagicSmoke was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to remove MagicSmoke?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP + Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\bin\${SMOKEEXE}" + + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" + Delete "$DESKTOP\MagicSmoke.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\MagicSmoke.lnk" + + RMDir "$SMPROGRAMS\$ICONS_GROUP" + + + Delete "$INSTDIR\bin\mingwm10.dll" + Delete "$INSTDIR\bin\QtCore4.dll" + Delete "$INSTDIR\bin\QtGui4.dll" + Delete "$INSTDIR\bin\QtNetwork4.dll" + Delete "$INSTDIR\bin\QtXml4.dll" + Delete "$INSTDIR\bin\qt_de.qm" + Delete "$INSTDIR\bin\smoke_de.qm" + Delete "$INSTDIR\bin\smoke_de_SAX.qm" + + Delete "$INSTDIR\README.txt + + RMDir "$INSTDIR\bin" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + SetAutoClose true +SectionEnd diff --git a/src/icon.ico b/src/icon.ico new file mode 100644 index 0000000..773f47f Binary files /dev/null and b/src/icon.ico differ diff --git a/src/smoke.pro b/src/smoke.pro index 7ef77ae..14c7f61 100644 --- a/src/smoke.pro +++ b/src/smoke.pro @@ -9,10 +9,17 @@ CONFIG += qt thread QT += xml network MSVERSION = "0.1 alpha" -#win32-* { -# #RC-File containing the icon: -# RC_FILE += win.rc -#} +win32-* { + #RC-File containing the icon: + RC_FILE += win.rc +} + +#compilation output: +DESTDIR = ../src +OBJECTS_DIR = .ctmp +MOC_DIR = .ctmp +RCC_DIR = .ctmp + SOURCES = \ main.cpp \ diff --git a/src/win.rc b/src/win.rc new file mode 100644 index 0000000..1bc463a --- /dev/null +++ b/src/win.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icon.ico"