Windows GUI for trunk building - page 32 - General Discussion and Assistance - CHDK Forum

Windows GUI for trunk building

  • 771 Replies
  • 305907 Views
Re: Windows GUI for trunk building
« Reply #310 on: 26 / November / 2009, 16:46:06 »
Advertisements
OK, I see how the PRIMARY_ROOT path option works now.  Still, as I said my previous post, I'm lazy and just want to click yes/no, not have to set/unset a path each time.

As for the sig ref, I think it will require trunk modification as I've outlined above.

Another small request (hope I'm not bugging you too much...   :-[ ):
The shell updating option you added (at my request) works great, except one tiny tidbit:  I have a desktop shortcut set to run CHDK-Shell, but since each shell is named "D:\CHDK\CHDK-Shell-vXXX.exe"  with the version number in it, my shortcut still points to the old version unless I change my shortcut.
Is there a reason why the exe has to have the version number in it and not be generic? (D:\CHDK\CHDK-Shell.exe).  I suppose the shell updater could toss the old .exe into a backup directory if it is intended to be kept and not merely overwritten for some reason.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Windows GUI for trunk building
« Reply #311 on: 26 / November / 2009, 18:03:52 »
Quote
OK, I see how the PRIMARY_ROOT path option works now.  Still, as I said my previous post, I'm lazy and just want to click yes/no, not have to set/unset a path each time.
extra checkbox noted down on wishlist
Quote
As for the sig ref, I think it will require trunk modification as I've outlined above.
don't think it's absolutely necessary ... i think i can do the following: check for presence of sig_ref_etc.bin files - if not
present: option disabled, if present: checkbox to select use / don't use. If user opts out of sig_reffing then rename *.bin -> *.bio or whatever. I agree it would be best to implement it in a similar way as PRIMARY_ROOT, it could then benefit all developers.
Quote
Is there a reason why the exe has to have the version number in it and not be generic? (D:\CHDK\CHDK-Shell.exe).  I suppose the shell updater could toss the old .exe into a backup directory if it is intended to be kept and not merely overwritten for some reason.
yes there is: since auto-update that's impossible, an exe that's in use can't overwrite itself: there is no shell updater, the new version gets started by it's predecessor  :D
How about an alternative: options to create shortcut at user specified location and to delete old versions ?
I realise versioned exe names can be a pain, but they sure make developing & archiving a lot less error prone for me - i regularly have 20 exe's + au3's in the same path, and my otherwise almost unlimited tolerance for chaos does not extend to my own source code folders

..which results in the following 'to do list':

- checkbox for primary use
- detect sig_ref bins and present on/off toggle if found
- options to create/maintain shortcut and delete exe's except last x version(s)

anything else ?

wim
« Last Edit: 26 / November / 2009, 18:14:35 by whim »

Re: Windows GUI for trunk building
« Reply #312 on: 26 / November / 2009, 19:53:49 »
Quote from: whim link=top6ic=845.msg43797#msg43797 date=1259276632
Quote
OK, I see how the PRIMARY_ROOT path option works now.  Still, as I said my previous post, I'm lazy and just want to click yes/no, not have to set/unset a path each time.
extra checkbox noted down on wishlist
How will this function then?  Would it have to have a dummy path to set that doesn't have the dump binaries in? Or would you have to rename the PRIMARY.BIN files to fool the build as below?


Quote
Quote
As for the sig ref, I think it will require trunk modification as I've outlined above.
don't think it's absolutely necessary ... i think i can do the following: check for presence of sig_ref_etc.bin files - if not
present: option disabled, if present: checkbox to select use / don't use. If user opts out of sig_reffing then rename *.bin -> *.bio or whatever. I agree it would be best to implement it in a similar way as PRIMARY_ROOT, it could then benefit all developers.
I can see how this would work.  Likely could do the same for the first option as well.  The issue does arise that (I believe) the build creates new dummy .bin files of 0 length if they don't exist.  The prog would have to undelete these before renaming the real .binaries back.

I do still think that the base trunk modification would be the best overall, as you said, it would be of help to all developers, not just CHDK Shell users.  I will still test this and maybe submit it as a patch if it works out.


Quote
Quote
Is there a reason why the exe has to have the version number in it and not be generic? (D:\CHDK\CHDK-Shell.exe).  I suppose the shell updater could toss the old .exe into a backup directory if it is intended to be kept and not merely overwritten for some reason.
yes there is: since auto-update that's impossible, an exe that's in use can't overwrite itself: there is no shell updater, the new version gets started by it's predecessor  :D
How about an alternative: options to create shortcut at user specified location and to delete old versions ?
Yes that would be acceptable.  I suggested this because I realized that I was running an older version all the time even though I had updated because of this.

There is a sneaky way to get a program to overwrite itself (perhaps sloppy).  Install itself under a dummy alternative name, start up, delete the original and copy itself with the base name, then start the proper copy which would delete the dummy.  I did something along the lines of this years ago:  I wrote a program that stayed where I wanted it, if the user tried to move directories, the program would simply move itself back (Windows Vista was my idea! :D )  Annoying and I would never actually do this now as I like to put programs where I want)


Quote
anything else ?

wim
Can you make it in blue?  And a function that predicts tomorrows lottery results.



*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Windows GUI for trunk building
« Reply #313 on: 26 / November / 2009, 21:02:31 »
Quote
How will this function then?  Would it have to have a dummy path to set that doesn't have the dump binaries in? Or would you have to rename the PRIMARY.BIN files to fool the build as below?
No, it will just ignore a set external PRIMARY_ROOT path when unchecked, i.e. it will NOT overrule the
"PRIMARY_ROOT=($topdir)platform. This would require you NOT to store any PRIMARY.BIN under /platform, just like
it always was since PRIMARY_ROOT was introduced AFAIK. In other words, just a convenience option, so you don't have
to browse to the path every time you want to use it.

Quote
...the build creates new dummy .bin files of 0 length ...
very true, forgot about that... also, this is gonna cause trouble with older builds, which have differing numbers of
reference builds ... i think i'll wait a bit then, said the lazy man (an extra OPT_ would be automatically supported)
In the mean time, you could write a quick batch to copy the files in & out of /tools, i guess

Quote
There is a sneaky way to get a program to overwrite itself (perhaps sloppy).  Install itself under a dummy alternative name, start up, delete the original and copy itself with the base name, then start the proper copy which would delete the dummy.
Yeah, i rejected a similar plan with a batch file to arrive at the current method

see ya,

wim


Re: Windows GUI for trunk building
« Reply #314 on: 27 / November / 2009, 09:54:30 »
I do still think that the base trunk modification would be the best overall, as you said, it would be of help to all developers, not just CHDK Shell users.  I will still test this and maybe submit it as a patch if it works out.
Here is a working patch for this based on build 844.
It updates both tools/Makefile and platform/makefile_sub.inc to toggle both options on/off.

You also need to add the OPT_GEN_SIGS and OPT_UPDATE_STUBS variables to buildconf.inc

Have a look and see if you think this is an appropriate approach and I can submit the patch to the trunk thread.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Windows GUI for trunk building
« Reply #315 on: 27 / November / 2009, 15:10:33 »
hi barberofcivil !

sorry for long wait - severe attack of real life (locked into my home, lock scr*wed up with key in it !)

looked at patch, unfortunately can't check (can't seem to find appropiate .bin files). I rediffed the patch for you, though, and included the buildconf.inc changes [see attach] [edit: removed] Any idea why your original patch is so big ?
Planned mods to CHDK-Shell done as well, in testing phase now.
No time though, must fix lock first, sorry

wim

 
« Last Edit: 30 / November / 2009, 04:25:55 by whim »

Re: Windows GUI for trunk building
« Reply #316 on: 27 / November / 2009, 15:49:52 »
Quote
I rediffed the patch for you, though, and included the buildconf.inc changes [see attach] Any idea why your original patch is so big ?

I used the Diff option from Source Tools.  I noticed that whenever I run it.  It basically ends up deleting and adding back in every line in the changed files.
I thought that's just the way it works, but now that you questioned it and I thought about it, I have a feeling that this may have to do with how I am openeing and saving.  I am just using wordpad text editor in windows and it appears as if the end of line character gets changed.  Have to see what I can do to avoid this in the future.

I did also notice that buildconf.inc didn't get included in the diff, is this by design in the Diff tool?

Re: Windows GUI for trunk building
« Reply #317 on: 27 / November / 2009, 16:00:15 »
I used the Diff option from Source Tools.  I noticed that whenever I run it.  It basically ends up deleting and adding back in every line in the changed files.
I thought that's just the way it works, but now that you questioned it and I thought about it, I have a feeling that this may have to do with how I am openeing and saving.  I am just using wordpad text editor in windows and it appears as if the end of line character gets changed.  Have to see what I can do to avoid this in the future.
Yes, this was it.  I tried a different editor and it worked fine.  Wish I noticed this earlier...I'll have to maybe go fix my previous patch submissions so they look smaller now.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Windows GUI for trunk building
« Reply #318 on: 27 / November / 2009, 16:50:05 »
Quote
I did also notice that buildconf.inc didn't get included in the diff, is this by design in the Diff tool?

no, just checked, it's not in the excludes. It does exclude certain files, which you can see by opening
.....\CHDK-Shell\exc_diff.txt. The file (Unix style, LF line endings !) gets created at first use of Diff, but will not be
overwritten, so you can modify it, and the program will use the modded version. Just kill to return to default
here's the generating code:
Quote
FileWrite($exc_file, "stubs_auto.S" & @LF & _
                           "stubs_entry.S" & @LF & _
                           "*.o" & @LF & _
                           "*.a" & @LF & _
                           "*.bin" & @LF & _
                           "*.BIN" & @LF & _
                           "*.exe" & @LF & _
                           "*.org" & @LF & _
                           "*.txt" & @LF & _
                           "bin" & @LF & _
                           "bin/*.*" & @LF & _
                           "bin/logs/*.*" & @LF & @LF)

Diff works fine for me now, but I will beef up the Patch code, i had some problems with it
preview of changed dialogs attached [edit: removed]

cheers,

wim

PS forgot: yes a good editor is vital, especially since trunk source uses both styles of line endings (i use Notepad++)
« Last Edit: 30 / November / 2009, 04:23:59 by whim »

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Windows GUI for trunk building
« Reply #319 on: 27 / November / 2009, 20:10:12 »
CHDK-Shell-v246 (update version)

  • fixed:     Patch function now deals better with DOS/cr-lf style patches; result
                   of the patch is now immediately reflected in CHDK-Shell's dialogs.

  • added:   If an external PRIMARY_ROOT path is set, it's application can now be
                   toggled on/off (dialog 'Compile Options')

  • added:   Create and update a program shortcut at a user-defined location, and
                   configurable deletion of old program EXE, INI and AU3 files


cheers,

wim

PS It seems i have accidentally frustrated the 'automatic update' feature by changing the 'default view'
     of the drop.io for a couple of days ... fixed now by switching back to 'media view'  ;)
« Last Edit: 28 / November / 2009, 07:42:02 by whim »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal