Compare commits

...

5 Commits
v6.3 ... master

Author SHA1 Message Date
Matthew Flatt
9579db1b15 update copyright to 2016 2016-01-13 19:44:43 -07:00
Matthew Flatt
ee1358f16b fix Windows build without code signing 2016-01-08 05:44:25 -07:00
Matthew Flatt
a4b7d3bbba Windows code-signing and ".tgz" options 2016-01-07 19:22:02 -07:00
Matthew Flatt
490d1677fe HTTPS references 2016-01-07 08:53:47 -07:00
Matthew Flatt
609f3f5f10 avoid "." files when packing "racket/collects" 2016-01-01 14:39:27 -07:00
16 changed files with 115 additions and 39 deletions

View File

@ -1,5 +1,5 @@
distro-build distro-build
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
This package is distributed under the GNU Lesser General Public This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary License (LGPL). This means that you can link this package into proprietary

View File

@ -3,6 +3,7 @@
racket/list racket/list
racket/system racket/system
racket/path racket/path
racket/file
racket/runtime-path racket/runtime-path
setup/getinfo setup/getinfo
setup/cross-system) setup/cross-system)
@ -133,7 +134,7 @@ InstallDir "${RKTProgFiles}\${RKTDirName}"
"") "")
!endif !endif
!define MUI_FINISHPAGE_LINK "Visit the Racket web site" !define MUI_FINISHPAGE_LINK "Visit the Racket web site"
!define MUI_FINISHPAGE_LINK_LOCATION "http://racket-lang.org/" !define MUI_FINISHPAGE_LINK_LOCATION "https://racket-lang.org/"
; !define MUI_UNFINISHPAGE_NOAUTOCLOSE ; to allow users see what was erased ; !define MUI_UNFINISHPAGE_NOAUTOCLOSE ; to allow users see what was erased
@ -146,7 +147,7 @@ InstallDir "${RKTProgFiles}\${RKTDirName}"
VIProductVersion "${RKTVersionLong}" VIProductVersion "${RKTVersionLong}"
VIAddVersionKey "ProductName" "Racket" VIAddVersionKey "ProductName" "Racket"
VIAddVersionKey "Comments" "This is the Racket language, see http://racket-lang.org/." VIAddVersionKey "Comments" "This is the Racket language, see https://racket-lang.org/."
VIAddVersionKey "CompanyName" "PLT Design Inc." VIAddVersionKey "CompanyName" "PLT Design Inc."
VIAddVersionKey "LegalCopyright" "© PLT Design Inc." VIAddVersionKey "LegalCopyright" "© PLT Design Inc."
VIAddVersionKey "FileDescription" "Racket Installer" VIAddVersionKey "FileDescription" "Racket Installer"
@ -309,8 +310,8 @@ Section ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayIcon" "$INSTDIR\DrRacket.exe,0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayIcon" "$INSTDIR\DrRacket.exe,0"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayVersion" "${RKTVersion}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayVersion" "${RKTVersion}"
; used to also have "VersionMajor" & "VersionMinor" but looks like it's not needed ; used to also have "VersionMajor" & "VersionMinor" but looks like it's not needed
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "HelpLink" "http://racket-lang.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "HelpLink" "https://racket-lang.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "URLInfoAbout" "http://racket-lang.org/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "URLInfoAbout" "https://racket-lang.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "Publisher" "PLT Design Inc." WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "Publisher" "PLT Design Inc."
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoModify" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoRepair" "1" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoRepair" "1"
@ -411,7 +412,7 @@ SectionEnd
"-V3")) "-V3"))
(system* makensis verbose "installer.nsi"))) (system* makensis verbose "installer.nsi")))
(define (installer-exe human-name base-name versionless? dist-suffix readme) (define (installer-exe human-name base-name versionless? dist-suffix readme osslsigncode-args)
(define makensis (or (case (system-type) (define makensis (or (case (system-type)
[(windows) [(windows)
(or (find-executable-path "makensis.exe") (or (find-executable-path "makensis.exe")
@ -437,4 +438,19 @@ SectionEnd
#:extension-registers (get-extreg "bundle/racket") #:extension-registers (get-extreg "bundle/racket")
#:start-menus (get-startmenu "bundle/racket") #:start-menus (get-startmenu "bundle/racket")
#:auto-launch (get-auto-launch "bundle/racket")) #:auto-launch (get-auto-launch "bundle/racket"))
(when osslsigncode-args
(define unsigned-exe-path (let-values ([(base name dir?) (split-path exe-path)])
(build-path base "unsigned" name)))
(make-directory* "bundle/unsigned")
(rename-file-or-directory exe-path unsigned-exe-path #t)
(unless (apply system*
(or (find-executable-path (case (system-type)
[(windows) "osslsigncode.exe"]
[else "osslsigncode"]))
(error "cannot find `osslsigncode`"))
(append osslsigncode-args
(list "-n" human-name
"-t" "http://timestamp.verisign.com/scripts/timstamp.dll"
"-in" unsigned-exe-path "-out" exe-path)))
(error "signing failed")))
exe-path) exe-path)

View File

@ -2,7 +2,8 @@
(require racket/system (require racket/system
racket/file racket/file
racket/format racket/format
file/tar) file/tar
setup/cross-system)
(provide installer-tgz) (provide installer-tgz)
@ -25,11 +26,22 @@
(parameterize ([current-directory src-dir]) (parameterize ([current-directory src-dir])
(apply tar-gzip dest #:path-prefix target-dir-name (directory-list)))) (apply tar-gzip dest #:path-prefix target-dir-name (directory-list))))
(define (installer-tgz base-name dir-name dist-suffix readme) (define (installer-tgz source? base-name dir-name dist-suffix readme)
(define tgz-path (format "bundle/~a-src~a.tgz" (define tgz-path (format "bundle/~a-~a~a.tgz"
base-name base-name
(if source?
"src"
(get-platform-name))
dist-suffix)) dist-suffix))
(generate-tgz "bundle/racket" tgz-path (generate-tgz "bundle/racket" tgz-path
dir-name dir-name
readme) readme)
tgz-path) tgz-path)
(define (get-platform-name)
(case (cross-system-type)
[(windows)
(define-values (base name dir?) (split-path (cross-system-library-subpath #f)))
(format "~a-win32" (bytes->string/utf-8 (path-element->bytes name)))]
[else
(format "~a" (cross-system-library-subpath #f))]))

View File

@ -9,6 +9,7 @@
racket/file racket/file
racket/path racket/path
racket/port racket/port
net/base64
setup/cross-system setup/cross-system
"display-time.rkt") "display-time.rkt")
@ -17,12 +18,14 @@
(define release? #f) (define release? #f)
(define source? #f) (define source? #f)
(define versionless? #f) (define versionless? #f)
(define tgz? #f)
(define mac-pkg? #f) (define mac-pkg? #f)
(define upload-to #f) (define upload-to #f)
(define upload-desc "") (define upload-desc "")
(define download-readme #f) (define download-readme #f)
(define-values (short-human-name human-name base-name dir-name dist-suffix sign-identity) (define-values (short-human-name human-name base-name dir-name dist-suffix
sign-identity osslsigncode-args-base64)
(command-line (command-line
#:once-each #:once-each
[("--release") "Create a release installer" [("--release") "Create a release installer"
@ -31,6 +34,8 @@
(set! source? #t)] (set! source? #t)]
[("--versionless") "Avoid version number in names and paths" [("--versionless") "Avoid version number in names and paths"
(set! versionless? #t)] (set! versionless? #t)]
[("--tgz") "Create a \".tgz\" archive instead of an installer"
(set! tgz? #t)]
[("--mac-pkg") "Create a \".pkg\" installer on Mac OS X" [("--mac-pkg") "Create a \".pkg\" installer on Mac OS X"
(set! mac-pkg? #t)] (set! mac-pkg? #t)]
[("--upload") url "Upload installer" [("--upload") url "Upload installer"
@ -42,7 +47,7 @@
(unless (string=? readme "") (unless (string=? readme "")
(set! download-readme readme))] (set! download-readme readme))]
#:args #:args
(human-name base-name dir-name dist-suffix sign-identity) (human-name base-name dir-name dist-suffix sign-identity osslsigncode-args-base64)
(values human-name (values human-name
(format "~a v~a" human-name (version)) (format "~a v~a" human-name (version))
(if versionless? (if versionless?
@ -55,7 +60,7 @@
(if (string=? dist-suffix "") (if (string=? dist-suffix "")
"" ""
(string-append "-" dist-suffix)) (string-append "-" dist-suffix))
sign-identity))) sign-identity osslsigncode-args-base64)))
(display-time) (display-time)
@ -68,12 +73,24 @@
(port->string i) (port->string i)
(close-input-port i))))) (close-input-port i)))))
(define (unpack-base64-arguments str)
(define p (open-input-bytes (base64-decode (string->bytes/utf-8 str))))
(define l (read p))
(unless (and (list? l)
(andmap string? l)
(eof-object? (read p)))
(error 'unpack-base64-arguments
"encoded arguments didn't decode and `read` as a list of strings: ~e" str))
l)
(define installer-file (define installer-file
(if source? (if (or source? tgz?)
(installer-tgz base-name dir-name dist-suffix readme) (installer-tgz source? base-name dir-name dist-suffix readme)
(case (cross-system-type) (case (cross-system-type)
[(unix) (installer-sh human-name base-name dir-name release? dist-suffix readme)] [(unix)
[(macosx) (if mac-pkg? (installer-sh human-name base-name dir-name release? dist-suffix readme)]
[(macosx)
(if mac-pkg?
(installer-pkg (if (or release? versionless?) (installer-pkg (if (or release? versionless?)
short-human-name short-human-name
human-name) human-name)
@ -82,8 +99,13 @@
short-human-name short-human-name
human-name) human-name)
base-name dist-suffix readme sign-identity))] base-name dist-suffix readme sign-identity))]
[(windows) (installer-exe short-human-name base-name (or release? versionless?) [(windows)
dist-suffix readme)]))) (define osslsigncode-args
(and (not (equal? osslsigncode-args-base64 ""))
(unpack-base64-arguments osslsigncode-args-base64)))
(installer-exe short-human-name base-name (or release? versionless?)
dist-suffix readme
osslsigncode-args)])))
(call-with-output-file* (call-with-output-file*
(build-path "bundle" "installer.txt") (build-path "bundle" "installer.txt")

View File

@ -352,9 +352,14 @@ spaces, etc.):
on the value of @racket[#:bits]} on the value of @racket[#:bits]}
@item{@racket[#:sign-identity _string] --- provides an identity to @item{@racket[#:sign-identity _string] --- provides an identity to
be passed to @exec{codesign} for code signing on Mac OS X (for all be passed to @exec{codesign} for code signing on Mac OS X (for a
executables in a distribution), where an empty string disables package or all executables in a distribution), where an empty
signing; the default is @racket[""]} string disables signing; the default is @racket[""]}
@item{@racket[#:osslsigncode-args (list _string ...)] --- provides
arguments for signing a Windows executable using
@exec{osslsigncode}, where @Flag{n}, @Flag{t}, @Flag{in}, and
@Flag{-out} arguments are supplied automatically.}
@item{@racket[#:j _integer] --- parallelism for @tt{make} on Unix @item{@racket[#:j _integer] --- parallelism for @tt{make} on Unix
and Mac OS X and for @exec{raco setup} on all platforms; defaults and Mac OS X and for @exec{raco setup} on all platforms; defaults
@ -408,6 +413,10 @@ spaces, etc.):
@filepath{.pkg} for Mac OS X (in single-file format) instead of a @filepath{.pkg} for Mac OS X (in single-file format) instead of a
@filepath{.dmg}; the default is @racket[#f]} @filepath{.dmg}; the default is @racket[#f]}
@item{@racket[#:tgz? _boolean] --- if true, creates a
@filepath{.tgz} archive instead of an installer; the default is
@racket[#f]}
@item{@racket[#:pause-before _nonnegative-real] --- a pause in @item{@racket[#:pause-before _nonnegative-real] --- a pause in
seconds to wait before starting a machine, which may help a seconds to wait before starting a machine, which may help a
virtual machine avoid confusion from being stopped and started too virtual machine avoid confusion from being stopped and started too

View File

@ -1,5 +1,5 @@
distro-build distro-build
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
This package is distributed under the GNU Lesser General Public This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary License (LGPL). This means that you can link this package into proprietary

View File

@ -1,5 +1,5 @@
distro-build distro-build
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
This package is distributed under the GNU Lesser General Public This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary License (LGPL). This means that you can link this package into proprietary

View File

@ -41,7 +41,7 @@
(define www-site (and (hash-ref config '#:plt-web-style? #t) (define www-site (and (hash-ref config '#:plt-web-style? #t)
(site "www" (site "www"
#:url "http://racket-lang.org/" #:url "https://racket-lang.org/"
#:generate? #f))) #:generate? #f)))
(printf "Assembling site as ~a\n" dest-dir) (printf "Assembling site as ~a\n" dest-dir)

View File

@ -146,6 +146,7 @@
[(#:bits) (or (equal? val 32) (equal? val 64))] [(#:bits) (or (equal? val 32) (equal? val 64))]
[(#:vc) (string? val)] [(#:vc) (string? val)]
[(#:sign-identity) (string? val)] [(#:sign-identity) (string? val)]
[(#:osslsigncode-args) (and (list? val) (andmap string? val))]
[(#:timeout) (real? val)] [(#:timeout) (real? val)]
[(#:j) (exact-positive-integer? val)] [(#:j) (exact-positive-integer? val)]
[(#:repo) (string? val)] [(#:repo) (string? val)]
@ -157,6 +158,7 @@
[(#:source-pkgs?) (boolean? val)] [(#:source-pkgs?) (boolean? val)]
[(#:versionless?) (boolean? val)] [(#:versionless?) (boolean? val)]
[(#:mac-pkg?) (boolean? val)] [(#:mac-pkg?) (boolean? val)]
[(#:tgz?) (boolean? val)]
[(#:site-dest) (path-string? val)] [(#:site-dest) (path-string? val)]
[(#:site-help) (hash? val)] [(#:site-help) (hash? val)]
[(#:site-title) (string? val)] [(#:site-title) (string? val)]

View File

@ -182,7 +182,7 @@
null) null)
#:share-from (or www-site #:share-from (or www-site
(site "www" (site "www"
#:url "http://racket-lang.org/" #:url "https://racket-lang.org/"
#:generate? #f))))) #:generate? #f)))))
(define orig-directory (current-directory)) (define orig-directory (current-directory))

View File

@ -6,6 +6,7 @@
racket/file racket/file
racket/string racket/string
racket/path racket/path
net/base64
(only-in distro-build/config (only-in distro-build/config
current-mode current-mode
site-config? site-config?
@ -233,6 +234,10 @@
"\"\\&\\&\"")] "\"\\&\\&\"")]
[else s])) [else s]))
(define (pack-base64-arguments args)
(bytes->string/utf-8 (base64-encode (string->bytes/utf-8 (format "~s" args))
#"")))
(define (client-args c server server-port kind readme) (define (client-args c server server-port kind readme)
(define desc (client-name c)) (define desc (client-name c))
(define pkgs (let ([l (get-opt c '#:pkgs)]) (define pkgs (let ([l (get-opt c '#:pkgs)])
@ -250,12 +255,14 @@
(define dist-suffix (get-opt c '#:dist-suffix "")) (define dist-suffix (get-opt c '#:dist-suffix ""))
(define dist-catalogs (choose-catalogs c '(""))) (define dist-catalogs (choose-catalogs c '("")))
(define sign-identity (get-opt c '#:sign-identity "")) (define sign-identity (get-opt c '#:sign-identity ""))
(define osslsigncode-args (get-opt c '#:osslsigncode-args))
(define release? (get-opt c '#:release? default-release?)) (define release? (get-opt c '#:release? default-release?))
(define source? (get-opt c '#:source? default-source?)) (define source? (get-opt c '#:source? default-source?))
(define versionless? (get-opt c '#:versionless? default-versionless?)) (define versionless? (get-opt c '#:versionless? default-versionless?))
(define source-pkgs? (get-opt c '#:source-pkgs? source?)) (define source-pkgs? (get-opt c '#:source-pkgs? source?))
(define source-runtime? (get-opt c '#:source-runtime? source?)) (define source-runtime? (get-opt c '#:source-runtime? source?))
(define mac-pkg? (get-opt c '#:mac-pkg? #f)) (define mac-pkg? (get-opt c '#:mac-pkg? #f))
(define tgz? (get-opt c '#:tgz? #f))
(define install-name (get-opt c '#:install-name (if release? (define install-name (get-opt c '#:install-name (if release?
"" ""
snapshot-install-name))) snapshot-install-name)))
@ -276,6 +283,9 @@
" DIST_SUFFIX=" (q dist-suffix) " DIST_SUFFIX=" (q dist-suffix)
" DIST_CATALOGS_q=" (qq dist-catalogs kind) " DIST_CATALOGS_q=" (qq dist-catalogs kind)
" SIGN_IDENTITY=" (q sign-identity) " SIGN_IDENTITY=" (q sign-identity)
" OSSLSIGNCODE_ARGS_BASE64=" (q (if osslsigncode-args
(pack-base64-arguments osslsigncode-args)
""))
" INSTALL_NAME=" (q install-name) " INSTALL_NAME=" (q install-name)
" BUILD_STAMP=" (q build-stamp) " BUILD_STAMP=" (q build-stamp)
" RELEASE_MODE=" (if release? "--release" (q "")) " RELEASE_MODE=" (if release? "--release" (q ""))
@ -285,6 +295,7 @@
(q "--source --no-setup") (q "--source --no-setup")
(q "")) (q ""))
" MAC_PKG_MODE=" (if mac-pkg? "--mac-pkg" (q "")) " MAC_PKG_MODE=" (if mac-pkg? "--mac-pkg" (q ""))
" TGZ_MODE=" (if tgz? "--tgz" (q ""))
" UPLOAD=http://" server ":" server-port "/upload/" " UPLOAD=http://" server ":" server-port "/upload/"
" README=http://" server ":" server-port "/" (q (file-name-from-path readme)))) " README=http://" server ":" server-port "/" (q (file-name-from-path readme))))

View File

@ -16,4 +16,8 @@
(delete-file tgz-file)) (delete-file tgz-file))
(parameterize ([current-directory (build-path "racket")]) (parameterize ([current-directory (build-path "racket")])
(tar-gzip tgz-file "collects")) (tar-gzip tgz-file "collects"
;; Skip "." files:
#:path-filter (lambda (p)
(define-values (base name dir?) (split-path p))
(not (regexp-match? #rx"^[.]" name)))))

View File

@ -77,7 +77,7 @@
------- -------
Racket Racket
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
Racket is distributed under the GNU Lesser General Public License Racket is distributed under the GNU Lesser General Public License
(LGPL). This means that you can link Racket into proprietary (LGPL). This means that you can link Racket into proprietary

View File

@ -1,5 +1,5 @@
distro-build-test distro-build-test
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
This package is distributed under the GNU Lesser General Public This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary License (LGPL). This means that you can link this package into proprietary

View File

@ -26,7 +26,7 @@
(define vbox-user "racket") (define vbox-user "racket")
(define vbox-snapshot "init") (define vbox-snapshot "init")
(define snapshot-site "http://pre-release.racket-lang.org/") (define snapshot-site "https://pre-release.racket-lang.org/")
(define installers-site (~a snapshot-site "installers/")) (define installers-site (~a snapshot-site "installers/"))
(define catalog (~a snapshot-site "catalog/")) (define catalog (~a snapshot-site "catalog/"))

View File

@ -1,5 +1,5 @@
distro-build distro-build
Copyright (c) 2010-2015 PLT Design Inc. Copyright (c) 2010-2016 PLT Design Inc.
This package is distributed under the GNU Lesser General Public This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary License (LGPL). This means that you can link this package into proprietary