Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First Attempt to run EmacsPortable under Linux. Compiled under
precise puppy. (Issue #9)
- Loading branch information
1 parent
d8fb7ab
commit b5d72fa
Showing
10 changed files
with
215 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
#!/bin/bash --login | ||
|
||
EMACSDIR=`dirname $0` | ||
if [ $EMACSDIR = "." ]; then | ||
EMACSDIR=`pwd` | ||
fi | ||
EPUSB=`echo $EMACSDIR | sed 's/\(\/mnt\/[^\/]*\/\).*/\1/'` | ||
EPOTHER=`echo $EMACSDIR | sed 's/\/App.*/\/Other\//'` | ||
DICPATH=`echo $EMACSDIR | sed 's/\/App.*/\/App\/hunspell\/epdic/'` | ||
DATPATH=`echo $EMACSDIR | sed 's/\/App.*/\/Data/'` | ||
EXEDIR=`echo $EMACSDIR | sed 's/\/App.*/\//'` | ||
OHOME=$HOME | ||
TEMP=/tmp/ | ||
|
||
##Get what version of Emacs is specified. | ||
EMACSAPP=`echo $EMACSDIR | sed 's/\/App.*/\/App/'` | ||
EMACSDAT=`echo $EMACSDIR | sed 's/\/App.*/\/Data/'` | ||
|
||
cp $EMACSDAT/ini/EmacsPortableApp.ini /tmp/epi.ini | ||
|
||
EPINI=/tmp/epi.ini | ||
EMACSVER=`cat $EPINI | grep "[Ll]inux[vV]ersion *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
GEOMETRY=`cat $EPINI | grep "[Gg]eometry *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
FOREGROUND=`cat $EPINI | grep "[Ff]oreground *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
BACKGROUND=`cat $EPINI | grep "[Bb]ackground *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
|
||
MAXIMIZED=`cat $EPINI | grep "[Mm]ax *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
|
||
FULLWIDTH=`cat $EPINI | grep "[Ff]ull[Ww]idth *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
|
||
FULLHEIGHT=`cat $EPINI | grep "[Ff]ull[Hh]eight *= *" | tr -d '\15' | cut -f 2 -d "="` | ||
EPSTART=`cat $EPINI | grep "[Ss]tartup *= *" | tr -d \15 | cut -f 2 -d "="` | ||
|
||
OPT="" | ||
|
||
## if [ "$GEOMETRY" != "" ]; then | ||
## OPT="$OPT --geometry $GEOMETRY" | ||
## fi | ||
|
||
if [ "$FOREGROUND" != "" ]; then | ||
OPT="$OPT -fg $FOREGROUND" | ||
fi | ||
|
||
if [ "$BACKGROUND" != "" ]; then | ||
OPT="$OPT -bg $BACKGROUND" | ||
fi | ||
|
||
## if [ "$MAXIMIZED" == "1" ]; then | ||
## OPT="$OPT -mm" | ||
## fi | ||
|
||
## if [ "$FULLWIDTH" == "1" ]; then | ||
## OPT="$OPT -fw" | ||
## fi | ||
|
||
## if [ "$FULLHEIGHT" == "1" ]; then | ||
## OPT="$OPT -fh" | ||
## fi | ||
|
||
## Set Emacs Specific Directories | ||
|
||
|
||
EMACSDATA="${EMACSAPP}/emacs-${EMACSVER}/etc" | ||
EMACSDOC="${EMACSAPP}/emacs-${EMACSVER}/etc" | ||
|
||
EMACSLOADPATH=$EMACSAPP/emacs-$EMACSVER/lisp/:$EMACSAPP/site-lisp/ | ||
|
||
EMACSDIR=$EMACSAPP/emacs-$EMACSVER/linux/bin | ||
|
||
|
||
OPHOME=`cat $EPINI | egrep "[Hh]ome *= *" | tr -d '\15' | cut -f 2 -d "=" | sed 's/\\\\/\\//g' | sed 's/\\/$//'` | ||
|
||
OPTYPE=`echo $OPHOME | sed 's/\(USB\).*/\1/' | sed 's/\(EXEDIR\).*/\1/'` | ||
|
||
if [ "$OPTYPE" == "EXEDIR" ]; then | ||
OPHOME=`echo $OPHOME | sed 's/EXEDIR:\///'` | ||
HOME="$EXEDIR$OPHOME" | ||
export HOME | ||
fi | ||
|
||
if [ "$OPTYPE" == "USB" ]; then | ||
OPHOME=`echo $OPHOME | sed 's/USB:\///'` | ||
HOME="$EPUSB$OPHOME" | ||
export HOME | ||
fi | ||
|
||
#HOME=$EPUSB/Documents | ||
|
||
echo HOME: $HOME | ||
echo OPHOME: $OPHOME | ||
echo OPTYPE: $OPTYPE | ||
echo EPUSB: $EPUSB | ||
echo EPOTHER: $EPOTHER | ||
echo TEMP: $TEMP | ||
echo DICPATH: $DICPATH | ||
#echo PATH: $PATH | ||
echo EMACSDIR: $EMACSDIR | ||
|
||
echo EMACSVER: $EMACSVER | ||
|
||
echo EMACSAPP: $EMACSAPP | ||
echo EMACSDATA: $EMACSDATA | ||
echo EMACSLOADPATH: $EMACSLOADPATH | ||
echo GEOMETRY: $GEOMETRY | ||
echo FOREGROUND: $FOREGROUND | ||
echo BACKGROUND: $BACKGROUND | ||
echo OPT: $OPT | ||
echo DATPATH: $DATPATH | ||
echo EPSTART: $EPSTART | ||
|
||
EPSTARTDIR=$EMACSAPP/../Data/start/$EPSTART | ||
echo EPSTARTDIR: $EPSTARTDIR | ||
|
||
if [ -e $DATPATH/ini/Environment.ini ]; then | ||
rm /tmp/ep-environment.sh | ||
sed 's/\[[Ee]nvironment\]/#!\/bin\/bash/' $DATPATH/ini/Environment.ini | sed 's/\(.*\)=\(.*\)/\1="\2"; export \1/' > /tmp/ep-environment.sh | ||
echo "" >> /tmp/ep-environment.sh | ||
./flip.osx -u /tmp/ep-environment.sh | ||
source /tmp/ep-environment.sh | ||
fi | ||
|
||
if [ -e $DATPATH/start/shared/Environment.ini ]; then | ||
rm /tmp/ep-environment.sh | ||
sed 's/\[[Ee]nvironment\]/#!\/bin\/bash/' $DATPATH/start/shared/Environment.ini | sed 's/\(.*\)=\(.*\)/\1="\2"; export \1/' > /tmp/ep-environment.sh | ||
echo "" >> /tmp/ep-environment.sh | ||
source /tmp/ep-environment.sh | ||
fi | ||
|
||
|
||
echo ERGOEMACS_KEYBOARD_LAYOUT: $ERGOEMACS_KEYBOARD_LAYOUT | ||
|
||
export OHOME | ||
export EPUSB | ||
export EPOTHER | ||
export TEMP | ||
export DICPATH | ||
export PATH | ||
export EMACSDIR | ||
export EMACSDATA | ||
export EMACSLOADPATH | ||
export EMACSDOC | ||
export EMACSVER | ||
export EPSTART | ||
export EPSTARTDIR | ||
|
||
REALVER=`$EMACSDIR/emacs-$EMACSVER --version 2>&1 | head -n1 | sed 's/[^0-9]*\([0-9].*\)/\1/'` | ||
|
||
|
||
echo REALVER: $REALVER | ||
## | ||
if ! [ -e $EMACSDATA/DOC-$REALVER ]; then | ||
cp $EMACSDATA/DOC-X $EMACSDATA/DOC-$REALVER | ||
fi | ||
echo $OPT | ||
rm $EPINI | ||
$EMACSDIR/emacs-$EMACSVER $OPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0"?> | ||
<AppInfo> | ||
<Summary xml:lang="en">EmacsPortable.App is a portable, extensible, | ||
customizable text editor -- and more.</Summary> | ||
<About xml:lang="en"> | ||
<Purpose>Text Editor</Purpose> | ||
<Authors>Matthew Fidler and Gnu Emacs team</Authors> | ||
<License>GNU General Public License v3</License> | ||
<Homepage>https://github.com/mlf176f2/EmacsPortable.App/</Homepage> | ||
</About> | ||
</AppInfo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
SOURCE="${BASH_SOURCE[0]}" | ||
DIR="$( dirname "$SOURCE" )" | ||
while [ -h "$SOURCE" ] | ||
do | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
cd $DIR/App/linux | ||
./EmacsPortable $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Desktop Entry] | ||
Name=EmacsPortable.App | ||
GenericName=Text Editor | ||
Comment=Edit text | ||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; | ||
Exec=./AppRun %F | ||
Icon=./.DirIcon | ||
Type=Application | ||
Terminal=false | ||
Categories=Development;TextEditor; | ||
StartupWMClass=Emacs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters