Installing Component : Problem to build packages on mac

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
ejmana
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Mar 13, 2007 4:05 pm

Installing Component : Problem to build packages on mac

Post by ejmana » Wed Mar 14, 2007 10:50 am

Hello!

I'm trying to install the hello_component made by ianmac and i just get in troubles each time i try to modify something.
so i'm using the yesterday nighty because with the today nighty i just get an error and couldn't install (looking for some php5 librairy)

if i use exactly the hello.xml given by ianmac there are no problems, but i tried to add languages and get a bklank page. so i though never mind let's try something else and tried to add an sql export
i just put 

Code: Select all

<!-- Install Database Section -->
	<install>
		<sql>
			<file driver="mysql" charset="utf8">install.sql</file>
		</sql>
	</install>
the file is here, in the component directory

as i was sick and tired to have a blank page i just put the debug level and error level at the max and i get

Code: Select all

Fatal error: Call to a member function getTagName() on a non-object in /Users/claire/Sites/joomla_test/libraries/joomla/installer/installer.php on line 1366
so i went to see this line in joomla and it's

Code: Select all

if ($root->getTagName() != "install" && $root->getTagName() != 'mosinstall')
				{
					continue;
				}
but i just don't have the courage to look at all the 1365 line before...

so do you have any idea?

(i attach my package if you want to see if i made some stupid basic mistakes in the files for example)
You do not have the required permissions to view the files attached to this post.
Last edited by ejmana on Thu Mar 15, 2007 9:33 am, edited 1 time in total.

 
ejmana
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Mar 13, 2007 4:05 pm

Re: Joomla Installer Update March 10th - Rev 6784

Post by ejmana » Wed Mar 14, 2007 11:16 am

I just tried to comment the function that was responsible for the error and i get an error just 5 lines after:

Code: Select all

Fatal error: Call to a member function getAttribute() on a non-object 
in /Users/claire/Sites/joomla_test/libraries/joomla/installer/installer.php on line 1371
so this time it's the line

Code: Select all

unset ($xmlDoc);
in joomla installer

so it seems there is a problem with my file...?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19014
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla Installer Update March 10th - Rev 6784

Post by infograf768 » Wed Mar 14, 2007 11:16 am

tcp wrote: Changes committed to the forge in rev 6788.

I still need to do a lot of cleanup work, including documentation.

tcp
I can install with 6788  :)
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ejmana
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Mar 13, 2007 4:05 pm

Re: Joomla Installer Update March 10th - Rev 6784

Post by ejmana » Wed Mar 14, 2007 11:40 am

if i comment all the lines, including

Code: Select all

	$type = $root->getAttribute('type');
	// Free up memory from DOMIT parser
	unset ($xmlDoc);
	return $type;
this time joomla doesn't crash and i get the joomla error message
    *  •ERROR: Could not find a Joomla! XML setup file in the package.•
which seems pretty logical if i understand the lines i've commented

so i just tried to add a single file to the working ianmac's package
i add copy2.php as the same level as hello.php and i add the line
copy2.php
just after
hello.php

so this is my package and i get the same error i've gotten first... so this time i don't think i can have make a mistake because just adding a line and a file isn't too hazardous so ;aybe there is something which need to be done and that i'm not doing...
do you have any clue?
You do not have the required permissions to view the files attached to this post.
Last edited by ejmana on Wed Mar 14, 2007 12:13 pm, edited 1 time in total.

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Installing Component

Post by tcp » Wed Mar 14, 2007 12:49 pm

Moving thread to appropriate board.  This is a question about installing a component, not the Joomla installation. :)
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

ejmana
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Mar 13, 2007 4:05 pm

Re: Installing Component

Post by ejmana » Wed Mar 14, 2007 12:56 pm

sorry i posted in the other because the user was talking about install and blank page which was the same problem i was having...

so ianmac find the solution, explaining that macos add an xmlfile which joomla cannot parse (http://forum.joomla.org/index.php?topic=136576)

so maybe you could ask joomla installer to ignore that hidden mac files?  :P
(if not, all the mac users are going to feel rejected and lonely  :'()

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Installing Component

Post by tcp » Thu Mar 15, 2007 5:22 am

I'm on Mac as well but I don't have this issue.  I think the fundamental issue is that your install file contains OS specific files that should not be in the zip.

Code: Select all

Toby-Patterson:tmp $ unzip -t com_hello-sql.zip 
Archive:  com_hello-sql.zip
    testing: com_hello-sql/           OK
    testing: com_hello-sql/.DS_Store   OK
    testing: __MACOSX/                OK
    testing: __MACOSX/com_hello-sql/   OK
    testing: __MACOSX/com_hello-sql/._.DS_Store   OK
    testing: com_hello-sql/admin/     OK
    testing: com_hello-sql/admin/.DS_Store   OK
    testing: __MACOSX/com_hello-sql/admin/   OK
    testing: __MACOSX/com_hello-sql/admin/._.DS_Store   OK
...
    testing: com_hello-sql/hello.php   OK
    testing: com_hello-sql/hello.xml   OK
    testing: __MACOSX/com_hello-sql/._hello.xml   OK
    testing: com_hello-sql/hello.xml~   OK
    testing: com_hello-sql/index.html   OK
    testing: com_hello-sql/install.sql   OK
    testing: __MACOSX/com_hello-sql/._install.sql   OK
    testing: com_hello-sql/views/     OK
    testing: com_hello-sql/views/.DS_Store   OK
    testing: __MACOSX/com_hello-sql/views/   OK
    testing: __MACOSX/com_hello-sql/views/._.DS_Store   OK
... and so on
    testing: com_hello-sql/views/index.html   OK
No errors detected in compressed data of com_hello-sql.zip.
Toby-Patterson:tmp $ 

Building an install file may not be as simple as zipping the directory.  For example, if you use SVN then you may have a .svn subdirectory in every directory.  In this install file I'm seeing OS specific files and temp files which shouldn't be in the install file.

Here is a small script that I use to zip up my files and place them in a specific directory.

Code: Select all

#!/bin/sh

# Basic Info
EXTENSION=com_lqm
VERSION=1.0
DATE=`date +'%d.%m.%y'`
RELEASE=Beta4
SVNREV=`svn info .. | grep Rev: | awk '{ print $4 }'`
FILENAME="../../builds/joomla-${SVNREV}_${EXTENSION}_${VERSION}_${RELEASE}_tcp.zip"
echo Creating Distro File: $FILENAME

# Remove the existing file
if [ -f $FILENAME ] ; then
  echo Removing previous file
  rm $FILENAME
fi

# Create a distro file
find ${EXTENSION}/ | egrep -v '(svn|zapatec/|DS_Store|\.bak|\.txt|\.psd)' | zip -9 $FILENAME -@ > /dev/null
Although basic, it does the job.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

ejmana
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Mar 13, 2007 4:05 pm

Re: Installing Component

Post by ejmana » Thu Mar 15, 2007 9:32 am

that is the conclusion we found in the other topic: http://forum.joomla.org/index.php?topic=136576
ianmac gave me a link to a little program which seems to remove the unnecessary files but as i'm trying to do the package automatically, i'm maybe going to try your script to see if it works better than mine which was creating tar.gz

so thanks for helping anyway. Is it possible to merge the posts together, whether in this topic or in the other, because it's all about the same issue in the end...?

EvanReeves
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Feb 14, 2008 7:58 pm

Re: Installing Component : Problem to build packages on mac

Post by EvanReeves » Thu Feb 14, 2008 8:03 pm

Hey all.

Just another Mac user chiming in here. I was having the same problems only when trying install a custom module. After boiling it down to its simplest form (effectively a "Hello World" module) I was still having the same trouble. After reading one of the replies in this topic about Mac's hidden files (.DS_store and whatever else) I discovered my solution.

I ended up taking my module files ( the .xml and .php files) and uploading them to my server and zipping them via the command line instead. The idea was to omit those hidden files that my Mac may have been including. Sure enough, I pulled that new ZIP file down and the module installed successfully. For those developing on the Mac platform I suggest you try this if you are running into those same messages.

 

Locked

Return to “Joomla! 1.5 Coding”