+(defun package-net-generate-bin-ini (&optional version)
+ "Convert the package index to ini file format in the current directory."
+ (let ((buf (get-buffer-create "*setup-bin.ini*")))
+ (unwind-protect
+ (save-excursion
+ (set-buffer buf)
+ (erase-buffer buf)
+ (goto-char (point-min))
+ (insert "# This file is automatically generated. If you edit it, your\n")
+ (insert "# edits will be discarded next time the file is generated.\n")
+ (insert "#\n\n")
+ (insert (format "setup-timestamp: %d\n"
+ (+ (* (car (current-time)) 65536) (car (cdr (current-time))))))
+ (insert (format "setup-version: %s\n\n" (or version "1.0")))
+ ;; Native version
+ (insert (format "@ %s\n" "xemacs-i586-pc-win32"))
+ (insert (format "version: %s\n" emacs-program-version))
+ (insert "type: native\n")
+ (insert (format "install: win32/%s %d\n\n"
+ (concat emacs-program-name
+ "-i586-pc-win32-"
+ emacs-program-version ".tar.gz")
+ package-net-win32-binary-size))
+ ;; Cygwin version
+ (insert (format "@ %s\n" "xemacs-i686-pc-cygwin"))
+ (insert (format "version: %s\n" emacs-program-version))
+ (insert "type: cygwin\n")
+ (insert (format "install: cygwin32/%s %d\n\n"
+ (concat emacs-program-name
+ "-i686-pc-cygwin-"
+ emacs-program-version ".tar.gz")
+ package-net-cygwin32-binary-size))
+ (insert "# setup.ini file ends here\n")
+ (write-region (point-min) (point-max) "setup-bin.ini")))
+ (kill-buffer buf)))
+
+(defun package-net-batch-generate-bin-ini ()