Mercurial > hg > xemacs-beta
comparison lisp/package-net.el @ 673:685b588e92d8
[xemacs-hg @ 2001-10-30 05:13:26 by andyp]
merge of windows 21.4.5 codeline
author | andyp |
---|---|
date | Tue, 30 Oct 2001 05:13:31 +0000 |
parents | d7a9135ec789 |
children | a307f9a2021d |
comparison
equal
deleted
inserted
replaced
672:42a8626b741e | 673:685b588e92d8 |
---|---|
53 ;; You can run `package-net-convert-index-to-ini' manually and specify | 53 ;; You can run `package-net-convert-index-to-ini' manually and specify |
54 ;; REMOTE but I generally found that to be inconvenient and error-prone. | 54 ;; REMOTE but I generally found that to be inconvenient and error-prone. |
55 ;; | 55 ;; |
56 ;; 3. For package releases that's all you need to do. For binary | 56 ;; 3. For package releases that's all you need to do. For binary |
57 ;; releases you need to build both cygwin and win32 binaries and put | 57 ;; releases you need to build both cygwin and win32 binaries and put |
58 ;; them in appropriate tarballs: | 58 ;; them in appropriate tarballs: This can be achieved by running |
59 ;; | 59 ;; build-msw-release.sh |
60 ;; For cygwin, configure, make and install and then do (this is for | 60 ;; |
61 ;; 21.1.13): | |
62 ;; | |
63 ;; cd <install dir> | |
64 ;; tar cvzf xemacs-i686-pc-cygwin32-21.1.13.tar.gz \ | |
65 ;; ./bin/i686-pc-cygwin32 ./lib/xemacs-21.1.13 \ | |
66 ;; ./lib/xemacs/lock ./man/man1/xemacs.1 \ | |
67 ;; ./man/man1/ctags.1 ./man/man1/gnu*.1' | |
68 ;; | |
69 ;; Note that the naming of the package is important. Don't be tempted | |
70 ;; to change the order in any way. | |
71 ;; | |
72 ;; For win32 build and install the release and then (again for | |
73 ;; 21.1.13): | |
74 ;; | |
75 ;; cd <install dir> | |
76 ;; tar cvzf xemacs-i386-pc-win32-21.1.13.tar.gz ./XEmacs-21.1.13 | |
77 ;; | |
78 ;; The binaries should be uploaded to | |
79 ;; `ftp://ftp.xemacs.org/pub/xemacs/binaries/cygwin32' and | |
80 ;; `ftp://ftp.xemacs.org/pub/xemacs/binaries/win32' respectively. Take | |
81 ;; a note of their sizes and set `package-net-cygwin32-binary-size' | |
82 ;; and `package-net-win32-binary-size' appropriately in this file and | |
83 ;; then follow step 2. | |
84 | 61 |
85 (require 'package-admin) | 62 (require 'package-admin) |
86 (require 'package-get) | 63 (require 'package-get) |
87 | 64 |
88 ;; What path should we use from the myriad available? | 65 ;; What path should we use from the myriad available? |
97 ;; database so that running setup.exe again does not reinstall | 74 ;; database so that running setup.exe again does not reinstall |
98 ;; packages. | 75 ;; packages. |
99 ;; | 76 ;; |
100 ;; 2. Generating setup.ini should be more automatic. | 77 ;; 2. Generating setup.ini should be more automatic. |
101 | 78 |
102 (defvar package-net-cygwin32-binary-size 6917126 | 79 (defvar package-net-cygwin32-binary-size 0 |
103 "The size in bytes of the cygwin32 binary distribution.") | 80 "The size in bytes of the cygwin32 binary distribution.") |
104 | 81 |
105 (defvar package-net-win32-binary-size 6563941 | 82 (defvar package-net-win32-binary-size 0 |
106 "The size in bytes of the win32 binary distribution.") | 83 "The size in bytes of the win32 binary distribution.") |
84 | |
85 (defvar package-net-setup-version "1.0" | |
86 "The version string of setup.") | |
107 | 87 |
108 ;;;###autoload | 88 ;;;###autoload |
109 (defun package-net-setup-directory () | 89 (defun package-net-setup-directory () |
110 (file-truename (concat data-directory "../../" (if (eq system-type 'cygwin32) | 90 (file-truename (concat data-directory "../../" (if (eq system-type 'cygwin32) |
111 "xemacs/setup/" "setup/")))) | 91 "xemacs/setup/" "setup/")))) |
169 (setq entries (cdr entries)))) | 149 (setq entries (cdr entries)))) |
170 (insert "# setup.ini file ends here\n") | 150 (insert "# setup.ini file ends here\n") |
171 (write-region (point-min) (point-max) (concat destdir "setup.ini"))) | 151 (write-region (point-min) (point-max) (concat destdir "setup.ini"))) |
172 (kill-buffer buf)))) | 152 (kill-buffer buf)))) |
173 | 153 |
174 (defun package-net-batch-convert-index-to-ini () | 154 |
155 (defun package-net-generate-bin-ini (&optional version) | |
156 "Convert the package index to ini file format in the current directory." | |
157 (let ((buf (get-buffer-create "*setup-bin.ini*"))) | |
158 (unwind-protect | |
159 (save-excursion | |
160 (set-buffer buf) | |
161 (erase-buffer buf) | |
162 (goto-char (point-min)) | |
163 (insert "# This file is automatically generated. If you edit it, your\n") | |
164 (insert "# edits will be discarded next time the file is generated.\n") | |
165 (insert "#\n\n") | |
166 (insert (format "setup-timestamp: %d\n" | |
167 (+ (* (car (current-time)) 65536) (car (cdr (current-time)))))) | |
168 (insert (format "setup-version: %s\n\n" (or version "1.0"))) | |
169 ;; Native version | |
170 (insert (format "@ %s\n" "xemacs-i586-pc-win32")) | |
171 (insert (format "version: %s\n" emacs-program-version)) | |
172 (insert "type: native\n") | |
173 (insert (format "install: win32/%s %d\n\n" | |
174 (concat emacs-program-name | |
175 "-i586-pc-win32-" | |
176 emacs-program-version ".tar.gz") | |
177 package-net-win32-binary-size)) | |
178 ;; Cygwin version | |
179 (insert (format "@ %s\n" "xemacs-i686-pc-cygwin")) | |
180 (insert (format "version: %s\n" emacs-program-version)) | |
181 (insert "type: cygwin\n") | |
182 (insert (format "install: cygwin32/%s %d\n\n" | |
183 (concat emacs-program-name | |
184 "-i686-pc-cygwin-" | |
185 emacs-program-version ".tar.gz") | |
186 package-net-cygwin32-binary-size)) | |
187 (insert "# setup.ini file ends here\n") | |
188 (write-region (point-min) (point-max) "setup-bin.ini"))) | |
189 (kill-buffer buf))) | |
190 | |
191 (defun package-net-batch-generate-bin-ini () | |
175 "Convert the package index to ini file format." | 192 "Convert the package index to ini file format." |
176 (unless noninteractive | 193 (unless noninteractive |
177 (error "`package-net-batch-convert-index-to-ini' is to be used only with -batch")) | 194 (error "`package-net-batch-generate-bin-ini' is to be used only with -batch")) |
178 (let ((dir (car command-line-args-left)) | 195 (package-net-generate-bin-ini package-net-setup-version)) |
179 (version (car (cdr command-line-args-left))) | |
180 (package-get-require-signed-base-updates nil)) | |
181 (package-net-convert-index-to-ini dir nil version))) | |
182 | 196 |
183 ;;;###autoload | 197 ;;;###autoload |
184 (defun package-net-update-installed-db (&optional destdir) | 198 (defun package-net-update-installed-db (&optional destdir) |
185 "Write out the installed package index in a net install suitable format. | 199 "Write out the installed package index in a net install suitable format. |
186 If DESTDIR is non-nil then use that as the destination directory. | 200 If DESTDIR is non-nil then use that as the destination directory. |