Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 341859 - Ebuild Request: Master of Orion II: Battle at Antares
Summary: Ebuild Request: Master of Orion II: Battle at Antares
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Default Assignee for New Packages
URL: http://www.masteroforion2.com/
Whiteboard: sunrise-removal
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2010-10-20 09:01 UTC by Daniel Santos
Modified: 2016-12-17 17:55 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild + all supporting scripts & files (moo2-1.40.24b.tgz,6.72 KB, application/octet-stream)
2010-10-21 00:27 UTC, Daniel Santos
Details
Updated ebuild + files (moo2-1.40.24.tgz,11.21 KB, application/octet-stream)
2010-10-21 01:15 UTC, Daniel Santos
Details
Lastest iteration (moo2-1.40.24.tbz2,15.60 KB, application/octet-stream)
2010-10-23 07:05 UTC, Daniel Santos
Details
Latest iteration (moo2-1.40.24-20101026.tbz2,15.73 KB, application/x-bzip-compressed-tar)
2010-10-27 00:41 UTC, Daniel Santos
Details
Ebuild that works with standard CD mount and V1.3 from MicroProse (moo2-1.40.24-r1.ebuild,6.96 KB, text/plain)
2011-02-05 20:30 UTC, Sven Eden
Details
Corrected symlinks for "nocd" variant (moo2-1.40.24-r2.ebuild,7.37 KB, text/plain)
2011-02-05 21:50 UTC, Sven Eden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2010-10-20 09:01:50 UTC
Fun classic game.  I got an ebuild, just trying to pacify repoman so I can get it into sunrise.
Comment 1 Daniel Santos 2010-10-21 00:27:49 UTC
Created attachment 251381 [details]
ebuild + all supporting scripts & files

Here's my current ebuild with supporting scripts & such.  The version does not actually reflect the true version accurately, they dubbed it 1.40b23, but gentoo doesn't like that, so I gave it the next best thing.

If USE=nocd, the entire CD-ROM will be copied into /opt/moo2/cd.  If not specified, a symlink will be created at /opt/moo2/cd pointing to your CD (or where ever you told ebuild you're CD was).

The original DOS setup program (INSTALL.EXE) and sound configuration program (SETUP.EXE) is circumvented.  Instead, the ebuild simulates that, setting DGI.INI and MDI.INI (digital & MIDI sound config) with settings that dosbox will support.

However, you cannot run the game from a global read-only install because there's no support for saved games & such to be in another directory.  Therefore, the 1st time the user runs the game (/usr/games/bin/moo2), a user setup will be performed.  ${HOME}/.moo2 is created and populated with:
* A default moo2rc file
* A dynamically generated dosboxrc (with appropriate alterations)
* A symlink to /opt/moo2/cd
* And a game directory MPS/ORION2

All of the files in ${HOME}/MPS/ORION2/ are symlinks to the files in /opt/moo2/MPS/ORION2, and thus read-only, with a few exceptions:
* SOUND.LBX which appears to be a used as a digital sound buffer file
* All .INI files (so that user can easily change their setup if they want)
* All SR_R* files, of which I have no idea what they are for

I have done a few hours of game play and haven't run into dosbox complaining about wanting write access to any other files.

Lastly, if you are using the lordbrazen unofficial patch, this has to be run in dosbox, which can only be done by the user.  This takes about 45 seconds to run on my machine (a real pain) and is executed the 1st time the user runs moo2 as well.

It still needs an icon so you can run it from your KDE/Gnome/etc menu.
Comment 2 Daniel Santos 2010-10-21 01:15:04 UTC
Created attachment 251385 [details]
Updated ebuild + files

I changed the version as the "Lord Brazen" version is actually labeled 1.40b.23, which neither fits in Gentoo's versioning convention or seems to make much sense.  I've added more comments into the code (function comment headers) and committed it to sunrise dev.  You can also pick it up from https://overlays.gentoo.org/svn/proj/sunrise/sunrise/games-strategy/moo2, but not layman (yet).

I would appreciate anybody who has this CD and can test.  Thanks!
Comment 3 Daniel Santos 2010-10-23 07:05:29 UTC
Created attachment 251659 [details]
Lastest iteration

This isn't committed yet, still waiting on approval, but if anybody can test, it would be much appreciated.  It fixes a lot of issues with the previous ebuild.
Comment 4 Daniel Santos 2010-10-23 07:15:42 UTC
Oh, I forgot to mention the big thing.  There's apparently more than one version of the CD-ROM out there and they are quite different.  I have acquired two of them, but there could be more.  I had to do a lot of adaptation to get the ebuild to work with either of them.  The two I have now are v1.2 released by MicroProse with the date of 11/21/96 in the README.TXT and a v1.31 released by Hasbro Interactive with the date of July 26, 1999 in the readme and missing DOS support.  Since it's original release date was October 31, 1996, I presume that there are others, including an EU edition.
Comment 5 Daniel Santos 2010-10-27 00:41:52 UTC
Created attachment 252125 [details]
Latest iteration

* Altered the handling of various CD-ROM releases in a more friendly fashion.
* Re-organized code and refined commentation (comment-documentation)
* Added info to pkg_postinst on where config files are and their corresponding documentation
* Got the unofficial patch to run *much* faster.

Still waiting on approval to commit.
Comment 6 Anton Romanov 2010-10-27 08:34:37 UTC
so, this is ebuild for a dos version for dosbox?

also, that is a really bad practice to attach ebuilds and scripts packed into archives
Comment 7 Daniel Santos 2010-10-31 23:37:26 UTC
(In reply to comment #6)
Yeah, I'm trying to keep it simple since there's three scripts that have changed a bit and plus an ebuild.  Hopefully, I'll get it committed to sunrise soon.

But yes, this is a DOS program that runs in dosbox.  Running the DOS version is dosbox is far more stable than running the Windows version in Wine and, therefore, the common choice.
Comment 8 Daniel Santos 2010-11-01 00:57:18 UTC
OK, this is now (back) in the unreviewed sunrise tree: https://overlays.gentoo.org/svn/proj/sunrise/sunrise/games-strategy/moo2

It would be nice if some other folks with the CD-ROM can test this.

Thanks
Comment 9 Sven Eden 2010-11-25 10:45:28 UTC
(In reply to comment #8)
> OK, this is now (back) in the unreviewed sunrise tree:
> https://overlays.gentoo.org/svn/proj/sunrise/sunrise/games-strategy/moo2
> 
> It would be nice if some other folks with the CD-ROM can test this.
> 
> Thanks
> 

I have, and it is not possible to work.

You can mount CD-ROMs in two different ways: With and without "map".

1.: With a map, the default mount, makes all filenames lowercase.
--> Ebuild fails, it expects uppercase like "ORION95.EXE", but its "orion95.exe" on *any* CD.
2.: Without map the files are uppercase plus version.
--> Ebuild fails, the ORION95.EXE now reads "ORION95.EXE;1"

Possible solution: Assume a standard mount where all files are lowercase.

I had to copy all files to Harddrive, batch rename them to all uppercase names, and then the ebuild worked without any problems. The game runs fine.

I have music stuttering, but that is due to not-perfect settings for dosbox and a very horrible laptop. :)
Comment 10 Daniel Santos 2010-12-01 17:18:17 UTC
(In reply to comment #9)
Thank you for your feedback!  I'll see if I can adjust the build to accommodate for this.

The music studding is an exceedingly annoying aspect of this process, especially on machines with slower CPUs.  On my gf's ASUS eee pc 701 (a 900 MHz Celeron) this problem is especially pronounced.  I tweaked the sound settings with some, but limited success.  Generally, you can sometimes reset the sound (hoping for better luck) by entering the ship design screen, but it doesn't always get it non-studding again.  I'm presuming that this is simply a weakness in dosbox at this time, and possibly a small sound buffer, who's size is likely hard-coded in the moo2 dos exe (where they didn't predict this problem down the line).  Maybe this Lord Brazen guy can get off his duff (with all due respect for the awesome stuff he's done so far!) and fix this problem for us .:)

There's a project to re-write the entire engine as open source, but it's in fairly early stages.
Comment 11 Sven Eden 2011-02-05 20:21:56 UTC
(In reply to comment #10)
> (In reply to comment #9)
> Thank you for your feedback!  I'll see if I can adjust the build to accommodate
> for this.
> 

Hey there!

I have written an -r1 ebuild (will be attached next) that tries both, upper- and lowercase names. Unfortunately there is a second issue to fix:

The original ebuild assumes the CD is the (DOS-Free) Hasbro version if the file Patch13.lbx is present. That's wrong. I own an original Microprose CD with both Win95 and DOS support: The german release from 1996.

To solve this I have added an additional test that changes the found version back to MP if the file orion2.exe/ORION2.EXE is found.
Comment 12 Sven Eden 2011-02-05 20:30:22 UTC
Created attachment 261600 [details]
Ebuild that works with standard CD mount and V1.3 from MicroProse

This is the version that works with MoO2-Version 1.3 from MicroProse. I have tried to not change original functionality, all versions that could be installed with the original ebuild should still work.

The patch directory must not be copied, I have changed the usage from $PVR to $PV.
Comment 13 Sven Eden 2011-02-05 21:50:58 UTC
Created attachment 261608 [details]
Corrected symlinks for "nocd" variant

Unfortunately the symlinks in my previous ebuild are incorrect. This one fixes this for the nocd option. Unfortunately I have no idea how to do it with -nocd.

It now looks like that:

lrwxrwxrwx 1 root games   22  5. Feb 22:48 SHIPS.LBX -> /opt/moo2/cd/ships.lbx
-rw-r----- 1 root games 9,8K  5. Feb 22:48 SKILDESC.LBX
lrwxrwxrwx 1 root games   25  5. Feb 22:48 SNDSCAPE.DIG -> /opt/moo2/cd/sndscape.dig
Comment 14 Daniel Santos 2011-11-07 06:30:53 UTC
Hey, I'm sorry I missed your patch earlier this year!  I guess I screwed up and forgot to add myself to the CC list! :(

Actually, I don't want to use your modifications to pkg_setup as written, because we need to identify that particular release of the CD and set a cdVersion value specific to it!  If you are still around, would you kindly post the directory listing of your CD to this bug report please?  Also, can you find out what the version is prior to patching it?  It should be printed on the lower right corner of the main screen.  For now, I'm guessing this is Microprose 1.2 German release, so I'm thinking M1.2-de should be the cdVersion identifier, but please let me know.

I still need to go through the rest of your changes and sort it out.  Probably, we should just modify the "unknown" implementation to be tolerant of mixed case.
Comment 15 Daniel Santos 2011-11-07 06:39:24 UTC
oh, and it occurred to me that the options you use when mounting the CD or iso image can have an impact.  Can you also please post that as well (i.e., egrep   '/(cd|sr|dvd)' /proc/mounts).  It sounds like we need to be tolerant of case always as a result of this.
Comment 16 Sven Eden 2011-11-07 09:22:53 UTC
Hi Daniel,

I will do that, but I guess it will take at least two weeks, because I am on vacation from wednesday on. Further I found that I have screwed up the ebuild, but had no time to investigate further.

For the CD-Options, I have to fetch my original CD first. It has a very old format where the standard mapping does not work. I have tried all combinations of map, norock and nojoliet mount options for iso9660, and it was either "orion95.exe" or "ORION95.EXE;1". On more recent CDs, this does not happen, meaning the version ";1" is dropped, and the case not changed.
Comment 17 Daniel Santos 2011-11-07 22:25:06 UTC
(In reply to comment #16)
ooh, that's very helpful, thank you!  I wouldn't mind modifying the ebuild to even accommodate for the ";1" artifact.  Most of all, I would like the ebuild to work for as many people as possible.  I'm probably also going to take this and generate a Debian package for it as well, I just have to learn their package system better.

Also, your troubles with the cd link makes me think that there should be a README to explain how this ebuild installs the game, since I"m bridging a wide gap between the ancient DOS/windows idioms where saved games reside in a subfolder of the program install, and the modern *nix paradigm, where you install things globally and user files are stored locally.  To add to the complications of this, the lordbrazen patch can only be run under dosbox, and it's not considered safe to run this program as root (especially when executing pre-compiled binary DOS code), so the patcher is run the first time the user runs the game rather than at the time it's emerged.

So there's a lot of complicated details that should probably be summarized in a readme somewhere.

Also, when posting any other mods, if you can kindly post a patch from what's in sunrise, it would be quite helpful too.

Thanks!
Comment 18 Daniel Santos 2011-11-07 22:27:47 UTC
Comment on attachment 252125 [details]
Latest iteration

obsoleting "Latest iteration", please see sunrise overlay (https://overlays.gentoo.org/svn/proj/sunrise/reviewed/games-strategy/moo2) for current version.
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-08 16:47:32 UTC
Hello, everyone.

It seems that at least one ebuild related to this bug exists in the Sunrise overlay at the moment. However, I have to regretfully announce that after a long inactivity period the Sunrise project has been discontinued and the related overlay will be eventually removed. For this reason, I'd like to ask you to reevaluate the ebuilds and consider moving them. If you'd like to maintain a package from Sunrise in Gentoo, please take a look at our Proxy Maintainers [1] project.

Please make sure to take ebuilds from the unreviewed developer Sunrise repository [2] rather than the -reviewed one, since the latter has not been updated for over a year. While at it, please note that:

1. Adding a package to Gentoo requires declaring yourself as an active maintainer for it. All bugs regarding the package will be assigned to you, and you will be expected to maintain it.

2. Some packages may not be suitable for addition anymore. While there's no strong rules that would prevent you from adding a package, it may be a bad idea to add old-unmaintained packages that will shortly result in a large number of bugs reported with no solution. If that is the case, please close the bug as RESOLVED/OBSOLETE to make it easier to find packages worth adding.

3. Some of the bugs were already closed as WONTFIX/OBSOLETE/... while the relevant ebuild was kept in Sunrise. If you disagree with the original decision, you still can add the ebuild via proxy-maint.

4. Pleaes note that many of the Sunrise ebuilds are old and may be buggy. If you decide to move them, please make sure to update/clean them up. The proxy-maint team will also review your ebuilds, therefore making sure they land in Gentoo in good quality.

Once again, thank you for your contribution. We hope that you will still want to contribute to Gentoo, through proxy-maint or otherwise.


[1]:https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
[2]:https://gitweb.gentoo.org/proj/sunrise.git/
Comment 20 Sven Eden 2016-06-08 19:45:08 UTC
I love this game, own a legal copy, and would proxy maintain the ebuild.

As a matter of fact I had planned to review and modernize the ebuild for years, but as the game simply works on my system, I just delayed every time I would've had the time to do so.

The ebuild I use from /usr/local/portage is a bit different, worked for me, but is not production ready.

However, if I get a proxy for this, I'd review it and create a PR for review.
Comment 21 Daniel Santos 2016-06-09 12:17:23 UTC
(In reply to Sven Eden from comment #20)
> I love this game, own a legal copy, and would proxy maintain the ebuild.
> 
> As a matter of fact I had planned to review and modernize the ebuild for
> years, but as the game simply works on my system, I just delayed every time
> I would've had the time to do so.
> 
> The ebuild I use from /usr/local/portage is a bit different, worked for me,
> but is not production ready.
> 
> However, if I get a proxy for this, I'd review it and create a PR for review.

Awesome! I know that one thing broke the ebuild because a sunrise maintainer didn't want the large html file in the repo and uploaded it somewhere where that it eventually died, so retrieval failed. I still have this html file and I would be happy to restore it, but I can especially use the help for maintenance because I have a lot going on in my life these days! :/

When I was working on this ebuild, I spent a while surfing ebay to try to find as many different releases of this game as I could, since the files on the CD changed from one release to another. It was a while back, but I recall being rather pleased with this adaptation, getting all files that shouldn't change into /usr and anything that had to change into ~/.moo2. Also, I'm guessing that there hasn't been another unofficial patch since I last updated it.