[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Anyone else needing this U2 updater?



I may be the only one who writes his own, supplementary, U2 frames. If so, then no one needs the program I wrote to preserve those when updating U2.

 

But here it is, if anyone out there in Xy-land wants it. It’s written as a U2 frame itself, and it does a ton of error-checking, so, with a goodly amount of commenting.

It presumes that:

 

1. you have downloaded the new U2 and have unzipped its files into a subdirectory of the directory that the current U2 is in. The subdirectory must be named “newu2dir”.

 

2. you have placed all your personal frames in one section of the U2, delimited by MyFramesStart and MyFramesEnd—each must be on a line by themselves, like this:

MyFramesStart

………

……..

……..

MyFramesEnd

…….

 

It places your frames at the top of the new U2, which is a bit risky, since placing them there means they take precedence over any other frames with the identical name. You can always move them manually to the bottom of the U2 file after the program has run.

 

Carl, maybe you want to include this in the “stock” U2.

The below is encoded with frame XyEnc and should be decoded by using XyDec.

 

'%--_XYENCode_start--

{{5updateU2}}_HB--December_30,_2016._For_updating_XyWWWeb.u2_w

hen_user-written_frames_are_to_be_transferred_from_the_existin

g_U2_to_to_the_new_one._Assumes_that_the_zip_file_has_been_ext

racted_to_a_directory_off_the_current_U2'`s_directory,_and_ass

umes_that_all_the_user-written_frames_are_in_one_section_of_th

e_old_U2,_delimited_by_MyFramesStart_(case-insenstive)_and_MyF

ramesEnd--where_each_is_on_a_line_by_itself--i.e._each_must_be

_surrounded_by_[CrLf]s.'^~B~~>~~>

',*',_I_don'`t_know_why_01_has_to_be_re-stored'^~~

01,02,03,04,05~>',*','^~<>"XYWWWEB.U2"~>',*','^'BCT

his_updates_XYWWWEB.U2,_but_~_is_loaded--continue?_[n]o

,_e[x]it',*','^~~>~=="n"'|~=="x"

~>'BC~<PRAborting~>~~~',*','^~+~<

IS02~>~>',*',_03_now_has,_e.g.,_c'.\Xy4\'^~+"new

u2dir\"~>',*',_05_is,_e.g.,_c'.\Xy4\newu2dir\'^'BXexist_~

~>XYWWWEB.U2'Q2',*','^~~>'BC~t_find_XYWWWEB.

U2_in_@03~>~~',*',_no_dir_or_no_file'^'BXgofile_~

03~>new.u2'Q2~)~>'BXab/nv'Q2~',*',_close_if

_open'^'BXgofile_~old.u2'Q2~)~>'BXab/nv'Q2

~',*',_close_if_open'^'BXcopy/nv_~xywwweb.u2_~

3~>old.u2'Q2',*',_will_get_"myframes"_from_old.u2'^~~>

'BCCan'`t_copy_~xywwweb.u2_to_~old.u2~~

~>',*',_'^'BXexist_~old.u2'Q2',*',_a_double_check'^~

~~>'BCCan'`t_find_~OLD.U2~~',*','^'BXcop

y/nv_~xywwweb.u2_~new.u2'Q2',*','^~~>'BC

Can'`t_copy_~XYWWWEB.U2_to_~NEW.U2~~',

*','^',*',_double_check_follows'^'BXexist_~new.u2'Q2',*

','^~~>'BCCan'`t_copy_~XYWWWEB.U2_to_~N

EW.U2~~',*','^'BXca/100_~old.U2'Q2',*','^~

~~>~<'BCCan'`t_open_~OLD.U2~~',*','^'TF

'BXse/f_/;~[MyFramesStart;~[/'Q2',*','^~~>'BCCan'`t_f

ind_'`;~[MyFramesStart;~[~~',*','^'XD'DF',*','^'BXs

e_/;~[MyFramesEnd;~[/'Q2',*','^~~>'BCCan'`t_find_;~[M

yFramesEnd;~[~~',*','^'DF',*','^'BXsad/nv_~m

yframes.u2'Q2',*','^~~>'BCCan'`t_sad/nv_~MYFRA

MES.U2~~',*','^'RD'BXab'Q2',*',_close_old.u2'^'BXca

/100_~new.u2'Q2~~>'BCcan'`t_open_~NEW.U

2~~',*','^'TF'BXse_/;~[MyFramesStart;~[/'Q2',*','^~<

IF@NOT(~)~>'BCThere_already_is_a_;~[MyFramesStart;~[_in_~<

PV03~>NEW.U2~>~~',*','^'TF'BXse/f_/{/'Q2~~>

'BCcan'`t_find_{~~',*','^'DF'RD:~M:~M'CU'CU',*','^'BX

me_~myframes.u2'Q2~~>'BCCan'`t_merge_in_~

~>MYFRAMES.U2~~',*','^'BXsa/nv_~xywwweb.u2'Q2

~~>'BCCan'`t_save_~xywwweb.u2~~',*',

'^'JM2.lh_'Q2'TF'BCNew_xywwweb.u2_should_be_loaded_(old_one_is

_~OLD.U2,_in_case_you_need_it)~'^

'%--_XYENCode___end--