[vlc-commits] NSIS: Make locale folder optional

Marvin Scholz git at videolan.org
Thu Feb 1 17:19:09 CET 2018


vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Thu Feb  1 14:08:21 2018 +0100| [dba3d2273a7d820c240b39ecbe0564ebac04fdd0] | committer: Marvin Scholz

NSIS: Make locale folder optional

It is valid to build an installer with a non-localized VLC, so it
should not error in that case.

(cherry picked from commit f5a39466790be22e3e3126a0fe610622e96d5749)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dba3d2273a7d820c240b39ecbe0564ebac04fdd0
---

 extras/package/win32/NSIS/helpers/install.nsh | 8 ++++++++
 extras/package/win32/NSIS/vlc.win32.nsi.in    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/extras/package/win32/NSIS/helpers/install.nsh b/extras/package/win32/NSIS/helpers/install.nsh
index e856b1efd8..d1d680f049 100644
--- a/extras/package/win32/NSIS/helpers/install.nsh
+++ b/extras/package/win32/NSIS/helpers/install.nsh
@@ -37,6 +37,14 @@
   Call InstallFolderInternal
 !macroend
 
+!macro InstallFolderOptional FOLDER
+  SetOutPath "$INSTDIR\${FOLDER}"
+  File /nonfatal /r "${FOLDER}\*.*"
+  SetOutPath "$INSTDIR"
+  Push "${FOLDER}"
+  Call InstallFolderInternal
+!macroend
+
 Function InstallFolderInternal
   Pop $9
   !define Index 'Line${__LINE__}'
diff --git a/extras/package/win32/NSIS/vlc.win32.nsi.in b/extras/package/win32/NSIS/vlc.win32.nsi.in
index de842ae2f4..9897179d8e 100644
--- a/extras/package/win32/NSIS/vlc.win32.nsi.in
+++ b/extras/package/win32/NSIS/vlc.win32.nsi.in
@@ -284,7 +284,7 @@ ${MementoSection} "$(Name_Section01)" SEC01
 
   ; Subfolders
   !insertmacro InstallFolder plugins
-  !insertmacro InstallFolder locale
+  !insertmacro InstallFolderOptional locale
   !insertmacro InstallFolder hrtfs
 @BUILD_SKINS_TRUE@   !insertmacro InstallFolder skins
 @BUILD_LUA_TRUE@     !insertmacro InstallFolder lua



More information about the vlc-commits mailing list