mp-installer.nsi 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. ;
  2. ; NSIS Installer Script for OBS Studio, https://obsproject.com/
  3. ;
  4. ; This installer script is designed only for the release process
  5. ; of OBS Studio. It requires a lot of files to be in exactly the
  6. ; right places. If you're making a fork, it's strongly suggested
  7. ; that you make your own installer.
  8. ;
  9. ; If you choose to use this script anyway, be absolutely sure you
  10. ; have replaced every OBS specific check, whether process names,
  11. ; application names, files, registry entries, etc.
  12. ;
  13. ; This script also requires OBSInstallerUtils for additional
  14. ; functions. You can find it at
  15. ; https://github.com/notr1ch/OBSInstallerUtils
  16. Unicode true
  17. ManifestDPIAware true
  18. ; Define your application name
  19. !define APPNAME "OBS Studio"
  20. !ifndef APPVERSION
  21. !define APPVERSION "25.0.8"
  22. !define SHORTVERSION "25.0.8"
  23. !endif
  24. !define APPNAMEANDVERSION "OBS Studio ${SHORTVERSION}"
  25. ; Additional script dependencies
  26. !include WinVer.nsh
  27. !include x64.nsh
  28. ; Main Install settings
  29. Name "${APPNAMEANDVERSION}"
  30. !ifdef INSTALL64
  31. InstallDir "$PROGRAMFILES64\obs-studio"
  32. !else
  33. InstallDir "$PROGRAMFILES32\obs-studio"
  34. !endif
  35. InstallDirRegKey HKLM "Software\${APPNAME}" ""
  36. !ifdef INSTALL64
  37. OutFile "OBS-Studio-${SHORTVERSION}-Full-Installer-x64.exe"
  38. !else
  39. OutFile "OBS-Studio-${SHORTVERSION}-Full-Installer-x86.exe"
  40. !endif
  41. ; Use compression
  42. SetCompressor /SOLID LZMA
  43. ; Need Admin
  44. RequestExecutionLevel admin
  45. ; Modern interface settings
  46. !include "MUI.nsh"
  47. !define MUI_ICON "obs.ico"
  48. !define MUI_HEADERIMAGE_BITMAP "OBSHeader.bmp"
  49. !define MUI_WELCOMEFINISHPAGE_BITMAP "OBSBanner.bmp"
  50. !define MUI_ABORTWARNING
  51. !define MUI_FINISHPAGE_RUN
  52. !define MUI_FINISHPAGE_RUN_TEXT "Launch OBS Studio ${SHORTVERSION}"
  53. !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchOBS"
  54. !define MUI_WELCOMEPAGE_TEXT "This setup will guide you through installing OBS Studio.\n\nIt is recommended that you close all other applications before starting, including OBS Studio. This will make it possible to update relevant files without having to reboot your computer.\n\nClick Next to continue."
  55. !define MUI_PAGE_CUSTOMFUNCTION_LEAVE PreReqCheck
  56. !define MUI_HEADERIMAGE
  57. !define MUI_PAGE_HEADER_TEXT "License Information"
  58. !define MUI_PAGE_HEADER_SUBTEXT "Please review the license terms before installing OBS Studio."
  59. !define MUI_LICENSEPAGE_TEXT_TOP "Press Page Down or scroll to see the rest of the license."
  60. !define MUI_LICENSEPAGE_TEXT_BOTTOM " "
  61. !define MUI_LICENSEPAGE_BUTTON "&Next >"
  62. !insertmacro MUI_PAGE_WELCOME
  63. !insertmacro MUI_PAGE_LICENSE "new\core\data\obs-studio\license\gplv2.txt"
  64. !insertmacro MUI_PAGE_DIRECTORY
  65. !insertmacro MUI_PAGE_INSTFILES
  66. !insertmacro MUI_PAGE_FINISH
  67. ;!insertmacro MUI_UNPAGE_CONFIRM
  68. !insertmacro MUI_UNPAGE_COMPONENTS
  69. !insertmacro MUI_UNPAGE_INSTFILES
  70. ; Set languages (first is default language)
  71. !insertmacro MUI_LANGUAGE "English"
  72. !insertmacro MUI_RESERVEFILE_LANGDLL
  73. Function PreReqCheck
  74. !ifdef INSTALL64
  75. ${if} ${RunningX64}
  76. ${Else}
  77. IfSilent +1 +3
  78. SetErrorLevel 3
  79. Quit
  80. MessageBox MB_OK|MB_ICONSTOP "This version of OBS Studio is not compatible with your system. Please use the 32bit (x86) installer."
  81. ${EndIf}
  82. ; Abort on XP or lower
  83. !endif
  84. ${If} ${AtMostWinVista}
  85. IfSilent +1 +3
  86. SetErrorLevel 3
  87. Quit
  88. MessageBox MB_OK|MB_ICONSTOP "Due to extensive use of DirectX 10 features, ${APPNAME} requires Windows 7 or higher and cannot be installed on this version of Windows."
  89. Quit
  90. ${EndIf}
  91. !ifdef INSTALL64
  92. ; 64 bit Visual Studio 2019 runtime check
  93. ClearErrors
  94. SetOutPath "$PLUGINSDIR"
  95. File check_for_64bit_visual_studio_2019_runtimes.exe
  96. ExecWait "$PLUGINSDIR\check_for_64bit_visual_studio_2019_runtimes.exe" $R0
  97. Delete "$PLUGINSDIR\check_for_64bit_visual_studio_2019_runtimes.exe"
  98. IntCmp $R0 126 vs2019Missing_64 vs2019OK_64
  99. vs2019Missing_64:
  100. IfSilent +1 +3
  101. SetErrorLevel 4
  102. Quit
  103. MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2019true_64 IDNO vs2019false_64
  104. vs2019true_64:
  105. ExecShell "open" "https://obsproject.com/visual-studio-2019-runtimes-64-bit"
  106. vs2019false_64:
  107. Quit
  108. vs2019OK_64:
  109. ClearErrors
  110. !else
  111. ; 32 bit Visual Studio 2019 runtime check
  112. ClearErrors
  113. GetDLLVersion "vcruntime140.DLL" $R0 $R1
  114. GetDLLVersion "msvcp140.DLL" $R0 $R1
  115. GetDLLVersion "msvcp140_1.DLL" $R0 $R1
  116. IfErrors vs2019Missing_32 vs2019OK_32
  117. vs2019Missing_32:
  118. IfSilent +1 +3
  119. SetErrorLevel 4
  120. Quit
  121. MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2019true_32 IDNO vs2019false_32
  122. vs2019true_32:
  123. ExecShell "open" "https://obsproject.com/visual-studio-2019-runtimes-32-bit"
  124. vs2019false_32:
  125. Quit
  126. vs2019OK_32:
  127. ClearErrors
  128. !endif
  129. ; DirectX Version Check
  130. ClearErrors
  131. GetDLLVersion "D3DCompiler_33.dll" $R0 $R1
  132. IfErrors dxMissing33 dxOK
  133. dxMissing33:
  134. ClearErrors
  135. GetDLLVersion "D3DCompiler_34.dll" $R0 $R1
  136. IfErrors dxMissing34 dxOK
  137. dxMissing34:
  138. ClearErrors
  139. GetDLLVersion "D3DCompiler_35.dll" $R0 $R1
  140. IfErrors dxMissing35 dxOK
  141. dxMissing35:
  142. ClearErrors
  143. GetDLLVersion "D3DCompiler_36.dll" $R0 $R1
  144. IfErrors dxMissing36 dxOK
  145. dxMissing36:
  146. ClearErrors
  147. GetDLLVersion "D3DCompiler_37.dll" $R0 $R1
  148. IfErrors dxMissing37 dxOK
  149. dxMissing37:
  150. ClearErrors
  151. GetDLLVersion "D3DCompiler_38.dll" $R0 $R1
  152. IfErrors dxMissing38 dxOK
  153. dxMissing38:
  154. ClearErrors
  155. GetDLLVersion "D3DCompiler_39.dll" $R0 $R1
  156. IfErrors dxMissing39 dxOK
  157. dxMissing39:
  158. ClearErrors
  159. GetDLLVersion "D3DCompiler_40.dll" $R0 $R1
  160. IfErrors dxMissing40 dxOK
  161. dxMissing40:
  162. ClearErrors
  163. GetDLLVersion "D3DCompiler_41.dll" $R0 $R1
  164. IfErrors dxMissing41 dxOK
  165. dxMissing41:
  166. ClearErrors
  167. GetDLLVersion "D3DCompiler_42.dll" $R0 $R1
  168. IfErrors dxMissing42 dxOK
  169. dxMissing42:
  170. ClearErrors
  171. GetDLLVersion "D3DCompiler_43.dll" $R0 $R1
  172. IfErrors dxMissing43 dxOK
  173. dxMissing43:
  174. ClearErrors
  175. GetDLLVersion "D3DCompiler_47.dll" $R0 $R1
  176. IfErrors dxMissing47 dxOK
  177. dxMissing47:
  178. ClearErrors
  179. GetDLLVersion "D3DCompiler_49.dll" $R0 $R1
  180. IfErrors dxMissing49 dxOK
  181. dxMissing49:
  182. IfSilent +1 +3
  183. SetErrorLevel 4
  184. Quit
  185. MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing DirectX components that ${APPNAME} requires. Would you like to download them?" IDYES dxtrue IDNO dxfalse
  186. dxtrue:
  187. ExecShell "open" "https://obsproject.com/go/dxwebsetup"
  188. dxfalse:
  189. Quit
  190. dxOK:
  191. ClearErrors
  192. ; Check previous instance
  193. check32BitRunning:
  194. OBSInstallerUtils::IsProcessRunning "obs32.exe"
  195. IntCmp $R0 1 0 notRunning1
  196. IfSilent +1 +3
  197. SetErrorLevel 5
  198. Quit
  199. MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${APPNAME} is already running. Please close it first before installing a new version." /SD IDCANCEL IDRETRY check32BitRunning
  200. Quit
  201. notRunning1:
  202. ${if} ${RunningX64}
  203. check64BitRunning:
  204. OBSInstallerUtils::IsProcessRunning "obs64.exe"
  205. IntCmp $R0 1 0 notRunning2
  206. IfSilent +1 +3
  207. SetErrorLevel 5
  208. Quit
  209. MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${APPNAME} is already running. Please close it first before installing a new version." /SD IDCANCEL IDRETRY check64BitRunning
  210. Quit
  211. notRunning2:
  212. ${endif}
  213. FunctionEnd
  214. Var dllFilesInUse
  215. Function checkDLLs
  216. OBSInstallerUtils::ResetInUseFileChecks
  217. !ifdef INSTALL64
  218. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\bin\64bit\avutil-56.dll"
  219. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\bin\64bit\swscale-5.dll"
  220. !else
  221. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\bin\32bit\avutil-56.dll"
  222. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\bin\32bit\swscale-5.dll"
  223. !endif
  224. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\data\obs-plugins\win-capture\graphics-hook32.dll"
  225. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\data\obs-plugins\win-capture\graphics-hook64.dll"
  226. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module32.dll"
  227. OBSInstallerUtils::AddInUseFileCheck "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module64.dll"
  228. OBSInstallerUtils::AddInUseFileCheck "$APPDATA\obs-studio-hook\graphics-hook32.dll"
  229. OBSInstallerUtils::AddInUseFileCheck "$APPDATA\obs-studio-hook\graphics-hook64.dll"
  230. OBSInstallerUtils::GetAppNameForInUseFiles
  231. StrCpy $dllFilesInUse "$R0"
  232. FunctionEnd
  233. Function checkFilesInUse
  234. retryFileChecks:
  235. Call checkDLLs
  236. StrCmp $dllFilesInUse "" dllsNotInUse
  237. IfSilent +1 +3
  238. SetErrorLevel 6
  239. Quit
  240. MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "OBS files are being used by the following applications:$\r$\n$\r$\n$dllFilesInUse$\r$\nPlease close these applications to continue setup." /SD IDCANCEL IDRETRY retryFileChecks
  241. Quit
  242. dllsNotInUse:
  243. FunctionEnd
  244. Function LaunchOBS
  245. !ifdef INSTALL64
  246. Exec '"$WINDIR\explorer.exe" "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"'
  247. !else
  248. Exec '"$WINDIR\explorer.exe" "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk"'
  249. !endif
  250. FunctionEnd
  251. Section "OBS Studio" SecCore
  252. SetShellVarContext all
  253. Call checkFilesInUse
  254. ; Set Section properties
  255. SectionIn RO
  256. SetOverwrite on
  257. AllowSkipFiles off
  258. ; Set Section Files and Shortcuts
  259. SetOutPath "$INSTDIR"
  260. OBSInstallerUtils::KillProcess "obs-plugins\32bit\cef-bootstrap.exe"
  261. OBSInstallerUtils::KillProcess "obs-plugins\64bit\cef-bootstrap.exe"
  262. File /r "new\core\data"
  263. !ifdef INSTALL64
  264. SetOutPath "$INSTDIR\bin"
  265. File /r "new\core\bin\64bit"
  266. SetOutPath "$INSTDIR\obs-plugins"
  267. File /r "new\core\obs-plugins\64bit"
  268. !else
  269. SetOutPath "$INSTDIR\bin"
  270. File /r "new\core\bin\32bit"
  271. SetOutPath "$INSTDIR\obs-plugins"
  272. File /r "new\core\obs-plugins\32bit"
  273. !endif
  274. # ----------------------------
  275. SetShellVarContext all
  276. SetOutPath "$INSTDIR"
  277. File /r "new\obs-browser\data"
  278. SetOutPath "$INSTDIR\obs-plugins"
  279. OBSInstallerUtils::KillProcess "32bit\cef-bootstrap.exe"
  280. OBSInstallerUtils::KillProcess "32bit\obs-browser-page.exe"
  281. ${if} ${RunningX64}
  282. OBSInstallerUtils::KillProcess "64bit\cef-bootstrap.exe"
  283. OBSInstallerUtils::KillProcess "64bit\obs-browser-page.exe"
  284. ${endif}
  285. !ifdef INSTALL64
  286. File /r "new\obs-browser\obs-plugins\64bit"
  287. SetOutPath "$INSTDIR\bin\64bit"
  288. !else
  289. File /r "new\obs-browser\obs-plugins\32bit"
  290. SetOutPath "$INSTDIR\bin\32bit"
  291. !endif
  292. # ----------------------------
  293. # Copy game capture files to ProgramData
  294. SetOutPath "$APPDATA\obs-studio-hook"
  295. File "new\core\data\obs-plugins\win-capture\graphics-hook32.dll"
  296. File "new\core\data\obs-plugins\win-capture\graphics-hook64.dll"
  297. File "new\core\data\obs-plugins\win-capture\obs-vulkan32.json"
  298. File "new\core\data\obs-plugins\win-capture\obs-vulkan64.json"
  299. OBSInstallerUtils::AddAllApplicationPackages "$APPDATA\obs-studio-hook"
  300. WriteUninstaller "$INSTDIR\uninstall.exe"
  301. !ifdef INSTALL64
  302. SetOutPath "$INSTDIR\bin\64bit"
  303. CreateShortCut "$DESKTOP\OBS Studio.lnk" "$INSTDIR\bin\64bit\obs64.exe"
  304. !else
  305. SetOutPath "$INSTDIR\bin\32bit"
  306. CreateShortCut "$DESKTOP\OBS Studio.lnk" "$INSTDIR\bin\32bit\obs32.exe"
  307. !endif
  308. CreateDirectory "$SMPROGRAMS\OBS Studio"
  309. !ifdef INSTALL64
  310. SetOutPath "$INSTDIR\bin\64bit"
  311. CreateShortCut "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk" "$INSTDIR\bin\64bit\obs64.exe"
  312. !else
  313. SetOutPath "$INSTDIR\bin\32bit"
  314. CreateDirectory "$SMPROGRAMS\OBS Studio"
  315. CreateShortCut "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk" "$INSTDIR\bin\32bit\obs32.exe"
  316. !endif
  317. CreateShortCut "$SMPROGRAMS\OBS Studio\Uninstall.lnk" "$INSTDIR\uninstall.exe"
  318. SectionEnd
  319. Section -FinishSection
  320. SetShellVarContext all
  321. # ---------------------------------------
  322. # 64bit vulkan hook registry stuff
  323. ${if} ${RunningX64}
  324. SetRegView 64
  325. WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
  326. ClearErrors
  327. DeleteRegValue HKCU "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan64.json"
  328. ClearErrors
  329. WriteRegDWORD HKLM "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan64.json" 0
  330. ${endif}
  331. # ---------------------------------------
  332. # 32bit vulkan hook registry stuff
  333. SetRegView 32
  334. WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
  335. ClearErrors
  336. DeleteRegValue HKCU "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan32.json"
  337. ClearErrors
  338. WriteRegDWORD HKLM "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan32.json" 0
  339. # ---------------------------------------
  340. # Register virtual camera dlls
  341. Exec '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module32.dll"'
  342. ${if} ${RunningX64}
  343. Exec '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module64.dll"'
  344. ${endif}
  345. # ---------------------------------------
  346. ClearErrors
  347. SetRegView default
  348. WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
  349. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
  350. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
  351. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "ProductID" "d16d2409-3151-4331-a9b1-dfd8cf3f0d9c"
  352. !ifdef INSTALL64
  353. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\bin\64bit\obs64.exe"
  354. !else
  355. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\bin\32bit\obs32.exe"
  356. !endif
  357. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "OBS Project"
  358. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "HelpLink" "https://obsproject.com"
  359. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${APPVERSION}"
  360. SectionEnd
  361. ; Modern install component descriptions
  362. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  363. !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "Core OBS Studio files"
  364. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  365. ;Uninstall section
  366. Section "un.obs-studio Program Files" UninstallSection1
  367. SectionIn RO
  368. ; Remove hook files and vulkan registry
  369. SetShellVarContext all
  370. RMDir /r "$APPDATA\obs-studio-hook"
  371. SetRegView 32
  372. DeleteRegValue HKCU "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan32.json"
  373. DeleteRegValue HKLM "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan32.json"
  374. ${if} ${RunningX64}
  375. SetRegView 64
  376. DeleteRegValue HKCU "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan64.json"
  377. DeleteRegValue HKLM "Software\Khronos\Vulkan\ImplicitLayers" "$APPDATA\obs-studio-hook\obs-vulkan64.json"
  378. ${endif}
  379. SetRegView default
  380. SetShellVarContext current
  381. ClearErrors
  382. ; Unregister virtual camera dlls
  383. Exec '"$SYSDIR\regsvr32.exe" /u /s "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module32.dll"'
  384. ${if} ${RunningX64}
  385. Exec '"$SYSDIR\regsvr32.exe" /u /s "$INSTDIR\data\obs-plugins\win-dshow\obs-virtualcam-module64.dll"'
  386. ${endif}
  387. ; Remove from registry...
  388. DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
  389. DeleteRegKey HKLM "SOFTWARE\${APPNAME}"
  390. ; Delete self
  391. Delete "$INSTDIR\uninstall.exe"
  392. ; Delete Shortcuts
  393. Delete "$DESKTOP\OBS Studio.lnk"
  394. Delete "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk"
  395. Delete "$SMPROGRAMS\OBS Studio\Uninstall.lnk"
  396. ${if} ${RunningX64}
  397. Delete "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"
  398. ${endif}
  399. IfFileExists "$INSTDIR\data\obs-plugins\win-ivcam\seg_service.exe" UnregisterSegService SkipUnreg
  400. UnregisterSegService:
  401. ExecWait '"$INSTDIR\data\obs-plugins\win-ivcam\seg_service.exe" /UnregServer'
  402. SkipUnreg:
  403. ; Clean up OBS Studio
  404. RMDir /r "$INSTDIR\bin"
  405. RMDir /r "$INSTDIR\data"
  406. RMDir /r "$INSTDIR\obs-plugins"
  407. RMDir "$INSTDIR"
  408. ; Remove remaining directories
  409. RMDir "$SMPROGRAMS\OBS Studio"
  410. RMDir "$INSTDIR\OBS Studio"
  411. SectionEnd
  412. Section /o "un.User Settings" UninstallSection2
  413. RMDir /r "$APPDATA\obs-studio"
  414. SectionEnd
  415. !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
  416. !insertmacro MUI_DESCRIPTION_TEXT ${UninstallSection1} "Remove the OBS program files."
  417. !insertmacro MUI_DESCRIPTION_TEXT ${UninstallSection2} "Removes all settings, scenes and sources, profiles, log files and other application data."
  418. !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
  419. ; Version information
  420. VIProductVersion "${APPVERSION}.0"
  421. VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "OBS Studio"
  422. VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "obsproject.com"
  423. VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "(c) 2012-2020"
  424. ; FileDescription is what shows in the UAC elevation prompt when signed
  425. VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "OBS Studio"
  426. VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.0"
  427. ; eof