2009-03-21 06:40:53 +00:00
|
|
|
|
|
|
|
$:.unshift(File.dirname(__FILE__)) unless
|
|
|
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
|
|
|
|
2009-01-26 04:15:40 +00:00
|
|
|
gem 'archive-zip'
|
|
|
|
require 'archive/zip'
|
|
|
|
require 'ftools'
|
|
|
|
|
|
|
|
WORKING_DIR=File.expand_path(File.dirname(__FILE__)+"/netboot65")
|
|
|
|
SRC_DIR=File.expand_path(File.dirname(__FILE__)+"/../")
|
2009-05-03 05:28:12 +00:00
|
|
|
VERSION_FILE=File.expand_path(File.dirname(__FILE__)+"/version_number.txt")
|
2009-08-18 02:41:34 +00:00
|
|
|
VERSION_INC_FILE=File.expand_path(File.dirname(__FILE__)+"/../client/inc/version.i")
|
2009-05-03 05:28:12 +00:00
|
|
|
version_string=File.open(VERSION_FILE).read
|
|
|
|
|
2009-10-05 03:01:58 +00:00
|
|
|
["","c64","lib","bin","boot","doc","inc"].each do |dir_suffix|
|
2009-01-26 04:15:40 +00:00
|
|
|
dir_path="#{WORKING_DIR}/#{dir_suffix}"
|
|
|
|
Dir.mkdir(dir_path) unless File.exist?(dir_path)
|
|
|
|
end
|
|
|
|
|
|
|
|
[
|
2009-08-20 14:03:02 +00:00
|
|
|
#["client/nb65/utherboot.dsk","a2/"],
|
2009-10-05 03:01:58 +00:00
|
|
|
["client/carts/set_ip_config.rb","bin/"],
|
2009-04-19 03:09:50 +00:00
|
|
|
#["client/nb65/nb65_rrnet.bin","c64/"],
|
2009-10-05 03:01:58 +00:00
|
|
|
["client/carts/kipperkart.prg","c64/"],
|
|
|
|
["client/carts/kipperkart.bin","c64/"],
|
|
|
|
["client/carts/kipperkart_rr.bin","c64/"],
|
2009-10-30 20:42:50 +00:00
|
|
|
#["client/carts/kipperterm.bin","c64/"],
|
2009-10-05 03:01:58 +00:00
|
|
|
["client/carts/netboot.bin","c64/"],
|
2009-04-25 12:04:27 +00:00
|
|
|
["client/nb65/d64_upload.prg","boot/"],
|
2009-08-20 14:03:02 +00:00
|
|
|
["client/examples/upnatom.prg","boot/"],
|
2009-01-26 04:15:40 +00:00
|
|
|
["server/lib/tftp_server.rb","lib"],
|
2009-05-15 12:23:01 +00:00
|
|
|
["server/lib/file_list.rb","lib"],
|
2009-01-26 04:15:40 +00:00
|
|
|
["server/bin/tftp_only_server.rb","bin/tftp_server.rb"],
|
2009-08-20 14:03:02 +00:00
|
|
|
#["server/bin/import_ags_games.rb","bin"],
|
2009-05-03 05:28:12 +00:00
|
|
|
#["server/boot/BOOTA2.PG2","boot"],
|
2009-08-20 14:03:02 +00:00
|
|
|
#["doc/README.Apple2.html","a2"],
|
2009-04-19 03:09:50 +00:00
|
|
|
["doc/README.C64.html","c64"],
|
2009-04-25 12:04:27 +00:00
|
|
|
["doc/netboot65.html","doc/index.html"],
|
2009-05-03 05:28:12 +00:00
|
|
|
#["doc/README.Apple2.html","doc"],
|
2009-04-25 12:04:27 +00:00
|
|
|
["doc/README.C64.html","doc"],
|
2009-10-30 20:42:50 +00:00
|
|
|
["doc/CONTRIBUTORS.txt","doc/"],
|
|
|
|
["doc/LICENSE.txt","doc/"],
|
|
|
|
|
2009-10-05 03:01:58 +00:00
|
|
|
["doc/kipper_api_technical_reference.doc","doc"],
|
2009-04-19 03:09:50 +00:00
|
|
|
["client/inc/common.i","inc"],
|
2009-10-05 03:01:58 +00:00
|
|
|
["client/inc/kipper_constants.i","inc"],
|
2009-08-24 10:20:21 +00:00
|
|
|
["client/examples/upnatom.d64","c64/"],
|
2009-04-19 03:09:50 +00:00
|
|
|
#["client/nb65/d64_upload.s","examples/"],
|
|
|
|
#["client/nb65/nb65_skeleton.s","examples/"],
|
2009-01-26 04:15:40 +00:00
|
|
|
].each do |args|
|
|
|
|
dest="#{WORKING_DIR}/#{args[1]}"
|
2009-03-26 03:46:30 +00:00
|
|
|
Dir["#{SRC_DIR}/#{args[0]}"].each do |src|
|
|
|
|
File.copy(src,dest)
|
|
|
|
puts "#{src}->#{dest}"
|
|
|
|
end
|
2009-01-26 04:15:40 +00:00
|
|
|
end
|
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
|
2009-05-03 05:28:12 +00:00
|
|
|
zipfile_name=File.dirname(__FILE__)+"/netboot65-#{version_string}.zip"
|
2009-01-26 04:15:40 +00:00
|
|
|
Archive::Zip.archive(zipfile_name, WORKING_DIR)
|
2009-05-03 05:28:12 +00:00
|
|
|
|
|
|
|
(maj,min,rel)=version_string.split(".")
|
|
|
|
version_string="#{maj}.#{min}.#{(rel.to_i)+1}"
|
|
|
|
|
|
|
|
file=File.new(VERSION_INC_FILE,"w")
|
|
|
|
file<<".byte \"#{version_string}\"\n"
|
|
|
|
file.close
|
|
|
|
|
|
|
|
file=File.new(VERSION_FILE,"w")
|
|
|
|
file<<version_string
|
|
|
|
file.close
|