Browse Source

Refactoring and flexibility changes

* Split game module into game and game_interface
* Move core_lib to corelib
* Move miniwindow to corelib
* Introduce init.lua script for initializing the client, giving much more flexibility
* OTClient is no longer Application derived and is much simpler
Eduardo Bart 8 years ago
parent
commit
8761220deb
100 changed files with 349 additions and 242 deletions
  1. 3
    1
      CMakeLists.txt
  2. 48
    0
      init.lua
  3. 3
    6
      modules/client/client.lua
  4. 0
    2
      modules/client/client.otmod
  5. 4
    4
      modules/client_locales/locales.lua
  6. 7
    6
      modules/client_skins/skins.lua
  7. 0
    0
      modules/client_skins/skins/default/images/bottompanel.png
  8. 0
    0
      modules/client_skins/skins/default/images/item.png
  9. 0
    0
      modules/client_skins/skins/default/images/logout.png
  10. 0
    0
      modules/client_skins/skins/default/images/mappanel.png
  11. 0
    0
      modules/client_skins/skins/default/images/miniwindow.png
  12. 0
    0
      modules/client_skins/skins/default/images/miniwindowbuttons.png
  13. 0
    0
      modules/client_skins/skins/default/images/sidepanel.png
  14. 0
    0
      modules/corelib/const.lua
  15. 1
    3
      modules/corelib/corelib.otmod
  16. 0
    0
      modules/corelib/ext/os.lua
  17. 0
    0
      modules/corelib/ext/string.lua
  18. 0
    0
      modules/corelib/ext/table.lua
  19. 0
    0
      modules/corelib/globals.lua
  20. 6
    12
      modules/corelib/keyboard.lua
  21. 0
    0
      modules/corelib/math/color.lua
  22. 0
    0
      modules/corelib/math/math.lua
  23. 0
    0
      modules/corelib/math/point.lua
  24. 0
    0
      modules/corelib/math/rect.lua
  25. 0
    0
      modules/corelib/math/size.lua
  26. 0
    0
      modules/corelib/mouse.lua
  27. 0
    0
      modules/corelib/settings.lua
  28. 0
    0
      modules/corelib/ui/effects.lua
  29. 0
    0
      modules/corelib/ui/radiogroup.lua
  30. 1
    1
      modules/corelib/ui/tooltip.lua
  31. 15
    2
      modules/corelib/util.lua
  32. 0
    0
      modules/corelib/widgets/uibutton.lua
  33. 0
    0
      modules/corelib/widgets/uicheckbox.lua
  34. 0
    0
      modules/corelib/widgets/uicombobox.lua
  35. 0
    0
      modules/corelib/widgets/uilabel.lua
  36. 0
    0
      modules/corelib/widgets/uimessagebox.lua
  37. 0
    0
      modules/corelib/widgets/uiminiwindow.lua
  38. 0
    0
      modules/corelib/widgets/uiminiwindowcontainer.lua
  39. 0
    0
      modules/corelib/widgets/uipopupmenu.lua
  40. 0
    0
      modules/corelib/widgets/uiprogressbar.lua
  41. 0
    0
      modules/corelib/widgets/uiresizeborder.lua
  42. 0
    0
      modules/corelib/widgets/uiscrollarea.lua
  43. 0
    0
      modules/corelib/widgets/uiscrollbar.lua
  44. 0
    0
      modules/corelib/widgets/uispinbox.lua
  45. 0
    0
      modules/corelib/widgets/uisplitter.lua
  46. 0
    0
      modules/corelib/widgets/uitabbar.lua
  47. 0
    0
      modules/corelib/widgets/uiwidget.lua
  48. 0
    0
      modules/corelib/widgets/uiwindow.lua
  49. 3
    19
      modules/game/game.otmod
  50. 1
    1
      modules/game_battle/battle.otmod
  51. 1
    1
      modules/game_bugreport/bugreport.otmod
  52. 1
    1
      modules/game_combatcontrols/combatcontrols.otmod
  53. 4
    4
      modules/game_console/console.lua
  54. 1
    1
      modules/game_console/console.otmod
  55. 1
    1
      modules/game_containers/container.otui
  56. 1
    1
      modules/game_containers/containers.otmod
  57. 1
    1
      modules/game_healthbar/healthbar.otmod
  58. 1
    1
      modules/game_hotkeys/hotkeys_manager.otmod
  59. 1
    1
      modules/game_interface/gameinterface.lua
  60. 3
    3
      modules/game_interface/gameinterface.otui
  61. 21
    0
      modules/game_interface/interface.otmod
  62. 0
    0
      modules/game_interface/styles/countwindow.otui
  63. 0
    0
      modules/game_interface/styles/creatures.otui
  64. 1
    1
      modules/game_interface/styles/items.otui
  65. 3
    3
      modules/game_interface/styles/miniwindow.otui
  66. 0
    0
      modules/game_interface/widgets/uigamemap.lua
  67. 0
    0
      modules/game_interface/widgets/uiitem.lua
  68. 1
    1
      modules/game_inventory/inventory.otmod
  69. 1
    1
      modules/game_minimap/minimap.otmod
  70. 1
    1
      modules/game_npctrade/npctrade.otmod
  71. 1
    1
      modules/game_outfit/outfit.otmod
  72. 1
    1
      modules/game_playertrade/playertrade.otmod
  73. 1
    1
      modules/game_questlog/questlog.otmod
  74. 1
    1
      modules/game_ruleviolation/ruleviolation.otmod
  75. 1
    1
      modules/game_shaders/shaders.otmod
  76. 1
    1
      modules/game_skills/skills.otmod
  77. 1
    1
      modules/game_textbooks/textbooks.otmod
  78. 1
    1
      modules/game_textmessage/textmessage.otmod
  79. 3
    6
      src/framework/CMakeLists.txt
  80. 28
    30
      src/framework/application.cpp
  81. 19
    14
      src/framework/application.h
  82. 1
    1
      src/framework/core/configmanager.cpp
  83. 1
    1
      src/framework/core/eventdispatcher.h
  84. 5
    0
      src/framework/core/logger.cpp
  85. 1
    1
      src/framework/core/module.cpp
  86. 0
    38
      src/framework/core/modulemanager.cpp
  87. 0
    3
      src/framework/core/modulemanager.h
  88. 77
    19
      src/framework/core/resourcemanager.cpp
  89. 7
    0
      src/framework/core/resourcemanager.h
  90. 1
    1
      src/framework/graphics/framebuffer.cpp
  91. 1
    1
      src/framework/graphics/hardwarebuffer.cpp
  92. 1
    1
      src/framework/graphics/shader.cpp
  93. 1
    1
      src/framework/graphics/shaderprogram.cpp
  94. 1
    1
      src/framework/graphics/texture.cpp
  95. 42
    34
      src/framework/luafunctions.cpp
  96. 12
    1
      src/framework/luascript/luainterface.cpp
  97. 3
    0
      src/framework/luascript/luainterface.h
  98. 1
    1
      src/framework/luascript/luaobject.cpp
  99. 1
    1
      src/framework/net/connection.cpp
  100. 0
    0
      src/framework/platform/unixcrashhandler.cpp

+ 3
- 1
CMakeLists.txt View File

@@ -9,7 +9,9 @@ SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=otclient.map")
9 9
 
10 10
 OPTION(PCH "Use precompiled header (speed up compile)" OFF)
11 11
 
12
-SET(executable_SOURCES src/main.cpp)
12
+SET(executable_SOURCES
13
+    src/main.cpp
14
+)
13 15
 
14 16
 # add executable icon for win32 platforms
15 17
 IF(WIN32)

+ 48
- 0
init.lua View File

@@ -0,0 +1,48 @@
1
+-- this is the first file executed when the application starts
2
+-- we have to load the first modules form here
3
+
4
+-- setup application name and version
5
+g_app.setName('OTClient')
6
+g_app.setCompactName('otclient')
7
+g_app.setVersion('0.4.0_dev')
8
+
9
+-- setup logger
10
+g_logger.setLogFile(g_resources.getWorkDir() .. g_app.getCompactName() .. ".log")
11
+
12
+-- print first terminal message
13
+g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' (rev ' .. g_app.getBuildRevision() .. ') built on ' .. g_app.getBuildDate())
14
+
15
+-- add modules directory to the search path
16
+if not g_resources.addToSearchPath(g_resources.getWorkDir() .. "modules", true) then
17
+    g_logger.fatal("Unable to add modules directory to the search path.")
18
+end
19
+
20
+-- try to add addons path too
21
+g_resources.addToSearchPath(g_resources.getWorkDir() .. "addons", true)
22
+
23
+-- setup directory for saving configurations
24
+g_resources.setupWriteDir(g_app.getCompactName())
25
+
26
+-- load configurations
27
+g_configs.load("/config.otml")
28
+
29
+g_modules.discoverModules()
30
+
31
+-- core modules 0-99
32
+g_modules.autoLoadModules(99);
33
+g_modules.ensureModuleLoaded("corelib")
34
+
35
+-- client modules 100-499
36
+g_modules.autoLoadModules(499);
37
+g_modules.ensureModuleLoaded("client")
38
+
39
+-- game modules 500-999
40
+g_modules.autoLoadModules(999);
41
+g_modules.ensureModuleLoaded("game")
42
+
43
+-- addons 1000-9999
44
+g_modules.autoLoadModules(9999)
45
+
46
+if g_resources.fileExists("/otclientrc.lua") then
47
+    dofile("/otclientrc.lua")
48
+end

+ 3
- 6
modules/client/client.lua View File

@@ -1,8 +1,8 @@
1 1
 Client = {}
2 2
 
3 3
 function Client.reloadScripts()
4
-  dofile '/otclientrc'
5 4
   reloadModules()
5
+  dofile '/otclientrc'
6 6
   local message = tr('All modules and scripts were reloaded.')
7 7
   TextMessage.displayEventAdvance(message)
8 8
   print(message)
@@ -35,16 +35,13 @@ function Client.init()
35 35
   g_window.setTitle('OTClient')
36 36
   g_window.setIcon(resolvepath('clienticon.png'))
37 37
 
38
-  -- show the only window after the first frame is rendered
39
-  scheduleEvent(function()
38
+  addEvent(function()
40 39
     scheduleEvent(function()
41
-        g_window.show()
42
-
43 40
         -- Play startup music (The Silver Tree, by Mattias Westlund)
44 41
         g_sounds.playMusic("startup.ogg", 3)
45 42
         connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
46 43
         connect(g_game, { onGameEnd= function() g_sounds.playMusic("startup.ogg", 3) end })
47
-    end, 0)
44
+    end, 100)
48 45
   end, 0)
49 46
 end
50 47
 

+ 0
- 2
modules/client/client.otmod View File

@@ -3,8 +3,6 @@ Module
3 3
   description: Initialize the client and setups its main window
4 4
   author: edubart
5 5
   website: www.otclient.info
6
-  autoload: true
7
-  autoload-priority: 100
8 6
   reloadable: false
9 7
 
10 8
   load-later:

+ 4
- 4
modules/client_locales/locales.lua View File

@@ -47,9 +47,9 @@ function Locales.init()
47 47
 
48 48
   local userLocaleName = Settings.get('locale')
49 49
   if userLocaleName and Locales.setLocale(userLocaleName) then
50
-    --info('Using configured locale: ' .. userLocaleName)
50
+    pdebug('Using configured locale: ' .. userLocaleName)
51 51
   else
52
-    --info('Using default locale: ' .. defaultLocaleName)
52
+    pdebug('Using default locale: ' .. defaultLocaleName)
53 53
     Locales.setLocale(defaultLocaleName)
54 54
     Settings.set('locale', defaultLocaleName)
55 55
   end
@@ -100,7 +100,7 @@ end
100 100
 function Locales.setLocale(name)
101 101
   local locale = installedLocales[name]
102 102
   if not locale then
103
-    warning("Locale " .. name .. ' does not exist.')
103
+    pwarning("Locale " .. name .. ' does not exist.')
104 104
     return false
105 105
   end
106 106
   currentLocale = locale
@@ -125,7 +125,7 @@ function tr(text, ...)
125 125
       local translation = currentLocale.translation[text]
126 126
       if not translation then
127 127
         if currentLocale.name ~= defaultLocaleName then
128
-          warning('Unable to translate: \"' .. text .. '\"')
128
+          pwarning('Unable to translate: \"' .. text .. '\"')
129 129
         end
130 130
         translation = text
131 131
       end

+ 7
- 6
modules/client_skins/skins.lua View File

@@ -15,7 +15,8 @@ local function onSkinComboBoxOptionChange(self, optionText, optionData)
15 15
 end
16 16
 
17 17
 local function getSkinPath(name)
18
-  return g_modules.getModulesPath() .. g_lua.getCurrentSourcePath(0) .. '/skins/' .. string.lower(name) .. '/'
18
+  local current = getfsrcpath()
19
+  return g_resources.getRealDir(current) .. current .. '/skins/' .. string.lower(name)
19 20
 end
20 21
 
21 22
 -- public functions
@@ -30,9 +31,9 @@ function Skins.init()
30 31
 
31 32
   local userSkinName = Settings.get('skin')
32 33
   if userSkinName and Skins.setSkin(userSkinName) then
33
-    info('Using configured skin: ' .. userSkinName)
34
+    pdebug('Using configured skin: ' .. userSkinName)
34 35
   else
35
-    info('Using default skin: ' .. defaultSkinName)
36
+    pdebug('Using default skin: ' .. defaultSkinName)
36 37
     Skins.setSkin(defaultSkinName)
37 38
     Settings.set('skin', defaultSkinName)
38 39
   end
@@ -65,7 +66,7 @@ function Skins.installSkin(skin)
65 66
   end
66 67
 
67 68
   if installedSkins[skin.name] then
68
-    warning(skin.name .. ' has been replaced.')
69
+    pwarning(skin.name .. ' has been replaced.')
69 70
   end
70 71
 
71 72
   installedSkins[skin.name] = skin
@@ -79,12 +80,12 @@ end
79 80
 function Skins.setSkin(name)
80 81
   local skin = installedSkins[name]
81 82
   if not skin then
82
-    warning("Skin " .. name .. ' does not exist.')
83
+    pwarning("Skin " .. name .. ' does not exist.')
83 84
     return false
84 85
   end
85 86
 
86 87
   g_fonts.clearFonts()
87
-  g_ui.clearStyles() 
88
+  g_ui.clearStyles()
88 89
 
89 90
   if name ~= defaultSkinName then
90 91
     local defaultSkin = installedSkins[defaultSkinName]

modules/game/images/bottompanel.png → modules/client_skins/skins/default/images/bottompanel.png View File


modules/game/images/item.png → modules/client_skins/skins/default/images/item.png View File


modules/game/images/logout.png → modules/client_skins/skins/default/images/logout.png View File


modules/game/images/mappanel.png → modules/client_skins/skins/default/images/mappanel.png View File


modules/game/images/miniwindow.png → modules/client_skins/skins/default/images/miniwindow.png View File


modules/game/images/miniwindowbuttons.png → modules/client_skins/skins/default/images/miniwindowbuttons.png View File


modules/game/images/sidepanel.png → modules/client_skins/skins/default/images/sidepanel.png View File


modules/core_lib/const.lua → modules/corelib/const.lua View File


modules/core_lib/core_lib.otmod → modules/corelib/corelib.otmod View File

@@ -1,10 +1,8 @@
1 1
 Module
2
-  name: core_lib
2
+  name: corelib
3 3
   description: Contains core lua classes, functions and constants used by other modules
4 4
   author: OTClient team
5 5
   website: www.otclient.info
6
-  autoload: true
7
-  autoload-priority: 10
8 6
   reloadable: false
9 7
 
10 8
   @onLoad: |

modules/core_lib/ext/os.lua → modules/corelib/ext/os.lua View File


modules/core_lib/ext/string.lua → modules/corelib/ext/string.lua View File


modules/core_lib/ext/table.lua → modules/corelib/ext/table.lua View File


modules/core_lib/globals.lua → modules/corelib/globals.lua View File


modules/core_lib/keyboard.lua → modules/corelib/keyboard.lua View File

@@ -15,7 +15,9 @@ function translateKeyCombo(keyCombo)
15 15
 end
16 16
 
17 17
 local function retranslateKeyComboDesc(keyComboDesc)
18
-  if keyComboDesc == nil then return nil end
18
+  if keyComboDesc == nil then
19
+    error('Unable to translate key combo \'' .. keyComboDesc .. '\'')
20
+  end
19 21
   local keyCombo = {}
20 22
   for i,currentKeyDesc in ipairs(keyComboDesc:split('+')) do
21 23
     for keyCode, keyDesc in pairs(KeyCodeDescs) do
@@ -97,11 +99,7 @@ function Keyboard.bindKeyDown(keyComboDesc, callback, widget)
97 99
   widget = widget or rootWidget
98 100
   connectKeyDownEvent(widget)
99 101
   local keyComboDesc = retranslateKeyComboDesc(keyComboDesc)
100
-  if keyComboDesc then
101
-    widget.boundKeyDownCombos[keyComboDesc] = callback
102
-  else
103
-    error('key combo \'' .. keyComboDesc .. '\' is failed')
104
-  end
102
+  widget.boundKeyDownCombos[keyComboDesc] = callback
105 103
 end
106 104
 
107 105
 function Keyboard.bindKeyPress(keyComboDesc, callback, widget, autoRepeatDelay)
@@ -109,12 +107,8 @@ function Keyboard.bindKeyPress(keyComboDesc, callback, widget, autoRepeatDelay)
109 107
   widget = widget or rootWidget
110 108
   connectKeyPressEvent(widget)
111 109
   local keyComboDesc = retranslateKeyComboDesc(keyComboDesc)
112
-  if keyComboDesc then
113
-    widget.boundKeyPressCombos[keyComboDesc] = { callback = callback, autoRepeatDelay = autoRepeatDelay }
114
-    widget:setAutoRepeatDelay(math.min(autoRepeatDelay, widget:getAutoRepeatDelay()))
115
-  else
116
-    error('key combo \'' .. keyComboDesc .. '\' is failed')
117
-  end
110
+  widget.boundKeyPressCombos[keyComboDesc] = { callback = callback, autoRepeatDelay = autoRepeatDelay }
111
+  widget:setAutoRepeatDelay(math.min(autoRepeatDelay, widget:getAutoRepeatDelay()))
118 112
 end
119 113
 
120 114
 function Keyboard.unbindKeyDown(keyComboDesc, widget)

modules/core_lib/math/color.lua → modules/corelib/math/color.lua View File


modules/core_lib/math/math.lua → modules/corelib/math/math.lua View File


modules/core_lib/math/point.lua → modules/corelib/math/point.lua View File


modules/core_lib/math/rect.lua → modules/corelib/math/rect.lua View File


modules/core_lib/math/size.lua → modules/corelib/math/size.lua View File


modules/core_lib/mouse.lua → modules/corelib/mouse.lua View File


modules/core_lib/settings.lua → modules/corelib/settings.lua View File


modules/core_lib/ui/effects.lua → modules/corelib/ui/effects.lua View File


modules/core_lib/ui/radiogroup.lua → modules/corelib/ui/radiogroup.lua View File


modules/core_lib/ui/tooltip.lua → modules/corelib/ui/tooltip.lua View File

@@ -45,7 +45,7 @@ function ToolTip.init()
45 45
                        onHoverChange = onWidgetHoverChange})
46 46
 
47 47
   addEvent(function()
48
-    toolTipLabel = createWidget('Label', rootWidget)
48
+    toolTipLabel = createWidget('UILabel', rootWidget)
49 49
     toolTipLabel:setId('toolTip')
50 50
     toolTipLabel:setBackgroundColor('#111111cc')
51 51
     toolTipLabel:setTextAlign(AlignCenter)

modules/core_lib/util.lua → modules/corelib/util.lua View File

@@ -6,18 +6,27 @@ function print(...)
6 6
   g_logger.log(LogInfo, msg)
7 7
 end
8 8
 
9
-function info(msg)
9
+function pinfo(msg)
10 10
   g_logger.log(LogInfo, msg)
11 11
 end
12 12
 
13
-function warning(msg)
13
+function perror(msg)
14
+  g_logger.log(LogError, msg)
15
+end
16
+
17
+function pwarning(msg)
14 18
   g_logger.log(LogWarning, msg)
15 19
 end
16 20
 
21
+function pdebug(msg)
22
+  g_logger.log(LogDebug, msg)
23
+end
24
+
17 25
 function fatal(msg)
18 26
   g_logger.log(LogFatal, msg)
19 27
 end
20 28
 
29
+
21 30
 exit = g_app.exit
22 31
 quit = g_app.exit
23 32
 
@@ -161,3 +170,7 @@ function signalcall(param, ...)
161 170
   end
162 171
   return false
163 172
 end
173
+
174
+function tr(s)
175
+  return s
176
+end

modules/core_lib/widgets/uibutton.lua → modules/corelib/widgets/uibutton.lua View File


modules/core_lib/widgets/uicheckbox.lua → modules/corelib/widgets/uicheckbox.lua View File


modules/core_lib/widgets/uicombobox.lua → modules/corelib/widgets/uicombobox.lua View File


modules/core_lib/widgets/uilabel.lua → modules/corelib/widgets/uilabel.lua View File


modules/core_lib/widgets/uimessagebox.lua → modules/corelib/widgets/uimessagebox.lua View File


modules/game/widgets/uiminiwindow.lua → modules/corelib/widgets/uiminiwindow.lua View File


modules/game/widgets/uiminiwindowcontainer.lua → modules/corelib/widgets/uiminiwindowcontainer.lua View File


modules/core_lib/widgets/uipopupmenu.lua → modules/corelib/widgets/uipopupmenu.lua View File


modules/core_lib/widgets/uiprogressbar.lua → modules/corelib/widgets/uiprogressbar.lua View File


modules/core_lib/widgets/uiresizeborder.lua → modules/corelib/widgets/uiresizeborder.lua View File


modules/core_lib/widgets/uiscrollarea.lua → modules/corelib/widgets/uiscrollarea.lua View File


modules/core_lib/widgets/uiscrollbar.lua → modules/corelib/widgets/uiscrollbar.lua View File


modules/core_lib/widgets/uispinbox.lua → modules/corelib/widgets/uispinbox.lua View File


modules/core_lib/widgets/uisplitter.lua → modules/corelib/widgets/uisplitter.lua View File


modules/core_lib/widgets/uitabbar.lua → modules/corelib/widgets/uitabbar.lua View File


modules/core_lib/widgets/uiwidget.lua → modules/corelib/widgets/uiwidget.lua View File


modules/core_lib/widgets/uiwindow.lua → modules/corelib/widgets/uiwindow.lua View File


+ 3
- 19
modules/game/game.otmod View File

@@ -1,15 +1,16 @@
1 1
 Module
2 2
   name: game
3
-  description: Create the game interface, where the ingame stuff starts
3
+  description: Contains game related classes
4 4
   author: OTClient team
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8 8
     - client_extended
9
-    - game_tibiafiles
10 9
     - client_background
10
+    - game_tibiafiles
11 11
 
12 12
   load-later:
13
+    - game_interface
13 14
     - game_textmessage
14 15
     - game_console
15 16
     - game_outfit
@@ -31,26 +32,9 @@ Module
31 32
     - game_shaders
32 33
 
33 34
   @onLoad: |
34
-    importStyle 'styles/items.otui'
35
-    importStyle 'styles/creatures.otui'
36
-    importStyle 'styles/miniwindow.otui'
37
-    importStyle 'styles/countwindow.otui'
38
-
39 35
     dofile 'const'
40 36
 
41 37
     dofile 'protocollogin'
42 38
 
43
-    dofile 'widgets/uigamemap'
44
-    dofile 'widgets/uiitem'
45
-    dofile 'widgets/uiminiwindow'
46
-    dofile 'widgets/uiminiwindowcontainer'
47
-
48 39
     dofile 'creature'
49 40
     dofile 'player'
50
-
51
-    dofile 'gameinterface'
52
-
53
-    GameInterface.init()
54
-
55
-  @onUnload: |
56
-    GameInterface.terminate()

+ 1
- 1
modules/game_battle/battle.otmod View File

@@ -6,7 +6,7 @@ Module
6 6
   icon: battle.png
7 7
 
8 8
   dependencies:
9
-    - game
9
+    - game_interface
10 10
 
11 11
   @onLoad: |
12 12
     dofile 'battle'

+ 1
- 1
modules/game_bugreport/bugreport.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'bugreport'

+ 1
- 1
modules/game_combatcontrols/combatcontrols.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'combatcontrols'

+ 4
- 4
modules/game_console/console.lua View File

@@ -106,7 +106,7 @@ local function onCreatureSpeak(name, level, speaktype, message, channelId, creat
106 106
       Console.addText(composedMessage, speaktype, channel, name)
107 107
     elseif channelId ~= 0 then
108 108
       -- server sent a message on a channel that is not open
109
-      warning('message in channel id ' .. channelId .. ' which is unknown, this is a server bug, relogin if you want to see messages in this channel')
109
+      pwarning('message in channel id ' .. channelId .. ' which is unknown, this is a server bug, relogin if you want to see messages in this channel')
110 110
     end
111 111
   end
112 112
 end
@@ -272,7 +272,7 @@ function Console.clear()
272 272
     local tab = consoleTabBar:getTab(channelname)
273 273
     consoleTabBar:removeTab(tab)
274 274
   end
275
-  
275
+
276 276
   channels = {}
277 277
 
278 278
   consoleTabBar:getTab(tr('Default')).tabPanel:getChildById('consoleBuffer'):destroyChildren()
@@ -407,12 +407,12 @@ function Console.popupMenu(mousePos, mouseButton, creatureName, text)
407 407
       end
408 408
       --TODO select all
409 409
       menu:addOption(tr('Copy message'), function () g_window.setClipboardText(text) end)
410
-      
410
+
411 411
       if RuleViolation.hasWindowAccess() then
412 412
         menu:addSeparator()
413 413
         menu:addOption(tr('Rule Violation'), function() RuleViolation.show(creatureName, text:match('.+%:%s(.+)')) end)
414 414
       end
415
-      
415
+
416 416
       menu:addSeparator()
417 417
       menu:addOption(tr('Copy name'), function () g_window.setClipboardText(creatureName) end)
418 418
     else

+ 1
- 1
modules/game_console/console.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'console'

+ 1
- 1
modules/game_containers/container.otui View File

@@ -17,7 +17,7 @@ ContainerWindow < MiniWindow
17 17
     anchors.right: minimizeButton.left
18 18
     margin-right: 3
19 19
     size: 14 14
20
-    image-source: /game/images/miniwindowbuttons.png
20
+    image-source: /images/miniwindowbuttons.png
21 21
     image-clip: 42 0 14 14
22 22
 
23 23
     $hover:

+ 1
- 1
modules/game_containers/containers.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'containers'

+ 1
- 1
modules/game_healthbar/healthbar.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'healthbar'

+ 1
- 1
modules/game_hotkeys/hotkeys_manager.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'hotkeys_manager'

modules/game/gameinterface.lua → modules/game_interface/gameinterface.lua View File

@@ -25,7 +25,7 @@ function GameInterface.init()
25 25
   gameLeftPanel = gameRootPanel:getChildById('gameLeftPanel')
26 26
   gameBottomPanel = gameRootPanel:getChildById('gameBottomPanel')
27 27
 
28
-  logoutButton = TopMenu.addRightButton('logoutButton', 'Logout', 'images/logout.png', GameInterface.tryLogout)
28
+  logoutButton = TopMenu.addRightButton('logoutButton', 'Logout', '/images/logout.png', GameInterface.tryLogout)
29 29
   logoutButton:hide()
30 30
 
31 31
   Keyboard.bindKeyPress('Up', function() g_game.walk(North) end, gameRootPanel, WALK_AUTO_REPEAT_DELAY)

modules/game/gameinterface.otui → modules/game_interface/gameinterface.otui View File

@@ -1,15 +1,15 @@
1 1
 GameSidePanel < UIMiniWindowContainer
2
-  image-source: images/sidepanel.png
2
+  image-source: /images/sidepanel.png
3 3
   image-border: 4
4 4
   padding: 4
5 5
 
6 6
 GameBottomPanel < Panel
7
-  image-source: images/bottompanel.png
7
+  image-source: /images/bottompanel.png
8 8
   image-border: 4
9 9
 
10 10
 GameMapPanel < UIGameMap
11 11
   padding: 4
12
-  image-source: images/mappanel.png
12
+  image-source: /images/mappanel.png
13 13
   image-border: 4
14 14
 
15 15
 UIWidget

+ 21
- 0
modules/game_interface/interface.otmod View File

@@ -0,0 +1,21 @@
1
+Module
2
+  name: game_interface
3
+  description: Create the game interface, where the ingame stuff starts
4
+  author: OTClient team
5
+  website: www.otclient.info
6
+
7
+  @onLoad: |
8
+    importStyle 'styles/items.otui'
9
+    importStyle 'styles/creatures.otui'
10
+    importStyle 'styles/miniwindow.otui'
11
+    importStyle 'styles/countwindow.otui'
12
+
13
+    dofile 'widgets/uigamemap'
14
+    dofile 'widgets/uiitem'
15
+
16
+    dofile 'gameinterface'
17
+
18
+    GameInterface.init()
19
+
20
+  @onUnload: |
21
+    GameInterface.terminate()

modules/game/styles/countwindow.otui → modules/game_interface/styles/countwindow.otui View File


modules/game/styles/creatures.otui → modules/game_interface/styles/creatures.otui View File


modules/game/styles/items.otui → modules/game_interface/styles/items.otui View File

@@ -1,6 +1,6 @@
1 1
 Item < UIItem
2 2
   size: 34 34
3 3
   padding: 1
4
-  image-source: /game/images/item.png
4
+  image-source: /images/item.png
5 5
   font: verdana-11px-rounded
6 6
   border-color: white

modules/game/styles/miniwindow.otui → modules/game_interface/styles/miniwindow.otui View File

@@ -5,7 +5,7 @@ MiniWindow < UIMiniWindow
5 5
   height: 200
6 6
   text-offset: 24 5
7 7
   text-align: topLeft
8
-  image-source: /game/images/miniwindow.png
8
+  image-source: /images/miniwindow.png
9 9
   image-border: 4
10 10
   image-border-top: 23
11 11
   image-border-bottom: 4
@@ -22,7 +22,7 @@ MiniWindow < UIMiniWindow
22 22
     margin-top: 5
23 23
     margin-right: 5
24 24
     size: 14 14
25
-    image-source: /game/images/miniwindowbuttons.png
25
+    image-source: /images/miniwindowbuttons.png
26 26
     image-clip: 28 0 14 14
27 27
 
28 28
     $hover:
@@ -37,7 +37,7 @@ MiniWindow < UIMiniWindow
37 37
     anchors.right: closeButton.left
38 38
     margin-right: 3
39 39
     size: 14 14
40
-    image-source: /game/images/miniwindowbuttons.png
40
+    image-source: /images/miniwindowbuttons.png
41 41
     image-clip: 0 0 14 14
42 42
 
43 43
     $hover:

modules/game/widgets/uigamemap.lua → modules/game_interface/widgets/uigamemap.lua View File


modules/game/widgets/uiitem.lua → modules/game_interface/widgets/uiitem.lua View File


+ 1
- 1
modules/game_inventory/inventory.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'inventory'

+ 1
- 1
modules/game_minimap/minimap.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'minimap'

+ 1
- 1
modules/game_npctrade/npctrade.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'npctrade'

+ 1
- 1
modules/game_outfit/outfit.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'outfit'

+ 1
- 1
modules/game_playertrade/playertrade.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'playertrade'

+ 1
- 1
modules/game_questlog/questlog.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'questlog'

+ 1
- 1
modules/game_ruleviolation/ruleviolation.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'ruleviolation'

+ 1
- 1
modules/game_shaders/shaders.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'shaders'

+ 1
- 1
modules/game_skills/skills.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'skills'

+ 1
- 1
modules/game_textbooks/textbooks.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'textbooks'

+ 1
- 1
modules/game_textmessage/textmessage.otmod View File

@@ -5,7 +5,7 @@ Module
5 5
   website: www.otclient.info
6 6
 
7 7
   dependencies:
8
-    - game
8
+    - game_interface
9 9
 
10 10
   @onLoad: |
11 11
     dofile 'textmessage'

+ 3
- 6
src/framework/CMakeLists.txt View File

@@ -10,11 +10,7 @@ OPTION(CRASH_HANDLER "Generate crash reports" ON)
10 10
 OPTION(LUAJIT "Use lua jit" OFF)
11 11
 SET(OPENGLES "OFF" CACHE "Use OpenGL ES 1.0 or 2.0 (for mobiles devices)" STRING)
12 12
 SET(BUILD_REVISION "custom" CACHE "Git revision string (intended for releases)" STRING)
13
-
14
-# set debug as default build type
15
-IF(NOT CMAKE_BUILD_TYPE)
16
-    SET(CMAKE_BUILD_TYPE RelWithDebInfo)
17
-ENDIF()
13
+SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE "Build type (Release, MinSizeRel, RelWithDebInfo or Debug)" STRING)
18 14
 
19 15
 IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
20 16
     SET(ARCH_FLAGS "-m64 -march=x86-64 -mtune=generic")
@@ -26,10 +22,11 @@ SET(CMAKE_CXX_FLAGS                   "${CMAKE_CXX_FLAGS} ${WARNS_FLAGS} ${ARCH_
26 22
 SET(CMAKE_CXX_FLAGS_DEBUG             "-O0 -ggdb")
27 23
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO    "-O1 -ggdb -fno-omit-frame-pointer")
28 24
 SET(CMAKE_CXX_FLAGS_RELEASE           "-O2")
25
+SET(CMAKE_CXX_FLAGS_MINSIZEREL        "-Os")
29 26
 
30 27
 SET(CMAKE_CXX_LINK_FLAGS              "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed")
31 28
 
32
-IF(CMAKE_BUILD_TYPE STREQUAL "Release")
29
+IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
33 30
     SET(CMAKE_CXX_LINK_FLAGS              "${CMAKE_CXX_LINK_FLAGS} -Wl,-s")
34 31
 ENDIF()
35 32
 

+ 28
- 30
src/framework/application.cpp View File

@@ -37,7 +37,7 @@
37 37
 #include <framework/luascript/luainterface.h>
38 38
 #include <framework/platform/crashhandler.h>
39 39
 
40
-Application *g_app = nullptr;
40
+Application g_app;
41 41
 
42 42
 void exitSignalHandler(int sig)
43 43
 {
@@ -53,18 +53,14 @@ void exitSignalHandler(int sig)
53 53
     }
54 54
 }
55 55
 
56
-Application::Application(const std::string& appName)
56
+Application::Application()
57 57
 {
58
-    g_app = this;
59
-    m_appName = appName;
58
+    m_appName = "application";
59
+    m_appCompactName = "app";
60
+    m_appVersion = "none";
60 61
     m_foregroundFrameCounter.setMaxFps(60);
61 62
 }
62 63
 
63
-Application::~Application()
64
-{
65
-    g_app = nullptr;
66
-}
67
-
68 64
 void Application::init(const std::vector<std::string>& args)
69 65
 {
70 66
     // capture exit signals
@@ -75,24 +71,28 @@ void Application::init(const std::vector<std::string>& args)
75 71
     installCrashHandler();
76 72
 #endif
77 73
 
78
-    // initialize lua
79
-    g_lua.init();
80
-    registerLuaFunctions();
74
+    std::string startupOptions;
75
+    for(uint i=1;i<args.size();++i) {
76
+        const std::string& arg = args[i];
77
+        startupOptions += " ";
78
+        startupOptions += arg;
79
+    }
80
+    if(startupOptions.length() > 0)
81
+        g_logger.info(stdext::format("Startup options: %s", startupOptions));
82
+
83
+    m_startupOptions = startupOptions;
81 84
 
82 85
     // initialize resources
83 86
     g_resources.init(args[0].c_str());
84 87
 
85
-    // setup configs write directory
86
-    if(!g_resources.setupWriteDir(m_appName))
87
-        g_logger.error("Could not setup write directory");
88
-
89
-    // load configs
90
-    if(!g_configs.load("/config.otml"))
91
-        g_logger.info("Using default configurations.");
88
+    // initialize lua
89
+    g_lua.init();
90
+    registerLuaFunctions();
92 91
 
93
-    // setup platform window
92
+    // initialize ui
94 93
     g_ui.init();
95 94
 
95
+    // setup platform window
96 96
     g_window.init();
97 97
     g_window.hide();
98 98
     g_window.setOnResize(std::bind(&Application::resize, this, std::placeholders::_1));
@@ -105,14 +105,9 @@ void Application::init(const std::vector<std::string>& args)
105 105
     // initialize sound
106 106
     g_sounds.init();
107 107
 
108
-    // fire first resize
108
+    // fire first resize event
109 109
     resize(g_window.getSize());
110 110
 
111
-    // display window when the application starts running
112
-    //g_eventDispatcher.addEvent([]{ g_window.show(); });
113
-
114
-    g_modules.discoverModulesPath();
115
-
116 111
     m_initialized = true;
117 112
 }
118 113
 
@@ -132,15 +127,15 @@ void Application::deinit()
132 127
 
133 128
     // poll remaining events
134 129
     poll();
135
-
136
-    // destroy any remaining widget
137
-    g_ui.terminate();
138 130
 }
139 131
 
140 132
 void Application::terminate()
141 133
 {
142 134
     assert(m_initialized);
143 135
 
136
+    // destroy any remaining widget
137
+    g_ui.terminate();
138
+
144 139
     // terminate network
145 140
     Connection::terminate();
146 141
 
@@ -164,7 +159,7 @@ void Application::terminate()
164 159
     g_graphics.terminate();
165 160
     g_window.terminate();
166 161
 
167
-    g_logger.info("Application ended successfully.");
162
+    g_logger.debug("Application ended successfully.");
168 163
 
169 164
     m_terminated = true;
170 165
 }
@@ -184,6 +179,9 @@ void Application::run()
184 179
     // first clock update
185 180
     g_clock.update();
186 181
 
182
+    // show the application window
183
+    g_window.show();
184
+
187 185
     while(!m_stopping) {
188 186
         // poll all events before rendering
189 187
         poll();

+ 19
- 14
src/framework/application.h View File

@@ -34,29 +34,31 @@ class Application
34 34
     };
35 35
 
36 36
 public:
37
-    Application(const std::string& appName);
38
-    ~Application();
37
+    Application();
39 38
 
40
-    virtual void init(const std::vector<std::string>& args);
41
-    virtual void registerLuaFunctions();
42
-    virtual void deinit();
43
-    virtual void terminate();
44
-    virtual void run();
45
-    virtual void exit();
46
-    virtual void poll();
47
-    virtual void close();
39
+    void init(const std::vector<std::string>& args);
40
+    void deinit();
41
+    void terminate();
42
+    void run();
43
+    void exit();
44
+    void poll();
45
+    void close();
48 46
 
49 47
     bool willRepaint() { return m_mustRepaint; }
50 48
     void repaint() { m_mustRepaint = true; }
51 49
 
52 50
     void setForegroundPaneMaxFps(int maxFps) { m_foregroundFrameCounter.setMaxFps(maxFps); }
53 51
     void setBackgroundPaneMaxFps(int maxFps) { m_backgroundFrameCounter.setMaxFps(maxFps); }
52
+    void setName(const std::string& name) { m_appName = name; }
53
+    void setCompactName(const std::string& compactName) { m_appCompactName = compactName; }
54
+    void setVersion(const std::string& version) { m_appVersion = version; }
54 55
 
55 56
     bool isRunning() { return m_running; }
56 57
     bool isStopping() { return m_stopping; }
57 58
     bool isTermianted() { return m_terminated; }
58 59
     bool isOnInputEvent() { return m_onInputEvent; }
59 60
     const std::string& getName() { return m_appName; }
61
+    const std::string& getCompactName() { return m_appCompactName; }
60 62
     const std::string& getVersion() { return m_appVersion; }
61 63
 
62 64
     int getForegroundPaneFps() { return m_foregroundFrameCounter.getLastFps(); }
@@ -67,14 +69,17 @@ public:
67 69
     std::string getBuildDate() { return BUILD_DATE; }
68 70
     std::string getBuildRevision() { return BUILD_REVISION; }
69 71
     std::string getBuildType() { return BUILD_TYPE; }
72
+    std::string getStartupOptions() { return m_startupOptions; }
70 73
 
71 74
 protected:
72
-    virtual void resize(const Size& size);
73
-    virtual void inputEvent(const InputEvent& event);
75
+    void resize(const Size& size);
76
+    void inputEvent(const InputEvent& event);
77
+    void registerLuaFunctions();
74 78
 
75 79
     std::string m_appName;
80
+    std::string m_appCompactName;
76 81
     std::string m_appVersion;
77
-    std::string m_appBuildDate;
82
+    std::string m_startupOptions;
78 83
     Boolean<false> m_initialized;
79 84
     Boolean<false> m_running;
80 85
     Boolean<false> m_stopping;
@@ -86,7 +91,7 @@ protected:
86 91
     TexturePtr m_foreground;
87 92
 };
88 93
 
89
-extern Application *g_app;
94
+extern Application g_app;
90 95
 
91 96
 #endif
92 97
 

+ 1
- 1
src/framework/core/configmanager.cpp View File

@@ -45,7 +45,7 @@ bool ConfigManager::load(const std::string& file)
45 45
             m_confsDoc = confsDoc;
46 46
         return true;
47 47
     } catch(stdext::exception& e) {
48
-        g_logger.error(stdext::format("Unable to load configuration file: %s", e.what()));
48
+        g_logger.error(stdext::format("Unable to parse configuration file '%s'", e.what()));
49 49
         return false;
50 50
     }
51 51
 }

+ 1
- 1
src/framework/core/eventdispatcher.h View File

@@ -33,7 +33,7 @@ public:
33 33
     Event(const std::function<void()>& callback) : m_callback(callback), m_canceled(false), m_executed(false) { }
34 34
     virtual ~Event() {
35 35
         // assure that we lost callback refs
36
-        assert(m_callback == nullptr);
36
+        //assert(m_callback == nullptr);
37 37
     }
38 38
 
39 39
     virtual void execute() {

+ 5
- 0
src/framework/core/logger.cpp View File

@@ -28,6 +28,11 @@ Logger g_logger;
28 28
 
29 29
 void Logger::log(Fw::LogLevel level, const std::string& message)
30 30
 {
31
+#ifdef NDEBUG
32
+    if(level == Fw::LogDebug)
33
+        return;
34
+#endif
35
+
31 36
     static bool ignoreLogs = false;
32 37
     if(ignoreLogs)
33 38
         return;

+ 1
- 1
src/framework/core/module.cpp View File

@@ -53,7 +53,7 @@ bool Module::load()
53 53
         m_loadCallback();
54 54
 
55 55
     m_loaded = true;
56
-    //g_logger.info(stdext::format("Loaded module '%s'", m_name));
56
+    g_logger.debug(stdext::format("Loaded module '%s'", m_name));
57 57
     g_modules.updateModuleLoadOrder(asModule());
58 58
 
59 59
     for(const std::string& modName : m_loadLaterModules) {

+ 0
- 38
src/framework/core/modulemanager.cpp View File

@@ -64,44 +64,6 @@ void ModuleManager::autoLoadModules(int maxPriority)
64 64
     }
65 65
 }
66 66
 
67
-void ModuleManager::discoverModulesPath()
68
-{
69
-    // search for modules directory
70
-    std::string possibleModulesDirs[] = { "modules",
71
-                                          g_resources.getBaseDir() + "modules",
72
-                                          g_resources.getBaseDir() + "../modules",
73
-                                          g_resources.getBaseDir() + "../share/" + g_app->getName() + "/modules",
74
-                                           "" };
75
-    bool found = false;
76
-    for(const std::string& dir : possibleModulesDirs) {
77
-        // try to add module directory
78
-        if(g_resources.addToSearchPath(dir, false)) {
79
-            //g_logger.info(stdext::format("Using modules directory '%s'", dir.c_str()));
80
-            m_modulesPath = dir;
81
-            found = true;
82
-            break;
83
-        }
84
-    }
85
-
86
-    if(!found)
87
-        g_logger.fatal("Could not find modules directory");
88
-
89
-    // search for addons directory
90
-    std::string possibleAddonsDirs[] = { "addons",
91
-                                         g_resources.getBaseDir() + "addons",
92
-                                         g_resources.getBaseDir() + "../addons",
93
-                                         g_resources.getBaseDir() + "../share/" + g_app->getName() + "/addons",
94
-                                         "" };
95
-    for(const std::string& dir : possibleAddonsDirs) {
96
-        // try to add module directory
97
-        if(g_resources.addToSearchPath(dir, true)) {
98
-            //g_logger.info(stdext::format("Using addons directory '%s'", dir.c_str()));
99
-            found = true;
100
-            break;
101
-        }
102
-    }
103
-}
104
-
105 67
 ModulePtr ModuleManager::discoverModule(const std::string& moduleFile)
106 68
 {
107 69
     ModulePtr module;

+ 0
- 3
src/framework/core/modulemanager.h View File

@@ -30,14 +30,12 @@ class ModuleManager
30 30
 public:
31 31
     void clear();
32 32
 
33
-    void discoverModulesPath();
34 33
     void discoverModules();
35 34
     void autoLoadModules(int maxPriority);
36 35
     ModulePtr discoverModule(const std::string& moduleFile);
37 36
     void ensureModuleLoaded(const std::string& moduleName);
38 37
     void unloadModules();
39 38
     void reloadModules();
40
-    std::string getModulesPath() { return m_modulesPath; }
41 39
 
42 40
     ModulePtr getModule(const std::string& moduleName);
43 41
     std::deque<ModulePtr> getModules() { return m_modules; }
@@ -48,7 +46,6 @@ protected:
48 46
     friend class Module;
49 47
 
50 48
 private:
51
-    std::string m_modulesPath;
52 49
     std::deque<ModulePtr> m_modules;
53 50
     std::multimap<int, ModulePtr> m_autoLoadModules;
54 51
 };

+ 77
- 19
src/framework/core/resourcemanager.cpp View File

@@ -40,22 +40,58 @@ void ResourceManager::terminate()
40 40
     PHYSFS_deinit();
41 41
 }
42 42
 
43
+void ResourceManager::discoverWorkDir(const std::string& appName, const std::string& existentFile)
44
+{
45
+    // search for modules directory
46
+    std::string sep = PHYSFS_getDirSeparator();
47
+    std::string possiblePaths[] = { "",
48
+                                    g_resources.getBaseDir(),
49
+                                    g_resources.getBaseDir() + ".." + sep,
50
+                                    g_resources.getBaseDir() + ".." + sep + "share" + sep + appName + sep,
51
+                                    g_resources.getBaseDir() + appName + sep };
52
+    bool found = false;
53
+    for(const std::string& dir : possiblePaths) {
54
+        // try to directory to modules path to see if it exists
55
+        std::ifstream fin(dir + existentFile);
56
+        if(fin) {
57
+            g_logger.debug(stdext::format("Found work dir at '%s'", dir.c_str()));
58
+            m_workDir = dir;
59
+            found = true;
60
+            break;
61
+        }
62
+    }
63
+
64
+    if(!found)
65
+        g_logger.fatal("Unable to find application work directory.");
66
+}
67
+
43 68
 bool ResourceManager::setupWriteDir(const std::string& appWriteDirName)
44 69
 {
45 70
     std::string userDir = PHYSFS_getUserDir();
46
-    std::string dirName = stdext::format(".%s", appWriteDirName);
71
+    std::string dirName;
72
+#ifndef WIN32
73
+    dirName = stdext::format(".%s", appWriteDirName);
74
+#else
75
+    dirName = appWriteDirName;
76
+#endif
47 77
     std::string writeDir = userDir + dirName;
78
+
48 79
     if(!PHYSFS_setWriteDir(writeDir.c_str())) {
49
-        if(!PHYSFS_setWriteDir(userDir.c_str()))
80
+        if(!PHYSFS_setWriteDir(userDir.c_str())) {
81
+            g_logger.error("User directory not found.");
50 82
             return false;
83
+        }
51 84
         if(!PHYSFS_mkdir(dirName.c_str())) {
52
-            PHYSFS_setWriteDir(NULL);
85
+            g_logger.error("Cannot create directory for saving configurations.");
53 86
             return false;
54 87
         }
55
-        if(!PHYSFS_setWriteDir(writeDir.c_str()))
88
+        if(!PHYSFS_setWriteDir(writeDir.c_str())) {
89
+            g_logger.error("Unable to set write directory.");
56 90
             return false;
91
+        }
57 92
     }
58
-    addToSearchPath(writeDir);
93
+    addToSearchPath(writeDir, true);
94
+    //g_logger.debug(stdext::format("Setup write dir %s", writeDir));
59 95
     return true;
60 96
 }
61 97
 
@@ -63,6 +99,8 @@ bool ResourceManager::addToSearchPath(const std::string& path, bool insertInFron
63 99
 {
64 100
     if(!PHYSFS_addToSearchPath(path.c_str(), insertInFront ? 0 : 1))
65 101
         return false;
102
+    //g_logger.debug(stdext::format("Add search path %s", path));
103
+    m_hasSearchPath = true;
66 104
     return true;
67 105
 }
68 106
 
@@ -70,6 +108,7 @@ bool ResourceManager::removeFromSearchPath(const std::string& path)
70 108
 {
71 109
     if(!PHYSFS_removeFromSearchPath(path.c_str()))
72 110
         return false;
111
+    //g_logger.debug(stdext::format("Remove search path %s", path));
73 112
     return true;
74 113
 }
75 114
 
@@ -94,22 +133,32 @@ bool ResourceManager::directoryExists(const std::string& directoryName)
94 133
 
95 134
 void ResourceManager::loadFile(const std::string& fileName, std::iostream& out)
96 135
 {
97
-    std::string fullPath = resolvePath(fileName);
98 136
     out.clear(std::ios::goodbit);
99
-    PHYSFS_file* file = PHYSFS_openRead(fullPath.c_str());
100
-    if(!file) {
101
-        out.clear(std::ios::failbit);
102
-        stdext::throw_exception(stdext::format("failed to load file '%s': %s", fullPath.c_str(), PHYSFS_getLastError()));
137
+    if(m_hasSearchPath) {
138
+        std::string fullPath = resolvePath(fileName);
139
+        PHYSFS_file* file = PHYSFS_openRead(fullPath.c_str());
140
+        if(!file) {
141
+            out.clear(std::ios::failbit);
142
+            stdext::throw_exception(stdext::format("failed to load file '%s': %s", fullPath.c_str(), PHYSFS_getLastError()));
143
+        } else {
144
+            int fileSize = PHYSFS_fileLength(file);
145
+            if(fileSize > 0) {
146
+                std::vector<char> buffer(fileSize);
147
+                PHYSFS_read(file, (void*)&buffer[0], 1, fileSize);
148
+                out.write(&buffer[0], fileSize);
149
+            } else
150
+                out.clear(std::ios::eofbit);
151
+            PHYSFS_close(file);
152
+            out.seekg(0, std::ios::beg);
153
+        }
103 154
     } else {
104
-        int fileSize = PHYSFS_fileLength(file);
105
-        if(fileSize > 0) {
106
-            std::vector<char> buffer(fileSize);
107
-            PHYSFS_read(file, (void*)&buffer[0], 1, fileSize);
108
-            out.write(&buffer[0], fileSize);
109
-        } else
110
-            out.clear(std::ios::eofbit);
111
-        PHYSFS_close(file);
112
-        out.seekg(0, std::ios::beg);
155
+        std::ifstream fin(fileName);
156
+        if(!fin) {
157
+            out.clear(std::ios::failbit);
158
+            stdext::throw_exception(stdext::format("failed to load file '%s': %s", fileName.c_str(), PHYSFS_getLastError()));
159
+        } else {
160
+            out << fin.rdbuf();
161
+        }
113 162
     }
114 163
 }
115 164
 
@@ -223,6 +272,15 @@ std::string ResourceManager::resolvePath(const std::string& path)
223 272
     return fullPath;
224 273
 }
225 274
 
275
+std::string ResourceManager::getRealDir(const std::string& path)
276
+{
277
+    std::string dir;
278
+    const char *cdir = PHYSFS_getRealDir(path.c_str());
279
+    if(cdir)
280
+        dir = cdir;
281
+    return dir;
282
+}
283
+
226 284
 std::string ResourceManager::getBaseDir()
227 285
 {
228 286
     return PHYSFS_getBaseDir();

+ 7
- 0
src/framework/core/resourcemanager.h View File

@@ -31,6 +31,7 @@ public:
31 31
     void init(const char *argv0);
32 32
     void terminate();
33 33
 
34
+    void discoverWorkDir(const std::string& appName, const std::string& existentFile);
34 35
     bool setupWriteDir(const std::string& appWriteDirName);
35 36
 
36 37
     bool addToSearchPath(const std::string& path, bool insertInFront = true);
@@ -55,7 +56,13 @@ public:
55 56
     std::list<std::string> listDirectoryFiles(const std::string& directoryPath = "");
56 57
 
57 58
     std::string resolvePath(const std::string& path);
59
+    std::string getRealDir(const std::string& path);
58 60
     std::string getBaseDir();
61
+    std::string getWorkDir() { return m_workDir; }
62
+
63
+private:
64
+    std::string m_workDir;
65
+    Boolean<false> m_hasSearchPath;
59 66
 };
60 67
 
61 68
 extern ResourceManager g_resources;

+ 1
- 1
src/framework/graphics/framebuffer.cpp View File

@@ -47,7 +47,7 @@ void FrameBuffer::internalCreate()
47 47
 
48 48
 FrameBuffer::~FrameBuffer()
49 49
 {
50
-    assert(!g_app->isTermianted());
50
+    assert(!g_app.isTermianted());
51 51
     if(g_graphics.ok() && m_fbo != 0)
52 52
         glDeleteFramebuffers(1, &m_fbo);
53 53
 }

+ 1
- 1
src/framework/graphics/hardwarebuffer.cpp View File

@@ -37,7 +37,7 @@ HardwareBuffer::HardwareBuffer(Type type)
37 37
 
38 38
 HardwareBuffer::~HardwareBuffer()
39 39
 {
40
-    assert(!g_app->isTermianted());
40
+    assert(!g_app.isTermianted());
41 41
     if(g_graphics.ok())
42 42
         glDeleteBuffers(1, &m_id);
43 43
 }

+ 1
- 1
src/framework/graphics/shader.cpp View File

@@ -44,7 +44,7 @@ Shader::Shader(Shader::ShaderType shaderType)
44 44
 
45 45
 Shader::~Shader()
46 46
 {
47
-    assert(!g_app->isTermianted());
47
+    assert(!g_app.isTermianted());
48 48
     if(g_graphics.ok())
49 49
         glDeleteShader(m_shaderId);
50 50
 }

+ 1
- 1
src/framework/graphics/shaderprogram.cpp View File

@@ -38,7 +38,7 @@ ShaderProgram::ShaderProgram()
38 38
 
39 39
 ShaderProgram::~ShaderProgram()
40 40
 {
41
-    assert(!g_app->isTermianted());
41
+    assert(!g_app.isTermianted());
42 42
     if(g_graphics.ok())
43 43
         glDeleteProgram(m_programId);
44 44
 }

+ 1
- 1
src/framework/graphics/texture.cpp View File

@@ -79,7 +79,7 @@ Texture::Texture(const ImagePtr& image, bool buildMipmaps)
79 79
 
80 80
 Texture::~Texture()
81 81
 {
82
-    assert(!g_app->isTermianted());
82
+    assert(!g_app.isTermianted());
83 83
     // free texture from gl memory
84 84
     if(g_graphics.ok() && m_id != 0)
85 85
         glDeleteTextures(1, &m_id);

+ 42
- 34
src/framework/luafunctions.cpp View File

@@ -20,8 +20,8 @@
20 20
  * THE SOFTWARE.
21 21
  */
22 22
 
23
+#include "application.h"
23 24
 #include <framework/luascript/luainterface.h>
24
-#include <framework/application.h>
25 25
 #include <framework/graphics/fontmanager.h>
26 26
 #include <framework/ui/ui.h>
27 27
 #include <framework/net/protocol.h>
@@ -480,35 +480,41 @@ void Application::registerLuaFunctions()
480 480
 
481 481
     // Application
482 482
     g_lua.registerSingletonClass("g_app");
483
-    g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, g_app);
484
-    g_lua.bindSingletonFunction("g_app", "setForegroundPaneMaxFps", &Application::setForegroundPaneMaxFps, g_app);
485
-    g_lua.bindSingletonFunction("g_app", "setBackgroundPaneMaxFps", &Application::setBackgroundPaneMaxFps, g_app);
486
-    g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, g_app);
487
-    g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, g_app);
488
-    g_lua.bindSingletonFunction("g_app", "isOnInputEvent", &Application::isOnInputEvent, g_app);
489
-    g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, g_app);
490
-    g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, g_app);
491
-    g_lua.bindSingletonFunction("g_app", "getForegroundPaneFps", &Application::getForegroundPaneFps, g_app);
492
-    g_lua.bindSingletonFunction("g_app", "getBackgroundPaneFps", &Application::getBackgroundPaneFps, g_app);
493
-    g_lua.bindSingletonFunction("g_app", "getForegroundPaneMaxFps", &Application::getForegroundPaneMaxFps, g_app);
494
-    g_lua.bindSingletonFunction("g_app", "getBackgroundPaneMaxFps", &Application::getBackgroundPaneMaxFps, g_app);
495
-    g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, g_app);
496
-    g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, g_app);
497
-    g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, g_app);
498
-    g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, g_app);
499
-
500
-    g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, g_app);
501
-    g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, g_app);
502
-    g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, g_app);
503
-    g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, g_app);
504
-    g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, g_app);
505
-    g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, g_app);
506
-    g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, g_app);
507
-    g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, g_app);
508
-    g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, g_app);
483
+    g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, &g_app);
484
+    g_lua.bindSingletonFunction("g_app", "setForegroundPaneMaxFps", &Application::setForegroundPaneMaxFps, &g_app);
485
+    g_lua.bindSingletonFunction("g_app", "setBackgroundPaneMaxFps", &Application::setBackgroundPaneMaxFps, &g_app);
486
+    g_lua.bindSingletonFunction("g_app", "setName", &Application::setName, &g_app);
487
+    g_lua.bindSingletonFunction("g_app", "setCompactName", &Application::setCompactName, &g_app);
488
+    g_lua.bindSingletonFunction("g_app", "setVersion", &Application::setVersion, &g_app);
489
+    g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, &g_app);
490
+    g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, &g_app);
491
+    g_lua.bindSingletonFunction("g_app", "isOnInputEvent", &Application::isOnInputEvent, &g_app);
492
+    g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, &g_app);
493
+    g_lua.bindSingletonFunction("g_app", "getCompactName", &Application::getName, &g_app);
494
+    g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, &g_app);
495
+    g_lua.bindSingletonFunction("g_app", "getForegroundPaneFps", &Application::getForegroundPaneFps, &g_app);
496
+    g_lua.bindSingletonFunction("g_app", "getBackgroundPaneFps", &Application::getBackgroundPaneFps, &g_app);
497
+    g_lua.bindSingletonFunction("g_app", "getForegroundPaneMaxFps", &Application::getForegroundPaneMaxFps, &g_app);
498
+    g_lua.bindSingletonFunction("g_app", "getBackgroundPaneMaxFps", &Application::getBackgroundPaneMaxFps, &g_app);
499
+    g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, &g_app);
500
+    g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, &g_app);
501
+    g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, &g_app);
502
+    g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, &g_app);
503
+    g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, &g_app);
504
+    g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, &g_app);
505
+    g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, &g_app);
506
+    g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, &g_app);
507
+    g_lua.bindSingletonFunction("g_app", "getCompactName", &Application::getCompactName, &g_app);
508
+    g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, &g_app);
509
+    g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, &g_app);
510
+    g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, &g_app);
511
+    g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, &g_app);
512
+    g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, &g_app);
509 513
 
510 514
     // ConfigManager
511 515
     g_lua.registerSingletonClass("g_configs");
516
+    g_lua.bindSingletonFunction("g_configs", "load", &ConfigManager::load, &g_configs);
517
+    g_lua.bindSingletonFunction("g_configs", "save", &ConfigManager::save, &g_configs);
512 518
     g_lua.bindSingletonFunction("g_configs", "set", &ConfigManager::set, &g_configs);
513 519
     g_lua.bindSingletonFunction("g_configs", "setList", &ConfigManager::setList, &g_configs);
514 520
     g_lua.bindSingletonFunction("g_configs", "get", &ConfigManager::get, &g_configs);
@@ -574,7 +580,13 @@ void Application::registerLuaFunctions()
574 580
     g_lua.registerSingletonClass("g_logger");
575 581
     g_lua.bindSingletonFunction("g_logger", "log", &Logger::log, &g_logger);
576 582
     g_lua.bindSingletonFunction("g_logger", "fireOldMessages", &Logger::fireOldMessages, &g_logger);
583
+    g_lua.bindSingletonFunction("g_logger", "setLogFile", &Logger::setLogFile, &g_logger);
577 584
     g_lua.bindSingletonFunction("g_logger", "setOnLog", &Logger::setOnLog, &g_logger);
585
+    g_lua.bindSingletonFunction("g_logger", "debug", &Logger::debug, &g_logger);
586
+    g_lua.bindSingletonFunction("g_logger", "info", &Logger::info, &g_logger);
587
+    g_lua.bindSingletonFunction("g_logger", "warning", &Logger::warning, &g_logger);
588
+    g_lua.bindSingletonFunction("g_logger", "error", &Logger::error, &g_logger);
589
+    g_lua.bindSingletonFunction("g_logger", "fatal", &Logger::fatal, &g_logger);
578 590
 
579 591
     // UI
580 592
     g_lua.registerSingletonClass("g_ui");
@@ -593,7 +605,6 @@ void Application::registerLuaFunctions()
593 605
 
594 606
     // ModuleManager
595 607
     g_lua.registerSingletonClass("g_modules");
596
-    g_lua.bindSingletonFunction("g_modules", "discoverModulesPath", &ModuleManager::discoverModulesPath, &g_modules);
597 608
     g_lua.bindSingletonFunction("g_modules", "discoverModules", &ModuleManager::discoverModules, &g_modules);
598 609
     g_lua.bindSingletonFunction("g_modules", "autoLoadModules", &ModuleManager::autoLoadModules, &g_modules);
599 610
     g_lua.bindSingletonFunction("g_modules", "discoverModule", &ModuleManager::discoverModule, &g_modules);
@@ -602,7 +613,6 @@ void Application::registerLuaFunctions()
602 613
     g_lua.bindSingletonFunction("g_modules", "reloadModules", &ModuleManager::reloadModules, &g_modules);
603 614
     g_lua.bindSingletonFunction("g_modules", "getModule", &ModuleManager::getModule, &g_modules);
604 615
     g_lua.bindSingletonFunction("g_modules", "getModules", &ModuleManager::getModules, &g_modules);
605
-    g_lua.bindSingletonFunction("g_modules", "getModulesPath", &ModuleManager::getModulesPath, &g_modules);
606 616
 
607 617
     // FontManager
608 618
     g_lua.registerSingletonClass("g_fonts");
@@ -633,11 +643,9 @@ void Application::registerLuaFunctions()
633 643
     // ResourceManager
634 644
     g_lua.registerSingletonClass("g_resources");
635 645
     g_lua.bindSingletonFunction("g_resources", "addToSearchPath", &ResourceManager::addToSearchPath, &g_resources);
646
+    g_lua.bindSingletonFunction("g_resources", "setupWriteDir", &ResourceManager::setupWriteDir, &g_resources);
636 647
     g_lua.bindSingletonFunction("g_resources", "removeFromSearchPath", &ResourceManager::removeFromSearchPath, &g_resources);
637 648
     g_lua.bindSingletonFunction("g_resources", "fileExists", &ResourceManager::fileExists, &g_resources);
638
-
639
-    // LuaInterface
640
-    g_lua.registerSingletonClass("g_lua");
641
-    g_lua.bindSingletonFunction("g_lua", "getCurrentSourcePath", &LuaInterface::getCurrentSourcePath, &g_lua);
642
-
649
+    g_lua.bindSingletonFunction("g_resources", "getRealDir", &ResourceManager::getRealDir, &g_resources);
650
+    g_lua.bindSingletonFunction("g_resources", "getWorkDir", &ResourceManager::getWorkDir, &g_resources);
643 651
 }

+ 12
- 1
src/framework/luascript/luainterface.cpp View File

@@ -292,6 +292,17 @@ int LuaInterface::luaObjectCollectEvent(LuaInterface* lua)
292 292
 ///////////////////////////////////////////////////////////////////////////////
293 293
 
294 294
 
295
+bool LuaInterface::safeRunScript(const std::string& fileName)
296
+{
297
+    try {
298
+        runScript(fileName);
299
+        return true;
300
+    } catch(LuaException& e) {
301
+        g_logger.error(stdext::format("Failed to load script '%s': %s", fileName, e.what()));
302
+        return false;
303
+    }
304
+}
305
+
295 306
 void LuaInterface::runScript(const std::string& fileName)
296 307
 {
297 308
     loadScript(fileName);
@@ -312,7 +323,7 @@ void LuaInterface::loadScript(const std::string& fileName)
312 323
         filePath = getCurrentSourcePath() + "/" + filePath;
313 324
 
314 325
     try {
315
-        std::string buffer = g_resources.loadFile(filePath);
326
+        std::string buffer = g_resources.loadFile(fileName);
316 327
         std::string source = "@" + filePath;
317 328
         loadBuffer(buffer, source);
318 329
     } catch(stdext::exception& e) {

+ 3
- 0
src/framework/luascript/luainterface.h View File

@@ -132,6 +132,9 @@ private:
132 132
     static int luaObjectCollectEvent(LuaInterface* lua);
133 133
 
134 134
 public:
135
+    /// Loads and runs a script, any errors are printed to stdout and returns false
136
+    bool safeRunScript(const std::string& fileName);
137
+
135 138
     /// Loads and runs a script
136 139
     /// @exception LuaException is thrown on any lua error
137 140
     void runScript(const std::string& fileName);

+ 1
- 1
src/framework/luascript/luaobject.cpp View File

@@ -31,7 +31,7 @@ LuaObject::LuaObject() : m_fieldsTableRef(-1)
31 31
 
32 32
 LuaObject::~LuaObject()
33 33
 {
34
-    assert(!g_app->isTermianted());
34
+    assert(!g_app.isTermianted());
35 35
     releaseLuaFieldsTable();
36 36
 }
37 37
 

+ 1
- 1
src/framework/net/connection.cpp View File

@@ -41,7 +41,7 @@ Connection::Connection() :
41 41
 
42 42
 Connection::~Connection()
43 43
 {
44
-    assert(!g_app->isTermianted());
44
+    assert(!g_app.isTermianted());
45 45
     close();
46 46
 }
47 47
 

+ 0
- 0
src/framework/platform/unixcrashhandler.cpp View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save