forum.easy-joomla.org
18. 01. 2010 02:02 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
Neueste Beiträge
Re: EasyCreator 0.0.12 von elkuku 15. 01. 2010 02:10
EasyBook und Datenbank-Präfix von mrmister 15. 01. 2010 00:00
Re: Icelandic Language von Unnar Erlingsson 14. 01. 2010 11:50
News:
Tutorials/Anleitungen rund um Joomla! oder
Filmchen herunterladen
 

 
 
    Übersicht   Hilfe Suche Spenden/Sponsors Impressum/Imprint Downloads Hauptseite Projects Tutorials Einloggen Registrieren  
Subject Statistics
Thema: EasyCreator 0.0.12 Replies: 6 posts
Gelesen 538 mal 0 Mitglieder und 1 Gast betrachten dieses Thema.
Seiten: [1]   Nach unten
  Drucken  
Autor Thema: EasyCreator 0.0.12  (Gelesen 538 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
elkuku
Developer
Full Member
*
OfflineOffline

Registriert seit: 11.12.07
Beiträge: 126



Profil anzeigen WWW
« am: 01. 01. 2010 18:12 »

Hi all Smiley

This is a refactoring release !
Some 'core' classes have been heavily modified so - Expect one ore more BUGs and please report them to our Tracker - THANKS !

Please also note that we are starting with some more serious documentation.
As this is a Wiki you are hereby invited to HELP  Händedruck
EasyCreator documentation: http://wiki.joomla-nafu.d...kuku/Proyektz/EasyCreator

A most annoying BUG has been fixed that deletes the code when an ampersand (&) is found.. my bad
Reported here: BUG BUG BUG
and on our tracker: BUG BUG BUG
Thanks electrocity, benneng and rvp Händedruck

Download: http://projects.easy-joom...ewsfeeds/EasyCreator.html

CHANGELOG:
 # Fixed code deleted on saving when an ampersand is found

 + Introducing EasyCodeEye
 + Added an interface to PEAR::CodeSniffer
 + Added Interface to PEAR::phpcpd - PHP Copy & Paste Detector
 + Added Interface to PEAR::phpDocumentor
 + Added Interface to PEAR::phpUnit
 + Creating skeleton UnitTest classes for project classes
 + Added the first Joomla! coding standards to be used with CodeSniffer - WIP
 + Added Extension template type 'template' named 'Blueprint'

 + Added profiler for J! 1.6
 + Added Mootools compat 1.1 => 1.2 - Ajax
 + Added Mootools compat 1.1 => 1.2 - Json (sry: JSON...)
 + Added PEAR and PEAR::Archive_Tar as they will be removed in J! 1.6

 + Option to include EasyCreator project file in final package
 + Option to place empty index.html in every directory on building the project
 + Added Language file 'overview' in Language Manager
 + Joomla! doctype DTD will be added to manifest

 - Removed language creation from startup Wizard
 - Removed language creation from extension Setup
 - Removed Extension templates 'Beez Copy' and 'MilkyWay Copy'
 - Removed old help screens - added link to documentation wiki

 ^ Optimized Install file detection
 ^ Refactored all extension templates. Using xml files now
 ^ EasyCreator project file is in xml format now
 ^ Changed EasyCreator Config from lightbox to a 'normal' view
 ^ Refactored manifest class to use PHPs SimpleXML
 ^ Refactored Toolbars to be tableless
 ^ Package install file placed in subfolder /install

 ! We should now run on Joomla! 1.6 =;)

Happy coding,
=;)
« Letzte Änderung: 02. 01. 2010 18:29 von elkuku » Gespeichert

Gruss,
Nikolai - NiK-IT.de
Easy-Joomla Team
ripper17
Newbie
*
OfflineOffline

Registriert seit: 15.04.09
Beiträge: 11


Profil anzeigen
« Antworten #1 am: 07. 01. 2010 17:31 »

Hi

thanks for the new version.
One problem I've found is that if you want to create a package for a Module (Scope: Site), it breaks.
Here's the fix:
Around line 380 in helpers/manifest.php replace
Code:
if (count($languageFiles))
        {
                $languagesElement = $administration->addChild('languages');
                $languagesElement->addAttribute('folder', 'admin/language');
                $substrlen = strlen($basepath.'admin'.DS.'language'.DS);
                foreach($languageFiles as $languageFile)
                {
                        $t = str_replace(DS, '/', substr($languageFile, $substrlen));
                        $languageElement = $languagesElement->addChild('language', $t);
                        $languageElement->addAttribute('tag', substr(basename($languageFile), 0, 5));
                }//foreach
        }

with
Code:
if (count($languageFiles))
        {
            if($this->project->type == 'component' || $this->project->scope == 'admin')
            {
                $languagesElement = $administration->addChild('languages');
                $languagesElement->addAttribute('folder', 'admin/language');
                $substrlen = strlen($basepath.'admin'.DS.'language'.DS);
                foreach($languageFiles as $languageFile)
                {
                        $t = str_replace(DS, '/', substr($languageFile, $substrlen));
                        $languageElement = $languagesElement->addChild('language', $t);
                        $languageElement->addAttribute('tag', substr(basename($languageFile), 0, 5));
                }//foreach
            }
        }

I noticed that you confirmed me as a developer for com_easycreator on joomlacode, but I've not yet set up my SVN for it, so I can not commit this (also I don't know if this is the correct way to solve the problem)
Gespeichert
ripper17
Newbie
*
OfflineOffline

Registriert seit: 15.04.09
Beiträge: 11


Profil anzeigen
« Antworten #2 am: 08. 01. 2010 14:28 »

Hi elkuku

I've continued fixing some issues, that com_eayscreator had, when I used it - this may not apply to everyone, but still I thought, I'd share:

Besides changing the section with the parameters, I had to do these things:

First, from everything I tried, the installer.compname.php file MUST be at the root of the ZIP file, when installing the component (I may be wrong about this, but nothing else worked. This includes having the files in admin/install/install.compname.php and in the manifest <installfile>admin/install/install.compname.php</installfile> and <installfile>install/install.compname.php</installfile>).
This of course also means, that the <installfile> node must not hold any path information, regardles where the install.compname.php file actually is stored in the development environment. So I changed helpers/manifest.php, around line 144, from :
Code:
foreach ($installFiles['php'] as $file)
            {
                $dir =($file->folder) ? $file->folder.DS : '';

                if(strpos($file->name, 'install') == 0)
                {
                    //--Install
                    $this->manifest->addChild('installfile', $dir.$file->name);
                }
                else
                {
                    //--Uninstall
                    $this->manifest->addChild('uninstallfile', $dir.$file->name);
                }
            }//foreach
to
Code:
foreach ($installFiles['php'] as $file)
            {

                if(strpos($file->name, 'install') == 0)
                {
                    //--Install
                    $this->manifest->addChild('installfile', $file->name);
                }
                else
                {
                    //--Uninstall
                    $this->manifest->addChild('uninstallfile', $file->name);
                }
            }//foreach


As said, the files themselves must be at the root of the ZIP file, so I also changed helpers/ziper.php, around line 311. After the line
Code:
$this->logger->log('COPY DIR<br />SRC: '.$copy.'<br />DST: '.$tmp_dest);
I added
Code:
if( strcmp( $dest, 'admin') == 0) {
// Check for install manifest files!
$installFiles = EasyProjectHelper::findInstallFiles($this->project);
$phpInstallFiles = $installFiles['php'];
if(! is_dir($copy)) {
        break;
}
   
    $files = array();
    $dirs = array( $copy);
    while( NULL !== ($dir = array_pop( $dirs)))
    {
        if( $dh = opendir($dir))
        {
            while( false !== ($file = readdir($dh)))
            {
                if( $file == '.' || $file == '..')
                    continue;
                $path = $dir . '/' . $file;
                if( is_dir($path)) {
                    $dirs[] = $path;
}
                else
{
foreach ($phpInstallFiles as $phpInstallFile) {
                if (strcmp($file, $phpInstallFile->name) == 0) {
if( JFile::copy($path, $this->temp_dir.DS.JFile::getName($file)))
                {
                    $this->logger->log('COPY FILE<br />SRC: '.$file.'<br />DST: '.$this->temp_dir);
                }
                else
                {
                    $this->logger->log('COPY FILE FAILED<br />SRC: '.$file.'<br />DST: '.$this->temp_dir,'ERROR copy file');
                }
}
}
}
            }
            closedir($dh);
        }
    }
}

I'll continue in the next post...

Cheers, Martin
Gespeichert
forum.easy-joomla.org
« Antworten #2 am: 08. 01. 2010 14:28 »

all-inkl.com webhosting
 Gespeichert
ripper17
Newbie
*
OfflineOffline

Registriert seit: 15.04.09
Beiträge: 11


Profil anzeigen
« Antworten #3 am: 08. 01. 2010 14:34 »

Part 2/2:

Next, I had the problem, that there wasn't an  SQL installation part in the newly created manifest, so I made the lookup for SQL files a little more complete and changed helpers/projecthelper.php by adding
Code:
//-- Look in 'sql' folder
        if(JFolder::exists($base.DS.'sql'))
        {
            $files = JFolder::files($base.DS.'sql', '(^install|^uninstall)([\.a-z])+(sql$|php$)', true, true);

            foreach ($files as $file)
            {
                $folder = str_replace($base.DS, '', $file);
                $folder = str_replace(DS.JFile::getName($file), '', $folder);

                $f = new stdClass();
                $f->folder = $folder;
                $f->name = JFile::getName($file);

                $installFiles[JFile::getExt($file)][] = $f;
            }//foreach
        }

to the function findInstallFiles()

At first I thought that the manifest.php file was maybe missing something, so I looked at it and I'm not sure if my change is valid or not, but here it is anyway (I left it in because now it works for me):
Changed around line 170
Code:
//--Install
                    if( ! isset($this->manifest->install))
                    {
                        $install = $this->manifest->addChild('install');
                        $installSql = $install->addChild('sql');
                    }
to
Code:
//--Install
                    $install = 0;
                    $installSql = 0;
                    if( ! isset($this->manifest->install))
                    {
                        $install = $this->manifest->addChild('install');
                    } else {
                        $install = $this->manifest->install;
                    }
                    if ( ! isset($this->manifest->install->sql )) {
                        $installSql = $install->addChild('sql');
                    } else {
                        $installSql = $this->manifest->install->sql;
                    }


and the same for uninstall...

Maybe these two posts help some other users, and if you think my changes are valid, feel free to copy them.
I'm enjoying easycreator a lot! I've made so many packages with it currently (for testing my own development) and it's very convenient to use, so thanks for all your work!

Martin
« Letzte Änderung: 08. 01. 2010 14:36 von ripper17 » Gespeichert
elkuku
Developer
Full Member
*
OfflineOffline

Registriert seit: 11.12.07
Beiträge: 126



Profil anzeigen WWW
« Antworten #4 am: 11. 01. 2010 18:19 »

Hello Martin,
thanks a lot for your kind words and for the bug reports and fixes you provided.

The problem(s) you are talking about seems to be the most annoying bug since EasyCreator was born Wink

I thought most of the problems would be fixed in this release, but it seems their not - and worse...

I tried to make up some documentation about this see: http://wiki.joomla-nafu.d...Component_install_scripts

Some questions:
* Can you try a previous version (e.g. 0.0.10) and see if the problem still exists ?
* Could you provide a package that does not work ? You talked about one that has an install file that does not get executed
* Does the files show up correct in Project->Building 'Install and Uninstall' ? (new in this release)

At least i would love to have some more 'hands' on the code as the project is still growing WinkYou should have SVN access..

You can still provide patch files Wink

I released a new version in the incubator: http://projects.easy-joom...ewsfeeds/EasyCreator.feed
Would you mind to give it a try ?

The first bug you mentioned (creating site modules packages) definitely will force a new (minor) release.

Thanks for the hard work,
Nikolai
« Letzte Änderung: 13. 01. 2010 07:12 von elkuku » Gespeichert

Gruss,
Nikolai - NiK-IT.de
Easy-Joomla Team
ripper17
Newbie
*
OfflineOffline

Registriert seit: 15.04.09
Beiträge: 11


Profil anzeigen
« Antworten #5 am: 13. 01. 2010 09:49 »

(...)
I tried to make up some documentation about this see: http://wiki.joomla-nafu.d...Component_install_scripts

This seems to be correct. If you take my changes from 08. 01. 2010 14:34 into account, the SQL install files may now also be inside administrator/components/YOURCOMP/sql/install.utf.sql
I have not tested with them being in the YOURCOMP/install or install/sql folder, so I can't say anything about this.

Some questions:
* Can you try a previous version (e.g. 0.0.10) and see if the problem still exists ?
With 0.0.11, the install.COMPNAME.php are copied to the root of the ZIP package, and are in the install manifest IF I add them manually in the Building->Files and Folders section
The SQL install files were found and in the install manifest, so this was working better in 0.0.11.

* Could you provide a package that does not work ? You talked about one that has an install file that does not get executed
My Component - install it, register with EasyCreator and create a package - at least with 0.0.12 there were no <installfile> sections in the manifest.
* Does the files show up correct in Project->Building 'Install and Uninstall' ? (new in this release)
Yes.
I released a new version in the incubator: http://projects.easy-joom...ewsfeeds/EasyCreator.feed
Would you mind to give it a try ?
This version (unlike all others before) does not work in Opera (my browser of choice :-) ) - I cannot register new projects. It works in Firefox (like reccomended, but FF seems very slow to me, especially when looking at the parameters - I've quite a few of them)

The install file now does get included in the XML install manifest file - but it looks like this:
<installfile>install/install.availability.php</installfile>
The install file in the ZIP is in admin/install/install.availability.php . In the combination this results in:
JInstaller::install: File '(...)tmp/install_4b4d8309dc692/install/install.availability.php' does not exist.
Again, from all I've tried: the install file MUST be at the root of the ZIP-file, the install manifest therefore may only read <installfile>install.availability.php</installfile>
The SQL files (still in administrator/components/com_availability/sql/) do not get included in the install manifest.

I will try to set up my svn on the weekend, but I'm not sure I'll actually find the time to do so - my own component has some bugs, too, that I need to fix first :-)

Best

Martin
Gespeichert
elkuku
Developer
Full Member
*
OfflineOffline

Registriert seit: 11.12.07
Beiträge: 126



Profil anzeigen WWW
« Antworten #6 am: 15. 01. 2010 02:10 »

Hi Martin,
the install.php thingy is actually quite complicated (at least for me..). I spent hours debugging in the past..
Easy probs come first:
  • Opera bug seems to be fixed - please confirm

Now the hard part Wink
Please have a look at this: http://docs.joomla.org/Incorrect_Install_File
It turns out that I was doing it all wrong since the beginning... too bad, but it worked Tongue
In EasyCreators case the error only appears if you use method="upgrade" AND are in JDEBUG mode.. weird

The fact is that the installer will attempt to copy the php install files to your admin directory. So the path (e.g. install/install.php) is relativ to your extension root in administrator.. Note that sql files are treated differently..

That said.. I changed the behavior when creating packages. All php install files are now copied to a separate directory on root(xml) level. So you will have admin, site and install dirs.
This is marked (internally) as a J 1.5 legacy option, cause J 1.6 will not attempt to copy these files..

Your component looks pretty nice Wink
Things i found out about the install process:
You actually have duplicated install and uninstall php files. I think EasyCreator gets confused about this..
I like the way you specify the default parameters from your config.xml in your xml install file - pretty good. So I implemented this feature in EasyCreator.
I have attached a version of your component with install/uninstall files in "The EasyCreator way" - give it a try Wink

I also noticed your updating queries. This would be definitely a great feature if EasyCreator would create them automatic.

I have also uploaded a new version to the incubator. Maybe you find some time to test it ?
Talking about time and your (possible) contribution to the EasyCreator project: I think that's not a problem - we are not in a hurry Wink

Best regards,
Nikolai

* DEMO_com_availability_0.4.0__100113_2214.tar.gz (231.59 KB - runtergeladen 7 Mal.)
« Letzte Änderung: 15. 01. 2010 02:15 von elkuku » Gespeichert

Gruss,
Nikolai - NiK-IT.de
Easy-Joomla Team
Seiten: [1]   Nach oben
  Drucken  
 
Gehe zu:  


Audiovisuelle Filmanleitungen hosted by all-inkl.com joomladirectory.net joomla.org jahoart.eu joomla-in-berlin.de Joomla Toplist Spende/Donate
easy-joomla.org joomla.de webjobber.de snipersister-de xing.de
joomlacode.org joomlaos.de joomla24.com nik-it.de

Powered by MySQLPowered by PHP Powered by SMF 1.1.8 | SMF © 2006, Simple Machines LLC Prüfe XHTML 1.0Prüfe CSS
Seite erstellt in 0.359 Sekunden mit 28 Zugriffen.