<commit_before>; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Remote PC Suite"
!define PRODUCT_VERSION "1.4"
!define PRODUCT_PUBLISHER "<NAME>"
!define PRODUCT_WEB_SITE "http://www.scientific-soft.com/mobile/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\RemotePC.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\..\RemotePC.QT\Resources\RemotePC.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "..\win\release\EULA.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\RemotePC.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\help\index.htm"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "RemotePCSetup.exe"
InstallDir "$PROGRAMFILES\Remote PC Suite"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File "..\win\release\msvcp100.dll"
  File "..\win\release\msvcr100.dll"
  File "..\win\release\QtGui4.dll"
  File "..\win\release\QtCore4.dll"
  File "..\win\release\EULA.txt"
  File "..\win\release\LIBS.txt"
  File "..\win\release\RemotePC.exe"
  CreateDirectory "$SMPROGRAMS\Remote PC Suite"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Remote PC Suite.lnk" "$INSTDIR\RemotePC.exe"
  CreateShortCut "$DESKTOP\Remote PC Suite.lnk" "$INSTDIR\RemotePC.exe"
  SetOverwrite try
  SetOutPath "$INSTDIR\help"
  File "..\win\release\help\*.*"
  SetOutPath "$INSTDIR\plugins\imageformats"
  File "..\win\release\plugins\imageformats\qjpeg4.dll"
SectionEnd

Section -AdditionalIcons
  SetOutPath $INSTDIR
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\RemotePC.exe"
  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\RemotePC.exe"
  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 "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  Abort
FunctionEnd

Section Uninstall
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\plugins\imageformats\qjpeg4.dll"
  Delete "$INSTDIR\help\*.*"
  Delete "$INSTDIR\RemotePC.exe"
  Delete "$INSTDIR\EULA.txt"
  Delete "$INSTDIR\LIBS.txt"  
  Delete "$INSTDIR\QtCore4.dll"
  Delete "$INSTDIR\QtGui4.dll"

  Delete "$SMPROGRAMS\Remote PC Suite\Uninstall.lnk"
  Delete "$SMPROGRAMS\Remote PC Suite\Website.lnk"
  Delete "$DESKTOP\Remote PC Suite.lnk"
  Delete "$SMPROGRAMS\Remote PC Suite\Remote PC Suite.lnk"

  RMDir "$INSTDIR\plugins\imageformats"
  RMDir "$INSTDIR\plugins"
  RMDir "$INSTDIR\help"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd<commit_msg>RPC Win. Setup build script was fixed.<commit_after>; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Remote PC Suite"
!define PRODUCT_VERSION "1.5"
!define PRODUCT_PUBLISHER "<NAME>"
!define PRODUCT_WEB_SITE "http://www.scientific-soft.com/mobile/iremote"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\RemotePC.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\..\RemotePC.QT\Resources\RemotePC.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "..\win\release\EULA.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\RemotePC.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\help\index.htm"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "RemotePCSetup.exe"
InstallDir "$PROGRAMFILES\Remote PC Suite"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File "..\win\release\msvcp110.dll"
  File "..\win\release\msvcr110.dll"
  File "..\win\release\icudt51.dll"
  File "..\win\release\icuin51.dll"
  File "..\win\release\icuuc51.dll"
  File "..\win\release\Qt5Core.dll"
  File "..\win\release\Qt5Gui.dll"
  File "..\win\release\Qt5Widgets.dll"
  File "..\win\release\EULA.txt"
  File "..\win\release\LIBS.txt"
  File "..\win\release\RemotePC.exe"
  CreateDirectory "$SMPROGRAMS\Remote PC Suite"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Remote PC Suite.lnk" "$INSTDIR\RemotePC.exe"
  CreateShortCut "$DESKTOP\Remote PC Suite.lnk" "$INSTDIR\RemotePC.exe"
  SetOverwrite try
  SetOutPath "$INSTDIR\help"
  File "..\win\release\help\*.*"
  SetOutPath "$INSTDIR\plugins\platforms"
  File "..\win\release\plugins\platforms\qwindows.dll"
  SetOutPath "$INSTDIR\plugins\imageformats"
  File "..\win\release\plugins\imageformats\qjpeg.dll"
SectionEnd

Section -AdditionalIcons
  SetOutPath $INSTDIR
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\Remote PC Suite\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\RemotePC.exe"
  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\RemotePC.exe"
  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 "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  Abort
FunctionEnd

Section Uninstall
  RMDir /r "$INSTDIR"
  
  Delete "$SMPROGRAMS\Remote PC Suite\Uninstall.lnk"
  Delete "$SMPROGRAMS\Remote PC Suite\Website.lnk"
  Delete "$DESKTOP\Remote PC Suite.lnk"
  Delete "$SMPROGRAMS\Remote PC Suite\Remote PC Suite.lnk"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd
{'fraction_non_alphanumeric': 0.12578034682080924, 'fraction_numerical': 0.005202312138728324, 'mean_word_length': 5.763878029710711, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4708186', 'n_tokens_mistral': 3281, 'n_tokens_neox': 3064, 'n_words': 610}