mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
kodev: add device simulation option for run command (#2802)
This commit is contained in:
@@ -14,13 +14,13 @@ local GestureRange = require("ui/gesturerange")
|
||||
local Button = require("ui/widget/button")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local Device = require("device")
|
||||
local Screen = require("device").screen
|
||||
local Screen = Device.screen
|
||||
local Geom = require("ui/geometry")
|
||||
local Font = require("ui/font")
|
||||
local util = require("ffi/util")
|
||||
local _ = require("gettext")
|
||||
local Blitbuffer = require("ffi/blitbuffer")
|
||||
local getMenuText = require("util").getMenuText
|
||||
local util = require("ffi/util")
|
||||
local _ = require("gettext")
|
||||
|
||||
--[[
|
||||
TouchMenuItem widget
|
||||
|
||||
26
kodev
26
kodev
@@ -272,10 +272,12 @@ usage: run <OPTIONS> <ARGS>
|
||||
|
||||
OPTIONS:
|
||||
|
||||
-h=X, --screen-height=X set height of the emulator screen (default: 720)
|
||||
-w=X, --screen-width=X set width of the emulator screen (default: 540)
|
||||
--no-build run reader without rebuilding
|
||||
--disable-touch use this if you want to simulate keyboard only devices
|
||||
-h=X, --screen-height=X set height of the emulator screen (default: 720)
|
||||
-w=X, --screen-width=X set width of the emulator screen (default: 540)
|
||||
--no-build run reader without rebuilding
|
||||
--disable-touch use this if you want to simulate keyboard only devices
|
||||
-s=FOO --simulate=FOO simulate dimension and other specs for a given device model
|
||||
supported model: kobo-aura-one, kindle3
|
||||
"
|
||||
screen_width=540
|
||||
screen_height=720
|
||||
@@ -295,6 +297,22 @@ OPTIONS:
|
||||
-h | --screen-height)
|
||||
screen_height=${VALUE}
|
||||
;;
|
||||
-s | --simulate)
|
||||
device_model=${VALUE}
|
||||
case ${device_model} in
|
||||
kindle3)
|
||||
screen_width=600
|
||||
screen_height=800
|
||||
;;
|
||||
kobo-aura-one)
|
||||
screen_width=1404
|
||||
screen_height=1872
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: spec unknown for ${device_model}."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-h | --help)
|
||||
echo "${RUN_HELP_MSG}"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user