Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/webframe/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace webframe
virtual window* create_window(window *parent, int width = -1, int height = -1);
virtual window* find_window(const std::string& id);
virtual void destroy_window(window* handle);
virtual std::string get_exe_path() const;
};

class server_context
Expand Down
5 changes: 5 additions & 0 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ namespace webframe
{
(void)signum;
}

std::string desktop_context::get_exe_path() const
{
return {};
}
}
5 changes: 5 additions & 0 deletions src/runtimes/desktop/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ namespace webframe::desktop
{
_windows.erase(handle->get_id());
}

std::string context::get_exe_path() const
{
return wxStandardPaths::Get().GetExecutablePath().ToStdString();
}
}
1 change: 1 addition & 0 deletions src/runtimes/desktop/include/desktop/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace webframe::desktop
webframe::window *create_window(webframe::window *parent, int width, int height) override;
webframe::window *find_window(const std::string &id) override;
void destroy_window(webframe::window *handle) override;
std::string get_exe_path() const override;

private:
int _default_width;
Expand Down
1 change: 1 addition & 0 deletions src/runtimes/desktop/include/desktop/wxwidgets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <wx/wx.h>
#include <wx/mstream.h>
#include <wx/webview.h>
#include <wx/stdpaths.h>
#include <wx/uri.h>

#endif
Loading