mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Refactoring
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
#include "../CEpubFile.h"
|
||||
#include "../../DesktopEditor/common/File.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
CEpubFile Epub;
|
||||
std::wstring sFile = NSFile::GetProcessDirectory() + L"/../../../Files/Harry Potter 1.epub";
|
||||
std::wstring sTmp = NSFile::GetProcessDirectory() + L"/tmp";
|
||||
std::wstring sOutput = NSFile::GetProcessDirectory() + L"/output";
|
||||
|
||||
if (Epub.IsEbubFile(L"../../../Files/Harry Potter 1.epub"))
|
||||
if (Epub.IsEbubFile(sFile))
|
||||
{
|
||||
Epub.SetTempDirectory(L"Temp");
|
||||
Epub.Convert(L"../../../Files/Harry Potter 1.epub", L"");
|
||||
Epub.SetTempDirectory(sTmp);
|
||||
Epub.Convert(sFile, sOutput);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2,28 +2,18 @@ QT -= core
|
||||
QT -= gui
|
||||
|
||||
TARGET = test
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CONFIG -= debug_and_release debug_and_release_target
|
||||
|
||||
DEFINES += EPUBFORMAT_USE_DYNAMIC_LIBRARY
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
||||
DESTDIR = $$PWD_ROOT_DIR/build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = $$PWD_ROOT_DIR/Debug/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
|
||||
} else {
|
||||
DESTDIR = $$PWD_ROOT_DIR/Release/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
|
||||
}
|
||||
|
||||
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lkernel -lEpubFile
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
ADD_DEPENDENCY(kernel, EpubFile)
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
Reference in New Issue
Block a user