Sha256: a9b985f161dfd10f7175cc0543d941481f5cc6e1b4b5b8973335b5326fd5a5ea

Contents?: true

Size: 1.95 KB

Versions: 2

Compression:

Stored size: 1.95 KB

Contents

#!/usr/bin/env ruby
# Copyright 2015-2016 Cédric LE MOIGNE, cedlemo@gmx.com
# This file is part of Germinal.
#
# Germinal 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
# any later version.
#
# Germinal 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 Germinal.  If not, see <http://www.gnu.org/licenses/>.
#
# Germinal is a terminal emulator written with the ruby gtk3 and
# vte 3 bindings.
# Author:: Cedlemo (mailto:cedlemo@gmx.com)

require "gtk3"
require "vte3"
require "fileutils"
require "sass"

CURRENT_PATH = File.expand_path(File.dirname(__FILE__))
LIB_PATH = "#{CURRENT_PATH}/../lib"
DATA_PATH = "#{CURRENT_PATH}/../data"
CONFIG_DIR = File.expand_path("#{ENV['HOME']}/.config/Germinal")
USR_CSS = "#{CONFIG_DIR}/germinal.css"
USR_LIB_PATH  = "#{CONFIG_DIR}/lib"
gresource_bin = "#{DATA_PATH}/germinal.gresource"
gresource_xml = "#{DATA_PATH}/germinal.gresource.xml"

system("glib-compile-resources",
       "--target", gresource_bin,
       "--sourcedir", File.dirname(gresource_xml),
       gresource_xml)

at_exit do
  FileUtils.rm_f(gresource_bin)
end

resource = Gio::Resource.load(gresource_bin)
Gio::Resources.register(resource)
# Load default libraries
%w(application terminal notebook color_selector font_selector
terminal_chooser window resize_message css_editor).each do |l|
  if File.exist?("#{USR_LIB_PATH}/#{l}.rb")
    require "#{USR_LIB_PATH}/#{l}.rb"
  else
    require "#{LIB_PATH}/#{l}.rb"
  end
end

Gtk::IconTheme.default.add_resource_path("/com/github/cedlemo/germinal/icons")

germinal = GerminalApplication.new

exit(germinal.run([$PROGRAM_NAME] + ARGV))

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Germinal-1.2.2 bin/Germinal
Germinal-1.2.1 bin/Germinal