Sha256: 10f64645367f7e31f186be0ec8d4be3d216eed96cbb63de2aa918618d8be640e
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require 'jsonview' require 'fileutils' opt = OptionParser.new opt.program_name = 'JsonViewer' opt.version = JsonView::VERSION # opt.on('-p', '--port VAL', Integer) { |v| port_num = v } opt.parse!(ARGV) resource_xml = File.expand_path('../resources/gresources.xml', __dir__) resource_bin = File.expand_path('../gresource.bin', __dir__) system('glib-compile-resources', '--target', resource_bin, '--sourcedir', File.dirname(resource_xml), resource_xml) at_exit do FileUtils.rm_f(resource_bin) end app = JsonView.application resource = Gio::Resource.load(resource_bin) Gio::Resources.register(resource) app.signal_connect :activate do |application| window = JsonView::ApplicationWindow.new application, ARGV window.present end app.run
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_viewer_gtk3-0.0.3 | exe/jsonview |