Skip to content

Commit 8e35080

Browse files
chore: autopublish 2024-10-20T23:07:45Z
1 parent 0dafdaf commit 8e35080

File tree

194 files changed

+2700
-878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+2700
-878
lines changed

dist/UI_switch_to_selected_part.lua

+26-6
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
108108
end
109109
return input_string
110110
end
111+
112+
function client.encode_with_utf8_codepage(input_string)
113+
if client.supports("luaosutils") then
114+
local text = require("luaosutils").text
115+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
116+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
117+
end
118+
end
119+
return input_string
120+
end
121+
122+
function client.execute(command)
123+
if client.supports("luaosutils") then
124+
local process = require("luaosutils").process
125+
if process then
126+
return process.execute(command)
127+
end
128+
end
129+
local handle = io.popen(command)
130+
if not handle then return nil end
131+
local retval = handle:read("*a")
132+
handle:close()
133+
return retval
134+
end
111135
return client
112136
end
113137
package.preload["library.general_library"] = package.preload["library.general_library"] or function()
@@ -307,7 +331,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
307331
end
308332

309333
function library.get_smufl_font_list()
310-
local osutils = finenv.EmbeddedLuaOSUtils and require("luaosutils")
334+
local osutils = client.supports("luaosutils") and require("luaosutils")
311335
local font_names = {}
312336
local add_to_table = function(for_user)
313337
local smufl_directory = calc_smufl_directory(for_user)
@@ -318,11 +342,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
318342
end
319343

320344
local cmd = finenv.UI():IsOnWindows() and "dir " or "ls "
321-
local handle = io.popen(cmd .. options .. " \"" .. smufl_directory .. "\"")
322-
if not handle then return "" end
323-
local retval = handle:read("*a")
324-
handle:close()
325-
return retval
345+
return client.execute(cmd .. options .. " \"" .. smufl_directory .. "\"") or ""
326346
end
327347
local is_font_available = function(dir)
328348
local fc_dir = finale.FCString()

dist/accidental_simplify.lua

+25
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
108108
end
109109
return input_string
110110
end
111+
112+
function client.encode_with_utf8_codepage(input_string)
113+
if client.supports("luaosutils") then
114+
local text = require("luaosutils").text
115+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
116+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
117+
end
118+
end
119+
return input_string
120+
end
121+
122+
function client.execute(command)
123+
if client.supports("luaosutils") then
124+
local process = require("luaosutils").process
125+
if process then
126+
return process.execute(command)
127+
end
128+
end
129+
local handle = io.popen(command)
130+
if not handle then return nil end
131+
local retval = handle:read("*a")
132+
handle:close()
133+
return retval
134+
end
111135
return client
112136
end
113137
package.preload["library.utils"] = package.preload["library.utils"] or function()
@@ -416,6 +440,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
416440
local fcstr = finale.FCString(directory_path)
417441
fcstr:AssureEndingPathDelimiter()
418442
directory_path = fcstr.LuaString
443+
419444
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
420445
return coroutine.wrap(function()
421446
for lfs_file in lfs.dir(lfs_directory_path) do

dist/articulation_expression_swap.lua

+27-6
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
304304
local fcstr = finale.FCString(directory_path)
305305
fcstr:AssureEndingPathDelimiter()
306306
directory_path = fcstr.LuaString
307+
307308
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
308309
return coroutine.wrap(function()
309310
for lfs_file in lfs.dir(lfs_directory_path) do
@@ -572,6 +573,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
572573
end
573574
return input_string
574575
end
576+
577+
function client.encode_with_utf8_codepage(input_string)
578+
if client.supports("luaosutils") then
579+
local text = require("luaosutils").text
580+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
581+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
582+
end
583+
end
584+
return input_string
585+
end
586+
587+
function client.execute(command)
588+
if client.supports("luaosutils") then
589+
local process = require("luaosutils").process
590+
if process then
591+
return process.execute(command)
592+
end
593+
end
594+
local handle = io.popen(command)
595+
if not handle then return nil end
596+
local retval = handle:read("*a")
597+
handle:close()
598+
return retval
599+
end
575600
return client
576601
end
577602
package.preload["library.general_library"] = package.preload["library.general_library"] or function()
@@ -771,7 +796,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
771796
end
772797

773798
function library.get_smufl_font_list()
774-
local osutils = finenv.EmbeddedLuaOSUtils and require("luaosutils")
799+
local osutils = client.supports("luaosutils") and require("luaosutils")
775800
local font_names = {}
776801
local add_to_table = function(for_user)
777802
local smufl_directory = calc_smufl_directory(for_user)
@@ -782,11 +807,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
782807
end
783808

784809
local cmd = finenv.UI():IsOnWindows() and "dir " or "ls "
785-
local handle = io.popen(cmd .. options .. " \"" .. smufl_directory .. "\"")
786-
if not handle then return "" end
787-
local retval = handle:read("*a")
788-
handle:close()
789-
return retval
810+
return client.execute(cmd .. options .. " \"" .. smufl_directory .. "\"") or ""
790811
end
791812
local is_font_available = function(dir)
792813
local fc_dir = finale.FCString()

dist/barline_chooser.lua

+27-6
Original file line numberDiff line numberDiff line change
@@ -3348,6 +3348,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
33483348
end
33493349
return input_string
33503350
end
3351+
3352+
function client.encode_with_utf8_codepage(input_string)
3353+
if client.supports("luaosutils") then
3354+
local text = require("luaosutils").text
3355+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
3356+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
3357+
end
3358+
end
3359+
return input_string
3360+
end
3361+
3362+
function client.execute(command)
3363+
if client.supports("luaosutils") then
3364+
local process = require("luaosutils").process
3365+
if process then
3366+
return process.execute(command)
3367+
end
3368+
end
3369+
local handle = io.popen(command)
3370+
if not handle then return nil end
3371+
local retval = handle:read("*a")
3372+
handle:close()
3373+
return retval
3374+
end
33513375
return client
33523376
end
33533377
package.preload["library.general_library"] = package.preload["library.general_library"] or function()
@@ -3547,7 +3571,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
35473571
end
35483572

35493573
function library.get_smufl_font_list()
3550-
local osutils = finenv.EmbeddedLuaOSUtils and require("luaosutils")
3574+
local osutils = client.supports("luaosutils") and require("luaosutils")
35513575
local font_names = {}
35523576
local add_to_table = function(for_user)
35533577
local smufl_directory = calc_smufl_directory(for_user)
@@ -3558,11 +3582,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
35583582
end
35593583

35603584
local cmd = finenv.UI():IsOnWindows() and "dir " or "ls "
3561-
local handle = io.popen(cmd .. options .. " \"" .. smufl_directory .. "\"")
3562-
if not handle then return "" end
3563-
local retval = handle:read("*a")
3564-
handle:close()
3565-
return retval
3585+
return client.execute(cmd .. options .. " \"" .. smufl_directory .. "\"") or ""
35663586
end
35673587
local is_font_available = function(dir)
35683588
local fc_dir = finale.FCString()
@@ -4071,6 +4091,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
40714091
local fcstr = finale.FCString(directory_path)
40724092
fcstr:AssureEndingPathDelimiter()
40734093
directory_path = fcstr.LuaString
4094+
40744095
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
40754096
return coroutine.wrap(function()
40764097
for lfs_file in lfs.dir(lfs_directory_path) do

dist/baseline_move_reset.lua

+1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
304304
local fcstr = finale.FCString(directory_path)
305305
fcstr:AssureEndingPathDelimiter()
306306
directory_path = fcstr.LuaString
307+
307308
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
308309
return coroutine.wrap(function()
309310
for lfs_file in lfs.dir(lfs_directory_path) do

dist/chord_accidental_adjust_down.lua

+1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
304304
local fcstr = finale.FCString(directory_path)
305305
fcstr:AssureEndingPathDelimiter()
306306
directory_path = fcstr.LuaString
307+
307308
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
308309
return coroutine.wrap(function()
309310
for lfs_file in lfs.dir(lfs_directory_path) do

dist/chord_accidental_adjust_up.lua

+1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
304304
local fcstr = finale.FCString(directory_path)
305305
fcstr:AssureEndingPathDelimiter()
306306
directory_path = fcstr.LuaString
307+
307308
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
308309
return coroutine.wrap(function()
309310
for lfs_file in lfs.dir(lfs_directory_path) do

dist/clef_change.lua

+24
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
108108
end
109109
return input_string
110110
end
111+
112+
function client.encode_with_utf8_codepage(input_string)
113+
if client.supports("luaosutils") then
114+
local text = require("luaosutils").text
115+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
116+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
117+
end
118+
end
119+
return input_string
120+
end
121+
122+
function client.execute(command)
123+
if client.supports("luaosutils") then
124+
local process = require("luaosutils").process
125+
if process then
126+
return process.execute(command)
127+
end
128+
end
129+
local handle = io.popen(command)
130+
if not handle then return nil end
131+
local retval = handle:read("*a")
132+
handle:close()
133+
return retval
134+
end
111135
return client
112136
end
113137
package.preload["library.clef"] = package.preload["library.clef"] or function()

dist/cross_staff_offset.lua

+27-6
Original file line numberDiff line numberDiff line change
@@ -4802,6 +4802,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
48024802
local fcstr = finale.FCString(directory_path)
48034803
fcstr:AssureEndingPathDelimiter()
48044804
directory_path = fcstr.LuaString
4805+
48054806
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
48064807
return coroutine.wrap(function()
48074808
for lfs_file in lfs.dir(lfs_directory_path) do
@@ -4933,6 +4934,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
49334934
end
49344935
return input_string
49354936
end
4937+
4938+
function client.encode_with_utf8_codepage(input_string)
4939+
if client.supports("luaosutils") then
4940+
local text = require("luaosutils").text
4941+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
4942+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
4943+
end
4944+
end
4945+
return input_string
4946+
end
4947+
4948+
function client.execute(command)
4949+
if client.supports("luaosutils") then
4950+
local process = require("luaosutils").process
4951+
if process then
4952+
return process.execute(command)
4953+
end
4954+
end
4955+
local handle = io.popen(command)
4956+
if not handle then return nil end
4957+
local retval = handle:read("*a")
4958+
handle:close()
4959+
return retval
4960+
end
49364961
return client
49374962
end
49384963
package.preload["library.general_library"] = package.preload["library.general_library"] or function()
@@ -5132,7 +5157,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
51325157
end
51335158

51345159
function library.get_smufl_font_list()
5135-
local osutils = finenv.EmbeddedLuaOSUtils and require("luaosutils")
5160+
local osutils = client.supports("luaosutils") and require("luaosutils")
51365161
local font_names = {}
51375162
local add_to_table = function(for_user)
51385163
local smufl_directory = calc_smufl_directory(for_user)
@@ -5143,11 +5168,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
51435168
end
51445169

51455170
local cmd = finenv.UI():IsOnWindows() and "dir " or "ls "
5146-
local handle = io.popen(cmd .. options .. " \"" .. smufl_directory .. "\"")
5147-
if not handle then return "" end
5148-
local retval = handle:read("*a")
5149-
handle:close()
5150-
return retval
5171+
return client.execute(cmd .. options .. " \"" .. smufl_directory .. "\"") or ""
51515172
end
51525173
local is_font_available = function(dir)
51535174
local fc_dir = finale.FCString()

dist/cue_notes_create.lua

+27-6
Original file line numberDiff line numberDiff line change
@@ -3673,6 +3673,30 @@ package.preload["library.client"] = package.preload["library.client"] or functio
36733673
end
36743674
return input_string
36753675
end
3676+
3677+
function client.encode_with_utf8_codepage(input_string)
3678+
if client.supports("luaosutils") then
3679+
local text = require("luaosutils").text
3680+
if text and text.get_default_codepage() ~= text.get_utf8_codepage() then
3681+
return text.convert_encoding(input_string, text.get_default_codepage(), text.get_utf8_codepage())
3682+
end
3683+
end
3684+
return input_string
3685+
end
3686+
3687+
function client.execute(command)
3688+
if client.supports("luaosutils") then
3689+
local process = require("luaosutils").process
3690+
if process then
3691+
return process.execute(command)
3692+
end
3693+
end
3694+
local handle = io.popen(command)
3695+
if not handle then return nil end
3696+
local retval = handle:read("*a")
3697+
handle:close()
3698+
return retval
3699+
end
36763700
return client
36773701
end
36783702
package.preload["library.general_library"] = package.preload["library.general_library"] or function()
@@ -3872,7 +3896,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
38723896
end
38733897

38743898
function library.get_smufl_font_list()
3875-
local osutils = finenv.EmbeddedLuaOSUtils and require("luaosutils")
3899+
local osutils = client.supports("luaosutils") and require("luaosutils")
38763900
local font_names = {}
38773901
local add_to_table = function(for_user)
38783902
local smufl_directory = calc_smufl_directory(for_user)
@@ -3883,11 +3907,7 @@ package.preload["library.general_library"] = package.preload["library.general_li
38833907
end
38843908

38853909
local cmd = finenv.UI():IsOnWindows() and "dir " or "ls "
3886-
local handle = io.popen(cmd .. options .. " \"" .. smufl_directory .. "\"")
3887-
if not handle then return "" end
3888-
local retval = handle:read("*a")
3889-
handle:close()
3890-
return retval
3910+
return client.execute(cmd .. options .. " \"" .. smufl_directory .. "\"") or ""
38913911
end
38923912
local is_font_available = function(dir)
38933913
local fc_dir = finale.FCString()
@@ -4396,6 +4416,7 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
43964416
local fcstr = finale.FCString(directory_path)
43974417
fcstr:AssureEndingPathDelimiter()
43984418
directory_path = fcstr.LuaString
4419+
43994420
local lfs_directory_path = text.convert_encoding(directory_path, text.get_utf8_codepage(), text.get_default_codepage())
44004421
return coroutine.wrap(function()
44014422
for lfs_file in lfs.dir(lfs_directory_path) do

0 commit comments

Comments
 (0)