WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce-load in makefiles  (Read 1072 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 503
  • Good software needn't be big!
tce-load in makefiles
« on: March 03, 2012, 02:29:54 PM »
I've been including some "manual installation" targets in the makefiles for my FLTK apps.  I've wondered if there is a more Core-standard way I could do things.

The makefile in my apps usually have a build target called "package" that calls a helper script that can make a complete .tcz extension.  Although I've not been using tce-load so far, I'd like to define the "install" target to use tce-load -ic to install it to the TCE directory.  This will work one time, but if the user (or even myself) wants to tweak my code and reinstall it, tce-load -ic will abort early with the "already installed" message. 

Is there a way to use tce-load to force-refresh a local .tcz package?  In other words, use the -ic options even through it is already installed?  If not, is there a fairly straightforward way my app make files can rebuild and refresh their extension package?

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 7970
Re: tce-load in makefiles
« Reply #1 on: March 03, 2012, 11:11:24 PM »
Even if you remove the installed marker, the files will not be overwritten.

For testing an extension, as long as the existing paths don't change, the mount mode seems easiest. Remove the installed marker and umount -d /tmp/tcloop/ext, reinstall.
The only barriers that can stop you are the ones you create yourself.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 503
  • Good software needn't be big!
Re: tce-load in makefiles
« Reply #2 on: March 04, 2012, 09:38:51 AM »
Thanks curaga, but that is not working as I would like.  What I'm hoping to be able to set up is something like this:

1) User/developer can enter 'make install' to build the app's .tcz and persistently install it just as if he or she used AppBrowser or the tce-load -iw to do so .  As a result of this, the app's extension would be copied to the TCEDIR's optional folder, the extension would be added to the onboot.lst file, the app would be 'installed' (e.g. mounted) into the filesystem, the app icon would be added to the wbar, and the app would be ready to use immediately.

2) After doing the above (or installing the app previously from a repo using a conventional tools) the user/developer can enter 'make update' to re-build (maybe after changes) the app's .tcz, copy it to the TCE optional subdirectory, and also update the file contents from the .tcz into the extension's mounted parts of the filesystem so the new version is immediately available and usable.  (Note, this should not cause wbar to have a duplicate!)

I guess I found it surprising that tce-load -i for a local file doesn't really persistently install the local extension (I think it just mounts it), and that there is not a straightforward way to force-refresh a persistent extension from a local copy of it.

Am I just overlooking a better way to do this stuff, or is there perhaps an opportunity to make the TCE commands a more complete and orthogonal set of functions?

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 7970
Re: tce-load in makefiles
« Reply #3 on: March 04, 2012, 10:01:06 AM »
Unloading extensions has a long history, short story is that there are many corner cases. But have a look at the programming section for unloading scripts.
The only barriers that can stop you are the ones you create yourself.