Browse Source

remove .idea and PyStand_for_UmiOCR

pull/892/head
Quit123 2 months ago
parent
commit
e87c65d0ac
  1. 8
      .idea/.gitignore
  2. 12
      .idea/Umi-OCR.iml
  3. 14
      .idea/deployment.xml
  4. 37
      .idea/inspectionProfiles/Project_Default.xml
  5. 6
      .idea/inspectionProfiles/profiles_settings.xml
  6. 7
      .idea/misc.xml
  7. 8
      .idea/modules.xml
  8. 6
      .idea/vcs.xml
  9. BIN
      PyStand_for_UmiOCR/PyStand.cpp
  10. 56
      PyStand_for_UmiOCR/PyStand.h
  11. 26
      PyStand_for_UmiOCR/Readme.md
  12. BIN
      PyStand_for_UmiOCR/appicon.ico
  13. 2
      PyStand_for_UmiOCR/resource.rc

8
.idea/.gitignore

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

12
.idea/Umi-OCR.iml

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

14
.idea/deployment.xml

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="zhangbojun@10.16.27.115:22 password">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>

37
.idea/inspectionProfiles/Project_Default.xml

@ -1,37 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
<item index="6" class="java.lang.String" itemvalue="botton" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N806" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredNames">
<list>
<option value="type" />
</list>
</option>
</inspection_tool>
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

6
.idea/inspectionProfiles/profiles_settings.xml

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.10" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Umi-OCR.iml" filepath="$PROJECT_DIR$/.idea/Umi-OCR.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

BIN
PyStand_for_UmiOCR/PyStand.cpp

56
PyStand_for_UmiOCR/PyStand.h

@ -1,56 +0,0 @@
//=====================================================================
//
// PyStand.h -
//
// Created by skywind on 2022/02/03
// Last Modified: 2022/02/03 23:39:52
//
//=====================================================================
#ifndef _PYSTAND_H_
#define _PYSTAND_H_
#include <stdio.h>
#include <windows.h>
#include <shlwapi.h>
#include <string>
#include <vector>
//---------------------------------------------------------------------
// PyStand
//---------------------------------------------------------------------
class PyStand
{
public:
virtual ~PyStand();
PyStand(const wchar_t *runtime);
PyStand(const char *runtime);
public:
std::wstring Ansi2Unicode(const char *text);
int RunString();
int DetectScript();
protected:
bool CheckEnviron(const wchar_t *rtp);
bool LoadPython();
protected:
typedef int (*t_Py_Main)(int argc, wchar_t **argv);
t_Py_Main _Py_Main;
protected:
HINSTANCE _hDLL;
std::wstring _cwd; // current working directory
std::wstring _args; // arguments
std::wstring _pystand; // absolute path of pystand
std::wstring _runtime; // absolute path of embedded python runtime
std::wstring _home; // home directory of PyStand.exe
std::wstring _script; // init script like PyStand.int or PyStand.py
std::vector<std::wstring> _argv;
std::vector<std::wstring> _py_argv;
std::vector<wchar_t *> _py_args;
};
#endif

26
PyStand_for_UmiOCR/Readme.md

@ -1,26 +0,0 @@
# PyStand for UmiOCR
这是为 Umi-OCR 而适配的 PyStand 启动器,功能为启动 Python Embedded 解释器并运行指定PY脚本。源项目为 [skywind3000/PyStand](https://github.com/skywind3000/PyStand) 。
可选32位和64位两种启动器。对应使用的python解释器和包也要换成32/64位。
### 生成解决方案
```cmd
# 创建 build 子目录,用于存储构建过程中生成的临时文件
mkdir build
# 32位:
# 指定构建目录为build,生成器为VS2019,生成32位exe,当前目录为根目录
cmake -B build -G "Visual Studio 16 2019" -A Win32 .
# 64位:
cmake -B build -G "Visual Studio 16 2019" -A x64 .
```
### 编译
```
# 构建生成到 build/Release 目录下
cmake --build build --config Release
```

BIN
PyStand_for_UmiOCR/appicon.ico

2
PyStand_for_UmiOCR/resource.rc

@ -1,2 +0,0 @@
IDI_ICON1 ICON DISCARDABLE "appicon.ico"
Loading…
Cancel
Save