trying to create my own DIY installer

SDK Docs: http://installatron.com/developer/apps
SDK GUI Editor: http://installatron.com/editor
lkbryant
Posts: 7
Joined: Sun Nov 18, 2007 4:51 pm

trying to create my own DIY installer

Postby lkbryant » Fri Nov 23, 2007 1:39 am

hi,
i just tried to create my own diy installer.
i have set it to get it to install but one problem.

the source .tar.gz file that im getting from, when extracted, it has everything contained in another folder.

so the installer, expects it to work when it goes to site.com/mymodule

but in reality, it is actually here site.com/mymodule/mymodule

is there way we can go around this problem?

like once extracted, if its just finds one folder, can we just move all the contents in that folder to one level up?

because there are lot of scripts out there in tar.gz format where the contents are inside a particular folder instead of laying out everything outside to prevent user from unexpectantly extracting the tar.gz and messing up their own files.

is there a known remedy to this dilema?

Rowan
Staff
Posts: 235
Joined: Tue Jun 19, 2007 7:39 am

Re: trying to create my own DIY installer

Postby Rowan » Fri Nov 23, 2007 6:53 am

Hi,

Yes, you can use the "move" command to fix that. The short-cut version for "move everything in this directory to the install directory" is:

Code: Select all

$f->mv("directory_name");


So, for example, if you install myBlog into:

Code: Select all

http://www.example.com/blog


and it is extracting to:

Code: Select all

http://www.example.com/blog/myBlog-2.0.5/


Then you would add this as the first line of the installer:

Code: Select all

$f->mv("myBlog-2.0.5");


Let me know if that doesn't work or you have any other questions.

Rowan.


Return to “Application Packaging SDK and Application Customizations”

Who is online

Users browsing this forum: No registered users and 3 guests