Commit 4c6bbc68 authored by 神楽坂玲奈's avatar 神楽坂玲奈

icon

parent 8c1171c8
mkexy --encoding=utf-8 main.rb
exerb -c gui -k utf8 main.exy
upx main.exe
\ No newline at end of file
upx main.exe
resource:
icon:
- width: 256
height: 256
color: 32
file : icon.ico
......@@ -41,7 +41,7 @@ begin
Config['ygopro']['numfont'] = Config['ygopro']['numfont'].find { |path| File.file? path } if Config['ygopro']['numfont'].is_a? Enumerable
if !Config['ygopro']['path']
if !Config['ygopro']['path'] or !File.file? Config['ygopro']['path']
require 'win32api'
GetOpenFileName = Win32API.new("comdlg32.dll", "GetOpenFileNameW", "p", "i")
......@@ -84,16 +84,16 @@ begin
0, # lpfnHook L
0 # lpTemplateName L
].pack("LLLPLLLPLPLPPLS2L4")
Dir.chdir('.') {
Dir.chdir('.') do
GetOpenFileName.call(ofn)
}
szFile.delete!("\0".encode("UTF-16LE"))
result = szFile.encode("UTF-8")
result = File.expand_path result
if result
Config['ygopro']['path'] = result
else
exit
result = szFile.delete("\0".encode(Encoding::UTF_16LE)).encode(Encoding::UTF_8)
if !result.empty? and File.file? result
result = File.expand_path result
Config['ygopro']['path'] = result
else
exit
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment