diff options
author | Jiachen Yang | 2015-08-10 19:56:51 +0900 |
---|---|---|
committer | Jiachen Yang | 2015-08-10 19:56:51 +0900 |
commit | 285eb39775d22193548fd6fad6312cf3f39547e4 (patch) | |
tree | 70bc4eef41021d872549cbec0d1e50c03e87d0e4 | |
download | aur-285eb39775d22193548fd6fad6312cf3f39547e4.tar.gz |
takeover sublime-text-dev-imfix
-rw-r--r-- | .SRCINFO | 60 | ||||
-rw-r--r-- | LICENSE | 3 | ||||
-rw-r--r-- | PKGBUILD | 139 | ||||
-rw-r--r-- | README.md | 173 | ||||
-rwxr-xr-x | sublime_text_3.sh | 23 | ||||
-rw-r--r-- | sublime_text_3_imfix.install | 96 | ||||
-rwxr-xr-x | sublime_text_3_imfix.sh | 24 |
7 files changed, 518 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1f38d3f6b639 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,60 @@ +pkgbase = sublime-text-dev-imfix + pkgver = 3.3083 + pkgrel = 1 + url = http://www.sublimetext.com/3 + install = sublime_text_3_imfix.install + changelog = README.md + arch = i686 + arch = x86_64 + license = custom + depends = desktop-file-utils + depends = gtk2 + depends = libpng + optdepends = gksu: sudo-save support + provides = sublime-text-dev=3.3083 + provides = sublime-text-nightly + conflicts = sublime-text-dev + conflicts = sublime-text-nightly + noextract = Default.zh_CN.sublime-package + noextract = Default.zh_TW.sublime-package + options = !strip + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_CN/Default.zh_CN.sublime-package + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_TW/Default.zh_TW.sublime-package + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/desktop/sublime_text_3.desktop + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/desktop/sublime_text_3_imfix.desktop + source = LICENSE + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_CN/LICENSE.zh_CN + source = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_TW/LICENSE.zh_TW + source = sublime_text_3.sh + source = sublime_text_3_imfix.sh + md5sums = b21c75fd6922ed383bf4b5ec0b62adb6 + md5sums = c13cc732b9007b205b2a6761f82f6564 + md5sums = 208a4b2ee9c8740e0d022b8050cedcbc + md5sums = 540175c597fdb98364c944551a4d08f1 + md5sums = ee96c697ef707e92077d0c55ec14922a + md5sums = f7e48316f800b0e1e0153111b1c80302 + md5sums = 6d473f472e643abe3549730b9fbd2b10 + md5sums = fa22069242e91e9a7a9dc4023ebf9bf5 + md5sums = 7be7d93a1062a9975f34661d66b72ff0 + source_i686 = http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x32.tar.bz2 + source_i686 = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/i686/libsublime-imfix.i686.so + source_i686 = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/i686/sublime_text.i686 + md5sums_i686 = d1be10594fe7093b1b43a888a48c838f + md5sums_i686 = 9c52cabd468301706be2fea8a7379161 + md5sums_i686 = 9e65dda3f3760bf80915f755f2183519 + source_x86_64 = http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x64.tar.bz2 + source_x86_64 = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/x86_64/libsublime-imfix.x86_64.so + source_x86_64 = https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/x86_64/sublime_text.x86_64 + md5sums_x86_64 = 5da998bea29f9ca02a60d2b3cfc46fea + md5sums_x86_64 = 6e45f6aee03a727c9f09b4136e0b8c9e + md5sums_x86_64 = 901cd838b215f814e2f260a3bdfb6179 + +pkgname = sublime-text-dev-imfix + pkgdesc = Sophisticated text editor for code, HTML and prose, development build with Fcitx input method support + +pkgname = sublime-text-dev-zh-cn + pkgdesc = Sophisticated text editor for code, HTML and prose, development build with Simplified Chinese translation and Fcitx input method support + +pkgname = sublime-text-dev-zh-tw + pkgdesc = Sophisticated text editor for code, HTML and prose, development build with Traditional Chinese translation and Fcitx input method support + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..3e2f842607c7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,3 @@ +Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. +Licenses are per-user, rather than per-machine, so you can enjoy Sublime Text on as many computers and operating systems as you wish with your license. +For more information, please visit https://www.sublimetext.com/buy diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6b5668c082fe --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,139 @@ +# Maintainer : farseerfc <farseerfc@archlinuxcn.org> +# Contributor : Fernando "Firef0x" G.P. da Silva <firefgx { aT ) gmail [ d0t } com> +# Contributor : Sander Boom <sander at inflowmotion dot nl> (From sublime-text-dev) +# Contributor : realitygaps <realitygaps at yahoo dot com> (From sublime-text-dev) +# Contributor : ska <skatiger (at} gmail {dot) com> (From sublime-text-imfix) + +pkgname=('sublime-text-dev-imfix' 'sublime-text-dev-zh-cn' 'sublime-text-dev-zh-tw') +pkgver=3.3083 +pkgrel=1 +arch=('i686' 'x86_64') +url="http://www.sublimetext.com/3" +license=('custom') +depends=('desktop-file-utils' 'gtk2' 'libpng') +optdepends=('gksu: sudo-save support') +provides=("sublime-text-dev=${pkgver}" 'sublime-text-nightly') +conflicts=('sublime-text-dev' 'sublime-text-nightly') +options=('!strip') +changelog=README.md + +_pkgname=sublime_text_3 +_pkgname1="${_pkgname}_imfix" +_rplexe=0 + +install=${_pkgname1}.install +noextract=("Default.zh_CN.sublime-package" + "Default.zh_TW.sublime-package") + +source=("https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_CN/Default.zh_CN.sublime-package" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_TW/Default.zh_TW.sublime-package" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/desktop/${_pkgname}.desktop" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/desktop/${_pkgname1}.desktop" + "LICENSE" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_CN/LICENSE.zh_CN" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/any/zh_TW/LICENSE.zh_TW" + "${_pkgname}.sh" + "${_pkgname1}.sh") +source_i686=("http://c758482.r82.cf2.rackcdn.com/${_pkgname}_build_${pkgver:2}_x32.tar.bz2" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/i686/libsublime-imfix.i686.so" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/i686/sublime_text.i686") +source_x86_64=("http://c758482.r82.cf2.rackcdn.com/${_pkgname}_build_${pkgver:2}_x64.tar.bz2" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/x86_64/libsublime-imfix.x86_64.so" + "https://raw.githubusercontent.com/Firef0x/SublimeText-i18n-zh/master/dist/x86_64/sublime_text.x86_64") + +md5sums=('b21c75fd6922ed383bf4b5ec0b62adb6' + 'c13cc732b9007b205b2a6761f82f6564' + '208a4b2ee9c8740e0d022b8050cedcbc' + '540175c597fdb98364c944551a4d08f1' + 'ee96c697ef707e92077d0c55ec14922a' + 'f7e48316f800b0e1e0153111b1c80302' + '6d473f472e643abe3549730b9fbd2b10' + 'fa22069242e91e9a7a9dc4023ebf9bf5' + '7be7d93a1062a9975f34661d66b72ff0') +md5sums_i686=('d1be10594fe7093b1b43a888a48c838f' + '9c52cabd468301706be2fea8a7379161' + '9e65dda3f3760bf80915f755f2183519') +md5sums_x86_64=('5da998bea29f9ca02a60d2b3cfc46fea' + '6e45f6aee03a727c9f09b4136e0b8c9e' + '901cd838b215f814e2f260a3bdfb6179') + +_package_common() { + # Copy everything + install -d "${pkgdir}/opt" + cp --preserve=mode -r "${_pkgname}" "${pkgdir}/opt/${_pkgname}" + + # Install IM fix library + install -Dm755 libsublime-imfix.${CARCH}.so \ + ${pkgdir}/opt/${_pkgname}/libsublime-imfix.so + + # Install icons and desktop shortcuts + for res in 16x16 32x32 48x48 128x128 256x256; do + install -d "${pkgdir}/usr/share/icons/hicolor/${res}/apps" + ln -sf "/opt/${_pkgname}/Icon/${res}/sublime-text.png" \ + "${pkgdir}/usr/share/icons/hicolor/${res}/apps/sublime-text.png" + done + + install -d "${pkgdir}/usr/share/applications" + install -Dm644 ${_pkgname}.desktop \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + install -Dm644 ${_pkgname1}.desktop \ + "${pkgdir}/usr/share/applications/${_pkgname1}.desktop" + + # Install bin file + install -d "${pkgdir}/usr/bin" + install -Dm755 ${_pkgname}.sh "${pkgdir}/usr/bin/${_pkgname}" + install -Dm755 ${_pkgname1}.sh "${pkgdir}/usr/bin/${_pkgname1}" + + # Make symbolic links + ln -sf "/usr/bin/${_pkgname1}" "${pkgdir}/usr/bin/subl3" + + # Install license file + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_sublime-text-dev-imfix() { + pkgdesc="Sophisticated text editor for code, HTML and prose, development build with Fcitx input method support" + + _package_common +} + +package_sublime-text-dev-zh-cn() { + pkgdesc="Sophisticated text editor for code, HTML and prose, development build with Simplified Chinese translation and Fcitx input method support" + + if [ ${_rplexe} -eq 1 ]; then + rm "${_pkgname}/sublime_text" + install -Dm755 sublime_text.${CARCH} \ + ${_pkgname}/sublime_text + fi + + rm "${_pkgname}/Packages/Default.sublime-package" + install -Dm644 Default.zh_CN.sublime-package \ + ${_pkgname}/Packages/Default.sublime-package + + _package_common + + # Install license file + install -Dm644 LICENSE.zh_CN "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.zh_CN" +} + +package_sublime-text-dev-zh-tw() { + pkgdesc="Sophisticated text editor for code, HTML and prose, development build with Traditional Chinese translation and Fcitx input method support" + + if [ ${_rplexe} -eq 1 ]; then + rm "${_pkgname}/sublime_text" + install -Dm755 sublime_text.${CARCH} \ + ${_pkgname}/sublime_text + fi + + rm "${_pkgname}/Packages/Default.sublime-package" + install -Dm644 Default.zh_TW.sublime-package \ + ${_pkgname}/Packages/Default.sublime-package + + _package_common + + # Install license file + install -Dm644 LICENSE.zh_TW "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.zh_TW" +} + +# vim:set sts=2 sw=2 ts=2 et: diff --git a/README.md b/README.md new file mode 100644 index 000000000000..168f2cc7d843 --- /dev/null +++ b/README.md @@ -0,0 +1,173 @@ +# CHANGELOG 更新日志 更新日誌 + +#### 3.3065-3 +---------- +##### 2015-02-12 Fernando "Firef0x" G.P. da Silva <firefgx { aT ) gmail [ d0t } com> + +* Add package `sublime-text-dev-zh-tw` providing Traditional Chinese translation +* 添加软件包 `sublime-text-dev-zh-tw` 以提供繁体中文翻译 +* 新增軟體套件 `sublime-text-dev-zh-tw` 以提供繁體中文翻譯 +* Refine desktop entries +* 完善桌面图标 +* 完善桌面圖示 + +-------------------------------------------------------------------------------- + +#### 3.3065-2 +---------- +##### 2014-12-15 Fernando "Firef0x" G.P. da Silva <firefgx { aT ) gmail [ d0t } com> + +* Add package `sublime-text-dev-zh-cn` providing Simplified Chinese translation +* 添加软件包 `sublime-text-dev-zh-cn` 以提供简体中文翻译 +* 新增軟體套件 `sublime-text-dev-zh-cn` 以提供簡體中文翻譯 + +-------------------------------------------------------------------------------- + +From `Build 3065`, the launch script [subl3][1] is split into two launch scripts +[sublime_text_3][2] and [sublime_text_3_imfix][3]. +[sublime_text_3][2] would launch the original executable `sublime_text` +without loading the library [libsublime-imfix.so][4]. +`/usr/bin/subl3` is a symlink to `/usr/bin/sublime_text_3_imfix` as default, +and you could re-link it to `/usr/bin/sublime_text_3` if you like. (Or re-link +it to `/usr/bin/vim` or `/usr/bin/emacs` if you like O(^_^)O) + +The desktop entry [sublime_text_3.desktop][5] is also split into two desktop +entries [sublime_text_3.desktop][6] and [sublime_text_3_imfix.desktop][7]. Note +that [sublime_text_3_imfix.desktop][7] is corresponding to +[sublime_text_3.desktop][5] in previous version. + +-------------------------------------------------------------------------------- + +从`构建版本 3065` 开始,运行脚本 [subl3][1] 分为两个运行脚本 [sublime_text_3][2] +和 [sublime_text_3_imfix][3]。[sublime_text_3][2] 将不加载链接库 +[libsublime-imfix.so][4] 直接运行原来的可执行文件 `sublime_text`。 +`/usr/bin/subl3` 默认为一个指向 `/usr/bin/sublime_text_3_imfix` 的符号链接。 +只要您愿意,您可以重新链接到 `/usr/bin/sublime_text_3`。(或者重新链接到 +`/usr/bin/vim` 或者 `/usr/bin/emacs`,如果您愿意的话。O(^_^)O) + +桌面图标 [sublime_text_3.desktop][5] 同样分为两个桌面图标 [sublime_text_3.desktop][6] +和 [sublime_text_3_imfix.desktop][7]。请注意,[sublime_text_3_imfix.desktop][7] +对应于之前版本的 [sublime_text_3.desktop][5]。 + +-------------------------------------------------------------------------------- + +從`構建版本 3065` 開始,啟動指令碼 [subl3][1] 分為兩個啟動指令碼 +[sublime_text_3][2] 和 [sublime_text_3_imfix][3]。[sublime_text_3][2] 將不載入連 +結庫 [libsublime-imfix.so][4] 直接運行原來的可執行檔案 `sublime_text`。 +`/usr/bin/subl3` 預設為一個指向 `/usr/bin/sublime_text_3_imfix` 的符號連結。 +只要您願意,您可以重新連結到 `/usr/bin/sublime_text_3`。(或者重新連結到 +`/usr/bin/vim` 或者 `/usr/bin/emacs`,如果您願意的話。O(^_^)O) + +桌面圖示 [sublime_text_3.desktop][5] 同樣分為兩個桌面圖示 [sublime_text_3.desktop][6] +和 [sublime_text_3_imfix.desktop][7]。請注意,[sublime_text_3_imfix.desktop][7] +對應於之前版本的 [sublime_text_3.desktop][5]。 + +-------------------------------------------------------------------------------- + +## The following is the changelog for the latest build: +## 以下是最新版本的更新日志: +## 以下是最新版本的更新日誌: + +Sublime Text 3 is currently in beta. The latest build is 3083. + +#### Build 3083 +---------- +Release Date: 26 March 2015 + +* Fixed high CPU usage caused by a corrupt index. This was occuring for some users upgrading from 3065 +* Added setting index_workers to control the number of threads used for file indexing. By default the number of threads is based on the number of CPU cores. By setting index_workers to 1 or 2, indexing will be slower, but less intrusive +* Fixed a crash when showing the Command Palette with an empty .sublime-build file +* Tab completion no longer completes numbers. Edit/Show Completions can still be used for this + +#### Build 3080 +---------- +Release Date: 24 March 2015 +See also the [Blog Post][8]. + +* Fixed Redo sometimes restoring the selection to the incorrect location +* Reworked how Build Systems are selected (More Information) +* Build Systems may now declare "keyfiles" (e.g., 'Makefile' for the Make build system) to better auto detect which build system to use +* Improved handling of build systems that generate lots of output +* New windows always use the automatic build system, rather than the build system of the last used window +* Command Palette now remembers the last entered string +* Improved change detection for files that disappear and reappear, as happens with disconnected network drives +* atomic_save is disabled by default +* Right clicking on a URL will show an "Open URL" menu item +* Added Goto Definition to the context menu +* Improved behavior of Goto Definition when using multiple panes +* Misspelled words can now be added to the dictionary, in addition to being ignored +* Fixed Ignored Words not persisting after exiting +* Fixed a long standing issue with spell checking and non-ascii characters +* Added spelling_selector setting, to control what text is checked for misspellings +* Tweaked handling of syntax definitions and unused captures, resolving an issue with spell checking in Markdown links. +* Goto Anything supports :line:col syntax in addition to :line +* Added Edit Project to the Command palette +* Improved quote auto pairing logic +* Added <current file> option to Find in Files +* Improved Console Panel scrolling behavior +* .tmLanguage files may contain a hidden setting, to indicate they shouldn't be displayed to the user +* Improved some error messages when parsing .tmLanguage files +* remember_open_files setting is now defaults to false. Note that this change will have no effect if the hot_exit setting is left at its default value of true +* Added auto_complete_cycle setting +* Fixed Minimap refusing to draw on very large windows +* Fixed not being able to click on the selected row of the auto complete popup +* Fixed sidebar icons sometimes being invisible on startup +* Transient sheets (e.g., as created by Goto Anything when previewing files) are no longer added to the Recently Closed list +* Improved scrolling behavior when line_padding_top is > 0 +* Fixed a bug with scrolling tabs, where a 1 pixel line would occasionally appear underneath them +* Fixed tabset background being set to the wrong color on startup if different colored tabs are used +* Updated to a never version of leveldb, fixing constant low level CPU usage if the index becomes corrupted +* Fixed a crash that could occur when directories are being rapidly deleted and recreated +* Fixed a crash that occurred when dragging rows scrolled out of view in the side bar +* Fixed a long standing plugin_host crash triggered via modal dialogs +* Fixed a typo in the "Save Workspace As" dialog +* Fixed incorrect menu mnemonics +* Linux: Added sudo save +* Windows: Popup windows are able to receive scroll wheel input +* Windows: subl.exe command line helper accepts wildcards +* Windows: Fixed access denied errors that could occur when saving with atomic_save disabled +* Windows: Added workaround for broken std::condition_variable in MSVC 2012, fixing a crash in plugin_host +* Windows: Added more descriptive errors when the Update Installer fails to rename a folder +* Windows: Fixed incorrect window sizing after making a maximised window full screen +* OSX: Added work around for performActionForItemAtIndex: taking an excessively long time in Yosemite. This affected any commands that had a corresponding menu item. +* OSX: Workaround for an OS issue with zero size windows and OpenGL views +* OSX: subl command line tool no longer uses Distributed Objects, resolving some intermittent failures +* Posix: Fixed new files not respecting the umask permission flags +* API: Added View.show_popup() and related functions +* API: Added sublime.yes_no_cancel_dialog() +* API: Added sublime.expand_variables() +* API: Added Window.extract_variables() +* API: Added Sheet.view() +* API: Window.show_quick_panel() now accepts the flag sublime.KEEP_OPEN_ON_FOCUS_LOST +* API: Window.show_quick_panel() will now scroll to the selected item when shown +* API: Fixed on_post_window_command() not getting called + +#### Build 3065 +---------- +Release Date: 29 August 2014 + +* Added sidebar icons +* Added sidebar loading indicators +* Sidebar remembers which folders are expanded +* Tweaked window closing behavior when pressing ctrl+w / cmd+w +* Improved quote auto pairing logic +* Selected group is now stored in the session +* Added remember_full_screen setting +* Fixed a lockup when transitioning from a blinking to a solid caret +* Fixed a crash in plugin_host +* Fixed a crash triggered by Goto Anything cloning views +* Windows: Added command line helper, subl.exe +* OSX: Added 'New Window' entry to dock menu +* Posix: Using correct permissions for newly created files and folders +* API: Updated to Python 3.3.3 + +For more changelog and information, please visit http://www.sublimetext.com/3 + +[1]: https://github.com/Firef0x/AUR-Firef0x/blob/75afa8662d4185afd15cdbbab0c8418a39e85b20/aur/sublime-text-dev-imfix/subl3 +[2]: https://github.com/Firef0x/AUR-Firef0x/blob/master/aur/sublime-text-dev-imfix/sublime_text_3.sh +[3]: https://github.com/Firef0x/AUR-Firef0x/blob/master/aur/sublime-text-dev-imfix/sublime_text_3_imfix.sh +[4]: https://github.com/Firef0x/SublimeText-i18n-zh/blob/master/dist/x86_64/libsublime-imfix.x86_64.so +[5]: https://github.com/Firef0x/AUR-Firef0x/blob/377934551a2476668ddc41e4e074f14c2e98294d/aur/sublime-text-dev-imfix/sublime_text_3.desktop +[6]: https://github.com/Firef0x/SublimeText-i18n-zh/blob/master/dist/any/desktop/sublime_text_3.desktop +[7]: https://github.com/Firef0x/SublimeText-i18n-zh/blob/master/dist/any/desktop/sublime_text_3_imfix.desktop +[8]: http://www.sublimetext.com/blog/articles/sublime-text-3-build-3080 diff --git a/sublime_text_3.sh b/sublime_text_3.sh new file mode 100755 index 000000000000..dfd4affaf2f9 --- /dev/null +++ b/sublime_text_3.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Please note that Sublime Text 3 for some reason opens an empty instance +# if the project you're trying to open is already open in another instance, +# instead of just giving it focus. + +SUBLIME_HOME=/opt/sublime_text_3 +BIN="${SUBLIME_HOME}/sublime_text" + +PID=$(pidof -o %PPID ${BIN} 2>/dev/null) +ARGS="--class=sublime-text" + +if [[ ${1:(-16)} == ".sublime-project" ]]; then + ARGS="${ARGS} --project" +fi + +if [[ -n ${PID} ]]; then + ${BIN} ${ARGS} "$@" +else + ${BIN} ${ARGS} "$@" & +fi + +# vim:set ts=2 sw=2 et: diff --git a/sublime_text_3_imfix.install b/sublime_text_3_imfix.install new file mode 100644 index 000000000000..ce187519b61f --- /dev/null +++ b/sublime_text_3_imfix.install @@ -0,0 +1,96 @@ +post_install() { + # Update desktop entries. + update-desktop-database -q + + # Update icon cache. + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + + # Note admin after install/update on how to change th update_check setting. + cat << _EOF + + ==> Sublime Text 3 Dev install/upgrade note: + ------------------------------------------------------------------------------ + + From Build 3065, the launch script 'subl3' is split into two launch scripts + 'sublime_text_3' and 'sublime_text_3_imfix'. 'sublime_text_3' would launch + the original executable 'sublime_text' without loading the library + 'libsublime-imfix.so'. + '/usr/bin/subl3' is a symlink to '/usr/bin/sublime_text_3_imfix' as default, + and you could re-link it to '/usr/bin/sublime_text_3' if you like. (Or re-link + it to '/usr/bin/vim' or '/usr/bin/emacs' if you like O(^_^)O) + + The desktop entry 'sublime_text_3.desktop' is also split into two desktop + entries 'sublime_text_3.desktop' and 'sublime_text_3_imfix.desktop'. Note that + 'sublime_text_3_imfix.desktop' is corresponding to 'sublime_text_3.desktop' + in previous version. + + To disable in-application reminders about new Sublime Text 3 Dev versions, add + the following setting to your User Preferences file: + + "update_check": false + + + + + The following is Simplified Chinese translation. + + ==> Sublime Text 3 开发版安装/升级注意事项: + ------------------------------------------------------------------------------ + + 从构建版本 3065 开始,运行脚本 "subl3" 分为两个运行脚本 "sublime_text_3" 和 + "sublime_text_3_imfix"。"sublime_text_3" 将不加载链接库 "libsublime-imfix.so" + 直接运行原来的可执行文件 "sublime_text"。 + "/usr/bin/subl3" 默认为一个指向 "/usr/bin/sublime_text_3_imfix" 的符号链接。 + 只要您愿意,您可以重新链接到 "/usr/bin/sublime_text_3"。(或者重新链接到 + "/usr/bin/vim" 或者 "/usr/bin/emacs",如果您愿意的话。O(^_^)O) + + 桌面图标 "sublime_text_3.desktop" 同样分为两个桌面图标 "sublime_text_3.desktop" + 和 "sublime_text_3_imfix.desktop"。请注意,"sublime_text_3_imfix.desktop" + 对应于之前版本的 "sublime_text_3.desktop"。 + + 要禁止 Sublime Text 3 开发版的应用内升级提醒,请在您的用户配置文件中添加以下 + 内容: + + "update_check": false + + + + + The following is Traditional Chinese translation. + + ==> Sublime Text 3 開發版安裝/升級注意事項: + ------------------------------------------------------------------------------ + + 從構建版本 3065 開始,啟動指令碼 "subl3" 分為兩個啟動指令碼 "sublime_text_3" + 和 "sublime_text_3_imfix"。"sublime_text_3" 將不載入連結庫 + "libsublime-imfix.so" 直接運行原來的可執行檔案 "sublime_text"。 + "/usr/bin/subl3" 預設為一個指向 "/usr/bin/sublime_text_3_imfix" 的符號連結。 + 只要您願意,您可以重新連結到 "/usr/bin/sublime_text_3"。(或者重新連結到 + "/usr/bin/vim" 或者 "/usr/bin/emacs",如果您願意的話。O(^_^)O) + + 桌面圖示 "sublime_text_3.desktop" 同樣分為兩個桌面圖示 "sublime_text_3.desktop" + 和 "sublime_text_3_imfix.desktop"。請注意,"sublime_text_3_imfix.desktop" + 對應於之前版本的 "sublime_text_3.desktop"。 + + 要禁止 Sublime Text 3 開發版的應用內升級提醒,請在您的用戶設定檔案中新增以下 + 內容: + + "update_check": false + + + + +_EOF +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + # Update desktop entries. + update-desktop-database -q + + # Update icon cache. + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/sublime_text_3_imfix.sh b/sublime_text_3_imfix.sh new file mode 100755 index 000000000000..db2a54b56454 --- /dev/null +++ b/sublime_text_3_imfix.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Please note that Sublime Text 3 for some reason opens an empty instance +# if the project you're trying to open is already open in another instance, +# instead of just giving it focus. + +SUBLIME_HOME=/opt/sublime_text_3 +LD_LIB="${SUBLIME_HOME}/libsublime-imfix.so" +BIN="${SUBLIME_HOME}/sublime_text" + +PID=$(pidof -o %PPID ${BIN} 2>/dev/null) +ARGS="--class=sublime-text" + +if [[ ${1:(-16)} == ".sublime-project" ]]; then + ARGS="${ARGS} --project" +fi + +if [[ -n ${PID} ]]; then + LD_PRELOAD=${LD_LIB} ${BIN} ${ARGS} "$@" +else + LD_PRELOAD=${LD_LIB} ${BIN} ${ARGS} "$@" & +fi + +# vim:set ts=2 sw=2 et: |