[NSIS] Visual C++ ์ฌ๋ฐฐํฌ ํจํค์ง ์ค์น ํฌํจํ๊ธฐ
์ฌ๋ฐฐํฌ ํจํค์ง(Visual C++ Redistribution Package)
ํน์ ํ๋ก๊ทธ๋จ์ ์ค์นํ๋ค ๋ณด๋ฉด ๋น์ฃผ์ผ C++ ์ฌ๋ฐฐํฌ ํจํค์ง ์ค์น๊ฐ ํ์ํ๋ค๋ ๋ฉ์์ง๋ฅผ ๋ณด๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. ๋น์ทํ๊ฒ .Net ํ๋ ์ ์ํฌ ์ค์น๊ฐ ํ์ํ๋ค๋ ๋ฉ์์ง๋ ์์ต๋๋ค.
MFC์ ๊ฐ์ ํ๊ฒฝ์์ ๊ฐ๋ฐํ ํ๋ก๊ทธ๋จ(exe)์ ๋ฐฐํฌํ ๋, ์ฌ์ฉ์ PC์ ์ด ํ๋ก๊ทธ๋จ์ ์ง์ํ๋ ํ์ผ์ด ํ์ํ๋ฐ์. ์ด๋ฌํ ํ์ผ ๊ตฌ์ฑ์ Microsoft์์ ์ ๊ณตํด ์ฃผ๋ ํจํค์ง๊ฐ ์ฌ๋ฐฐํฌ ํจํค์ง์ ๋๋ค.
์ ์ดํ > ํ๋ก๊ทธ๋จ ๋ฐ ๊ธฐ๋ฅ์์ ์ค์น๋ ์ฌ๋ฐฐํฌ ํจํค์ง ๋ชฉ๋ก์ ํ์ธํ ์ ์์ต๋๋ค.
Visual C++ ๋ฒ์ ์ ๋ณด
์ฌ๋ฐฐํฌ ํจํค์ง๊ฐ ๋ฌด์์ธ์ง ์์ ๋ดค๋๋ฐ์. NSIS ์ธ์คํจ๋ฌ์ ์ฌ๋ฐฐํฌ ํจํค์ง๋ฅผ ํฌํจํ๊ธฐ ์ ์, Visual C++ ๋ฒ์ ์ ๋ฐ๋ฅธ ์ฌ๋ฐฐํฌ ํจํค์ง ํ์ผ๊ณผ ๋ ์ง์คํธ๋ฆฌ ์ฃผ์๋ฅผ ์์์ผ ํฉ๋๋ค.
์๋ ๋์ดํ ์ ๋ณด๋ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ฌ ์ ๋ฆฌํ์ต๋๋ค.
๋งํฌ: stackoverflow.com/questions/12206314/detect-if-visual-c-redistributable-for-visual-studio-2012-is-installed
Visual C++ 2005
Microsoft Visual C++ 2005 Redistributable (x64)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\1af2a8da7e60d0b429d7e6453b3d0182
Configuration: x64
Version: 6.0.2900.2180
Download: Link
Microsoft Visual C++ 2005 Redistributable (x86)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\c1c4f01781cc94c4c8fb1542c0981a2a Configuration: x86
Version: 6.0.2900.2180
Download: Link
Visual C++ 2008
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161 (SP1)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\67D6ECF5CD5FBA732B8B22BAC8DE1B4D Configuration: x64
Version: 9.0.30729.6161 (Actual $Version data in registry: 0x9007809 [DWORD])
Download: Link
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161 (SP1)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\6E815EB96CCE9A53884E7857C57002F0 Configuration: x86
Version: 9.0.30729.6161 (Actual $Version data in registry: 0x9007809 [DWORD])
Download: Link
Visual C++ 2010
Microsoft Visual C++ 2010 Redistributable (x64)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\1926E8D15D0BCE53481466615F760A7F Configuration: x64
Version: 10.0.40219.325
Download: Link
Microsoft Visual C++ 2010 Redistributable (x86)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Products\1D5E3C0FEDA1E123187686FED06E995A Configuration: x86
Version: 10.0.40219.325
Download: Link
Visual C++ 2012
Microsoft Visual C++ 2012 Redistributable (x64)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}
Configuration: x64
Version: 11.0.61030.0
Download: Link
Microsoft Visual C++ 2012 Redistributable (x86)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f} Configuration: x86
Version: 11.0.61030.0
Download: Link
Visual C++ 2013
Microsoft Visual C++ 2013 Redistributable (x64)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{050d4fc8-5d48-4b8f-8972-47c82c46020f} Configuration: x64
Version: 12.0.30501.0
Download: Link
Microsoft Visual C++ 2013 Redistributable (x86)
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{f65db027-aff3-4070-886a-0d87064aabb1} Configuration: x86
Version: 12.0.30501.0
Download: Link
Visual C+ 2015
Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.24215
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{d992c12e-cab2-426f-bde3-fb8c53950b0d} Configuration: x64
Version: 14.0.24215.1
Download: Link
Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.24215
Registry Key: HKLM\SOFTWARE\Classes\Installer\Dependencies\{e2803110-78b3-4664-a479-3611a381656a}
Configuration: x86
Version: 14.0.24215.1
Download: Link
Visual C++ 2017
Microsoft Visual C++ 2017 Redistributable (x64) - 14.16.27012
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x64,amd64,14.16,bundle\Dependents\{427ada59-85e7-4bc8-b8d5-ebf59db60423}]
Configuration: x64
Version: 14.16.27012.6
Download: Link
Microsoft Visual C++ 2017 Redistributable (x86) - 14.16.27012
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x86,x86,14.16,bundle\Dependents\{67f67547-9693-4937-aa13-56e296bd40f6}]
Configuration: x86
Version: 14.16.27012.6
Download: Link
Visual C++ 2019 (2015-2019 bundle)
14.21.27702
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.21.27702
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x64,amd64,14.21,bundle\Dependents\{f4220b74-9edd-4ded-bc8b-0342c1e164d8}]
Configuration: x64
Version: 14.21.27702
Download: Link
Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.21.27702
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x86,x86,14.21,bundle\Dependents\{49697869-be8e-427d-81a0-c334d1d14950}]
Configuration: x86
Version: 14.21.27702
Download: Link
14.22.27821
Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.22.27821
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x86,x86,14.22,bundle\Dependents\{5bfc1380-fd35-4b85-9715-7351535d077e}]
Configuration: x86
Version: 14.22.27821
Download: Link
Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.22.27821
Registry Key: [HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x64,amd64,14.22,bundle\Dependents\{6361b579-2795-4886-b2a8-53d5239b6452}]
Configuration: x64
Version: 14.22.27821
Download: Link
์ฌ๋ฐฐํฌ ํจํค์ง ์คํฌ๋ฆฝํธ ์ถ๊ฐํ๊ธฐ
์ธ์คํจ๋ฌ์ ํฌํจํ ์ฌ๋ฐฐํฌ ํจํค์ง๋ฅผ ๋ค์ด๋ก๋ ๋ฐ์ผ์ จ๋์? ๋ณธ๋ฌธ์์๋ Visual C++ 2015 x64๋ฅผ ํฌํจ์์ผ ์งํํด ๋ณด๊ฒ ์ต๋๋ค. ์คํฌ๋ฆฝํธ๋ ์๋์ ๊ฐ์ต๋๋ค.
;์ค์น๊ฐ ์๋ฃ๋๊ธฐ ์ ์ ํธ์ถ๋๋ Section.
Section -InnoSetup
;CheckVCRedist2015 Function์ ํธ์ถ.
Call CheckVCRedist2015
Pop $R9 ;R9 ๋ณ์๋ฅผ ๊บผ๋ธ๋ค.
StrCmp $R9 "No" 0 +2 ;R9 ๋ณ์๊ฐ No๋ผ๋ฉด ์๋ ExecWait๋ฅผ ํธ์ถํ๊ณ , ๊ทธ๋ ์ง ์๋ค๋ฉด SectionEnd๋ฅผ ์ํํ๋ค.
ExecWait "$INSTDIR\Driver\vc_redist.x64.exe"
SectionEnd
Function CheckVCRedist2015
Push $R9
ClearErrors
;64bit OS์ธ ๊ฒฝ์ฐ.
SetRegView 64
;Registry Version์ ์ฝ๋๋ค.
ReadRegStr $R9 HKLM "SOFTWARE\Classes\Installer\Dependencies\{d992c12e-cab2-426f-bde3-fb8c53950b0d}" "Version"
; if VS 2015 redist not installed, install it
IfErrors 0 VSRedistInstalled
StrCpy $R9 "No" ;Registry๊ฐ ์๋ค๋ฉด R9 ๋ณ์์ No๋ฅผ ๋ณต์ฌ.
VSRedistInstalled: ;Registry๊ฐ ์๋ค๋ฉด R9 ๋ณ์์ ์ค์น๋ ๋ฒ์ ์ ๋ณต์ฌ.
Exch $R9
FunctionEnd
NSIS์์ ์ฃผ์์ ; ์ ๋๋ค. ์คํฌ๋ฆฝํธ์ ๊ฐ ๋ช ๋ น์ด์ ๋ํ ์ค๋ช ์ ์ฃผ์์ผ๋ก ๋จ๊ฒผ์ต๋๋ค. ์ ๋์์ ์ ๋ฆฌํ๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
โ Visual C++ 2015์ ๋ ์ง์คํธ๋ฆฌ๋ฅผ ํ์ํ์ฌ ๋ฒ์ ํ์ธ.
โก ๋ฒ์ ์ด ์๋ค๋ฉด ์ค์น ์งํ.
โข ๋ฒ์ ์ด ์๋ค๋ฉด ์ข
๋ฃ.
ํ๋จ์ ์ฒจ๋ถ๋ ์์ NSI ํ์ผ์ ์คํํ๋ฉด, ์ค์น ๊ณผ์ ์ค์ ์๋์ ๊ฐ์ด ์ฐฝ์ด ํ์๋ฉ๋๋ค.
์์ ํ์ผ: 1drv.ms/u/s!AhrLbATTcIfkxVoHgYDhHGMj77xL?e=FOv250
'Programming > NSIS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[NSIS] ์คํ๋์(Splash) ๊ธฐ๋ฅ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ) (2) | 2020.10.04 |
---|---|
[NSIS] Welcome ๋ฐ Header ์ด๋ฏธ์ง, ์์ด์ฝ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ) (3) | 2020.10.01 |
[NSIS] ์ฃผ์ ํน์ง ์ค์ ๋์ ํ์ธํ๊ธฐ (0) | 2020.09.23 |
[NSIS] HM NIS Edit๋ก ์ฝ๊ณ ๋น ๋ฅด๊ฒ ์ค์น ํ์ผ ๋ง๋ค๊ธฐ (5) | 2020.09.23 |
[NSIS] HM NIS Edit ํ๋ก๊ทธ๋จ ๋ค์ด๋ก๋ ๋ฐ ์ค์นํ๊ธฐ (0) | 2020.09.21 |
[NSIS] NSIS ํ๋ก๊ทธ๋จ ๋ค์ด๋ก๋ ๋ฐ ์ค์นํ๊ธฐ (0) | 2020.09.19 |
[NSIS] ์ค์น ํ์ผ ๋ฐฐํฌ๋ฅผ ์ํ NSIS ์์๋ณด๊ธฐ! (0) | 2020.09.17 |
๋๊ธ
์ด ๊ธ ๊ณต์ ํ๊ธฐ
-
๊ตฌ๋
ํ๊ธฐ
๊ตฌ๋ ํ๊ธฐ
-
์นด์นด์คํก
์นด์นด์คํก
-
๋ผ์ธ
๋ผ์ธ
-
ํธ์ํฐ
ํธ์ํฐ
-
Facebook
Facebook
-
์นด์นด์ค์คํ ๋ฆฌ
์นด์นด์ค์คํ ๋ฆฌ
-
๋ฐด๋
๋ฐด๋
-
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
-
Pocket
Pocket
-
Evernote
Evernote
๋ค๋ฅธ ๊ธ
-
[NSIS] ์คํ๋์(Splash) ๊ธฐ๋ฅ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ)
[NSIS] ์คํ๋์(Splash) ๊ธฐ๋ฅ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ)
2020.10.04 -
[NSIS] Welcome ๋ฐ Header ์ด๋ฏธ์ง, ์์ด์ฝ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ)
[NSIS] Welcome ๋ฐ Header ์ด๋ฏธ์ง, ์์ด์ฝ ์ถ๊ฐํ๊ธฐ (์์ ํฌํจ)
2020.10.01 -
[NSIS] ์ฃผ์ ํน์ง ์ค์ ๋์ ํ์ธํ๊ธฐ
[NSIS] ์ฃผ์ ํน์ง ์ค์ ๋์ ํ์ธํ๊ธฐ
2020.09.23 -
[NSIS] HM NIS Edit๋ก ์ฝ๊ณ ๋น ๋ฅด๊ฒ ์ค์น ํ์ผ ๋ง๋ค๊ธฐ
[NSIS] HM NIS Edit๋ก ์ฝ๊ณ ๋น ๋ฅด๊ฒ ์ค์น ํ์ผ ๋ง๋ค๊ธฐ
2020.09.23