-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathrb_main.rb
More file actions
executable file
·32 lines (27 loc) · 832 Bytes
/
rb_main.rb
File metadata and controls
executable file
·32 lines (27 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
#
# rb_main.rb
# Gyaim
#
# Created by Toshiyuki Masui on 11/03/14.
# Copyright Pitecan Systems. 2011. All rights reserved.
#
# Loading the Cocoa framework. If you need to load more frameworks, you can
# do that here too.
framework 'Cocoa'
framework 'InputMethodKit'
# Loading all the Ruby project files.
main = File.basename(__FILE__, File.extname(__FILE__))
dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation
Dir.glob(File.join(dir_path, '*.{rb,rbo}')).map { |x| File.basename(x, File.extname(x)) }.uniq.each do |path|
if path != main
require(path)
end
end
#
# IMKServerに接続
#
identifier = NSBundle.mainBundle.bundleIdentifier
server = IMKServer.alloc.initWithName("Gyaim_Connection",bundleIdentifier:identifier)
# Starting the Cocoa main loop.
NSApplicationMain(0, nil)