[Beta] EasyMOD Add-on

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Sun Jul 06, 2003 3:43 am

Cool, I never knew this existed JZ ;) Good work. Ptirhiik is right that there could be some issues, especially when the same line has been modified multiple times. But I think your method should work the majority of the time. I've only glanced at the code, but have a good handle on what's going on.

One HUGE thing that is missing is that you should be telling people to backup their files before running the uninstall just in case. After it is uninstalled, the user should be told to thoroughly test their board before install or uninstalling any more MODs. This way they can catch problems before they get worse.

But again, I do agree this should work well in most cases. I just think people should know there is a chance it won't work in certain situations.

As for the "official" EM uninstaller, that will appear in Beta 1. I think I know how I'm going to do it. As I install the MOD, a new MOD will be created and this will be the uninstall script. I have not yet proved this concept will work though. I think for EMC MODs it should work fine. But for non-EMC MODs that use REPLACE liberally, then that is going to be a problem. I may have to leave a few breadcrumbs in the code at install time so I can find my way back ;) Hopefully not though.

Good work!
-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

aznkoz
Registered User
Posts: 12
Joined: Thu Oct 24, 2002 5:57 am
Location: USA
Contact:

Post by aznkoz » Sun Jul 06, 2003 6:33 am

Installation Failed
EasyMOD encountered the following error(s). A general error could be ABC. A critical error means D and you should do XYZ.

Critical Error

FIND FAILED: In file [templates/subSilver/admin/mod_history.tpl] could not find:

<td width="5%" class="{install.ROW_CLASS}" align="center"><span class="gensmall">details</span></td>

MOD script line #203


Wonder what happen, I have fail to install it. Could it be because I have added log actions mod before this to cause it to not working :( . Oh boy, some work to do .

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Jul 06, 2003 8:57 am

Nuttzy99 wrote: As I install the MOD, a new MOD will be created and this will be the uninstall script. I have not yet proved this concept will work though.
It won't : even with only the use of inline, the find sentence on a line modified will change after installing a new mod on this line. Also, a template beeing an external mod, you will miss the uninstall part on it. Also, you don't know yet what part of a new mod use a part of an older, functionaly, so you won't be able to determine if even you have to keep the older installed or to uninstall the newest too.

As I said, the only reliant way, but yet not enough reliant way I see is to determine the differences between "after the mod" and today (what have to be re-install after the desinstallation), and to restore backup before the installation of the mod to desinstall. First of course, you have to compose a descriptive that will be what has be done between the each mod installed with easyMod and the backup of the next mod installed with easyMod (this is a very important point in the retro-engeenering process).

The only way an uninstall process can work is only using easyMod what ever modification you plan (and a new template is a hughe modification, also an upgrade of version), and only desinstall the mods with a from-yet to before-the-install unsinstall re-install process. And you won't have deal with the database at this point.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Sun Jul 06, 2003 2:20 pm

Ptirhiik - RPGnet-fr wrote: It won't
It is not possible to definitively say this yet. The more I think about it, the more I think it will work. I'm pretty good with these things you know ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Jul 06, 2003 3:38 pm

I let you explore the way you plan, I already did it ;). You will soon find the classical issues concerning this kind of process.

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Sun Jul 06, 2003 3:49 pm

Ptirhiik - RPGnet-fr wrote: As I said, the only reliant way, but yet not enough reliant way I see is to determine the differences between "after the mod" and today (what have to be re-install after the desinstallation), and to restore backup before the installation of the mod to desinstall. First of course, you have to compose a descriptive that will be what has be done between the each mod installed with easyMod and the backup of the next mod installed with easyMod (this is a very important point in the retro-engeenering process).

This is obviously not true, as this un-installer works perfectly fine, so restoring a backup is not the best way.
(Notice I'm not commenting on the way Nuttzy wants to do it. It sounds like a good idea, but I don't know how practical and/or probable it is. ;) )

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Jul 06, 2003 4:39 pm

GPHemsley wrote: This is obviously not true, as this un-installer works perfectly fine, so restoring a backup is not the best way.
A single carriage return in a source file can screwed it, and the install of a new template will also get it out of lines. This one surely works very well under certain conditions, but absolutly not on all. It supposes so many things to be verified (never editing at hand a file, never installing a template or a pack language file, etc.) that is not enough reliant at all.

[MA]dCow_Inc{velt}
Registered User
Posts: 23
Joined: Sat Mar 08, 2003 9:05 pm

Post by [MA]dCow_Inc{velt} » Sun Jul 06, 2003 5:09 pm

Also, when removing, adding a comment like /* A MOD was here */ isn't a very good idea in a template file, you best off deleteing the code without replacing it (or make it <!-- A MOD was here !> to comply with HTML). using a PHP comment in a .tpl file will cause it to acually display it in some area.

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Sun Jul 06, 2003 5:42 pm

[MA]dCow_Inc{velt} wrote: Also, when removing, adding a comment like /* A MOD was here */ isn't a very good idea in a template file, you best off deleteing the code without replacing it (or make it <!-- A MOD was here !> to comply with HTML). using a PHP comment in a .tpl file will cause it to acually display it in some area.

Notice that I reported that on page one. ;)

xboxguru
Registered User
Posts: 6
Joined: Sun Mar 09, 2003 11:23 pm

Post by xboxguru » Sun Jul 06, 2003 10:06 pm

You should make this mod Easy Mod compatible!

JuniorZ
Registered User
Posts: 188
Joined: Wed Apr 24, 2002 10:11 pm
Location: http://localhost/
Contact:

Post by JuniorZ » Mon Jul 07, 2003 5:48 pm

GPHemsley wrote: 2) It leaves a little

Code: Select all

/* A MOD was here */
comment in one of the template files where a MOD was, and since

Code: Select all

/* */
doesn't comment something out in HTML, it appears in the output...


I used this because the EM dont allow to replace with an empty line like

Code: Select all

#
#FIND
#
$var = $userdata['foo'];

#
#REPLACE WITH
#
I tried to do the best :wink:
SuportephpBB.org
Sorry by the Horrible English. ;)

JuniorZ
Registered User
Posts: 188
Joined: Wed Apr 24, 2002 10:11 pm
Location: http://localhost/
Contact:

Post by JuniorZ » Mon Jul 07, 2003 5:51 pm

Talking about the SQL:

Run SQL is disabled in the EM, but I am developing a script that will generate the reverse SQL query (it is dangerous, I know - but I am testing this...)

I've made this to test all the habilities os EM, and...
That's Great!!!
SuportephpBB.org
Sorry by the Horrible English. ;)

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Tue Jul 08, 2003 3:59 am

JuniorZ wrote: I used this because the EM dont allow to replace with an empty line like

Code: Select all

[code]
I tried to do the best :wink:




Maybe trying an if/else statement? Like, IF the file end in .tpl, replace with

Code: Select all

<!-- A MOD was here -->
, ELSE replace with

Code: Select all

/* A MOD was here */
.
Last edited by GPHemsley on Tue Dec 30, 2003 8:39 pm, edited 1 time in total.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 » Tue Jul 08, 2003 2:45 pm

Sorry if I hijacked this thread a bit. I have started a new discussion about the official EM uninstaller over here: http://www.phpbb.com/phpBB/viewtopic.php?t=117273

However, I STRONGLY encourage the continued development of JZ's uninstaller. Although we may figure how the official EM uninstaller will work, it is going to be a LONG time before it actually available. You can count on it being measured in months, not days ;)

Again, I wish to congratulate JZ on a job well done :D

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

User avatar
GPHemsley
Registered User
Posts: 1475
Joined: Fri Apr 18, 2003 3:12 am
Location: Long Beach, NY
Name: Gordon Hemsley
Contact:

Post by GPHemsley » Wed Jul 30, 2003 3:39 am

Well, I've taken the liberty of updating this MOD.

It should be compatible with 0.0.10 when it is released (seeing as how I worked with the pre-release version when updating this MOD) and it fixes the wrong comment being shown in templates.

@JuniorZ: The reason was because the substr() that you did not take into account the \n at the end of the filename.

Click Here to Download EasyMOD Uninstaller 1.2.1

Locked

Return to “[2.0.x] MODs in Development”