-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cpp
42 lines (36 loc) · 915 Bytes
/
Main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Gacfred.h"
#include "ViewModel/MainWindowViewModel.h"
#include "Model/DB.h"
#include "Lib/util.h"
using namespace vl::collections;
using namespace vl::stream;
using namespace gacfred;
/*void initWebkit()
{
wkeSetWkeDllPath(L"C:\\Users\\buaac\\Projects\\gacfred\\Debug\\node.dll");
if (!wkeInitialize()) {
return;
}
}*/
void initDir()
{
auto folder = vl::filesystem::Folder(vl::filesystem::FilePath(Appdata(L"/Images")));
if (!folder.Exists())
{
folder.Create(true);
}
}
void GuiMain()
{
//initWebkit();
initDir();
DB.sync_schema(true);
FileStream fileStream(L"./Gacfred.bin", FileStream::ReadOnly);
GetResourceManager()->LoadResourceOrPending(fileStream);
auto viewModel = Ptr(new MainWindowViewModel());
MainWindow window(viewModel);
window.MoveToScreenCenter();
viewModel->SetProgram(L"clipboard");
GetApplication()->Run(&window);
}