#10064 closed bug (fixed)
Unable to use Canna input method
Reported by: | X512 | Owned by: | bonefish |
---|---|---|---|
Priority: | blocker | Milestone: | R1/beta1 |
Component: | Servers/input_server | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
After introduction of package management, Canna input method doesn't work anymore. I tried to move the method in non-packaged of home folder, but nothing happens. No input method icon in deskbar and no canna looper thread in input_server. Alt+Space doesn't work either.
Attachments (7)
Change History (30)
comment:1 by , 11 years ago
Component: | Add-Ons/Input Methods → Servers/input_server |
---|---|
Description: | modified (diff) |
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 11 years ago
Hi, It seems canna fails to make "/boot/system/data/Canna/dic/user" and "/boot/system/data/Canna/dic/group" in http://cgit.haiku-os.org/haiku/tree/src/add-ons/input_server/methods/canna/rk/context.c#n98, so CannaMethod::InitCheck() fails. I think /boot/system/data/Canna/ may be read / write.
comment:4 by , 11 years ago
Hi, I make canna package (gcc4), please test (put it to home/config/packages and restart). I put canna data to "home/config/settings/global" by "global-writable-files" method, because it is only method to put files under "config/settings" on package activation. any ideas?
After PM, we can choose these method to distribute canna.
- Make canna package, install via HaikuDepot (install to /system)
- Make canna package, put it in system/optional, install by user (install to /home)
- Make canna add-on, put it in system/optional, install by user (install to /home)
I think method 1 is better, but I can't put data files to "home/config/settings" on package activation by method 1..
comment:5 by , 11 years ago
As a side note: no need to zip hpkg packages as they already compressed.
comment:6 by , 11 years ago
Building a package for canna is the way to go. Since the sources live in the Haiku tree, the build system should do that. Until we have a package repository for the packages the build system builds, there is no way to install it via HaikuDepot, though.
Regarding the data files, I don't know what those are and how they are used. Generally there are the following categories:
- Read-only data should go somewhere in the "data" directory.
- Writable data created by the software should go in "cache" or "var", depending on the nature of the data.
- System-wide configuration/settings data should go in "/system/settings", respectively "~/config/settings/global", depending on where the package is installed. The package can provide a default configuration that can be specified via the global-writable-file attribute.
- Per-user settings should only be created/written by the software at run-time. If the software includes a default settings file, it should be installed in "data" and it should be used as a fallback when the user's settings file is not present. When the per-user settings are written they should always be written to "~/config/settings".
by , 11 years ago
Attachment: | 0001-CannaIM-copy-data-files-to-user-setting-directory.patch added |
---|
comment:8 by , 11 years ago
patch: | 0 → 1 |
---|
follow-up: 11 comment:9 by , 11 years ago
Thanks for the patch!
I still don't know what the data files are used for, so I can't really comment on whether copying them to the user's settings directory is a good solution. Disregarding that question, here are a few comments on your patch:
- For finding the data directory, instead of using
find_directory()
to iterate throughB_USER_DATA_DIRECTORY
andB_SYSTEM_DATA_DIRECTORY
, the newBPathFinder
API should be used. That would look like:status = BPathFinder(B_CURRENT_IMAGE_SYMBOL).FindPath( B_FIND_PATH_DATA_DIRECTORY, "Canna", B_FIND_PATH_EXISTING_ONLY, path);
copyData()
should rather be named_CopyData()
.- The includes should be sorted alphabetically. "CopyEngine.h" being a private header should be in a separate block.
comment:10 by , 11 years ago
Thanks suggestion! I modified patch. I use both BPathFinder() and BPathFinder(B_CURRENT_IMAGE_SYMBOL) so that user can use either input method add-on from boot/system/optional or package.
With BPathFinder():
- put add-on bellow system/non-packaged with /boot/system/data/Canna -> works after restarting Haiku.
- put add-on bellow home/config/non-packaged with /boot/system/data/Canna -> works without restarting Haiku.
- put package into system/packages with /boot/system/data/Canna -> works after restarting Haiku.
- put package into home/config/packages with /boot/system/data/Canna -> works after restarting Haiku.
- put package into system/packages without /boot/system/data/Canna -> works after restarting Haiku.
- put package into home/config/packages without /boot/system/data/Canna -> do not work.
With BPathFinder(B_CURRENT_IMAGE_SYMBOL):
- put add-on bellow system/non-packaged with /boot/system/data/Canna -> do not work.
- put add-on bellow home/config/non-packaged with /boot/system/data/Canna -> do not work.
- put package into system/packages with /boot/system/data/Canna -> works after restarting Haiku.
- put package into home/config/packages with /boot/system/data/Canna -> works after restarting Haiku.
- put package into system/packages without /boot/system/data/Canna -> works after restarting Haiku.
- put package into home/config/packages without /boot/system/data/Canna -> works after restarting Haiku.
by , 11 years ago
Attachment: | 0002-CannaIM-copy-data-files-to-user-setting-directory.patch added |
---|
comment:11 by , 11 years ago
Replying to bonefish:
I still don't know what the data files are used for, so I can't really comment on whether copying them to the user's settings directory is a good solution.
In Ubuntu, Canna files located as:
- Fallback dictionary list and settings file -> /etc/canna/
- System wide dictionary -> /var/lib/canna/dic/canna
- Group Dictionary -> /var/lib/canna/dic/group
- Each user's dictionary -> /var/lib/canna/dic/user
- Sample key bindings files etc. -> /usr/share/canna
So In haiku, I think files put to:
- Fallback dictionary list and settings file -> /etc/Canna/
- System wide dictionary -> /var/Canna/dic
- Sample key bindings files etc. -> /boot/system/data/Canna
- Each user's dictionary -> /boot/home/settings/config/Canna/dic
- Each user's dictionary list and settings file -> /boot/home/settings/config/Canna
I'm trying to move user dictionary to /boot/home/settings/config/Canna/dic. If I finish it, I will change other data paths.
comment:12 by , 10 years ago
Milestone: | R1 → R1/alpha5 |
---|
Moving to alpha5 milestone, shipping without an input method for CJK languages is not acceptable.
comment:13 by , 10 years ago
Some little question: what is official way to enable this input method? Copying it manually from "optional" folder to home add-ons folder looks like a hack and not suitable for end user.
comment:14 by , 10 years ago
This was the official way until now. We will make a Canna package, and possibly automate its installation from ReadOnlyBootPrompt for the languages that use it.
comment:15 by , 10 years ago
Hi, I tried to move user dictionary, still I can't finish it. So, I make canna package for R1A5. Please test and apply it. (It seems we need restart system after install / uninstall canna via package.)
by , 10 years ago
Attachment: | canna-1.0.1_20140705.recipe added |
---|
comment:16 by , 10 years ago
Priority: | normal → blocker |
---|
DEVS: where should this go? Part of Haiku's repo, deactivated by default but included in the normal build?
comment:17 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've added the attached recipe to HaikuPorts, and uploaded package for x86_gcc2.
However, if we're sticking with outsourcing like this, the source code should also be packaged up properly on somewhere like github.
comment:18 by , 10 years ago
Thanks, jessicah. I uploaded the source code to https://github.com/mt819/CannaIM, and update source, etc. I think canna works with x86_64 now.
by , 10 years ago
Attachment: | canna-1.0.2_20140807.recipe added |
---|
follow-up: 20 comment:19 by , 10 years ago
mt, since this ticket is closed, could you possibly add a pull request over at http://bb.haikuports.org/haikuports/ so that this is not forgotten? It would be the better place to track it now as well.
comment:20 by , 10 years ago
Replying to luroh:
mt, since this ticket is closed, could you possibly add a pull request over at http://bb.haikuports.org/haikuports/ so that this is not forgotten? It would be the better place to track it now as well.
Thanks luroh, I tried pull request from Bitbucket.
comment:21 by , 10 years ago
Should Canna be deleted from Haiku tree now that the package is outsourced to HaikuPorts repo?
comment:23 by , 10 years ago
Milestone: | R1/alpha5 → R1/beta1 |
---|
It looks like add-ons directories are being monitored:
http://cgit.haiku-os.org/haiku/tree/src/servers/input/AddOnManager.cpp#n257
But putting canna in either non-packaged dir and restarting input_server via
hey input_server -q
or even rebooting doesn't result in canna add-on being loaded according tolistimage | grep canna
.Changing component to input_server for now.