[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Source Releasal Methods Need Altering
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Source Releasal Methods Need Altering

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  3  4  5  

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Thu 31 Jan 2008 11:10 AM (UTC)
Message
It has been 7 versions since a FULL source has been released, or so the forums state, but 4.19 has the entire source, you just have to go to the http://www.gammon.com.au/files/mushclient/src/
to get it.

I use MS Visual Studio 6, which is MSVC++ 6, which I believe is what you yourself used Nick, but haven't the foggiest idea how to use the "diffs" from version to version to amend source code.

Perhaps you could release the code every 2 updates, or 5 updates as a rule of thumb, cause I know that doing it every update would be taxing, unless you wrote a batch file in whatever language to do the task of zipping the source folders up and what-not, which might be the BEST thing for all that wish to jump on board, but are not totally familiar with the tasks required for compiling the program.

And again thank you for making Mushclient, it is a WONDERFUL program, and has given me MANY hours of entertainment on MANY muds.

-Onoitsu2
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 31 Jan 2008 08:09 PM (UTC)
Message
Quote:

It has been 7 versions since a FULL source has been released ...


The current version is 4.21, and 4.19 full source has been released, as you said. How does that become 7 versions?

The only change in 4.20 was a single function that I reproduced in full on the release page, and for 4.21 I did a "diff".

To use the diff file you simply use the "patch" program, this is normally part of a Cygwin (or Linux) distribution.

You simply go to the source directory (or maybe its parent) and type:


patch < version_4.21_diffs.txt


That patches the current source by applying the differences.

It's not that hard to do it manually. Let's take an example from the diffs file:


*** doc_construct.cpp	13 Jun 2007 17:57:28 -0000	1.23
--- doc_construct.cpp	10 Jan 2008 01:24:53 -0000	1.24
***************
*** 49,54 ****
--- 49,61 ----
    m_iCurrentActionSource = eUnknownActionSource;
    m_nBytesIn = 0;
    m_nBytesOut = 0;
+ 
+   m_iTriggersEvaluatedCount = 0; 
+   m_iTriggersMatchedCount = 0;   
+   m_iAliasesEvaluatedCount = 0;  
+   m_iAliasesMatchedCount = 0;    
+   m_iTimersFiredCount = 0;       
+ 
    m_bLoaded = false;
    m_bMapping = false;
    m_bRemoveMapReverses = true;


That means, in the original file doc_construct.cpp, consider lines 49 - 54, and add (hence the +) the lines marked with a + sign (of course, excluding column 1, with the + in it).

Now those lines become 49 - 61 as shown above.

The other lines shown (the unmarked ones) are to put the diff "in context". It is known as a "context diff". The reason for the context is that if you had added some lines of your own further up, the patch program can still synchronize the correct place, because it does not totally rely on the line numbers shown. They are effectively a hint, about where to look for the correct context.


The other symbols you might see are ! which means replace.

Here is an example of a replacement:


*** localize.lua	12 Jun 2007 04:01:56 -0000	1.2
--- localize.lua	10 Jan 2008 01:24:53 -0000	1.3
***************
*** 19,25 ****
  fo = assert (io.open ("Localize_template.lua", "w"))
  
  fo:write ("-- MUSHclient localization file\n\n")
! fo:write (os.date ("-- Written: %A, %m %B %Y at %H:%M:%S\n\n"))
  
  -- try to work out number of arguments (see sprintf format)
  -- eg.  %+06.4f
--- 19,25 ----
  fo = assert (io.open ("Localize_template.lua", "w"))
  
  fo:write ("-- MUSHclient localization file\n\n")
! fo:write (os.date ("-- Written: %A, %d %B %Y at %H:%M:%S\n\n"))
  
  -- try to work out number of arguments (see sprintf format)
  -- eg.  %+06.4f


Here the incorrect os.date line was replaced with a different one.

Finally, if a line is removed it would have a "-" at the start of it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Reply #2 on Fri 01 Feb 2008 05:25 AM (UTC)
Message
As stated it was released for 4.19, BUT it is not advertised, that is the reason it is 7 versions since it was advertised in the Announcement posting for the new version.

Nick, you, yourself used the C++ 6 compiler from MS, so perhaps you could explain where in that is the patch feature.

I know that it comes standard with the GCC compilers, but this is MS we are talking about, and nothing is really standard with them.

-Onoitsu2
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 01 Feb 2008 05:58 AM (UTC)
Message
Well, on the announcement post for version 4.21 it mentions where the diffs are. I was basically saving lots of new posts in that section for something that only a handful of people would use. However I see your point.

It is true that the patch program isn't part of the MS Visual package.

I see where you are coming from, a few years ago I used Visual C++ and had no idea what "patch" or "diff" was.

I use a hybrid set of tools these days. The whole idea of distributing a "diff" file is that it seems crazy for everyone to have to download 1 Mb of data to obtain what is probably 1K of differences from one version to the next.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #4 on Fri 01 Feb 2008 06:01 AM (UTC)
Message
It might be an option to make a VCS repository available. I'd be willing to maintain such a thing, but it's pretty easy to do. The hard part IMO is deciding which system to use. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Reply #5 on Fri 01 Feb 2008 06:52 AM (UTC)
Message
I would be much obliged if you would upload the diff tool you are using, or email it to my email address you have on file for me on the forums, as I would like to delve into altering Mushclient to allow full COM calls.

It is going to be a pain in the ass to do, because you have it implemented where the main application itself has no COM objects, it is the "Documents" it handles that have all the interfaces.

I have been looking at several tlb's and trying to see how things are done in the "global section" of the "Object Browser" of VB, and it is a separate interface named whatever, with a coclass named Global, referring to that separate interface. This CAN be done to allow you to query the list of open worlds with a few rewrites, and allow access to them via the named version. Although the GetWorld function will need another version created that DOES not do its queries from within a "Mushclient Document Class"

-Onoitsu2
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #6 on Fri 01 Feb 2008 06:57 AM (UTC)
Message
If I remember correctly, you can use WinDiff and WinMerge:

http://en.wikipedia.org/wiki/WinDiff
http://winmerge.org/

I don't remember if WinMerge can actually apply patches, but I believe it can since I know it can create them.

Also, if you have Cygwin installed, you can get all of this from its package manager.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Fri 01 Feb 2008 07:43 AM (UTC)
Message
Quote:

I would be much obliged if you would upload the diff tool you are using ...


I don't know if it will work without the Cygwin environment, but that is publicly and freely available. I suggest you get a Cygwin install going, making sure that the patch utility is part of the selected options.

It might take a while the first time, but you get gcc and heaps of other interesting stuff.

See: http://www.gammon.com.au/smaug/installingcygwin.htm

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Reply #8 on Fri 01 Feb 2008 08:45 AM (UTC)

Amended on Fri 01 Feb 2008 09:07 AM (UTC) by Onoitsu2

Message
well being on dialup means that I will be downloading things for over 24 hours, I know, I've done it before.

I do however think I found a suitable substitute, i google'd for windows patch, and 6th down the page was "Patch for Windows" - http://gnuwin32.sourceforge.net/packages/patch.htm

Hopefully that will get the job done, if not I have several linux distros that are on CD's and can probably use vmware to load those and use it to patch things, but I would rather not use those to do the task.

-Onoitsu2

[Edit:] c:\Program Files\GnuWin32\bin\patch.exe: **** malformed patch at line 561: =========================
==========================================

Using version_4.21_diffs.txt from the location you have it uploaded.
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Fri 01 Feb 2008 09:14 AM (UTC)

Amended on Fri 01 Feb 2008 09:15 AM (UTC) by Nick Gammon

Message
That particular line seems to be changes to the help file contents: mushclient.cnt

It looks like the linefeeds are somehow missing from that particular bit. Since you probably aren't too interested in the help file (which you have anyway), I would delete that part of the patch file (edit it and you will see what I mean - delete the faulty bit between the ====== symbols).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #10 on Fri 01 Feb 2008 09:38 AM (UTC)
Message
http://www.cs.purdue.edu/homes/trinkle/RCS/ has Windows binaries (no Cygwin required) of GNU RCS, which encludes both diff and merge, but I am not sure how you would go about patching source that isn't under version control.

[Go to top] top

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Reply #11 on Fri 01 Feb 2008 09:51 AM (UTC)

Amended on Fri 01 Feb 2008 09:55 AM (UTC) by Onoitsu2

Message
I already attempted to alter the diff file in that section to add the line feeds, but it still failed in a few others...


patching file MUSHclient.rc
Hunk #1 FAILED at 56.
Hunk #2 FAILED at 75.
2 out of 2 hunks FAILED -- saving rejects to file MUSHclient.rc.rej

patching file doc.h
Hunk #1 FAILED at 21.
1 out of 3 hunks FAILED -- saving rejects to file doc.h.rej

Also the install/readme.txt fails patching as well, but that is not a big deal

I am wondering what is up with the patch, is it missing end line chars all over, or what ?!

-Onoitsu2
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #12 on Fri 01 Feb 2008 04:11 PM (UTC)
Message
Erm... can we just have MUSHclient on Git, or some other versioning control tool? Git is pretty easy to use, and very compact as well.

http://git.or.cz/

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #13 on Fri 01 Feb 2008 07:23 PM (UTC)
Message
VCS would be my preference, although the problem is agreeing on which VCS to use; I'd prefer bzr myself. :-) (but could live with git too) As I said, I would be willing to host and maintain the repository based on Nick's source releases.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #14 on Fri 01 Feb 2008 08:32 PM (UTC)
Message
My preference would lie with yet another one.. svn. :) But that would be up to Nick, really.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


37,821 views.

This is page 1, subject is 5 pages long: 1 2  3  4  5  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]