News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

new option in package xml install files

Started by AzaToth, September 22, 2005, 11:56:06 AM

Previous topic - Next topic

AzaToth

I would like an option to search/jump to a specific line in the file to start search from, for example:

<operation>
<search start="120" position="before"><![CDATA[]]></search>
<add><![CDATA[]]></add>
</operation>

niko

Not good idea... if you install lines differ and if theres two of those lines it could replace wrong etc...
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

AzaToth

Quote from: Niko on September 22, 2005, 02:05:59 PM
Not good idea... if you install lines differ and if theres two of those lines it could replace wrong etc...
Hehe, seems I was not specific enough here. What I ment is a pointer to start search from, in the example, starrt search for the text from line 120. ignore everything before line 120.

[Unknown]

Even if you wanted to skip something, what if someone added 300 lines to the beginning of the file?  Suddenly you wouldn't be skipping it anymore.

-[Unknown]

AzaToth

#4
Quote from: [Unknown] on September 22, 2005, 03:10:42 PM
Even if you wanted to skip something, what if someone added 300 lines to the beginning of the file?  Suddenly you wouldn't be skipping it anymore.

-[Unknown]
Yes, you might have right, but perhaps a backward search, and include a count:

<operation>
<search backward="true" count="1" position="before"><![CDATA[]]></search>
<add><![CDATA[]]></add>
</operation>


Something other for the whole package that might be usefull:

incremental updates: (perhaps difficult to implement)

<name>Foo</name>
<version>0.0.3</version>
<upgrade from="0.0.1" to="0.0.2" for="1.1 RC1">
<modification>changes-0.0.1-0.0.2.xml</modification>
</upgrade>
<upgrade from="0.0.2" to="0.0.3" for="1.1 RC1">
<modification>changes-0.0.2-0.0.3.xml</modification>
</upgrade>


Dependices:

<id>mine:fluff</id>
<depends package="foo:bar" version="1.0.2" />
<suggest package="someones:pack" version="0.76" />
<conflicts package="someones:fluff" version="1.0" />

[Unknown]

You can have a search without an add, and make it give a fatal error if not found.  That's like a dependency check.

Backward searches would be difficult... why not just increase the context?

You can do incremental updates just fine:

<upgrade from="0.0.1" for="1.1 RC1">
   <modification>changes-0.0.1-0.0.2.xml</modification>
   <modification>changes-0.0.2-0.0.3.xml</modification>
</upgrade>
<upgrade from="0.0.2" for="1.1 RC1">
   <modification>changes-0.0.2-0.0.3.xml</modification>
</upgrade>

-[Unknown]

AzaToth

Quote from: [Unknown] on September 22, 2005, 04:54:15 PM
You can have a search without an add, and make it give a fatal error if not found.  That's like a dependency check.

I ment it more global that file check, one example that is obsolete not is the mod faster parse code, it might be easier for those installing the mods to see that (s)he missing some mods.
Like it's now it's only give a error that a file is wrong, not what's wrong, and what mod that perhaps is causing the error, better then for the mod to point out in advance that mod one is not compatible with mod two (perhaps both edit the same line in source)

Advertisement: