Ubuntu Linux 18.10下面安裝魔法門之英雄無敵3

不廢話,直接進入正題:
1.Heroes.of.Might.and.Magic.3.Linux.[mulek.info].iso
這個資源是32位
下載鏈接:

鏈接: https://pan.baidu.com/s/1Cut226Ipk8g20ja2aAejbw
提取碼: yrpq
2.Xubuntu18.10 amd64

好了你們會發現我上面的是64位系統下面打算安裝32位的,別擔心,我會告訴你怎麼做.

3.這個iso裏面的文件全部解壓拷貝到一個文件夾,注意不要用什麼mount命令,那是很多年前的教程,已經不適用於最新的linux系統了.

然後setup.sh修改如下:

#!/bin/sh
#
# Product setup script - Loki Entertainment Software

# Go to the proper setup directory (if not already there)
cd `dirname $0`

# Return the appropriate architecture string
function DetectARCH {
	status=1
	case `uname -m` in
		i?86)  echo "x86"
			status=0;;
		*)     echo "`uname -m`"
			status=0;;
	esac
	return $status
}

# Return the appropriate version string
function DetectLIBC {
      status=1
      if [ -f `echo /lib/i386-linux-gnu/libc.so.6* | tail -1` ]; then
	      if fgrep GLIBC_2.1 /lib/libc.so.6* 2>&1 >/dev/null; then
	              echo "glibc-2.1"
	              status=0
	      else    
	              echo "glibc-2.0"
	              status=0
	      fi        
      elif [ -f /lib/libc.so.5 ]; then
	      echo "libc5"
	      status=0
      else
	      echo "unknown"
      fi
      return $status
}

# Detect the Linux environment
arch=`DetectARCH`
libc=`DetectLIBC`
arch="x86"
libc="libc6"

# Find the installation program
function try_run
{
    setup=$1
    shift
    fatal=$1
    if [ "$1" != "" ]; then
        shift
    fi

    # First find the binary we want to run
    failed=0
    setup_bin="setup.data/bin/$arch/$libc/$setup"
    echo $setup_bin
    if [ ! -f "$setup_bin" ]; then
        setup_bin="setup.data/bin/$arch/$setup"
        if [ ! -f "$setup_bin" ]; then
            failed=1
        fi
    fi
    if [ "$failed" -eq 1 ]; then
        if [ "$fatal" != "" ]; then
            cat <<__EOF__
This installation doesn't support $libc on $arch

Please contact Loki Technical Support at [email protected]
__EOF__
            exit 1
        fi
        return $failed
    fi

    # Try to run the binary
    # The executable is here but we can't execute it from CD
    setup="$HOME/.setup$$"
    cp "$setup_bin" "$setup"
    chmod 700 "$setup"
    if [ "$fatal" != "" ]; then
        "$setup" $*
        failed=$?
    else
        "$setup" $* 2>/dev/null
        failed=$?
    fi
    rm -f "$setup"
    return $failed
}


# Try to run the setup program
status=0
rm -f "$setup"
if ! try_run setup.gtk && ! try_run setup -fatal; then
    echo "The setup program seems to have failed on $arch/$libc"
    echo
    echo "Please contact Loki Technical Support at [email protected]"
    status=1
fi
exit $status

有些同學擔心上面的glibc版本以及libc版本不一致咋辦,沒事,別擔心,就按照我的來改.
稍微解釋下:
這裏面

arch=`DetectARCH`
libc=`DetectLIBC`

是在調用函數,DetectARCH和DetectLIBC是兩個函數,我特意做了修改.如果不是和我一樣的系統,請根據自己的情況來修改

下面是完整的安裝過程:

(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ bash setup.sh
setup.data/bin/x86/libc6/setup.gtk
setup.data/bin/x86/libc6/setup
----====== Heroes of Might and Magic III installation program ======----

You are running a x86 machine with libc5
Hit Control-C anytime to cancel this installation program.

Please enter the installation path [/usr/local/games/Heroes3] /home/appleyuchi/Heros3
Please enter the path for binary installation [/usr/local/bin] /home/appleyuchi/Heros3/Heros3_bin
Install Base Install? [Y/n] Y
Install Scenarios? [N/y] Y
Install Sounds and Graphics? [N/y] y
Install Music? [N/y] y
Install Videos? [N/y] y
Do you want to install desktop items? [Y/n] Y
Installing to /home/appleyuchi/Heros3
272873 MB available, 341 MB will be installed.

Continue install? [Y/n] Y
Installing heroes3 binary ...
 100% - /home/appleyuchi/Heros3/heroes3
Installing Base Install ...
 100% - /home/appleyuchi/Heros3/Heroes_III_Tutorial.pdf
 100% - /home/appleyuchi/Heros3/README
 100% - /home/appleyuchi/Heros3/icon.bmp
 100% - /home/appleyuchi/Heros3/icon.xpm
Installing Scenarios ...
 100% - /home/appleyuchi/Heros3/maps/all for one.h3m
 100% - /home/appleyuchi/Heros3/maps/ascension.h3m
 100% - /home/appleyuchi/Heros3/maps/barbarian breakout.h3m
 100% - /home/appleyuchi/Heros3/maps/barbarian breakouta.h3m
 100% - /home/appleyuchi/Heros3/maps/buried treasure.h3m
 100% - /home/appleyuchi/Heros3/maps/crimson and clover.h3m
 100% - /home/appleyuchi/Heros3/maps/crimson and clovera.h3m
 100% - /home/appleyuchi/Heros3/maps/dead and buried.h3m
 100% - /home/appleyuchi/Heros3/maps/divided loyalties.h3m
 100% - /home/appleyuchi/Heros3/maps/divided loyaltiesa.h3m
 100% - /home/appleyuchi/Heros3/maps/dragon orb.h3m
 100% - /home/appleyuchi/Heros3/maps/emerald isles.h3m
 100% - /home/appleyuchi/Heros3/maps/emerald islesa.h3m
 100% - /home/appleyuchi/Heros3/maps/free for all.h3m
 100% - /home/appleyuchi/Heros3/maps/good to go.h3m
 100% - /home/appleyuchi/Heros3/maps/island of fire.h3m
 100% - /home/appleyuchi/Heros3/maps/islands and caves.h3m
 100% - /home/appleyuchi/Heros3/maps/judgement day.h3m
 100% - /home/appleyuchi/Heros3/maps/key to victory.h3m
 100% - /home/appleyuchi/Heros3/maps/knee deep in the dead.h3m
 100% - /home/appleyuchi/Heros3/maps/knight of darkness.h3m
 100% - /home/appleyuchi/Heros3/maps/manifest destiny.h3m
 100% - /home/appleyuchi/Heros3/maps/middletown.h3m
 100% - /home/appleyuchi/Heros3/maps/myth and legend.h3m
 100% - /home/appleyuchi/Heros3/maps/noahs ark.h3m
 100% - /home/appleyuchi/Heros3/maps/overthrow thy neighbors.h3m
 100% - /home/appleyuchi/Heros3/maps/peacemaker.h3m
 100% - /home/appleyuchi/Heros3/maps/pirates.h3m
 100% - /home/appleyuchi/Heros3/maps/race for ardintinny.h3m
 100% - /home/appleyuchi/Heros3/maps/realm of chaos.h3m
 100% - /home/appleyuchi/Heros3/maps/realm of chaosa.h3m
 100% - /home/appleyuchi/Heros3/maps/rebellion.h3m
 100% - /home/appleyuchi/Heros3/maps/rumble in the bogs.h3m
 100% - /home/appleyuchi/Heros3/maps/rumble in the bogsa.h3m
 100% - /home/appleyuchi/Heros3/maps/search for the grail.h3m
 100% - /home/appleyuchi/Heros3/maps/serpents treasure.h3m
 100% - /home/appleyuchi/Heros3/maps/southern cross.h3m
 100% - /home/appleyuchi/Heros3/maps/the five rings.h3m
 100% - /home/appleyuchi/Heros3/maps/the mandate of heaven.h3m
 100% - /home/appleyuchi/Heros3/maps/titans winter.h3m
 100% - /home/appleyuchi/Heros3/maps/tutorial.tut
 100% - /home/appleyuchi/Heros3/maps/unholy quest.h3m
 100% - /home/appleyuchi/Heros3/maps/vial of life.h3m
 100% - /home/appleyuchi/Heros3/maps/warlords.h3m
 100% - /home/appleyuchi/Heros3/maps/warlordsa.h3m
 100% - /home/appleyuchi/Heros3/maps/warmongers.h3m
 100% - /home/appleyuchi/Heros3/maps/when dragons clash.h3m
 100% - /home/appleyuchi/Heros3/maps/wings of war.h3m
 100% - /home/appleyuchi/Heros3/maps/xathras prize.h3m
Installing Sounds and Graphics ...
 100% - /home/appleyuchi/Heros3/data/h3bitmap.lod
 100% - /home/appleyuchi/Heros3/data/h3sprite.lod
 100% - /home/appleyuchi/Heros3/data/heroes3.snd
 100% - /home/appleyuchi/Heros3/data/video/cevil1.mjpg
 100% - /home/appleyuchi/Heros3/data/video/cevil2.mjpg
 100% - /home/appleyuchi/Heros3/data/video/cgood1.mjpg
 100% - /home/appleyuchi/Heros3/data/video/cgood2.mjpg
 100% - /home/appleyuchi/Heros3/data/video/cgood3.mjpg
 100% - /home/appleyuchi/Heros3/data/video/cneutral.mjpg
 100% - /home/appleyuchi/Heros3/data/video/credits.mjpg
 100% - /home/appleyuchi/Heros3/data/video/credits.pcx
 100% - /home/appleyuchi/Heros3/data/video/csecret.mjpg
 100% - /home/appleyuchi/Heros3/data/video/defendall.mjpg
 100% - /home/appleyuchi/Heros3/data/video/defendloop.mjpg
 100% - /home/appleyuchi/Heros3/data/video/lbloop.mjpg
 100% - /home/appleyuchi/Heros3/data/video/lbstart.mjpg
 100% - /home/appleyuchi/Heros3/data/video/losecslp.mjpg
 100% - /home/appleyuchi/Heros3/data/video/losecstl.mjpg
 100% - /home/appleyuchi/Heros3/data/video/pgtrnlft.mjpg
 100% - /home/appleyuchi/Heros3/data/video/pgtrnrgh.mjpg
 100% - /home/appleyuchi/Heros3/data/video/progressbar.mjpg
 100% - /home/appleyuchi/Heros3/data/video/rtloop.mjpg
 100% - /home/appleyuchi/Heros3/data/video/rtstart.mjpg
 100% - /home/appleyuchi/Heros3/data/video/surrender.mjpg
 100% - /home/appleyuchi/Heros3/data/video/tavern.mjpg
 100% - /home/appleyuchi/Heros3/data/video/win3.mjpg
Installing Music ...
 100% - /home/appleyuchi/Heros3/mp3/aitheme0.mp3
 100% - /home/appleyuchi/Heros3/mp3/aitheme1.mp3
 100% - /home/appleyuchi/Heros3/mp3/aitheme2.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic01.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic02.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic03.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic04.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic05.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic06.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic07.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic08.mp3
 100% - /home/appleyuchi/Heros3/mp3/campainmusic09.mp3
 100% - /home/appleyuchi/Heros3/mp3/combat01.mp3
 100% - /home/appleyuchi/Heros3/mp3/combat02.mp3
 100% - /home/appleyuchi/Heros3/mp3/combat03.mp3
 100% - /home/appleyuchi/Heros3/mp3/combat04.mp3
 100% - /home/appleyuchi/Heros3/mp3/cstletown.mp3
 100% - /home/appleyuchi/Heros3/mp3/defend castle.mp3
 100% - /home/appleyuchi/Heros3/mp3/dirt.mp3
 100% - /home/appleyuchi/Heros3/mp3/dungeon.mp3
 100% - /home/appleyuchi/Heros3/mp3/eviltheme.mp3
 100% - /home/appleyuchi/Heros3/mp3/fortresstown.mp3
 100% - /home/appleyuchi/Heros3/mp3/goodtheme.mp3
 100% - /home/appleyuchi/Heros3/mp3/grass.mp3
 100% - /home/appleyuchi/Heros3/mp3/infernotown.mp3
 100% - /home/appleyuchi/Heros3/mp3/lava.mp3
 100% - /home/appleyuchi/Heros3/mp3/looplepr.mp3
 100% - /home/appleyuchi/Heros3/mp3/lose campain.mp3
 100% - /home/appleyuchi/Heros3/mp3/losecastle.mp3
 100% - /home/appleyuchi/Heros3/mp3/losecombat.mp3
 100% - /home/appleyuchi/Heros3/mp3/mainmenu.mp3
 100% - /home/appleyuchi/Heros3/mp3/necrotown.mp3
 100% - /home/appleyuchi/Heros3/mp3/neutraltheme.mp3
 100% - /home/appleyuchi/Heros3/mp3/rampart.mp3
 100% - /home/appleyuchi/Heros3/mp3/retreat battle.mp3
 100% - /home/appleyuchi/Heros3/mp3/rough.mp3
 100% - /home/appleyuchi/Heros3/mp3/sand.mp3
 100% - /home/appleyuchi/Heros3/mp3/secrettheme.mp3
 100% - /home/appleyuchi/Heros3/mp3/snow.mp3
 100% - /home/appleyuchi/Heros3/mp3/stronghold.mp3
 100% - /home/appleyuchi/Heros3/mp3/surrender battle.mp3
 100% - /home/appleyuchi/Heros3/mp3/swamp.mp3
 100% - /home/appleyuchi/Heros3/mp3/towertown.mp3
 100% - /home/appleyuchi/Heros3/mp3/ultimatelose.mp3
 100% - /home/appleyuchi/Heros3/mp3/underground.mp3
 100% - /home/appleyuchi/Heros3/mp3/water.mp3
 100% - /home/appleyuchi/Heros3/mp3/win battle.mp3
 100% - /home/appleyuchi/Heros3/mp3/win scenario.mp3
Installing Videos ...
 100% - /home/appleyuchi/Heros3/data/heroes3cd.snd
 100% - /home/appleyuchi/Heros3/data/video/3dologo.mpg
 100% - /home/appleyuchi/Heros3/data/video/endgame.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil1a.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil1b.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil1c.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2a.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2ap1.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2ap2.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2b.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2c.mpg
 100% - /home/appleyuchi/Heros3/data/video/evil2d.mpg
 100% - /home/appleyuchi/Heros3/data/video/good1a.mpg
 100% - /home/appleyuchi/Heros3/data/video/good1b.mpg
 100% - /home/appleyuchi/Heros3/data/video/good1c.mpg
 100% - /home/appleyuchi/Heros3/data/video/good2a.mpg
 100% - /home/appleyuchi/Heros3/data/video/good2b.mpg
 100% - /home/appleyuchi/Heros3/data/video/good2c.mpg
 100% - /home/appleyuchi/Heros3/data/video/good2d.mpg
 100% - /home/appleyuchi/Heros3/data/video/good3a.mpg
 100% - /home/appleyuchi/Heros3/data/video/good3b.mpg
 100% - /home/appleyuchi/Heros3/data/video/good3c.mpg
 100% - /home/appleyuchi/Heros3/data/video/h3intro.mpg
 100% - /home/appleyuchi/Heros3/data/video/hsanim.mpg
 100% - /home/appleyuchi/Heros3/data/video/hsloop.mpg
 100% - /home/appleyuchi/Heros3/data/video/losegame.mpg
 100% - /home/appleyuchi/Heros3/data/video/neutrala.mpg
 100% - /home/appleyuchi/Heros3/data/video/neutralb.mpg
 100% - /home/appleyuchi/Heros3/data/video/neutralc.mpg
 100% - /home/appleyuchi/Heros3/data/video/nwclogo.mpg
 100% - /home/appleyuchi/Heros3/data/video/secreta.mpg
 100% - /home/appleyuchi/Heros3/data/video/secretb.mpg
 100% - /home/appleyuchi/Heros3/data/video/secretc.mpg
Would you like to view the README? [Y/n] Y

                        Heroes of Might and Magic III
                               Version 1.2
                              November 9 1999




       TABLE OF CONTENTS

       1 System Requirements
       2 Installation 
       3 Playing The Game
       4 Troubleshooting
       5 Contacting Loki Entertainment Software


-----------------------
(1) SYSTEM REQUIREMENTS
-----------------------
  Linux capable computer, Pentium class processor or better
  Linux kernel version 2.2.x
  32 MB RAM
  4x CD-ROM drive
  Video card capable of 800x600 resolution
  XFree86 version 3.2 or newer at 16 bpp.
  /dev/dsp sound device for audio
    (the Enlightenment Sound Daemon is supported as well).
  150 MB free hard disk space


------------------
(2) INSTALLATION
------------------

Mount the Heroes III CD and change the current directory to where
it is mounted.  Type 'sh setup.sh' to run the install script.

e.g.  Log in as root:
	mount /mnt/cdrom
	cd /mnt/cdrom
	sh setup.sh


--------------------
(3) PLAYING THE GAME
--------------------

    Run 'heroes3' to start the game.

    The first time you run Heroes III it will create a .loki/heroes3
    directory in your home directory.  Saved games and preferences will
    be stored here.

    The following arguments may be given to Heroes III:

        [-h | --help]       Display this help message
        [-v | --version]    Display the game version
        [-f | --fullscreen] Run the game fullscreen
        [-w | --windowed]   Run the game in a window
        [-s | --nosound]    Do not access the soundcard
        [-c | --nocdrom]    Do not access the CD-ROM

    Use Ctrl-G to toggle mouse grabbing.

    Use Ctrl-Z to iconify the game when it is run in a window.

    The Print Screen key will save the current screen to the ~/.loki/heroes3
    directory.

    If the Print Screen, Pause, or Alt-# keys are not working,
    make sure your window manager is not overriding them.

    String widgets have standard UNIX keybindings.

        Ctrl-A - Move to beginning of line
        Ctrl-E - Move to end of line
        Ctrl-B - Move backwards
        Ctrl-F - Move forwards
        Ctrl-U - Erase line
        Ctrl-D - Delete character
        Ctrl-C - Copy to X clipboard
        Ctrl-V - Paste from X clipboard

    Dragging the middle mouse button will move the playfield.


-------------------    
(4) TROUBLESHOOTING    
-------------------    
The following are some of the more common problems you might have, and
recommended solutions:

A) There is no game sound.

   First, check all your connections between your speakers and your 
   computer.  Make sure your speakers are turned on and receiving power.  
   Make sure the volume is not turned down all the way.  You can change
   sound and music volume in the 'Game Options' window.
   If none of the above suggestions works, try producing sound in another 
   program.  If that does not work, make sure you have the sound driver
   enabled in your kernel.  Finally, go to http://www.opensound.com/
   to see whether a commercial driver is available for your sound card.

B) Networking behind a firewall.

   Networking behind a masqueraded network works only for two players.

   If more than two players try to form a game, and one or more of them
   are on different masqueraded networks, then the game will drop all
   players but the host.

   Heroes III uses TCP port 4269 for it's networking connections.

------------------------------------------
(5) CONTACTING LOKI ENTERTAINMENT SOFTWARE
------------------------------------------

Technical Support
Support for Heroes of Might and Magic III is available from
Loki Entertainment Software at:

    Website:  http://www.lokigames.com/  Follow the links for support.

    Usenet:   news://news.lokigames.com/loki.games.heroes3

    Email:    [email protected]

    Phone:    801-356-7629. Telephone support is available between the hours 
              of 9 A.M. and 5 P.M. Mountain Standard Time.



Installation complete.
Would you like launch the game now? [Y/n] 
Creating Loki preferences directory: /home/appleyuchi/.loki/
Creating heroes3 preferences directory: /home/appleyuchi/.loki/heroes3
(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ 
(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ 
(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ 
(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ 
(python3.6) appleyuchi@ubuntu:英雄無敵修改版$ Couldn't open audio: Couldn't open audio device or ESD connection

5.然後上面報錯沒有聲音設備,我們接着研究:

下面兩條命令試了下,似乎是不行的,也沒起作用
modprobe snd-pcm-oss
modprobe snd-mixer-oss
下面的哪個包起作用了我不確定,我都安裝了,安裝後重啓遊戲就有聲音了.
apt install osspd pulseaudio-esound-compat
以上這些是用來增加聲音的
因爲用的是老系統的聲音設備.

啓動後效果如下:
在這裏插入圖片描述

Reference:
[1]https://askubuntu.com/questions/318396/oss-compat-package-does-not-create-dev-dsp

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章