Preparing for generation the template resource

This commit is contained in:
Oleg Korshul
2020-07-14 10:29:23 +03:00
parent e9097be275
commit 706f4db53c
4 changed files with 38 additions and 1 deletions

View File

@ -5,7 +5,7 @@
#include "../DesktopEditor/common/Directory.h"
#include "../DesktopEditor/common/StringBuilder.h"
#include "../DesktopEditor/common/SystemUtils.h"
#include "../OfficeUtils/src/OfficeUtils.h"
#include "./template/template.h"
#include <vector>
#include <map>

View File

@ -21,3 +21,4 @@ ADD_DEPENDENCY(kernel)
SOURCES += Fb2File.cpp
HEADERS += Fb2File.h
HEADERS += template/template.h

20
Fb2File/template/make.py Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python
import sys
sys.path.append('./../../../build_tools/scripts')
import base
def make():
# 1. Configure for 7z using (if need)
base.configure_common_apps("../../../build_tools/scripts/base.py")
# 2. Reading template.docx
# 3. Reading template.h
# 4. Replace the content inside autogen section to BYTE template_memory[len] = { 1,0,... };
# 5. update template.docx.
return
make()

View File

@ -0,0 +1,16 @@
#ifndef _FB2FILE_TEMPLATE_H
#define _FB2FILE_TEMPLATE_H
#include <string>
#include "../../OfficeUtils/src/OfficeUtils.h"
static bool ExtractTemplate(const std::wstring& sDirectory)
{
// [START] AUTO-GENERATED CONTENT
// [END]
// Save memory to tmp file and extract it to directory
}
#endif // _FB2FILE_TEMPLATE_H