Sha256: 323a90a1f564a5c2ddac6d4cf585d37bde80f4ec2861ff24a033021f3487a9c4
Contents?: true
Size: 831 Bytes
Versions: 1
Compression:
Stored size: 831 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 window.present end app.run
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_viewer_gtk3-0.0.2 | exe/jsonview |