Jump to content


Creating a multi-snippet self-extracting module installation container


4 replies to this topic

#1 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 04 February 2008 - 09:11 PM

I am writing a module that requires over 15 snippets to "install" (copy and paste) into the snippet library. I am trying to work out a way to make this installation easier with less chance for human... [ >open file, >wordwrap off, >copy, >paste, >name, >save ]... error.
QUESTION:
If I wrote an installation snippet to save the snippets to the snippet library is there any other sanitation that needs to be done to the snippet code for it to be saved successfully and reliably (apart from addslashes)?

#2 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 04 February 2008 - 09:19 PM

Want a tip?? Gut the etomite installer ;)

#3 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 04 February 2008 - 11:25 PM

I thik I have one or two installers kicking around from modules I have written if you need one as a guide...

#4 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 05 February 2008 - 12:01 AM

I had a look at the etomite installer and it looks as though the challenge is creating the database dump so that it will be compatible with the widest range of installations... I noticed the sql/etomite.sql file does not mention character sets, encoding, etc Was this a standard export using export compatibilty options that I have not been able to discover? or is it a hand processed file? (obviously a search and replace for "table_prefix" and "database_name" has been done...

Quote

I thik I have one or two installers kicking around from modules I have written if you need one as a guide...

I'd love to have a look... there's a lot of gutting needed to tranform the eto installer, almost easier to start from scratch (which I don't have a problem with). But if you have an installer already, it would make more sense to use that... PM?

#5 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 05 February 2008 - 01:19 AM

The etomite.sql file is, indeed, a hand edited file... Any items, such as collation and such, by being omitted, allow tables to take on the database defaults if they already exist...

I'll dig out one of my installers and see about adding a few more bits to help things along...

I just wrote a snippet the other day that actually exports all Snippets and Chunks for a module into PHP and HTML files... It can either look for a module prefix or can use arrays of resource names... It needs some refining but might be another handy addition to your developer toolbox...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users