Skip to content

Commit

Permalink
installer: win: put addons in a separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Mar 2, 2018
1 parent aadf6f6 commit 7aa9b97
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
22 changes: 17 additions & 5 deletions dev/build/windows/makecoq_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,8 @@ function make_coq_installer {

# Prepare the file lists for the installer. We created to file list dumps of the target folder during the build:
# ocaml: ocaml + menhir + camlp5 + findlib
# ocal_coq: as above + coq
# ocaml_coq: as above + coq
# ocaml_coq_addons: as above + lib/user-contrib/*

# Create coq file list as ocaml_coq / ocaml
diff_files coq ocaml_coq ocaml
Expand All @@ -1300,11 +1301,17 @@ function make_coq_installer {
# Coq objects objects required for plugin development = coq objects except those for pre installed plugins
diff_files coq_plugindev coq_objects coq_objects_plugins

# Addons (TODO: including objects that could go to the plugindev thing, but
# then one would have to make that package depend on this one, so not
# implemented yet)
diff_files coq_addons ocaml_coq_addons ocaml_coq

# Coq files, except objects needed only for plugin development
diff_files coq_base coq coq_plugindev

# Convert section files to NSIS format
files_to_nsis coq_base
files_to_nsis coq_addons
files_to_nsis coq_plugindev
files_to_nsis ocaml

Expand All @@ -1320,7 +1327,7 @@ function make_coq_installer {
cp ../patches/ReplaceInFile.nsh dev/nsis
VERSION=`grep '^VERSION=' config/Makefile | cut -d = -f 2 | tr -d '\r'`
cd dev/nsis
logn nsis-installer "$NSIS" -DVERSION=$VERSION -DARCH=$ARCH -DCOQ_SRC_PATH="$PREFIXCOQ" -DCOQ_ICON=..\\..\\ide\\coq.ico coq_new.nsi
logn nsis-installer "$NSIS" -DVERSION=$VERSION -DARCH=$ARCH -DCOQ_SRC_PATH="$PREFIXCOQ" -DCOQ_ICON=..\\..\\ide\\coq.ico -DCOQ_ADDONS="$COQ_ADDONS" coq_new.nsi

build_post
fi
Expand Down Expand Up @@ -1353,14 +1360,19 @@ list_files ocaml

make_coq

make_addons

if [ "$INSTALLMAKE" == "Y" ] ; then
make_mingw_make
# I've to comment this out becase, with addons, if this make is in the
# PATH it hides the real one (the one that works, while this one does not)
#make_mingw_make
:
fi

list_files ocaml_coq

make_addons

list_files ocaml_coq_addons

if [ "$MAKEINSTALLER" == "Y" ] ; then
make_coq_installer
fi
Expand Down
11 changes: 9 additions & 2 deletions dev/build/windows/patches_coq/coq_new.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
; ARCH The target architecture, either x86_64 or i686
; COQ_SRC_PATH path of Coq installation in Windows or MinGW format (either \\ or /, but with drive letter)
; COQ_ICON path of Coq icon file in Windows or MinGW format
; COQ_ADDONS list of addons that are shipped

; Enable compression after debugging.
; SetCompress off
Expand Down Expand Up @@ -69,7 +70,8 @@ Var INSTDIR_DBS ; INSTDIR with \\ instead of \

;Description
LangString DESC_1 ${LANG_ENGLISH} "This package contains Coq and CoqIDE."
LangString DESC_2 ${LANG_ENGLISH} "This package contains an OCaml compiler for Coq native compute and plugin development."
LangString DESC_2 ${LANG_ENGLISH} "This package contains the following extra Coq packages: ${COQ_ADDONS}"
;LangString DESC_2 ${LANG_ENGLISH} "This package contains an OCaml compiler for Coq native compute and plugin development."
LangString DESC_3 ${LANG_ENGLISH} "This package contains the development files needed in order to build a plugin for Coq."
LangString DESC_4 ${LANG_ENGLISH} "Set the OCAMLLIB environment variable for the current user."
LangString DESC_5 ${LANG_ENGLISH} "Set the OCAMLLIB environment variable for all users."
Expand Down Expand Up @@ -150,6 +152,11 @@ SectionEnd
;OCAML !insertmacro ReplaceInFile "$INSTDIR\etc\findlib.conf" "$COQ_SRC_PATH_DBS" "$INSTDIR_DBS"
;OCAML SectionEnd

Section "Coq packages" Sec2
SetOutPath "$INSTDIR\"
!include "..\..\..\filelists\coq_addons.nsh"
SectionEnd

Section "Coq files for plugin developers" Sec3
SetOutPath "$INSTDIR\"
!include "..\..\..\filelists\coq_plugindev.nsh"
Expand All @@ -176,7 +183,7 @@ SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Sec1} $(DESC_1)
;OCAML !insertmacro MUI_DESCRIPTION_TEXT ${Sec2} $(DESC_2)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec2} $(DESC_2)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec3} $(DESC_3)
;OCAML !insertmacro MUI_DESCRIPTION_TEXT ${Sec4} $(DESC_4)
;OCAML !insertmacro MUI_DESCRIPTION_TEXT ${Sec5} $(DESC_5)
Expand Down

0 comments on commit 7aa9b97

Please sign in to comment.