Add an NSIS script for building a win32 installer. Closes #522.
This commit is contained in:
parent
57459ec8ae
commit
ad954fcecc
@ -145,6 +145,7 @@ COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \
|
||||
######################################################################
|
||||
|
||||
export CFG_SRC_DIR
|
||||
export CFG_BUILD_DIR
|
||||
export CFG_VERSION
|
||||
export CFG_LLVM_ROOT
|
||||
export CFG_ENABLE_MINGW_CROSS
|
||||
|
3
configure
vendored
3
configure
vendored
@ -200,7 +200,7 @@ probe_need CFG_PERL perl
|
||||
probe_need CFG_PYTHON python
|
||||
probe_need CFG_CURL curl
|
||||
|
||||
probe CFG_GIT git
|
||||
probe CFG_GIT git
|
||||
probe CFG_CLANG clang++
|
||||
probe CFG_GCC gcc
|
||||
probe CFG_LLVM_CONFIG llvm-config
|
||||
@ -208,6 +208,7 @@ probe CFG_VALGRIND valgrind
|
||||
probe CFG_MAKEINFO makeinfo
|
||||
probe CFG_TEXI2PDF texi2pdf
|
||||
probe CFG_TEX tex
|
||||
probe CFG_MAKENSIS makensis
|
||||
|
||||
if [ -z "$CFG_CLANG" -a -z "$CFG_GCC" ]
|
||||
then
|
||||
|
21
mk/dist.mk
21
mk/dist.mk
@ -2,11 +2,17 @@
|
||||
# Distribution
|
||||
######################################################################
|
||||
|
||||
|
||||
PKG_NAME := rust
|
||||
PKG_VER = $(shell date +"%Y-%m-%d")-snap
|
||||
PKG_DIR = $(PKG_NAME)-$(PKG_VER)
|
||||
PKG_TAR = $(PKG_DIR).tar.gz
|
||||
|
||||
ifdef CFG_MAKENSIS
|
||||
PKG_NSI = $(S)src/etc/pkg/rust.nsi
|
||||
PKG_EXE = $(PKG_DIR)-install.exe
|
||||
endif
|
||||
|
||||
PKG_3RDPARTY := rt/valgrind.h rt/memcheck.h \
|
||||
rt/isaac/rand.h rt/isaac/standard.h \
|
||||
rt/uthash/uthash.h rt/uthash/utlist.h \
|
||||
@ -29,9 +35,20 @@ PKG_FILES = \
|
||||
$(ALL_TEST_INPUTS) \
|
||||
$(GENERATED)
|
||||
|
||||
dist: $(PKG_TAR)
|
||||
dist: $(PKG_TAR) $(PKG_EXE)
|
||||
|
||||
$(PKG_TAR): $(GENERATED)
|
||||
nsis-dist: $(PKG_EXE)
|
||||
|
||||
lic.txt: $(S)LICENSE.txt
|
||||
@$(call E, crlf: $@)
|
||||
@$(Q)perl -pe 's@\n@\r\n@go' <$< >$@
|
||||
|
||||
$(PKG_EXE): $(PKG_NSI) $(PKG_FILES) $(DOCS) $(SREQ3) lic.txt
|
||||
@$(call E, makensis: $@)
|
||||
$(Q)makensis -NOCD -V1 "-XOutFile $@" "-XLicenseData lic.txt" $<
|
||||
$(Q)rm -f lic.txt
|
||||
|
||||
$(PKG_TAR): $(PKG_FILES)
|
||||
@$(call E, making dist dir)
|
||||
$(Q)rm -Rf dist
|
||||
$(Q)mkdir -p dist/$(PKG_DIR)
|
||||
|
39
src/etc/pkg/rust.nsi
Normal file
39
src/etc/pkg/rust.nsi
Normal file
@ -0,0 +1,39 @@
|
||||
# -*- shell-script -*-
|
||||
# (not really, but syntax is similar)
|
||||
#
|
||||
# This is a NSIS win32 installer script the Rust toolchain.
|
||||
#
|
||||
|
||||
Name "Rust"
|
||||
ShowInstDetails "show"
|
||||
ShowUninstDetails "show"
|
||||
SetCompressor "lzma"
|
||||
LicenseForceSelection checkbox
|
||||
|
||||
Page license
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
|
||||
Section "Compiler"
|
||||
SetOutPath $INSTDIR
|
||||
File /oname=rustc.exe stage3\rustc.exe
|
||||
File /oname=rustllvm.dll stage3\rustllvm.dll
|
||||
File /oname=rustrt.dll stage3\rustrt.dll
|
||||
File /oname=std.dll stage3\std.dll
|
||||
|
||||
SetOutPath $INSTDIR\lib
|
||||
File /oname=rustrt.dll stage3\lib\rustrt.dll
|
||||
File /oname=std.dll stage3\lib\std.dll
|
||||
File /oname=main.o stage3\lib\main.o
|
||||
File /oname=glue.o stage3\lib\glue.o
|
||||
SectionEnd
|
||||
|
||||
Section "Documentation"
|
||||
SetOutPath $INSTDIR\doc
|
||||
File /nonfatal /oname=rust.html doc\rust.html
|
||||
File /nonfatal /oname=rust.pdf doc\rust.pdf
|
||||
SectionEnd
|
Loading…
Reference in New Issue
Block a user