Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Source Releasal Methods Need Altering

Source Releasal Methods Need Altering

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


Pages: 1  2  3 4  5  

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #30 on Tue 19 Feb 2008 07:29 PM (UTC)
Message
What I meant was, simply uploading a .zip export does not give you that.

David, since you seem to know your way around bzr, how about if you download one of the recent full sources from:

http://www.gammon.com.au/files/mushclient/src/

(eg. 4.19)

To upgrade that to 4.20 you need to manually change one function, see this post:

http://www.gammon.com.au/forum/?id=8401

You probably also need to change the version number in doc.h and readme.txt.

Then you could apply the patches for 4.21.

However if you made a checkpoint or whatever bzr calls it we would have at least 3 versions of history. From then on I could supply you with the patch file (or do it myself) to keep it up-to-date.

If you wanted to start with an earlier version (eg. 4.01) then I could apply (or send) the subsequent patches so you can get it up-to-date.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #31 on Tue 19 Feb 2008 07:36 PM (UTC)
Message
Yay, a repository! Now if only Micro$oft would drop the price of MFC. And as for what version to start with... 0.63 :) Really, anywhere from when MUSHclient became open source to now would be fine as a starting point.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #32 on Tue 19 Feb 2008 08:00 PM (UTC)
Message
I quite like the idea of a web-based access method for nice pretty-printed source. At least I can point to various places and say "this is how I did it", and maybe someone can say "but here is a neater way".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #33 on Tue 19 Feb 2008 08:08 PM (UTC)
Message
Great! I will take care of this right after my exam in an hour. :-)

And Nick, I can create the patches fairly easily myself by just extracting source files on top of each other and let bzr figure it out. Then, I can just grab the source archives you already have online rather than bother you for patches. :)

And yes, I also know of a way to get nice pretty-printed source code diffs, which I will set up as well. If you'd like to get a feel for what it looks like, see:

http://www.binarygoblins.com:8088/

I haven't kept those up to date; it was mostly an experiment to see if it worked. (The "last changed" dates are a little weird, though...)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #34 on Tue 19 Feb 2008 08:31 PM (UTC)
Message
I was expecting a bit more syntax colouring, but that looks like the general idea all right.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #35 on Thu 21 Feb 2008 01:55 AM (UTC)
Message
I have started to build the repository history from version 4.01. It's taking a little longer than expected because I cannot apply the diffs as-is; the line ending formats are messing things up and AFAICT I can't tell patch to leave the CRs in the diff file -- it insists on removing them. (--binary doesn't seem to do anything -- and it says it does nothing on POSIX systems.)

And yeah, I didn't realize you meant coloring of the code, and not just the diffs... oops. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #36 on Thu 21 Feb 2008 03:06 AM (UTC)

Amended on Thu 21 Feb 2008 03:07 AM (UTC) by Nick Gammon

Message
There are a few unix2dos and dos2unix utilities around that will fix up line endings. There is one version in the Downloads area here.

And for fun, I wrote one in Lua, which you can run from the MUSHclient immediate window. This one gets rid of \r from the file, you could modify it slightly to add them back.


-- get file name
local filename = utils.filepicker ("Choose file to convert")

if not filename then
  return
end -- no file

-- read original file
local f = io.open (filename, "rb")  -- binary mode
local s = f:read ("*a")  -- read entire file
f:close ()

local count

-- convert file
s, count = string.gsub (s, "\r", "")

-- write converted file
f = io.open (filename, "wb")
f:write (s)  -- write entire file
f:close ()

-- show summary
print ("File " .. filename .. " written, " 
       .. count .. " carriage-returns removed, " 
       .. " new file size is " .. #s .. " bytes.")

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #37 on Thu 21 Feb 2008 05:00 AM (UTC)

Amended on Thu 21 Feb 2008 05:08 AM (UTC) by David Haley

Message
Yeah, I have a whole suite of mac/unix/dos-to-mac/unix/dos converters. Pretty useful things. But what I use in the end of the day is just vi:

vi (list of files)
:bufdo set ff=unix
:wa
:q

I suppose it would be faster to use the command-line tools, though...

By the way, the diff for 4.14 appears to be slightly broken; around line 400, it looks like several lines of 'diff' output got turned into one.

The bad text is:

===================================================================

RCS file: /cvs/mushclient/mushclient.cnt,v

retrieving revision 1.25

diff -c -r1.25 mushclient.cnt

*** mushclient.cnt	16 Jun 2007 01:27:37 -0000	1.25

--- mushclient.cnt	22 Jul 2007 02:41:25 -0000

***************

*** 431,436 ****

--- 431,437 ----

  3 SendPkt=FNC_SendPkt  3 SendNoEcho=FNC_SendNoEcho   3 SendPush=FNC_SendPush + 3 SendSpecial=FNC_SendSpecial   3 SendToNotepad=FNC_SendToNotepad   3 SetAliasOption=FNC_SetAliasOption   3 SetAlphaOption=FNC_SetAlphaOption Index: mushclient.hlp

===================================================================


It should be:


===================================================================
RCS file: /cvs/mushclient/mushclient.cnt,v
retrieving revision 1.25
diff -c -r1.25 mushclient.cnt
*** mushclient.cnt	16 Jun 2007 01:27:37 -0000	1.25
--- mushclient.cnt	22 Jul 2007 02:41:25 -0000
***************
*** 431,436 ****
--- 431,437 ----
 3 SendPkt=FNC_SendPkt
 3 SendNoEcho=FNC_SendNoEcho
 3 SendPush=FNC_SendPush
+3 SendSpecial=FNC_SendSpecial
 3 SendToNotepad=FNC_SendToNotepad
 3 SetAliasOption=FNC_SetAliasOption
 3 SetAlphaOption=FNC_SetAlphaOption
Index: mushclient.hlp
===================================================================


(EDIT: note that a few of the lines also need spaces at the end... kind of annoying to show here, and probably doesn't really matter... and using the --ignore-whitespace option makes patch ignore the problem.)

Not really sure how that happened...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #38 on Thu 21 Feb 2008 05:22 AM (UTC)
Message
Yes, well I am not certain what happened there, except that perhaps the "enormous mutant star goat" (to quote from The Restaurant At The End Of The Universe) got to it.

Strictly speaking, the help "contents" file is not really part of the source, so I wouldn't be too concerned about it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #39 on Thu 21 Feb 2008 05:42 AM (UTC)
Message
Gotta watch out for those star goats... :P

One last problem; it appears that there is no diff or source archive for v4.20, but the diff for v4.21 seems to assume that it's patching 4.20. Could you send me a diff from 4.19 to 4.20? Once I get that I'll have every version since 4.01 in bzr version control. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #40 on Thu 21 Feb 2008 06:59 AM (UTC)
Message
Here they are:



Index: MUSHclient.rc
===================================================================
RCS file: /cvs/mushclient/MUSHclient.rc,v
retrieving revision 1.210
retrieving revision 1.211
diff -c -r1.210 -r1.211
*** MUSHclient.rc	24 Dec 2007 01:18:05 -0000	1.210
--- MUSHclient.rc	30 Dec 2007 04:32:12 -0000	1.211
***************
*** 56,63 ****
  //
  
  VS_VERSION_INFO VERSIONINFO
!  FILEVERSION 4,0,19,0
!  PRODUCTVERSION 4,0,19,0
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x1L
--- 56,63 ----
  //
  
  VS_VERSION_INFO VERSIONINFO
!  FILEVERSION 4,0,20,0
!  PRODUCTVERSION 4,0,20,0
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x1L
***************
*** 75,88 ****
              VALUE "Comments", "MUSHclient - a client program for playing MUD games\0"
              VALUE "CompanyName", "Gammon Software Solutions\0"
              VALUE "FileDescription", "MUSHclient\0"
!             VALUE "FileVersion", "4.19\0"
              VALUE "InternalName", "MUSHCLIENT\0"
              VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0"
              VALUE "LegalTrademarks", "\0"
              VALUE "OriginalFilename", "MUSHCLIENT.EXE\0"
              VALUE "PrivateBuild", "\0"
              VALUE "ProductName", "MUSHclient\0"
!             VALUE "ProductVersion", "4.19\0"
              VALUE "SpecialBuild", "\0"
          END
      END
--- 75,88 ----
              VALUE "Comments", "MUSHclient - a client program for playing MUD games\0"
              VALUE "CompanyName", "Gammon Software Solutions\0"
              VALUE "FileDescription", "MUSHclient\0"
!             VALUE "FileVersion", "4.20\0"
              VALUE "InternalName", "MUSHCLIENT\0"
              VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0"
              VALUE "LegalTrademarks", "\0"
              VALUE "OriginalFilename", "MUSHCLIENT.EXE\0"
              VALUE "PrivateBuild", "\0"
              VALUE "ProductName", "MUSHclient\0"
!             VALUE "ProductVersion", "4.20\0"
              VALUE "SpecialBuild", "\0"
          END
      END
Index: doc.h
===================================================================
RCS file: /cvs/mushclient/doc.h,v
retrieving revision 1.229
retrieving revision 1.230
diff -c -r1.229 -r1.230
*** doc.h	24 Dec 2007 01:18:05 -0000	1.229
--- doc.h	30 Dec 2007 04:32:12 -0000	1.230
***************
*** 21,28 ****
  
  // New versions - things to change
  
! #define THISVERSION 419                       // Step 1.
! const CString MUSHCLIENT_VERSION = "4.19";    // Step 2.
  // Step 3. Don't forget VERSION resource in Resources tab
  // Step 4. Remember: README.TXT 
  
--- 21,28 ----
  
  // New versions - things to change
  
! #define THISVERSION 420                       // Step 1.
! const CString MUSHCLIENT_VERSION = "4.20";    // Step 2.
  // Step 3. Don't forget VERSION resource in Resources tab
  // Step 4. Remember: README.TXT 
  
Index: mushclient.hlp
===================================================================
RCS file: /cvs/mushclient/mushclient.hlp,v
retrieving revision 1.87
retrieving revision 1.88
diff -c -r1.87 -r1.88
Binary files /tmp/cvszcmHjk and /tmp/cvs5hgvmw differ
Index: xml_save_world.cpp
===================================================================
RCS file: /cvs/mushclient/xml_save_world.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -c -r1.53 -r1.54
*** xml_save_world.cpp	4 Aug 2007 09:36:29 -0000	1.53
--- xml_save_world.cpp	30 Dec 2007 04:32:23 -0000	1.54
***************
*** 177,190 ****
                         const double & fNumber,
                         const bool sameline)
    {
!   if (fNumber)
!     {
!     // if number has decimal places, need special treatment
!     if (floor (fNumber) != fNumber)
!       {
!       // see: http://www.gammon.com.au/forum/?id=8077
        char old_locale[256];
!       strncpy(old_locale, setlocale(LC_NUMERIC, NULL), sizeof old_locale); /* store the locale */
        old_locale [255] = 0;
        // want numbers formatted correctly
        setlocale (LC_NUMERIC, "C" );
--- 177,189 ----
                         const double & fNumber,
                         const bool sameline)
    {
! 
!   /*
!   --- THIS DIDN'T WORK, see: http://www.gammon.com.au/forum/?id=7953&page=2
! 
!         // see: http://www.gammon.com.au/forum/?id=8077
        char old_locale[256];
!       strncpy(old_locale, setlocale(LC_NUMERIC, NULL), sizeof old_locale); // store the locale
        old_locale [255] = 0;
        // want numbers formatted correctly
        setlocale (LC_NUMERIC, "C" );
***************
*** 192,206 ****
                         sName, 
                         FixHTMLString (CFormat ("%.2f", fNumber)), 
                         sameline);
!       setlocale(LC_NUMERIC, old_locale);         /* restore the old locale */
!       }
!     else
!       Save_XML_string (ar, 
!                        sName, 
!                        FixHTMLString (CFormat ("%.2f", fNumber)), 
!                        sameline);
  
-     }
    } // end of Save_XML_double
  
  void Save_XML_colour  (CArchive& ar, 
--- 191,208 ----
                         sName, 
                         FixHTMLString (CFormat ("%.2f", fNumber)), 
                         sameline);
!       setlocale(LC_NUMERIC, old_locale);         // restore the old locale
! 
!       */
! 
!   CString strNumber = CFormat ("%.2f", fNumber);
!   strNumber.Replace (",", ".");    // don't want any blasted commas!
! 
!   Save_XML_string (ar, 
!                    sName, 
!                    FixHTMLString (strNumber), 
!                    sameline);
  
    } // end of Save_XML_double
  
  void Save_XML_colour  (CArchive& ar, 
Index: install/readme.txt
===================================================================
RCS file: /cvs/mushclient/install/readme.txt,v
retrieving revision 1.158
retrieving revision 1.159
diff -c -r1.158 -r1.159
*** install/readme.txt	24 Dec 2007 01:18:05 -0000	1.158
--- install/readme.txt	30 Dec 2007 04:32:23 -0000	1.159
***************
*** 1,7 ****
! MUSHclient version 4.19
  =======================
  
! Monday, 24th December 2007
  
  Author: Nick Gammon
  Web support: http://www.gammon.com.au/forum/
--- 1,7 ----
! MUSHclient version 4.20
  =======================
  
! Sunday, 30th December 2007
  
  Author: Nick Gammon
  Web support: http://www.gammon.com.au/forum/

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #41 on Thu 21 Feb 2008 07:55 AM (UTC)
Message
OK, all done, just need to go about making it publicly viewable in some sane manner. The repos are accessible but not in a nice graphical way at the moment:

http://www.binarygoblins.com/~david/bzr/mushclient/

This gives you a list of repos.

To grab one, e.g. 4.21,

bzr branch http://www.binarygoblins.com/~david/bzr/mushclient/mushclient-4.21/

That will get you the 4.21 release along with all history since 4.01.

For now, sleep time. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #42 on Thu 21 Feb 2008 07:53 PM (UTC)

Amended on Thu 21 Feb 2008 07:56 PM (UTC) by Nick Gammon

Message
Thanks a lot David!

I am trying a quick compile on that branch, on a different PC to make sure it all works, and that it doesn't pull in stuff I happen to have there.

So far I have had to change:


  • Missing doc.ico file

    Apply this patch:

    
    === modified file 'MUSHclient.rc'
    --- MUSHclient.rc       2008-02-21 08:16:11 +0000
    +++ MUSHclient.rc       2008-02-21 20:25:34 +0000
    @@ -103,7 +103,6 @@
     // Icon with lowest ID value placed first to ensure application icon
     // remains consistent on all systems.
     IDR_MAINFRAME           ICON    DISCARDABLE     "res\\MUSHclient.ico"
    -IDR_MUSHCLTYPE          ICON    DISCARDABLE     "res\\doc.ico"
     IDR_NORMALTYPE          ICON    DISCARDABLE     "res\\idr_main.ico"
     #endif    // English (Australia) resources
     /////////////////////////////////////////////////////////////////////////////
    


    In other words, there was an error for a missing file doc.ico, you edit MUSHclient.rc and remove the line that refers to it.

  • Missing zlib files.

    Then you get errors about missing zlib files. Download this:

    http://www.gammon.com.au/files/mushclient/src/zlib.zip

    Make a directory "zlib" at the same level as the MUSHclient source directory (in my case mushclient-4.21), and unzip the files into that zlib directory. This will be a once-off operation, as zlib won't change from version to version.

    Don't make the directory inside the MUSHclient directory, make it adjacent to it (so mushclient-4.21 and zlib directories are at the same level).

  • Missing file forcelib.h.

    Because of some obscure problem, I had to add the include below into the zlib source (that is, the files downloaded in the previous step).

    However the include refers to a parent "mushclient" directory, not "mushclient-4.21" and thus the compile fails.

    To fix this, copy the file forcelib.h from the MUSHclient source directory into the zlib directory.

    Then for each file that gives the error change:

    
    #include "..\mushclient\forcelib.h"   // see ID: Q148652 
    


    to:

    
    #include "forcelib.h"   // see ID: Q148652 
    


    (That is around 15 .c files).



That should compile cleanly then (the zlib steps are a once-off because that directory will not change after this).

However to run without errors you need a couple of DLLs - Lua and the DLL with the English resources in it.

Use a current MUSHclient distribution and copy these files into the WinRel directory (the one where it put MUSHclient.exe into):


  • lua5.1.dll
  • The entire "locale" directory (that is copy "locale" so it is a subdirectory of WinRel").


Basically you have copied in two DLLs:


  • mushclient-4.21\WinRel\lua5.1.dll
  • mushclient-4.21\WinRel\locale\en.dll


Now it should start up and run normally.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #43 on Thu 21 Feb 2008 07:57 PM (UTC)
Message
Quote:

The repos are accessible but not in a nice graphical way at the moment:

http://www.binarygoblins.com/~david/bzr/mushclient/


The directories shown there seem empty, David.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #44 on Thu 21 Feb 2008 08:20 PM (UTC)
Message
I think the problems you had with mushclient.cnt file is because it was marked as binary in my cvs repository. I have changed it back to text, I think.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


215,765 views.

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

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

Go to topic:           Search the forum


[Go to top] top

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