Permalink
Browse files

Merge https://github.com/user-none/Sigil

updating to latest
  • Loading branch information...
Kevin Hendricks
Kevin Hendricks committed Sep 25, 2014
2 parents 3b45b04 + 535787c commit ac60583c1d041c1cbc3a201276e88b9a7ea58536
Showing with 182 additions and 56,606 deletions.
  1. +0 −1 CMakeLists.txt
  2. +0 −2 INSTALL.txt
  3. +0 −51 src/Sigil/CMakeLists.txt
  4. +8 −9 src/Sigil/Dialogs/PluginRunner.cpp
  5. +2 −0 src/Sigil/Dialogs/PluginRunner.h
  6. +0 −38 src/Sigil/Dialogs/PreferenceWidgets/PluginWidget.cpp
  7. +0 −3 src/Sigil/Dialogs/PreferenceWidgets/PluginWidget.h
  8. +153 −184 src/Sigil/Form_Files/PPluginWidget.ui
  9. +13 −1 src/Sigil/Form_Files/main.ui
  10. +4 −7 src/Sigil/MainUI/MainWindow.cpp
  11. +2 −1 src/Sigil/Misc/Plugin.cpp
  12. +0 −21 src/Sigil/Misc/PluginDB.cpp
  13. +0 −1 src/Sigil/Misc/PluginDB.h
  14. +0 −23 src/Sigil/Misc/SettingsStore.cpp
  15. +0 −2 src/Sigil/Misc/SettingsStore.h
  16. +0 −119 src/Sigil/Resource_Files/plugin_launchers/lua/launcher.lua
  17. +0 −8 src/lua/CMakeLists.txt
  18. +0 −135 src/lua/Penlight/CHANGES.md
  19. +0 −46 src/lua/Penlight/CONTRIBUTING.md
  20. +0 −21 src/lua/Penlight/LICENSE.md
  21. +0 −230 src/lua/Penlight/README.md
  22. +0 −20 src/lua/Penlight/doc/config.ld
  23. +0 −621 src/lua/Penlight/doc/manual/01-introduction.md
  24. +0 −649 src/lua/Penlight/doc/manual/02-arrays.md
  25. +0 −224 src/lua/Penlight/doc/manual/03-strings.md
  26. +0 −170 src/lua/Penlight/doc/manual/04-paths.md
  27. +0 −109 src/lua/Penlight/doc/manual/05-dates.md
  28. +0 −1,262 src/lua/Penlight/doc/manual/06-data.md
  29. +0 −547 src/lua/Penlight/doc/manual/07-functional.md
  30. +0 −478 src/lua/Penlight/doc/manual/08-additional.md
  31. +0 −91 src/lua/Penlight/doc/manual/09-discussion.md
  32. +0 −54 src/lua/Penlight/examples/seesubst.lua
  33. +0 −33 src/lua/Penlight/examples/sipscan.lua
  34. +0 −223 src/lua/Penlight/examples/symbols.lua
  35. +0 −4 src/lua/Penlight/examples/test-cmp.lua
  36. +0 −10 src/lua/Penlight/examples/test-listcallbacks.lua
  37. +0 −13 src/lua/Penlight/examples/test-pretty.lua
  38. +0 −85 src/lua/Penlight/examples/test-symbols.lua
  39. +0 −5 src/lua/Penlight/examples/testapp.lua
  40. +0 −38 src/lua/Penlight/examples/testclone.lua
  41. +0 −51 src/lua/Penlight/examples/testconfig.lua
  42. +0 −27 src/lua/Penlight/examples/testglobal.lua
  43. +0 −13 src/lua/Penlight/examples/testinputfields.lua
  44. +0 −8 src/lua/Penlight/examples/testinputfields2.lua
  45. +0 −81 src/lua/Penlight/examples/testxml.lua
  46. +0 −30 src/lua/Penlight/examples/which.lua
  47. +0 −640 src/lua/Penlight/lua/pl/Date.lua
  48. +0 −567 src/lua/Penlight/lua/pl/List.lua
  49. +0 −117 src/lua/Penlight/lua/pl/Map.lua
  50. +0 −61 src/lua/Penlight/lua/pl/MultiMap.lua
  51. +0 −167 src/lua/Penlight/lua/pl/OrderedMap.lua
  52. +0 −182 src/lua/Penlight/lua/pl/Set.lua
  53. +0 −163 src/lua/Penlight/lua/pl/app.lua
  54. +0 −499 src/lua/Penlight/lua/pl/array2d.lua
  55. +0 −250 src/lua/Penlight/lua/pl/class.lua
  56. +0 −137 src/lua/Penlight/lua/pl/compat.lua
  57. +0 −286 src/lua/Penlight/lua/pl/comprehension.lua
  58. +0 −203 src/lua/Penlight/lua/pl/config.lua
  59. +0 −653 src/lua/Penlight/lua/pl/data.lua
  60. +0 −476 src/lua/Penlight/lua/pl/dir.lua
  61. +0 −62 src/lua/Penlight/lua/pl/file.lua
  62. +0 −374 src/lua/Penlight/lua/pl/func.lua
  63. +0 −89 src/lua/Penlight/lua/pl/import_into.lua
  64. +0 −11 src/lua/Penlight/lua/pl/init.lua
  65. +0 −172 src/lua/Penlight/lua/pl/input.lua
  66. +0 −420 src/lua/Penlight/lua/pl/lapp.lua
  67. +0 −455 src/lua/Penlight/lua/pl/lexer.lua
  68. +0 −264 src/lua/Penlight/lua/pl/luabalanced.lua
  69. +0 −211 src/lua/Penlight/lua/pl/operator.lua
  70. +0 −413 src/lua/Penlight/lua/pl/path.lua
  71. +0 −63 src/lua/Penlight/lua/pl/permute.lua
  72. +0 −286 src/lua/Penlight/lua/pl/pretty.lua
  73. +0 −551 src/lua/Penlight/lua/pl/seq.lua
  74. +0 −341 src/lua/Penlight/lua/pl/sip.lua
  75. +0 −123 src/lua/Penlight/lua/pl/strict.lua
  76. +0 −158 src/lua/Penlight/lua/pl/stringio.lua
  77. +0 −461 src/lua/Penlight/lua/pl/stringx.lua
  78. +0 −895 src/lua/Penlight/lua/pl/tablex.lua
  79. +0 −105 src/lua/Penlight/lua/pl/template.lua
  80. +0 −146 src/lua/Penlight/lua/pl/test.lua
  81. +0 −245 src/lua/Penlight/lua/pl/text.lua
  82. +0 −143 src/lua/Penlight/lua/pl/types.lua
  83. +0 −475 src/lua/Penlight/lua/pl/utils.lua
  84. +0 −775 src/lua/Penlight/lua/pl/xml.lua
  85. +0 −65 src/lua/Penlight/penlight-1.1.0-3.rockspec
  86. +0 −41 src/lua/Penlight/run.lua
  87. +0 −54 src/lua/Penlight/tests/lua/animal.lua
  88. +0 −10 src/lua/Penlight/tests/lua/bar.lua
  89. +0 −9 src/lua/Penlight/tests/lua/foo/args.lua
  90. +0 −20 src/lua/Penlight/tests/lua/mod52.lua
  91. +0 −19 src/lua/Penlight/tests/lua/mymod.lua
  92. +0 −28 src/lua/Penlight/tests/test-animal.lua
  93. +0 −39 src/lua/Penlight/tests/test-args.lua
  94. +0 −77 src/lua/Penlight/tests/test-array.lua
  95. +0 −123 src/lua/Penlight/tests/test-class.lua
  96. +0 −13 src/lua/Penlight/tests/test-compare-no-order.lua
  97. +0 −68 src/lua/Penlight/tests/test-comprehension.lua
  98. +0 −310 src/lua/Penlight/tests/test-config.lua
  99. +0 −220 src/lua/Penlight/tests/test-data.lua
  100. +0 −115 src/lua/Penlight/tests/test-date.lua
  101. +0 −72 src/lua/Penlight/tests/test-dir.lua
  102. +0 −75 src/lua/Penlight/tests/test-fenv.lua
  103. +0 −90 src/lua/Penlight/tests/test-func.lua
  104. +0 −27 src/lua/Penlight/tests/test-import_into.lua
  105. +0 −20 src/lua/Penlight/tests/test-job-query.lua
  106. +0 −29 src/lua/Penlight/tests/test-klass.lua
  107. +0 −170 src/lua/Penlight/tests/test-lapp.lua
  108. +0 −94 src/lua/Penlight/tests/test-lexer.lua
  109. +0 −62 src/lua/Penlight/tests/test-list.lua
  110. +0 −17 src/lua/Penlight/tests/test-map.lua
  111. +0 −12 src/lua/Penlight/tests/test-move.lua
  112. +0 −70 src/lua/Penlight/tests/test-path.lua
  113. +0 −31 src/lua/Penlight/tests/test-pretty-number.lua
  114. +0 −110 src/lua/Penlight/tests/test-pretty.lua
  115. +0 −65 src/lua/Penlight/tests/test-pylib.lua
  116. +0 −21 src/lua/Penlight/tests/test-relpath.lua
  117. +0 −70 src/lua/Penlight/tests/test-seq.lua
  118. +0 −193 src/lua/Penlight/tests/test-set.lua
  119. +0 −99 src/lua/Penlight/tests/test-sip.lua
  120. +0 −50 src/lua/Penlight/tests/test-strict.lua
  121. +0 −72 src/lua/Penlight/tests/test-stringio.lua
  122. +0 −272 src/lua/Penlight/tests/test-stringx.lua
  123. +0 −41 src/lua/Penlight/tests/test-substitute.lua
  124. +0 −26 src/lua/Penlight/tests/test-super.lua
  125. +0 −179 src/lua/Penlight/tests/test-tablex.lua
  126. +0 −165 src/lua/Penlight/tests/test-text.lua
  127. +0 −9 src/lua/Penlight/tests/test-tzone.lua
  128. +0 −118 src/lua/Penlight/tests/test-vector.lua
  129. +0 −507 src/lua/Penlight/tests/test-xml.lua
  130. +0 −33 src/lua/Penlight/tests/tests.run
  131. +0 −27 src/lua/lfs/CMakeLists.txt
  132. +0 −21 src/lua/lfs/LICENSE
  133. +0 −22 src/lua/lfs/Makefile
  134. +0 −25 src/lua/lfs/Makefile.win
  135. +0 −78 src/lua/lfs/README
  136. +0 −24 src/lua/lfs/config
  137. +0 −19 src/lua/lfs/config.win
  138. +0 −212 src/lua/lfs/doc/us/doc.css
  139. +0 −103 src/lua/lfs/doc/us/examples.html
  140. +0 −213 src/lua/lfs/doc/us/index.html
  141. +0 −122 src/lua/lfs/doc/us/license.html
  142. BIN src/lua/lfs/doc/us/luafilesystem.png
  143. +0 −280 src/lua/lfs/doc/us/manual.html
  144. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.3.0-1.rockspec
  145. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.4.0-1.rockspec
  146. +0 −43 src/lua/lfs/rockspecs/luafilesystem-1.4.0-2.rockspec
  147. +0 −43 src/lua/lfs/rockspecs/luafilesystem-1.4.1-1.rockspec
  148. +0 −43 src/lua/lfs/rockspecs/luafilesystem-1.4.1rc1-1.rockspec
  149. +0 −26 src/lua/lfs/rockspecs/luafilesystem-1.4.2-1.rockspec
  150. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.5.0-1.rockspec
  151. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.6.0-1.rockspec
  152. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.6.1-1.rockspec
  153. +0 −27 src/lua/lfs/rockspecs/luafilesystem-1.6.2-1.rockspec
  154. +0 −44 src/lua/lfs/rockspecs/luafilesystem-cvs-1.rockspec
  155. +0 −26 src/lua/lfs/rockspecs/luafilesystem-cvs-2.rockspec
  156. +0 −2 src/lua/lfs/src/.gitignore
  157. +0 −891 src/lua/lfs/src/lfs.c
  158. +0 −17 src/lua/lfs/src/lfs.h
  159. +0 −168 src/lua/lfs/tests/test.lua
  160. +0 −33 src/lua/lfs/vc6/luafilesystem.dsw
  161. +0 −127 src/lua/lfs/vc6/luafilesystem_dll.dsp
  162. +0 −53 src/lua/lua/CMakeLists.txt
  163. +0 −114 src/lua/lua/Makefile
  164. +0 −6 src/lua/lua/README
  165. +0 −533 src/lua/lua/doc/contents.html
  166. BIN src/lua/lua/doc/logo.gif
  167. +0 −116 src/lua/lua/doc/lua.1
  168. +0 −96 src/lua/lua/doc/lua.css
  169. +0 −118 src/lua/lua/doc/luac.1
  170. +0 −27 src/lua/lua/doc/manual.css
  171. +0 −10,507 src/lua/lua/doc/manual.html
  172. BIN src/lua/lua/doc/osi-certified-72x60.png
  173. +0 −413 src/lua/lua/doc/readme.html
  174. +0 −187 src/lua/lua/src/Makefile
  175. +0 −1,284 src/lua/lua/src/lapi.c
  176. +0 −24 src/lua/lua/src/lapi.h
  177. +0 −959 src/lua/lua/src/lauxlib.c
  178. +0 −212 src/lua/lua/src/lauxlib.h
  179. +0 −458 src/lua/lua/src/lbaselib.c
  180. +0 −212 src/lua/lua/src/lbitlib.c
  181. +0 −881 src/lua/lua/src/lcode.c
  182. +0 −83 src/lua/lua/src/lcode.h
  183. +0 −155 src/lua/lua/src/lcorolib.c
  184. +0 −52 src/lua/lua/src/lctype.c
  185. +0 −95 src/lua/lua/src/lctype.h
  186. +0 −398 src/lua/lua/src/ldblib.c
  187. +0 −593 src/lua/lua/src/ldebug.c
  188. +0 −34 src/lua/lua/src/ldebug.h
  189. +0 −681 src/lua/lua/src/ldo.c
  190. +0 −46 src/lua/lua/src/ldo.h
  191. +0 −173 src/lua/lua/src/ldump.c
  192. +0 −161 src/lua/lua/src/lfunc.c
  193. +0 −33 src/lua/lua/src/lfunc.h
  194. +0 −1,220 src/lua/lua/src/lgc.c
  195. +0 −157 src/lua/lua/src/lgc.h
  196. +0 −67 src/lua/lua/src/linit.c
  197. +0 −666 src/lua/lua/src/liolib.c
  198. +0 −530 src/lua/lua/src/llex.c
  199. +0 −78 src/lua/lua/src/llex.h
  200. +0 −309 src/lua/lua/src/llimits.h
  201. +0 −279 src/lua/lua/src/lmathlib.c
  202. +0 −99 src/lua/lua/src/lmem.c
  203. +0 −57 src/lua/lua/src/lmem.h
  204. +0 −725 src/lua/lua/src/loadlib.c
  205. +0 −287 src/lua/lua/src/lobject.c
  206. +0 −607 src/lua/lua/src/lobject.h
  207. +0 −107 src/lua/lua/src/lopcodes.c
  208. +0 −288 src/lua/lua/src/lopcodes.h
  209. +0 −323 src/lua/lua/src/loslib.c
  210. +0 −1,638 src/lua/lua/src/lparser.c
  211. +0 −119 src/lua/lua/src/lparser.h
  212. +0 −323 src/lua/lua/src/lstate.c
  213. +0 −228 src/lua/lua/src/lstate.h
  214. +0 −185 src/lua/lua/src/lstring.c
  215. +0 −46 src/lua/lua/src/lstring.h
  216. +0 −1,019 src/lua/lua/src/lstrlib.c
  217. +0 −588 src/lua/lua/src/ltable.c
  218. +0 −45 src/lua/lua/src/ltable.h
  219. +0 −283 src/lua/lua/src/ltablib.c
  220. +0 −77 src/lua/lua/src/ltm.c
  221. +0 −57 src/lua/lua/src/ltm.h
  222. +0 −497 src/lua/lua/src/lua.c
  223. +0 −444 src/lua/lua/src/lua.h
  224. +0 −9 src/lua/lua/src/lua.hpp
  225. +0 −432 src/lua/lua/src/luac.c
  226. +0 −551 src/lua/lua/src/luaconf.h
  227. +0 −55 src/lua/lua/src/lualib.h
  228. +0 −258 src/lua/lua/src/lundump.c
  229. +0 −28 src/lua/lua/src/lundump.h
  230. +0 −867 src/lua/lua/src/lvm.c
  231. +0 −44 src/lua/lua/src/lvm.h
  232. +0 −76 src/lua/lua/src/lzio.c
  233. +0 −65 src/lua/lua/src/lzio.h
View
@@ -131,5 +131,4 @@ if( NOT FLIGHTCREW_FOUND )
set( FLIGHTCREW_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/FlightCrew )
endif()
add_subdirectory( src/lua )
add_subdirectory( src/Sigil )
View
@@ -31,8 +31,6 @@ Qt 5.3.0 is also required on all platforms. It can be downloaded
* FORCE_BUNDLED_COPIES=1
* Only use bundled copies and don't use system versions of dependencies.
* NO_BUNDLED_LUA=1
* Don't bundle Lua
* WIN_INSTALLER_USE_64BIT_CRT=1
* Windows only.
* Must be specified if building a 64 bit installable package.
View
@@ -457,7 +457,6 @@ file( GLOB TS_FILES Resource_Files/ts/sigil_*.ts )
file( GLOB DIC_FILES Resource_Files/dictionaries/* )
file( GLOB PLUGIN_FILES_PYTHON Resource_Files/plugin_launchers/python/* )
file( GLOB PLUGIN_FILES_LUA Resource_Files/plugin_launchers/lua/* )
file( GLOB EXAMPLE_FILES Resource_Files/examples/* )
@@ -536,11 +535,6 @@ if( APPLE )
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/hunspell_dictionaries")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/plugin_launchers")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/plugin_launchers/python")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/plugin_launchers/lua")
if(NOT NO_BUNDLED_LUA)
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/plugin_launchers/lua/dev")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/plugin_launchers/lua/pl")
endif()
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/Sigil.app/Contents/examples")
else()
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/Resources")
@@ -552,11 +546,6 @@ if( APPLE )
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/hunspell_dictionaries")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/plugin_launchers")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/plugin_launchers/python")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/plugin_launchers/lua")
if(NOT NO_BUNDLED_LUA)
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/plugin_launchers/lua/dev")
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/plugin_launchers/lua/pl")
endif()
exec_program("mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sigil.app/Contents/examples")
endif()
@@ -596,10 +585,6 @@ if ( APPLE )
else()
add_executable( ${PROJECT_NAME} WIN32 ${ALL_SOURCES} )
endif()
if(NOT NO_BUNDLED_LUA)
add_dependencies (${PROJECT_NAME} lfs)
add_dependencies (${PROJECT_NAME} lua-bin)
endif()
if (MSVC)
set(QT_MAIN Qt5::WinMain)
@@ -664,14 +649,6 @@ if( APPLE )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${PROJECT_BINARY_DIR}/*.qm ${WORK_DIR}/Sigil.app/Contents/translations/ )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${CMAKE_SOURCE_DIR}/src/Sigil/Resource_Files/dictionaries/* ${WORK_DIR}/Sigil.app/Contents/hunspell_dictionaries )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp -r ${CMAKE_SOURCE_DIR}/src/Sigil/Resource_Files/plugin_launchers/python/* ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/python )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp -r ${CMAKE_SOURCE_DIR}/src/Sigil/Resource_Files/plugin_launchers/lua/* ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/lua )
if(NOT NO_BUNDLED_LUA)
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lfs.* ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/lua/ )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lua ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/lua/ )
# Lua header files in case someone wants to link lua C modules against the bundled lua.
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${LUA_INCLUDE_DIR}/lauxlib.h ${LUA_INCLUDE_DIR}/lua.h ${LUA_INCLUDE_DIR}/lua.hpp ${LUA_INCLUDE_DIR}/luaconf.h ${LUA_INCLUDE_DIR}/lualib.h ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp -r ${LUA_TOPLEVEL_DIR}/Penlight/lua/pl/* ${WORK_DIR}/Sigil.app/Contents/plugin_launchers/lua/pl/ )
endif()
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${CMAKE_SOURCE_DIR}/src/Sigil/Resource_Files/examples/* ${WORK_DIR}/Sigil.app/Contents/examples )
# For Linux and Windows, provide binary installers.
@@ -833,23 +810,6 @@ elseif (MSVC)
foreach( PLUGFILE ${PLUGIN_FILES_PYTHON} )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${PLUGFILE} ${MAIN_PACKAGE_DIR}/plugin_launchers/python/ )
endforeach( PLUGFILE )
add_custom_command( TARGET ${TARGET_FOR_COPY} PRE_BUILD COMMAND cmake -E make_directory ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/ )
foreach( PLUGFILE ${PLUGIN_FILES_LUA} )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${PLUGFILE} ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/ )
endforeach( PLUGFILE )
if(NOT NO_BUNDLED_LUA)
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lfs.dll ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lua.exe ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lua.dll ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} PRE_BUILD COMMAND cmake -E make_directory ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lua.lib ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${LUA_INCLUDE_DIR}/lauxlib.h ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${LUA_INCLUDE_DIR}/lua.h ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${LUA_INCLUDE_DIR}/lua.hpp ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${LUA_INCLUDE_DIR}/luaconf.h ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy ${LUA_INCLUDE_DIR}/lualib.h ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/dev/ )
add_custom_command( TARGET ${TARGET_FOR_COPY} POST_BUILD COMMAND cmake -E copy_directory ${LUA_TOPLEVEL_DIR}/Penlight/lua/pl/ ${MAIN_PACKAGE_DIR}/plugin_launchers/lua/pl/ )
endif()
# Copy the example files
add_custom_command( TARGET ${TARGET_FOR_COPY} PRE_BUILD COMMAND cmake -E make_directory ${MAIN_PACKAGE_DIR}/examples/ )
@@ -925,17 +885,6 @@ if( UNIX AND NOT APPLE )
install( FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/translations/ )
install( FILES ${DIC_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/hunspell_dictionaries/ )
install( FILES ${PLUGIN_FILES_PYTHON} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/python/ )
install( FILES ${PLUGIN_FILES_LUA} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/ )
if(NOT NO_BUNDLED_LUA)
install( FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lfs.so DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/ )
install( FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lua DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/ )
install( FILES ${LUA_INCLUDE_DIR}/lauxlib.h DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/dev/ )
install( FILES ${LUA_INCLUDE_DIR}/lua.h DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/dev/ )
install( FILES ${LUA_INCLUDE_DIR}/lua.hpp DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/dev/ )
install( FILES ${LUA_INCLUDE_DIR}/luaconf.h DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/dev/ )
install( FILES ${LUA_INCLUDE_DIR}/lualib.h DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/dev/ )
install( DIRECTORY ${LUA_TOPLEVEL_DIR}/Penlight/lua/pl/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/plugin_launchers/lua/ )
endif()
install( FILES ${EXAMPLE_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sigil/examples/ )
endif()
@@ -76,6 +76,13 @@ PluginRunner::~PluginRunner()
{
}
QStringList PluginRunner::SupportedEngines()
{
QStringList engines;
engines << "python2.7" << "python3.4";
return engines;
}
int PluginRunner::exec(const QString &name)
{
QHash <QString, QStringList> plugininfo;
@@ -109,6 +116,7 @@ int PluginRunner::exec(const QString &name)
// The launcher and plugin path are both platform specific and engine/interpreter specific
launcher_root = PluginDB::launcherRoot();
// Note: Keep SupportedEngines() in sync with the engine calling code here.
if ((m_engine == "python2.7") || (m_engine == "python3.4")) {
m_launcherPath = launcher_root + "/python/launcher.py";
m_pluginPath = m_pluginsFolder + "/" + m_pluginName + "/" + "plugin.py";
@@ -118,15 +126,6 @@ int PluginRunner::exec(const QString &name)
reject();
return QDialog::Rejected;
}
} else if (m_engine == "lua5.2") {
m_launcherPath = launcher_root + "/lua/launcher.lua";
m_pluginPath = m_pluginsFolder + "/" + m_pluginName + "/" + "plugin.lua";
if (!QFileInfo(m_launcherPath).exists()) {
Utility::DisplayStdErrorDialog(tr("Installation Error: plugin launcher ") +
m_launcherPath + tr(" does not exist"));
reject();
return QDialog::Rejected;
}
} else {
Utility::DisplayStdErrorDialog(tr("Error: plugin engine ") +
m_engine + tr(" is not supported (yet!)"));
@@ -69,6 +69,8 @@ class PluginRunner : public QDialog
PluginRunner(TabManager *tabMgr, QWidget *parent);
~PluginRunner();
static QStringList SupportedEngines();
public slots:
int exec(const QString &name);
@@ -37,7 +37,6 @@ PluginWidget::ResultAction PluginWidget::saveSettings()
pdb->set_engine_path("python2.7", ui.editPathPy2->text());
pdb->set_engine_path("python3.4", ui.editPathPy3->text());
pdb->set_engine_path("lua5.2", ui.editPathLua->text());
m_isDirty = false;
return PreferencesWidget::ResultAction_None;
@@ -53,7 +52,6 @@ void PluginWidget::readSettings()
ui.editPathPy2->setText(pdb->get_engine_path("python2.7"));
ui.editPathPy3->setText(pdb->get_engine_path("python3.4"));
ui.editPathLua->setText(pdb->get_engine_path("lua5.2"));
// clear out the table but do NOT clear out column headings
while (ui.pluginTable->rowCount() > 0) {
@@ -189,12 +187,6 @@ void PluginWidget::AutoFindPy3()
m_isDirty = true;
}
void PluginWidget::AutoFindLua()
{
ui.editPathLua->setText(QStandardPaths::findExecutable("lua"));
m_isDirty = true;
}
void PluginWidget::SetPy2()
{
QString name = QFileDialog::getOpenFileName(this, tr("Select Interpreter"));
@@ -215,16 +207,6 @@ void PluginWidget::SetPy3()
m_isDirty = true;
}
void PluginWidget::SetLua()
{
QString name = QFileDialog::getOpenFileName(this, tr("Select Interpreter"));
if (name.isEmpty()) {
return;
}
ui.editPathLua->setText(name);
m_isDirty = true;
}
void PluginWidget::enginePy2PathChanged()
{
// make sure typed in path actually exists
@@ -257,36 +239,16 @@ void PluginWidget::enginePy3PathChanged()
m_isDirty = true;
}
void PluginWidget::engineLuaPathChanged()
{
// make sure typed in path actually exists
QString enginepath = ui.editPathLua->text();
if (!enginepath.isEmpty()) {
QFileInfo enginfo(enginepath);
if (!enginfo.exists() || !enginfo.isFile() || !enginfo.isReadable() || !enginfo.isExecutable() ){
disconnect(ui.editPathLua, SIGNAL(editingFinished()), this, SLOT(engineLuaPathChanged()));
Utility::DisplayStdWarningDialog(tr("Incorrect Interpreter Path selected"));
ui.editPathLua->setText("");
connect(ui.editPathLua, SIGNAL(editingFinished()), this, SLOT(engineLuaPathChanged()));
}
}
m_isDirty = true;
}
void PluginWidget::connectSignalsToSlots()
{
connect(ui.Py2Auto, SIGNAL(clicked()), this, SLOT(AutoFindPy2()));
connect(ui.Py3Auto, SIGNAL(clicked()), this, SLOT(AutoFindPy3()));
connect(ui.LuaAuto, SIGNAL(clicked()), this, SLOT(AutoFindLua()));
connect(ui.Py2Set, SIGNAL(clicked()), this, SLOT(SetPy2()));
connect(ui.Py3Set, SIGNAL(clicked()), this, SLOT(SetPy3()));
connect(ui.LuaSet, SIGNAL(clicked()), this, SLOT(SetLua()));
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addPlugin()));
connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removePlugin()));
connect(ui.removeAllButton, SIGNAL(clicked()), this, SLOT(removeAllPlugins()));
connect(ui.pluginTable, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(pluginSelected(int,int)));
connect(ui.editPathPy2, SIGNAL(editingFinished()), this, SLOT(enginePy2PathChanged()));
connect(ui.editPathPy3, SIGNAL(editingFinished()), this, SLOT(enginePy3PathChanged()));
connect(ui.editPathLua, SIGNAL(editingFinished()), this, SLOT(engineLuaPathChanged()));
}
@@ -19,13 +19,10 @@ private slots:
void addPlugin();
void AutoFindPy2();
void AutoFindPy3();
void AutoFindLua();
void SetPy2();
void SetPy3();
void SetLua();
void enginePy2PathChanged();
void enginePy3PathChanged();
void engineLuaPathChanged();
void removePlugin();
void removeAllPlugins();
void pluginSelected(int row, int col);
Oops, something went wrong.

0 comments on commit ac60583

Please sign in to comment.