mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
refactoring utils to tools as discussed in #2197
This commit is contained in:
4
Makefile
4
Makefile
@@ -38,7 +38,7 @@ UBUNTUTOUCH_SDL_DIR:=$(UBUNTUTOUCH_DIR)/ubuntu-touch-sdl
|
||||
WIN32_DIR=$(PLATFORM_DIR)/win32
|
||||
|
||||
# files to link from main directory
|
||||
INSTALL_FILES=reader.lua frontend resources defaults.lua datastorage.lua l10n utils \
|
||||
INSTALL_FILES=reader.lua frontend resources defaults.lua datastorage.lua l10n tools \
|
||||
README.md COPYING
|
||||
|
||||
# for gettext
|
||||
@@ -336,7 +336,7 @@ pot:
|
||||
mkdir -p $(TEMPLATE_DIR)
|
||||
$(XGETTEXT_BIN) reader.lua `find frontend -iname "*.lua"` \
|
||||
`find plugins -iname "*.lua"` \
|
||||
`find utils -iname "*.lua"` \
|
||||
`find tools -iname "*.lua"` \
|
||||
> $(TEMPLATE_DIR)/$(DOMAIN).pot
|
||||
# push source file to Transifex
|
||||
$(MAKE) -i -C l10n bootstrap push
|
||||
|
||||
@@ -144,7 +144,7 @@ function Kobo:init()
|
||||
local switch_xy = G_reader_settings:readSetting("kobo_touch_switch_xy")
|
||||
-- and has no probe before
|
||||
if switch_xy == nil then
|
||||
local TouchProbe = require("utils/kobo_touch_probe")
|
||||
local TouchProbe = require("tools/kobo_touch_probe")
|
||||
local UIManager = require("ui/uimanager")
|
||||
UIManager:show(TouchProbe:new{})
|
||||
UIManager:run()
|
||||
|
||||
@@ -5,7 +5,7 @@ describe("touch probe module", function()
|
||||
|
||||
it("should probe properly for kobo touch", function()
|
||||
local Device = require("device")
|
||||
local TouchProbe = require("utils/kobo_touch_probe"):new{}
|
||||
local TouchProbe = require("tools/kobo_touch_probe"):new{}
|
||||
local need_to_switch_xy
|
||||
TouchProbe.saveSwitchXYSetting = function(_, new_need_to_switch_xy)
|
||||
need_to_switch_xy = new_need_to_switch_xy
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- touch probe utility
|
||||
-- usage: ./luajit util/kobo_touch_probe.lua
|
||||
-- usage: ./luajit tools/kobo_touch_probe.lua
|
||||
|
||||
require "defaults"
|
||||
package.path = "common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
@@ -1,5 +1,5 @@
|
||||
-- trace package loading flow with require call
|
||||
-- usage: ./luajit -lutils/trace_require reader.lua ../../test
|
||||
-- usage: ./luajit -ltools/trace_require reader.lua ../../test
|
||||
|
||||
local math = require("math")
|
||||
local _require = require
|
||||
@@ -1,5 +1,5 @@
|
||||
-- widget test utility
|
||||
-- usage: ./luajit util/wtest.lua
|
||||
-- usage: ./luajit tools/wtest.lua
|
||||
|
||||
require "defaults"
|
||||
print(package.path)
|
||||
Reference in New Issue
Block a user