pC.NET

Welcome to oscc.kr



 Netscape 4.76한글화시키는 방법
2021-08-01 09:52:33
Hit : 109

작성자 : 피시넷

Netscape 4.76한글화시키는 방법


다음의 문서는 Netscape 4.76을 한글화 시켜 설치하는 방법을 적고 있습니다.

o 필요한 화일
  1. netscape 4.76 배포판
  2. 최준호 님의 한글화 리소스
     (http://www.kr.freebsd.org/~cjh/freetime/mozilla/netscape-ko/
  3. 박원규님의 libnsfix 라이브러리
      (http://chem.skku.ac.kr/~wkpark/linux/archive/에서
              netscape-nsfix-20000913-1.src.rpm)

o 설치 방법.
  1. 일단 netscape 4.76을 설치합니다. 지금 이곳에서는 /usr/local/lib/nescape
     에 설치했다고 가정합니다.
 
  2. 한글 리소스 설치.
     % gunzip -c netscape-korean-kit-xxx.tar.gz | tar xvf -
     % cd netscape-korean-kit-xxx
     % vi install

---> [BEFORE] 이부분을 찾아서 바꾸시길 바랍니다.

NETHELP=nethelp-v451.nif

case `uname` in
HP-UX)
   ADLOC="/usr/lib/X11/ko_KR.eucKR/app-defaults";
   CFGLOC="/usr/lib/X11/ko_KR.eucKR/app-defaults";
   MISCLOC="/usr/lib/X11/ko_KR.eucKR/netscape";
   ;;
IRIX)
   ADLOC="/usr/lib/X11/ko_KR.EUC/app-defaults";
   CFGLOC="/usr/lib/X11/ko_KR.EUC/app-defaults";
   MISCLOC="/usr/lib/X11/ko_KR.EUC/netscape";
   ;;
OSF1)
   ADLOC="/usr/lib/X11/ko_KR/app-defaults";
   CFGLOC="/usr/lib/X11/ko_KR/app-defaults";
   MISCLOC="/usr/lib/X11/ko_KR/netscape";
   ;;
SunOS)
   ADLOC="/usr/openwin/lib/locale/ko/app-defaults";
   CFGLOC="/usr/openwin/lib/ko/app-defaults";
  MISCLOC="/usr/openwin/lib/locale/ko/netscape";
   ;;
FreeBSD|*)
   # Location for the apps-default file
   ADLOC="/usr/X11R6/lib/X11/${LANG}/app-defaults";
   # Location for the netscape.cfg file
   CFGLOC="/usr/lib/X11/${LANG}/app-defaults";
   # Location for some Misc pieces
   MISCLOC="/usr/X11R6/lib/X11/${LANG}/netscape";
   ;;
esac

--> [AFTER] 다음과 같이 고치십시요.
    
NETHELP=nethelp-v451.nif
PREFIX="/usr/local/lib/Netscape"

case `uname` in
HP-UX)
    uLANG="ko_KR.eucKR";
   ;;
IRIX)
    uLANG="ko_KR.eucKR";
   ;;
OSF1)
    uLANG="ko_KR";
   ;;
unOS)
    uLANG="ko";
   ;;
FreeBSD|*)
    uLANG=${LANG};
   ;;
esac

ADLOC="${PREFIX}/korean/app-defaults";
CFGLOC="${PREFIX}/korean/app-defaults";
MISCLOC="${PREFIX}/korean/netscape";


---> [BEFORE] 다음 부분도 찾아서 고치십시요.
echo ""
echo "Install completed. Don't forgot to see your platform-specfic"
echo "subdirectory(e.g. FreeBSD/README) for more information to"
echo "work in your platform environment."
echo ""
exit 0

---> [AFTER] 이렇게 고치십시요. (실제는 몇 줄 첨가하는 것입니다.)
# Default Locale Setting

if test ! -d "${PREFIX}/en_US/app-defaults"
then
   mkdir -p ${PREFIX}/en_US/app-defaults
fi
cp ${INSTALL_DIR}/Netscape.ad ${PREFIX}/en_US/app-defaults/Netscape

# For Other Korean Locale
cd ${PREFIX}
ln -s korean ${uLANG}
mv netscape netscape-communicator                   # ETC Procedure

echo ""
echo "Install completed. Don't forgot to see your platform-specfic"
echo "subdirectory(e.g. FreeBSD/README) for more information to"
echo "work in your platform environment."
echo ""
exit 0

---> [install script의 내용은 여기까지 입니다]

      그런 후 다음의 프로시져를 걸치십시요.

      % su
      # sh ./install
         netscape의 설치 디렉토리를 묻는 물음에는 /usr/local/lib/netscape으로
         답하시길 바랍니다.

      # vi /usr/local/bin/netscape

        다음의 내용을 netscpae이라는 이름으로 만들면 됩니다.
---> [netscape script 내용]

#!/bin/sh

set -e

#################
## Basic Setting
#################
prefix=$(dirname $(dirname $0))
MOZILLA_HOME=${prefix}/lib/netscape
prefdir=$HOME/.netscape
prefcpcK=${prefdir}/preferences.js
defs="-irix-session-management"
defsrem="irix-session-management -noraise -remote"
b_opt="openBrowser"


nlang=${LANG}

case "${LANG}" in
ko*)
   export LANG="ko_KR";
   nlang="korean"
   export LD_PRELOAD=${MOZILLA_HOME}/shlib/libnsfix.so.1;
   ;;
esac

NPX_PLUGIN_PATH=${prefdir}/plugins:${MOZILLA_HOME}/plugins
XUSERFILESEARCHPATH=${prefdir}/${nlang}/%T/%N:${MOZILLA_HOME}/${nlang}/%T/%N
XFILESEARCHPATH=${XUSERFILESEARCHPATH}:${XFILESEARCHPATH}
LD_LIBRARY_PATH=${MOSZILLA_HOME}:${LD_LIBRARY_PATH}

export MOZILLA_HOME
export NPX_PLUGIN_PATH
export XUSERFILESEARCHPATH
export XFILESEARCHPATH
export LD_LIBRARY_PATH

#########################
# Korean Language Setting
#########################


netscape=""
if echo $0 | grep 'navigator' >/dev/null; then
    netscape=${prefix}/lib/netscape/netscape-navigator
elif echo $0 | grep 'communicator' >/dev/null ; then
    netscape=${prefix}/lib/netscape/netscape-communicator
elif [ -x ${prefix}/lib/netscape/netscape-communicator ]; then
    netscape=${prefix}/lib/netscape/netscape-communicator
elif [ -x ${prefix}/lib/netscape/netscape-navigator ]; then
    netscape=${prefix}/lib/netscape/netscape-navigator
else
    echo "You don't seem to have netscape installed."
    exit 1
fi

procname=$netscape
#procname=${prefix}/lib/netscape/netscape-dyMotif

#if [ "$sysname" = "sparc" ]; then
#   export LD_PRELOAD=libBrokenLocale.so.1
#fi

# This couldn't hurt.
export MOZILLA_LINUX_INSERT_LINK_FIX=1

# Exterminate zombie netscapes, and wipe stale lock file.
killstale () {

        user="`whoami`"
        ourpids="`/sbin/pidof $procname`"
        [ "$ourpids" != "" ] && ourpids=`ps u $ourpids | sed -n "s/^$user[ ]*\([^ ]*\)[ ].*/\1/p"`
       
        for p in $ourpids; do
                [ "$p" = "" ] && continue
                # int, quit, term, kill
                { kill -2 $p && kill -3 $p && kill -15 $p && sleep 2 && kill -9 $p ; } >/dev/null 2>&1
        done

        [ -L "$HOME/.netscape/lock" ] && rm "$HOME/.netscape/lock"
       
        return 0
}

# Check the netscape lock file
checklock () {
        lock=`ls -l $HOME/.netscape/lock | awk '{ print $11 }'`
        # Don't check the IP address; it may have changed.
        #ipaddr=`echo $lock | awk -F : '{ print $1 }'`
        pid=`echo $lock | awk -F : '{ print $2 }'`
        #/sbin/ifconfig | grep -q "inet addr:$ipaddr" && \
        pids=`/sbin/pidof $procname`
        for apid in $pids ; do
          [ "$pid" = "$apid" ] && return 0
        done
        killstale
        return 1
}

# Try calling existing netscape process with functions, else start one.
newbrowser () {
        [ $# -gt 0 ] && url=`echo $@ | sed 's/\ -[^ ]*//g; s/\( |        \)*//'`
        if [ -L "$HOME/.netscape/lock" ] && checklock; then
                if [ "$url" = "" ]; then
                        $netscape $defsrem "xfeDoCommand($b_opt)" "$@" 2>/dev/null || \
                        { killstale && exec $netscape $defs $cl_opt "$@" ; }
                else
                        $netscape $defsrem "xfeDoCommand(openBrowser)" 2>/dev/null && \
                                $netscape $defsrem "openURL($url)"  2>/dev/null || \
                        { killstale && exec $netscape $defs "$@" ; }
                fi
        else
                if [ "$url" = "" ]; then
                        [ ${rerun:=0} -eq 1 ] && { sleep 3; $netscape $defsrem "xfeDoCommand($b_opt)" '$@' 2>/dev/null ; } &
                            exec $netscape $defs $cl_opt "$@"
                else
                            exec $netscape $defs "$@"
                fi       
        fi
}

newopt () {
opt="$1"
shift
        case "$opt" in
                "+news"|"+discussions") b_opt="openNewsgroups"        ; cl_opt="-discussions" ;;
                "+mail"|"+messenger")        b_opt="openInbox"        ; cl_opt="-messenger"        ;;
                "+edit"|"+composer")        b_opt="openEditor"        ; cl_opt="-composer"        ;;
                "+addr"|"+addresses")        b_opt="openAddrBook"        ; cl_opt="-messenger -iconic"        ; rerun=1        ;;
                "+hist"|"+history")        b_opt="openHistory"        ; cl_opt="-iconic"                ; rerun=1        ;;
                "+book"|"+bookmarks")        b_opt="openBookmarks"        ; cl_opt="-iconic"                ; rerun=1        ;;
                "+mailto")                b_opt="composeMessage"        ; cl_opt="-messenger -iconic"        ; rerun=1        ;;
                "+component-bar")        b_opt="toggleTaskbar"        ; cl_opt="-component-bar";;
        esac
        newbrowser "$@"
}

oldopt () {
          exec $netscape $defs "$@"
}

usage () {
        echo ""
        echo "Netscape Wrapper $ver, $ts"
        echo "        (c) 1998,1999 Dave Cinege, H. Peter Anvin, and Red Hat, Inc."
        echo ""
        echo "usage: netscape [ option ]"
        echo "  options:"
        echo ""
        echo "    [none]                Open new browser"
        echo "    [URL]                 Open new browser with URL"        
        echo "    +news | +discussions  Show Collabra Discussions"
        echo "    +mail | +messenger    Show Messenger Mailbox (INBOX)"
        echo "    +edit | +composer     Open Composer"               
        echo "    +addr | +addresses    Show Address Book"
        echo "    +hist | +history      Open History window"
        echo "    +book | +bookmarks    Open Bookmarks windowsBook"
        echo "    +mailto               Open New Message window"
        echo "    +component-bar        Show (detach) Component Lauch Bar"
        echo "    -[option]             Passed directly to Netscape binary"
        echo ""
        echo "The wrapper first attempts to open the option in a running"
        echo "netscape. If no netscape is running, one is executed with"
        echo "the option as the starting window."
        echo ""
        echo "Edit the top of this file to set default paths."
        echo ""
        echo ""
        echo "Netscape binary help:"
        echo ""
        exec $netscape "-help"
}

#
# Fix "locale" problems when printing to postscript
#
# If the locale uses a decimal separator other than a point printf
# will return something other than 1.0
#

pnt=`printf "%1.1f" 1 2>/dev/null`
if [ "$pnt" != "1.0" ]; then
        export LC_NUMERIC=C                # Try a "safe" value for LC_NUMERIC.

        pnt=`printf "%1.1f" 1 2>/dev/null`
        if [ "$pnt" != "1.0" ]; then        #  LC_ALL is bad.
                 LC_COLLATE=$LC_ALL        #  Set $LC_ALL for every category except
                LC_CTYPE=$LC_ALL        #  LC_NUMERIC, and then unset LC_ALL.
                LC_MESSAGES=$LC_ALL
                LC_MONETARY=$LC_ALL
                LC_TIME=$LC_ALL
                unset LC_ALL
                export LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_CTIME
        fi
fi


# Make user copy of default files unless they already exist

if [ ! -f $prefcpck ]; then
        [ ! -d $prefdir ] && mkdir -p $prefdir
        pwd=`pwd`
       
        for pdir in $prefskel; do
                [ ! -d $pdir ] && continue
                cd $pdir
                for i in *; do
                        [ ! -f $prefdir/$i ] && cp $i $prefdir/$i
                   done
        done
       
        touch $prefcpck                #safer, slower then this?   #echo -n "" >>$prefcpck
            cd $pwd
fi

# set up home page
#HOMEPAGE=/usr/share/doc/HTML/index.html
#if [ -f $pref ]; then
#    if egrep "\"browser.startup.(homepage|page)\"" \
#    $pref > /dev/null; then
#        HOMEPAGE=""
#    fi
#fi

# main

case "$1" in
        +*)        newopt "$@"; exit        ;;
        -h|-help|--help) usage; exit        ;;
        -*)        oldopt "$@"; exit        ;;
        *)        [ -z "$*"  -a -n "$HOMEPAGE" ] && newbrowser "$HOMEPAGE" || newbrowser "$@"; exit        ;;
esac       

echo "An error occurred running $netscape."

----> [netscape script] 화일의 내용은 여기까지 입니다.
  
      # cd /usr/local/bin
      # chmod a+x netscape
      # ln -s netscape netscape-communicator

   3. 박원규님의 libnsfix 설치하기
      위에서 말한 netscape-nsfix-20000913-1.src.rpm을 받아 옵니다. 직접
      컴파일 해서 쓰는 것이 좋습니다.
     
      % su
      # rpm -Uvh netscape-nsfix-20000913-1.src.rpm
      # exit              <- 일반 사용자로 하시는 것이 좋습니다.
      % cp /usr/src/redhat/SOURCES/libnsfix-xxx.tar.gz .
      % gunzip -c libnsfix-xxx.tar.gz | tar xvf -
      % cd libnsfix-xxx
      % make CC=egcs      <- RH 7.0에서 문제가 생겨서 다음과 같이하는 것입니다.
        에러 메세지가 뜨지만 상관하지 않으셔도 됩니다.
      % su
      # mkdir /usr/local/lib/netscape/shlib
      # cp libnsfix.so.1 /usr/local/lib/netscape/shlib


  피시넷
안녕하세요.
피시넷입니다.

 2830
 41


적수네 동네 팁 게시판
텍스트 화일에서 ^M 빼기

Copyright (C) 1997-2025 All Rights Reserved.

Powered by
DNS server, DNS service 우분투 리눅스 웹서비스 AbuseIPDB Contributor Badge