Fix the installer bugs and create a dockerfile to test it
This commit is contained in:
parent
a367126f1d
commit
58c16d6842
|
@ -0,0 +1,7 @@
|
||||||
|
FROM debian:11-slim
|
||||||
|
|
||||||
|
RUN apt update && apt install -y emacs build-essential sudo git
|
||||||
|
|
||||||
|
COPY . /root/.fg42
|
||||||
|
WORKDIR /root/.fg42
|
||||||
|
RUN make install
|
2
Makefile
2
Makefile
|
@ -25,7 +25,7 @@ install:
|
||||||
/bin/sh $(my_dir)/scripts/install_files.sh runners
|
/bin/sh $(my_dir)/scripts/install_files.sh runners
|
||||||
@echo " "
|
@echo " "
|
||||||
@echo "------------------------------------------------------------------------------------"
|
@echo "------------------------------------------------------------------------------------"
|
||||||
@echo "Make sure to install external dependencies of FG42. For more info checkout README.md"
|
@echo "Make sure to install external dependencies of FG42. For more info checkout README.org"
|
||||||
@echo "Enjoy the bless of GNU/Emacs and FG42 :)"
|
@echo "Enjoy the bless of GNU/Emacs and FG42 :)"
|
||||||
|
|
||||||
.PHONY: install-fonts
|
.PHONY: install-fonts
|
||||||
|
|
|
@ -21,13 +21,40 @@
|
||||||
;;
|
;;
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(setq debug-on-error t)
|
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2010-2020 Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
;;
|
||||||
|
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
;; URL: https://gitlab.com/FG42/FG42
|
||||||
|
;; Version: 3.0.0
|
||||||
|
;;
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;; Uncomment this line for debugging
|
||||||
|
;; (setq debug-on-error t)
|
||||||
|
|
||||||
(require 'fg42/flags)
|
(require 'fg42/flags)
|
||||||
(require 'cubes/editor)
|
(require 'cubes/editor)
|
||||||
|
(require 'cubes/org)
|
||||||
(require 'cubes/elisp)
|
(require 'cubes/elisp)
|
||||||
(require 'cubes/region-expansion)
|
(require 'cubes/region-expansion)
|
||||||
(require 'cubes/wm)
|
(require 'cubes/wm)
|
||||||
|
(require 'cubes/modeline)
|
||||||
(require 'cubes/autocompletion)
|
(require 'cubes/autocompletion)
|
||||||
(require 'cubes/golang)
|
(require 'cubes/golang)
|
||||||
(require 'cubes/project)
|
(require 'cubes/project)
|
||||||
|
@ -36,17 +63,12 @@
|
||||||
(require 'cubes/java)
|
(require 'cubes/java)
|
||||||
(require 'cubes/python)
|
(require 'cubes/python)
|
||||||
(require 'cubes/snippets)
|
(require 'cubes/snippets)
|
||||||
(require 'cubes/org)
|
|
||||||
(require 'cubes/git)
|
(require 'cubes/git)
|
||||||
(require 'cubes/bookmark)
|
(require 'cubes/bookmark)
|
||||||
(require 'cubes/terraform)
|
(require 'cubes/terraform)
|
||||||
(require 'cubes/graph)
|
(require 'cubes/graph)
|
||||||
|
|
||||||
;; ============== MY STUFF ==============================
|
|
||||||
|
|
||||||
(setq max-specpdl-size 13000)
|
|
||||||
(setq max-lisp-eval-depth 10000)
|
|
||||||
|
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
'(mini-modeline-mode-line
|
'(mini-modeline-mode-line
|
||||||
((((background light))
|
((((background light))
|
||||||
|
@ -54,46 +76,6 @@
|
||||||
(t
|
(t
|
||||||
:background "#bd93f9" :height 0.1 :box nil))))
|
:background "#bd93f9" :height 0.1 :box nil))))
|
||||||
|
|
||||||
(defvar global-font-size 11)
|
|
||||||
|
|
||||||
|
|
||||||
(setq lsp-clients-clangd-executable "/home/lxsameer/usr/lib/llvm-13rc2/bin/clangd")
|
|
||||||
(defconst LLVM_DIR "/home/lxsameer/src/serene/llvm-project")
|
|
||||||
(defconst llvm-config-dir (concat LLVM_DIR "/llvm/utils/emacs/"))
|
|
||||||
(defconst mlir-config-dir (concat LLVM_DIR "/mlir/utils/emacs/"))
|
|
||||||
|
|
||||||
|
|
||||||
(add-hook 'c++-mode-hook (lambda ()
|
|
||||||
(load (concat llvm-config-dir "emacs.el"))
|
|
||||||
(load (concat llvm-config-dir "llvm-mode.el"))
|
|
||||||
(load (concat llvm-config-dir "tablegen-mode.el"))))
|
|
||||||
|
|
||||||
(autoload 'mlir-mode (concat mlir-config-dir "mlir-mode") "Code highlighting for MLIR" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.mlir\\'" . mlir-mode))
|
|
||||||
|
|
||||||
|
|
||||||
(autoload 'llvm-mode (concat llvm-config-dir "llvm-mode") "Code highlighting for LLVMIR" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.llvmir\\'" . llvm-mode))
|
|
||||||
|
|
||||||
(autoload 'tablegen-mode (concat llvm-config-dir "tablegen-mode") "Code highlighting for tablegen" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.td\\'" . tablegen-mode))
|
|
||||||
|
|
||||||
(autoload 'tablegen-mode (concat llvm-config-dir "tablegen-mode") "Code highlighting for tablegen" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.td\\'" . tablegen-mode))
|
|
||||||
|
|
||||||
(autoload 'tablegen-mode (concat llvm-config-dir "tablegen-mode") "Code highlighting for tablegen" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.td\\'" . tablegen-mode))
|
|
||||||
|
|
||||||
(load-file "/home/lxsameer/src/serene/serene/resources/emacs/serene-dev.el")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; =========== FG42 stuff ===============================
|
|
||||||
;; (use-flags wm font-icons cursor-type
|
|
||||||
;; exec-path-from-shell golang
|
|
||||||
;; rcirc pinentry vterm
|
|
||||||
;; company lsp flycheck smart-mode-line wm fg42/region-expansion-cube
|
|
||||||
;; selectrum window-navigation buffer-navigation font-icons)
|
|
||||||
|
|
||||||
(use-flags
|
(use-flags
|
||||||
(fg42/merge-with-default-flags
|
(fg42/merge-with-default-flags
|
||||||
|
@ -107,7 +89,8 @@
|
||||||
flycheck
|
flycheck
|
||||||
fg42/region-expansion-cube))
|
fg42/region-expansion-cube))
|
||||||
|
|
||||||
;; ================== my stuff mixed with FG42 stuff ===================
|
|
||||||
|
;TODO: Move this blog to a macro or something ===========
|
||||||
(when-wm
|
(when-wm
|
||||||
(setq global-font-size 8)
|
(setq global-font-size 8)
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
|
@ -118,6 +101,7 @@
|
||||||
:background "#6272a4" :height 0.1 :box nil))))
|
:background "#6272a4" :height 0.1 :box nil))))
|
||||||
(fg42/wm-cube :number-of-workspaces 9)
|
(fg42/wm-cube :number-of-workspaces 9)
|
||||||
|
|
||||||
|
;; Change the resolution and monitors to your need
|
||||||
(defvar monitors
|
(defvar monitors
|
||||||
'(:hdmi-only
|
'(:hdmi-only
|
||||||
("--output HDMI-1 --primary"
|
("--output HDMI-1 --primary"
|
||||||
|
@ -151,6 +135,7 @@
|
||||||
;; how to run it via elisp
|
;; how to run it via elisp
|
||||||
(monitor :hdmi-only))
|
(monitor :hdmi-only))
|
||||||
|
|
||||||
|
|
||||||
(use-flags
|
(use-flags
|
||||||
(fg42/merge-with-default-flags
|
(fg42/merge-with-default-flags
|
||||||
wm
|
wm
|
||||||
|
@ -164,14 +149,13 @@
|
||||||
-flycheck
|
-flycheck
|
||||||
fg42/region-expansion-cube)))
|
fg42/region-expansion-cube)))
|
||||||
|
|
||||||
;; =========== FG42 stuff ===============================
|
|
||||||
|
|
||||||
;; Both are part of the editor cube but we want to override
|
;; Both are part of the editor cube but we want to override
|
||||||
;; their behavior
|
;; their behavior
|
||||||
|
|
||||||
|
(fg42/org-cube)
|
||||||
(fg42/cursor-cube :type 'bar :color "#bd93f9")
|
(fg42/cursor-cube :type 'bar :color "#bd93f9")
|
||||||
(fg42/font-cube :font-size global-font-size)
|
(fg42/font-cube :font-name "Fira code" :font-size global-font-size)
|
||||||
(fg42/editor-cube)
|
(fg42/editor-cube)
|
||||||
|
|
||||||
;;(fg42/imenu-cube)
|
;;(fg42/imenu-cube)
|
||||||
|
@ -184,36 +168,26 @@
|
||||||
(fg42/python-cube)
|
(fg42/python-cube)
|
||||||
(fg42/yaml-cube)
|
(fg42/yaml-cube)
|
||||||
(fg42/flycheck-cube)
|
(fg42/flycheck-cube)
|
||||||
(fg42/org-cube)
|
|
||||||
(fg42/golang-cube)
|
(fg42/golang-cube)
|
||||||
(fg42/projectile-cube)
|
(fg42/projectile-cube)
|
||||||
(fg42/rcirc-cube :server '(("irc.libera.chat" :channels ("#fg42" "#5hit" "#serene-lang" "#technotux" "#emacs" "#c++") :nick "lxsameer")
|
|
||||||
("irc.oftc.net" :channels ("#llvm") :nick "lxsameer")))
|
|
||||||
|
|
||||||
(fg42/vterm-cube)
|
(fg42/vterm-cube)
|
||||||
(fg42/git-cube)
|
(fg42/git-cube)
|
||||||
(fg42/alert-cube)
|
(fg42/alert-cube)
|
||||||
(fg42/bookmark-cube)
|
(fg42/bookmark-cube)
|
||||||
(fg42/terraform-cube :terraform-lsp-path "~/bin/terraform-lsp")
|
(fg42/terraform-cube)
|
||||||
(fg42/java-cube)
|
(fg42/java-cube)
|
||||||
(fg42/yasnippet-cube)
|
(fg42/yasnippet-cube)
|
||||||
|
|
||||||
;; Themes should be the last cube and anything that wants to manipulate a face
|
;; Themes should be the last cube and anything that wants to manipulate a face
|
||||||
;; has to use either `fg42/before-initializing-theme-hook' or
|
;; has to use either `fg42/before-initializing-theme-hook' or
|
||||||
;; `fg42/after-initializing-theme-hook' hooks.
|
;; `fg42/after-initializing-theme-hook' hooks.
|
||||||
(fg42/dracula-theme-cube)
|
(fg42/dracula-theme-cube)
|
||||||
|
|
||||||
;;(global-set-key (kbd "C-t") 'forward-char)
|
|
||||||
;;(g lobal-set-key (kbd "C-n") 'backward-char)
|
|
||||||
;;(global-set-key (kbd "M-n") 'backward-word)
|
|
||||||
;;(global-set-key (kbd "M-t") 'forward-word)
|
|
||||||
;;(global-set-key (kbd "C-,") 'previous-line)
|
|
||||||
;;(global-set-key (kbd "C-.") 'next-line)
|
|
||||||
|
|
||||||
(set-face-attribute 'region nil :background "#888")
|
(set-face-attribute 'region nil :background "#888")
|
||||||
|
|
||||||
|
(when (file-exists-p "~/.fg42.user.el")
|
||||||
|
(load "~/.fg42.user.el"))
|
||||||
|
|
||||||
;; ============== MY STUFF ==============================
|
(provide 'fg42.user)
|
||||||
(serene/setup-dev-env)
|
;;; fg42.user.el ends here
|
||||||
|
|
||||||
(provide 'fg42.user.v3)
|
|
||||||
;;; fg42.user.v3.el ends here
|
|
||||||
|
|
|
@ -34,9 +34,8 @@
|
||||||
(setq custom-file (format "%s/.fg42.custom.el" (getenv "HOME")))
|
(setq custom-file (format "%s/.fg42.custom.el" (getenv "HOME")))
|
||||||
(setq user-emacs-directory "~/.fg42/emacs.d")
|
(setq user-emacs-directory "~/.fg42/emacs.d")
|
||||||
(setq user-init-file
|
(setq user-init-file
|
||||||
(format "%s/.fg42.%s"
|
(format "%s/.fg42.el"
|
||||||
(getenv "HOME")
|
(getenv "HOME")))
|
||||||
(if fg42-v3 "v3.el" "el")))
|
|
||||||
|
|
||||||
|
|
||||||
;; Load the custom ization file. In FG42 it is different than
|
;; Load the custom ization file. In FG42 it is different than
|
||||||
|
|
|
@ -15,32 +15,34 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
current=$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)
|
current=$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)
|
||||||
fg42_home=$current/..
|
fg42_home="$current/.."
|
||||||
|
|
||||||
# Coloring Functions
|
# Coloring Functions
|
||||||
function info() {
|
info() {
|
||||||
if [ "$1" ]
|
if [ "$1" ]
|
||||||
then
|
then
|
||||||
echo -e "[\033[01;32mINFO\033[00m]: $1"
|
echo "[\033[01;32mINFO\033[00m]: $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function error(){
|
error() {
|
||||||
if [ "$1" ]
|
if [ "$1" ]
|
||||||
then
|
then
|
||||||
echo -e "[\033[01;31mERR\033[00m]: $1"
|
echo "[\033[01;31mERR\033[00m]: $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function warn(){
|
warn() {
|
||||||
if [ "$1" ]
|
if [ "$1" ]
|
||||||
then
|
then
|
||||||
echo -e "[\033[01;33mWARN\033[00m]: $1"
|
echo "[\033[01;33mWARN\033[00m]: $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_fonts() {
|
install_fonts() {
|
||||||
info "Downloading and installing fonts..."
|
info "Downloading and installing fonts..."
|
||||||
mkdir -p ~/.fonts
|
mkdir -p ~/.fonts
|
||||||
wget "https://dl.fg42.org/fonts/0.1.0.tar.gz" -O ~/.fonts/fg42.tar.gz
|
wget "https://dl.fg42.org/fonts/0.1.0.tar.gz" -O ~/.fonts/fg42.tar.gz
|
||||||
|
@ -52,14 +54,17 @@ function install_fonts() {
|
||||||
|
|
||||||
install_runners() {
|
install_runners() {
|
||||||
info "Creating the runner scripts..."
|
info "Creating the runner scripts..."
|
||||||
cp $current/templates/fg42 > $current/../fg42
|
cp $current/templates/fg42 $current/../fg42
|
||||||
cp $current/templates/fg42-wm > $current/../fg42-wm
|
cp $current/templates/fg42-wm $current/../fg42-wm
|
||||||
sed -i "s/___FG42_HOME___/$fg42_home" $fg42_home/fg42
|
sed -i "s'___FG42_HOME___'$fg42_home'" $fg42_home/fg42
|
||||||
sed -i "s/___FG42_HOME___/$fg42_home" $fg42_home/fg42-wm
|
sed -i "s'___FG42_HOME___'$fg42_home'" $fg42_home/fg42-wm
|
||||||
|
|
||||||
chmod +x $fg42_home/fg42
|
chmod +x $fg42_home/fg42
|
||||||
chmod +x $fg42_home/fg42-wm
|
chmod +x $fg42_home/fg42-wm
|
||||||
|
|
||||||
|
info "Copying conifg file to ~/.fg42.el..."
|
||||||
|
cp $fg42_home/config/fg42.user.el ~/.fg42.el
|
||||||
|
|
||||||
info "Installing the runners..."
|
info "Installing the runners..."
|
||||||
|
|
||||||
sudo mkdir -p /usr/local/bin/
|
sudo mkdir -p /usr/local/bin/
|
||||||
|
@ -73,6 +78,7 @@ install_runners() {
|
||||||
sudo cp $fg42_home/share/applications/fg42.desktop /usr/local/share/applications
|
sudo cp $fg42_home/share/applications/fg42.desktop /usr/local/share/applications
|
||||||
sudo cp -r $fg42_home/share/icons/hicolor/ /usr/local/share/icons
|
sudo cp -r $fg42_home/share/icons/hicolor/ /usr/local/share/icons
|
||||||
sudo cp -r $fg42_home/share/* /usr/share/fg42/
|
sudo cp -r $fg42_home/share/* /usr/share/fg42/
|
||||||
|
sudo mkdir -p /usr/share/xsessions/
|
||||||
sudo cp -r $fg42_home/share/xsessions/fg42.desktop /usr/share/xsessions/
|
sudo cp -r $fg42_home/share/xsessions/fg42.desktop /usr/share/xsessions/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue