新增工程cadproject

This commit is contained in:
gjm committed 2026-09-28 21:19:38 +08:00
commit 9c41e1d91c
20 files changed
+1871

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
#include "StdAfx.h"
#include "resource.h"
#include "cadsdk.h"
HINSTANCE _hdllInstance = NULL ;
#ifndef _ttof
#define _ttof(pszVal) _tcstod((pszVal), NULL)
#endif
void AddCommand(const TCHAR* cmdGroup, const TCHAR* cmdInt, const TCHAR* cmdLoc,
const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal = -1);
void InitApplication();
void UnloadApplication();
AC_IMPLEMENT_EXTENSION_MODULE(EarthWormDLL);
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_hdllInstance = hInstance;
EarthWormDLL.AttachInstance(hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH)
{
EarthWormDLL.DetachInstance();
}
return TRUE;
}
extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
switch (msg)
{
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxDynamicLinker->registerAppMDIAware(pkt);
InitApplication();
break;
case AcRx::kUnloadAppMsg:
UnloadApplication();
break;
}
return AcRx::kRetOK;
}
void CR_SCGXCmdFnc();
void InitApplication()
{
acrxBuildClassHierarchy();
AddCommand(_T("SHCRACKTOOLS"), _T("CR_SCGX"), _T("CR_SCGX"), ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, CR_SCGXCmdFnc);
}
void UnloadApplication()
{
acedRegCmds->removeGroup(_T("SHCRACKTOOLS"));
}
void AddCommand(const TCHAR* cmdGroup, const TCHAR* cmdInt, const TCHAR* cmdLoc,
const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal)
{
TCHAR cmdLocRes[65];
if (idLocal != -1)
{
::LoadString(_hdllInstance, idLocal, cmdLocRes, 64);
acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLocRes, cmdFlags, cmdProc);
}
else
{
acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLoc, cmdFlags, cmdProc);
}
}
+7
View File
@@ -0,0 +1,7 @@
LIBRARY "AutoAgent.arx"
EXPORTS
acrxEntryPoint PRIVATE
acrxGetApiVersion PRIVATE
+110
View File
@@ -0,0 +1,110 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Chinese (Simplified, PRC) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"#include ""res\\AutoAgent.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "AutoAgent ObjectARX application"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "AutoAgent"
VALUE "LegalCopyright", "Copyright 2014"
VALUE "OriginalFilename", "AutoAgent.arx"
VALUE "ProductName", "AutoAgent Application"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_PROJNAME "AutoAgent"
END
#endif // Chinese (Simplified, PRC) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "res\AutoAgent.rc2" // non-Microsoft Visual C++ edited resources
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+6
View File
@@ -0,0 +1,6 @@
// StdAfx.cpp : source file that includes just the standard includes
// StdAfx.pch will be the pre-compiled header
// StdAfx.obj will contain the pre-compiled type information
#include "StdAfx.h"
+50
View File
@@ -0,0 +1,50 @@
#pragma once
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WINVER 0x0600
#pragma warning(disable: 4786)
//- 'DEBUG workaround' below prevents the MFC or ATL #include-s from pulling
//- in "Afx.h" that would force the debug CRT through #pragma-s.
#if defined(_DEBUG) && !defined(AC_FULL_DEBUG)
#define _DEBUG_WAS_DEFINED
#undef _DEBUG
#pragma message ("Compiling MFC / STL / ATL header files in release mode.")
#endif
#pragma pack (push, 8)
#pragma warning(disable: 4786 4996)
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC Automation classes
#endif
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif
#include <map>
#include <string>
#include <vector>
#include <afxdhtml.h>
#include <afxwin.h>
extern HINSTANCE _hdllInstance;
#ifdef _DEBUG_WAS_DEFINED
#define _DEBUG
#undef _DEBUG_WAS_DEFINED
#endif
+29
View File
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.16)
project(AutoAgent)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(CURL CONFIG REQUIRED)
set(SOURCES
"AutoAgent.cpp"
"command.cpp"
"stdafx.cpp"
"AutoAgent.rc"
)
add_def_file_name(SOURCES "${PROJECT_NAME}")
add_library(${PROJECT_NAME} SHARED ${SOURCES})
target_precompile_headers(${PROJECT_NAME} PRIVATE StdAfx.h)
target_link_objectarx(${PROJECT_NAME} AECRXBASE_EXPORT)
target_set_name_and_suffix(${PROJECT_NAME} "${PROJECT_NAME}" ".arx")
target_compile_options(${PROJECT_NAME} PRIVATE /Zc:forScope)
target_link_libraries(${PROJECT_NAME} PRIVATE
nlohmann_json::nlohmann_json
CURL::libcurl
)
+5
View File
@@ -0,0 +1,5 @@
#include "StdAfx.h"
void CR_SCGXCmdFnc()
{
}
+13
View File
@@ -0,0 +1,13 @@
//
// AutoAgent.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////
+16
View File
@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by newProject.rc
//
#define IDS_PROJNAME 100
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 426
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 438
#define _APS_NEXT_SYMED_VALUE 122
#endif
#endif