forked from FG42/FG42
installer script changed to support remote installation.
This commit is contained in:
parent
8e3362f944
commit
7784391e9d
18
.hgignore
18
.hgignore
|
@ -1,18 +0,0 @@
|
||||||
.pydevproject
|
|
||||||
.pida-metadata
|
|
||||||
.pida-metadata/python/*
|
|
||||||
.pida-metadata/*
|
|
||||||
.DS_Store
|
|
||||||
syntax: glob
|
|
||||||
*.pyc
|
|
||||||
*~
|
|
||||||
\#*
|
|
||||||
\.\#*
|
|
||||||
.settings/*
|
|
||||||
*Thumbs.db
|
|
||||||
*.swp
|
|
||||||
*.kpf
|
|
||||||
*.log
|
|
||||||
*.e4p
|
|
||||||
*.wpr
|
|
||||||
data/*
|
|
2
bin/kuso
2
bin/kuso
|
@ -1,3 +1,3 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
emacs --title KusoIDE -q -l ~/.kuso $1
|
emacs --no-splash --name KusoIDE --title KusoIDE -q -l ~/.kuso $1
|
||||||
|
|
308
conf/dotkuso
308
conf/dotkuso
|
@ -1,300 +1,12 @@
|
||||||
;; Setup load directory
|
(add-to-list 'load-path "--REPO--")
|
||||||
(add-to-list 'load-path "~/.kuso.d/")
|
|
||||||
|
|
||||||
;; General configuration ---------------------------------------------------------
|
(setq developer-name "--FULLNAME--")
|
||||||
(tool-bar-mode -1)
|
(setq developer-email "--EMAIL--")
|
||||||
(scroll-bar-mode -1)
|
(setq kuso-workspace "--WORKSPACE--")
|
||||||
(setq x-select-enable-clipboard t)
|
|
||||||
(column-number-mode t)
|
|
||||||
(global-linum-mode)
|
|
||||||
|
|
||||||
;; Setting up color them -------------------------------------------------------
|
(setq el-get-dir "--REPO--/el-get/")
|
||||||
(eval-after-load "color-theme"
|
(url-retrieve
|
||||||
'(progn
|
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
|
||||||
(color-theme-initialize)
|
(lambda (s)
|
||||||
(color-theme-tomorrow-night-eighties)
|
(goto-char (point-max))
|
||||||
))
|
(eval-print-last-sexp)))
|
||||||
|
|
||||||
;; Setting up customization -----------------------------------------------------
|
|
||||||
(custom-set-variables
|
|
||||||
;; custom-set-variables was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
'(c-plugin nil)
|
|
||||||
;'(color-theme-selection "Arjen" nil (color-theme_seldefcustom))
|
|
||||||
'(developer-email "--EMAIL--")
|
|
||||||
'(developer-name "--FULLNAME--")
|
|
||||||
'(kuso-workspace "--WORKSPACE--")
|
|
||||||
'(face-font-family-alternatives (quote (("courier" "Monospace" "fixed") ("courier" "CMU Typewriter Text" "fixed") ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed"))))
|
|
||||||
'(inhibit-startup-screen t)
|
|
||||||
'(rng-nxml-auto-validate-flag nil))
|
|
||||||
(custom-set-faces
|
|
||||||
;; custom-set-faces was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
|
||||||
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
|
||||||
|
|
||||||
(set-frame-font "Terminus-9")
|
|
||||||
|
|
||||||
;; HideShow --------------------
|
|
||||||
(load-library "hideshow")
|
|
||||||
(global-set-key (kbd "C-\-") 'hs-toggle-hiding)
|
|
||||||
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
|
||||||
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'java-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'python-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'js-mode-hook 'hs-minor-mode)
|
|
||||||
|
|
||||||
(require 'fringe-helper)
|
|
||||||
(autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
|
|
||||||
(autoload 'hideshowvis-minor-mode
|
|
||||||
"hideshowvis"
|
|
||||||
"Will indicate regions foldable with hideshow in the fringe."
|
|
||||||
'interactive)
|
|
||||||
(dolist (hook (list 'emacs-lisp-mode-hook
|
|
||||||
'c++-mode-hook
|
|
||||||
'python-mode-hook))
|
|
||||||
(add-hook hook 'hideshowvis-enable))
|
|
||||||
|
|
||||||
|
|
||||||
;; auto complete ------------------------------------------------------------
|
|
||||||
(require 'auto-complete-config)
|
|
||||||
(add-to-list 'ac-dictionary-directories "~/.kuso.d/ac-dict")
|
|
||||||
(ac-config-default)
|
|
||||||
|
|
||||||
(global-auto-complete-mode t)
|
|
||||||
|
|
||||||
;;dabbrev;;
|
|
||||||
;; dabbrev configuration ----------------------------------------------------------
|
|
||||||
(require 'ac-dabbrev)
|
|
||||||
(setq ac-sources
|
|
||||||
(list ac-source-dabbrev
|
|
||||||
))
|
|
||||||
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
|
||||||
;;/dabbrev;;
|
|
||||||
|
|
||||||
;; ssh configuration ---------------------------------------------------------
|
|
||||||
(setq tramp-default-method "ssh")
|
|
||||||
|
|
||||||
;;python-mode;;
|
|
||||||
;; python configuration ------------------------------------------------------
|
|
||||||
(autoload 'python-mode "python-mode" "Python Mode." t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
|
||||||
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
|
||||||
(require 'python-mode)
|
|
||||||
(define-key py-mode-map (kbd "\C-c @") 'uncomment-region)
|
|
||||||
|
|
||||||
(autoload 'python-pylint "python-pylint")
|
|
||||||
(autoload 'pylint "python-pylint")
|
|
||||||
|
|
||||||
;;/python-mode;;
|
|
||||||
|
|
||||||
;;python-autocomplete;;
|
|
||||||
;; python autocomplete -------------------------------------------------------
|
|
||||||
(require 'deferred)
|
|
||||||
(require 'epc)
|
|
||||||
(autoload 'jedi:setup "jedi" nil t)
|
|
||||||
(add-hook 'python-mode-hook 'jedi:setup)
|
|
||||||
(setq jedi:setup-keys t)
|
|
||||||
;;/python-autocomplete;;
|
|
||||||
|
|
||||||
;;php-mode;;
|
|
||||||
;; php-mode -------------------------------------------------------------------
|
|
||||||
(autoload 'php-mode "php-mode" "PHP editing mode" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
|
|
||||||
;;/php-mode;;
|
|
||||||
|
|
||||||
|
|
||||||
;;yasnippet;;
|
|
||||||
;; yasnippet configuration ----------------------------------------------------
|
|
||||||
(require 'yasnippet)
|
|
||||||
(yas/initialize)
|
|
||||||
(yas/load-directory "~/.kuso.d/snippets")
|
|
||||||
;;/yasnippet;;
|
|
||||||
|
|
||||||
;; flymake --------------------------------------------------------------------
|
|
||||||
(require 'flymake)
|
|
||||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
|
||||||
|
|
||||||
;; pyflymake ------------------------------------------------------------------
|
|
||||||
(when (load "flymake" t)
|
|
||||||
(defun flymake-pyflakes-init ()
|
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
|
||||||
'flymake-create-temp-inplace))
|
|
||||||
(local-file (file-relative-name
|
|
||||||
temp-file
|
|
||||||
(file-name-directory buffer-file-name))))
|
|
||||||
(list "--ADDR--/pyemacs.sh" (list local-file))))
|
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
|
||||||
'("\\.py$" flymake-pyflakes-init)))
|
|
||||||
|
|
||||||
;; html flymake ---------------------------------------------------------------
|
|
||||||
(defun flymake-html-init ()
|
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
|
||||||
'flymake-create-temp-inplace))
|
|
||||||
(local-file (file-relative-name
|
|
||||||
temp-file
|
|
||||||
(file-name-directory buffer-file-name))))
|
|
||||||
(list "tidy" (list local-file))))
|
|
||||||
|
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
|
||||||
'("\\.html$\\|\\.ctp" flymake-html-init))
|
|
||||||
|
|
||||||
(add-to-list 'flymake-err-line-patterns
|
|
||||||
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
|
|
||||||
nil 1 2 4))
|
|
||||||
|
|
||||||
l;; css flymake -----------------------------------------------------------------
|
|
||||||
(defun flymake-css-init ()
|
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
|
||||||
'flymake-create-temp-inplace))
|
|
||||||
(local-file (file-relative-name
|
|
||||||
temp-file
|
|
||||||
(file-name-directory buffer-file-name))))
|
|
||||||
(list "cssparse" (list local-file))))
|
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
|
||||||
'("\\.css$" flymake-css-init))
|
|
||||||
(add-to-list 'flymake-err-line-patterns
|
|
||||||
'("\\(.*\\) \\[\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)\\]"
|
|
||||||
nil 2 3 1))
|
|
||||||
(add-hook 'css-mode-hook
|
|
||||||
(lambda () (flymake-mode t)))
|
|
||||||
|
|
||||||
;; flymake shortkeys --------------------------------------------------------------
|
|
||||||
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
|
||||||
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
|
||||||
|
|
||||||
;; JS folding
|
|
||||||
(add-hook 'js-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
;; Scan the file for nested code blocks
|
|
||||||
(imenu-add-menubar-index)
|
|
||||||
;; Activate the folding mode
|
|
||||||
(hs-minor-mode t)))
|
|
||||||
|
|
||||||
|
|
||||||
;;clang-mode;;
|
|
||||||
;; C configuration ----------------------------------------------------------------
|
|
||||||
;; clang auto completion
|
|
||||||
(require 'auto-complete-clang)
|
|
||||||
(setq clang-completion-suppress-error 't)
|
|
||||||
|
|
||||||
(defun my-c-mode-common-hook()
|
|
||||||
(setq ac-auto-start nil)
|
|
||||||
(setq ac-expand-on-auto-complete nil)
|
|
||||||
(setq ac-quick-help-delay 0.3)
|
|
||||||
(define-key c-mode-base-map (kbd "M-3") 'ac-complete-clang)
|
|
||||||
)
|
|
||||||
|
|
||||||
;; Linux style for c programming ------------------------------------------------
|
|
||||||
(setq c-default-style '((java-mode . "java")
|
|
||||||
(awk-mode . "awk")
|
|
||||||
(other . "linux")))
|
|
||||||
|
|
||||||
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
|
||||||
;;/clang-mode;;
|
|
||||||
|
|
||||||
;; KUSO configuration ------------------------------------------------------------
|
|
||||||
(load-file "--KUSOHOME--/src/kuso-ide.el")
|
|
||||||
(kuso-mode)
|
|
||||||
|
|
||||||
|
|
||||||
;;org-mode;;
|
|
||||||
;; org-mode ------------------------------------------------------
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
|
||||||
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when(global-set-key "\C-cl" 'org-store-link)
|
|
||||||
(global-set-key "\C-ca" 'org-agenda)
|
|
||||||
(global-set-key "\C-cb" 'org-iswitchb)
|
|
||||||
|
|
||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
|
||||||
;;/org-mode;;
|
|
||||||
|
|
||||||
;;cedet;;
|
|
||||||
;; Configuring ECB and CEDET
|
|
||||||
(load-file "~/.kuso.d/cedet/cedet-devel-load.el")
|
|
||||||
(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode t)
|
|
||||||
(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode t)
|
|
||||||
|
|
||||||
(global-ede-mode 1)
|
|
||||||
(semantic-load-enable-code-helpers)
|
|
||||||
(global-srecode-minor-mode 1)
|
|
||||||
(add-to-list 'load-path "~/.kuso.d/ecb/")
|
|
||||||
(require 'ecb)
|
|
||||||
;;/cedet;;
|
|
||||||
|
|
||||||
;;lua-mode;;
|
|
||||||
;; Lua mode --------------------
|
|
||||||
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
|
||||||
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
|
||||||
(add-hook 'lua-mode-hook 'hs-minor-mode)
|
|
||||||
;;/lua-mode;;
|
|
||||||
|
|
||||||
;; JS folding ----------------
|
|
||||||
(add-hook 'js-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
;; Scan the file for nested code blocks
|
|
||||||
(imenu-add-menubar-index)
|
|
||||||
;; Activate the folding mode
|
|
||||||
(hs-minor-mode t)))
|
|
||||||
|
|
||||||
|
|
||||||
;; Yaml mode --------------------------------------
|
|
||||||
(require 'yaml-mode)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
|
|
||||||
|
|
||||||
(add-hook 'yaml-mode-hook
|
|
||||||
'(lambda ()
|
|
||||||
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
|
|
||||||
|
|
||||||
;;git-gutter;;
|
|
||||||
;; git-gutter ------------------
|
|
||||||
(require 'git-gutter)
|
|
||||||
(require 'git-gutter-fringe)
|
|
||||||
|
|
||||||
(global-git-gutter-mode t)
|
|
||||||
|
|
||||||
(add-hook 'ruby-mode-hook 'git-gutter-mode)
|
|
||||||
(add-hook 'python-mode-hook 'git-gutter-mode)
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-x C-g") 'git-gutter:toggle)
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-x p") 'git-gutter:previous-diff)
|
|
||||||
(global-set-key (kbd "C-x n") 'git-gutter:next-diff)
|
|
||||||
;;/git-gutter;;
|
|
||||||
|
|
||||||
;; Yaml mode --------------------------------------
|
|
||||||
(require 'yaml-mode)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
|
|
||||||
|
|
||||||
(add-hook 'yaml-mode-hook
|
|
||||||
'(lambda ()
|
|
||||||
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
|
|
||||||
|
|
||||||
|
|
||||||
(autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t)
|
|
||||||
(autoload 'inf-ruby-setup-keybindings "inf-ruby" "" t)
|
|
||||||
(eval-after-load 'ruby-mode
|
|
||||||
'(add-hook 'ruby-mode-hook 'inf-ruby-setup-keybindings))
|
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.kuso.d/rinari")
|
|
||||||
(require 'rinari)
|
|
||||||
|
|
||||||
(setq rinari-tags-file-name "TAGS")
|
|
||||||
|
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.kuso.d/rhtml")
|
|
||||||
(require 'rhtml-mode)
|
|
||||||
(add-hook 'rhtml-mode-hook
|
|
||||||
(lambda () (rinari-launch)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(show-paren-mode t)
|
|
||||||
|
|
57
install.sh
57
install.sh
|
@ -1,11 +1,17 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
VERSION=$(emacs -l src/lib/version.el --eval "(princ (get_version))" --batch -Q)
|
VERSION=1.0.0
|
||||||
|
|
||||||
|
remoteconffile=
|
||||||
|
remoteexecutable=
|
||||||
|
|
||||||
|
conffile=conf/dotkuso
|
||||||
|
|
||||||
# Gathering informations
|
# Gathering informations
|
||||||
echo -e "\n\tKuso IDE $VERSION copyright 2010-2011 Sameer Rahmani <lxsameer@gnu.org>\n\n"
|
echo -e "\n\033[01;32mKuso IDE\033[00m $VERSION copyright 2010-2013 \033[01;34mSameer Rahmani <lxsameer@gnu.org>\033[00m\n\n"
|
||||||
echo "Enter requested informations. You can change it later in top"
|
echo "Enter requested informations. You can change it later in top"
|
||||||
echo -e "level customization.\n\n"
|
echo -e "your init file.\n\n"
|
||||||
|
|
||||||
condition="1"
|
condition="1"
|
||||||
while [ "$condition" == "1" ] ; do
|
while [ "$condition" == "1" ] ; do
|
||||||
read -p "Do you want to install Kuso IDE as an stand alone application ([y]/n)? " standalone
|
read -p "Do you want to install Kuso IDE as an stand alone application ([y]/n)? " standalone
|
||||||
|
@ -13,10 +19,10 @@ while [ "$condition" == "1" ] ; do
|
||||||
if [ "$standalone" == "" -o "$standalone" == "y" ]
|
if [ "$standalone" == "" -o "$standalone" == "y" ]
|
||||||
then
|
then
|
||||||
standalone="y"
|
standalone="y"
|
||||||
dotemacs=~/.kuso
|
dotemacs=~/.kuso_dev
|
||||||
repo=~/.kuso.d
|
repo=~/.kuso.d_dev
|
||||||
condition="0"
|
condition="0"
|
||||||
conffile=conf/dotkuso
|
executable=kuso-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$standalone" == "n" ]
|
if [ "$standalone" == "n" ]
|
||||||
|
@ -24,9 +30,9 @@ while [ "$condition" == "1" ] ; do
|
||||||
dotemacs=~/.emacs
|
dotemacs=~/.emacs
|
||||||
repo=~/.emacs.d
|
repo=~/.emacs.d
|
||||||
condition="0"
|
condition="0"
|
||||||
conffile=conf/dotemacs
|
|
||||||
|
executable=emacs-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
done
|
done
|
||||||
read -p "Enter your full name: " fullname
|
read -p "Enter your full name: " fullname
|
||||||
|
@ -45,35 +51,32 @@ addr=$HOME/.kuso.d
|
||||||
kusohome=`pwd`
|
kusohome=`pwd`
|
||||||
mkdir -p $repo
|
mkdir -p $repo
|
||||||
if [ -e $dotemacs ]; then
|
if [ -e $dotemacs ]; then
|
||||||
echo "Backing up exists .emacs file . . ."
|
echo "Backing up exists init file . . ."
|
||||||
cp $dotemacs "$dotemacs.backup"
|
#cp $dotemacs "$dotemacs.backup"
|
||||||
fi
|
fi
|
||||||
echo "Copying files . . . "
|
echo "Copying files . . . "
|
||||||
cp conf/emacs.d/* $repo -r
|
if [ -e $conffile ]
|
||||||
mkdir -p $addr
|
|
||||||
mkdir -p $HOME/.tmp
|
|
||||||
cp conf/bin/pyemacs.sh $addr/ -r
|
|
||||||
chmod u+x $addr/pyemacs.sh
|
|
||||||
|
|
||||||
echo "Creating ~/.emacs"
|
|
||||||
cp $conffile $dotemacs
|
|
||||||
|
|
||||||
if [ "$standalone" == "y" ]
|
|
||||||
then
|
then
|
||||||
cp bin/kuso $repo
|
cp $conffile $dotemacs
|
||||||
cp bin/kuso.desktop $HOME/.local/share/applications/
|
cp bin/$executable $repo/$executable
|
||||||
sed "s,--HOME--,$HOME,mg" -i $HOME/.local/share/applications/kuso.desktop
|
else
|
||||||
cp images/icon.svg $repo
|
wget $remoteconffile -o $dotemacs
|
||||||
|
wget $remoteexecutable -o $repo/$executable
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$standalone" == "" -o "$standalone" == "y" ]
|
||||||
|
then
|
||||||
|
sudo ln -s $repo/$executable /usr/bin/$executable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed "s/--EMAIL--/$mail/mg" -i $dotemacs
|
sed "s/--EMAIL--/$mail/mg" -i $dotemacs
|
||||||
sed "s/--FULLNAME--/$fullname/mg" -i $dotemacs
|
sed "s/--FULLNAME--/$fullname/mg" -i $dotemacs
|
||||||
sed "s,--WORKSPACE--,$workspace,mg" -i $dotemacs
|
sed "s,--WORKSPACE--,$workspace,mg" -i $dotemacs
|
||||||
sed "s,--ADDR--,$addr,mg" -i $dotemacs
|
sed "s,--REPO--,$repo,mg" -i $dotemacs
|
||||||
sed "s,--KUSOHOME--,$kusohome,mg" -i $dotemacs
|
|
||||||
|
|
||||||
echo "Copy the below code in your initial shell script:"
|
echo "Copy the below code in your initial shell script:"
|
||||||
echo
|
echo
|
||||||
echo "export PATH=\$PATH:$repo"
|
echo "export PATH=\$PATH:$repo"
|
||||||
echo -e "\nInstallation finished."
|
echo -e "\nInstallation finished."
|
||||||
echo "Restart the GNU/Emacs and make sure that all the requirements met."
|
echo "Restart the GNU/Emacs and make sure that all the requirements met."
|
||||||
|
|
Loading…
Reference in New Issue