Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 320e7035f2 | |||
| 2fe2b9ac29 | |||
| 6e7e82c475 | |||
| 9fef5bea76 | |||
| 05c133f447 | |||
| 24a703ba04 | |||
| ab19375a50 | |||
| 0c2fdb73d2 | |||
| 1afaa62fd5 | |||
| ba79108a0c | |||
| fbd949d8f3 | |||
| 980446b1e5 | |||
| 4fc545f28a | |||
| 8b6d8758a2 | |||
| 3879ffa8e2 | |||
| 508fcc0600 | |||
| f94e7cce5c | |||
| b39c4d4d6d | |||
| 2f67ff4cf9 | |||
| 9a93fc4539 | |||
| 1cd094d8ed | |||
| 2d27971eab | |||
| 807ba40b50 | |||
| 1af3d13d6b | |||
| cab18d13d6 | |||
| dd3209901b | |||
| 2758d6ab73 | |||
| 5c884e9587 | |||
| ee342de0d2 | |||
| 38a4510d0e | |||
| 924ec6492e |
+68
-24
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2023-2023
|
||||
// EgalTech 2023-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtEngine.cpp Data : 30.05.23 Versione : 2.5e5
|
||||
// File : EgtEngine.cpp Data : 08.01.26 Versione : 3.1a1
|
||||
// Contenuto : Motore di calcolo geometrico-grafico con lua.
|
||||
//
|
||||
//
|
||||
@@ -36,6 +36,33 @@ const string EXE_NAME = "EgtEngineD32.exe" ;
|
||||
const string EXE_NAME = "EgtEngineR32.exe" ;
|
||||
#endif
|
||||
#endif
|
||||
// Per file INI
|
||||
static char S_GENERAL[] = "General" ;
|
||||
static char K_USERLEVEL[] = "UserLevel" ;
|
||||
static char K_LICENCE[] = "Licence" ;
|
||||
static char K_NETKEY[] = "NetKey" ;
|
||||
static char K_DEBUG[] = "Debug" ;
|
||||
static char K_MESSAGESDIR[] = "MessagesDir" ;
|
||||
static char S_LUA[] = "Lua" ;
|
||||
static char K_LIBSDIR[] = "LibsDir" ;
|
||||
static char K_BASELIB[] = "BaseLib" ;
|
||||
static char S_GEOMDB[] = "GeomDB" ;
|
||||
static char K_NFEFONTDIR[] = "NfeFontDir" ;
|
||||
static char K_DEFAULTFONT[] = "DefaultFont" ;
|
||||
static char S_SCENE[] = "Scene" ;
|
||||
static char K_ENABLE[] = "Enable" ;
|
||||
static char K_MMUNITS[] = "MmUnits" ;
|
||||
static char S_IMPORT[] = "Import" ;
|
||||
static char K_BTLFLAG[] = "BtlFlag" ;
|
||||
static char K_BTLAUXDIR[] = "BtlAuxDir" ;
|
||||
static char S_MACH[] = "Mach" ;
|
||||
static char K_MACHINESDIR[] = "MachinesDir" ;
|
||||
static char K_TOOLMAKERSDIR[] = "ToolMakersDir" ;
|
||||
// Per file LICENCE
|
||||
static char S_LICENCE[] = "Licence" ;
|
||||
static char K_KEY[] = "Key" ;
|
||||
static char K_NESTKEY[] = "NestKey" ;
|
||||
static char K_LOCKID[] = "LockId" ;
|
||||
|
||||
//------------------------- Variabili locali ---------------------------------
|
||||
|
||||
@@ -70,34 +97,34 @@ wmain( int argc, wchar_t* argv[])
|
||||
// Impostazione path del file Ini
|
||||
string sFileIni = sConfigDir + "\\EgtEngine.ini" ;
|
||||
// Impostazione direttorio per le macchine
|
||||
string sMachinesRoot = GetPrivateProfileStringUtf8( "Mach", "MachinesDir", "", sFileIni.c_str()) ;
|
||||
string sMachinesRoot = GetPrivateProfileStringUtf8( S_MACH, K_MACHINESDIR, "", sFileIni.c_str()) ;
|
||||
if ( sMachinesRoot.empty())
|
||||
sMachinesRoot = sDataRoot + "\\Machines" ;
|
||||
// Impostazione direttorio toolmakers
|
||||
string sToolMakersDir = GetPrivateProfileStringUtf8( "Mach", "ToolMakersDir", "", sFileIni.c_str()) ;
|
||||
string sToolMakersDir = GetPrivateProfileStringUtf8( S_MACH, K_TOOLMAKERSDIR, "", sFileIni.c_str()) ;
|
||||
if ( sToolMakersDir.empty())
|
||||
sToolMakersDir = sDataRoot + "\\ToolMakers" ;
|
||||
// Imposto tipo chiave
|
||||
ExeSetLockType( KEY_LOCK_TYPE_HW) ;
|
||||
// Leggo e imposto chiave di protezione ed eventuale chiave nesting
|
||||
string sFileLic = sConfigDir + "\\" + GetPrivateProfileStringUtf8( "General", "Licence", "", sFileIni.c_str()) ;
|
||||
string sKey = GetPrivateProfileStringUtf8( "Licence", "Key", "", sFileLic.c_str()) ;
|
||||
string sFileLic = sConfigDir + "\\" + GetPrivateProfileStringUtf8( S_GENERAL, K_LICENCE, "", sFileIni.c_str()) ;
|
||||
string sKey = GetPrivateProfileStringUtf8( S_LICENCE, K_KEY, "", sFileLic.c_str()) ;
|
||||
ExeSetKey( sKey) ;
|
||||
string sNestKey = GetPrivateProfileStringUtf8( "Licence", "NestKey", "", sFileLic.c_str()) ;
|
||||
string sNestKey = GetPrivateProfileStringUtf8( S_LICENCE, K_NESTKEY, "", sFileLic.c_str()) ;
|
||||
ExeSetNestKey( sNestKey) ;
|
||||
// Impostazioni per chiave di rete
|
||||
bool bNetHwKey = ( GetPrivateProfileInt( "General", "NetKey", 0, sFileIni.c_str()) == 1) ;
|
||||
bool bNetHwKey = ( GetPrivateProfileInt( S_GENERAL, K_NETKEY, 0, sFileIni.c_str()) == 1) ;
|
||||
ExeSetNetHwKey( bNetHwKey) ;
|
||||
string sLockId = GetPrivateProfileStringUtf8( "Licence", "LockId", "", sFileLic.c_str()) ;
|
||||
string sLockId = GetPrivateProfileStringUtf8( S_LICENCE, K_LOCKID, "", sFileLic.c_str()) ;
|
||||
if ( ! IsEmptyOrSpaces( sLockId))
|
||||
ExeSetLockId( sLockId) ;
|
||||
// Recupero livello e opzioni della chiave
|
||||
int nKeyLev ; unsigned int nKeyOptions ;
|
||||
bool bKey = ExeGetKeyLevel( 9935, 2511, 1, nKeyLev) &&
|
||||
ExeGetKeyOptions( 9935, 2511, 1, nKeyOptions) ;
|
||||
bool bKey = ExeGetKeyLevel( 9935, 3104, 1, nKeyLev) &&
|
||||
ExeGetKeyOptions( 9935, 3104, 1, nKeyOptions) ;
|
||||
// Recupero livello utente e livello di debug
|
||||
int nUserLev = min( GetPrivateProfileInt( "General", "UserLevel", 1, sFileIni.c_str()), nKeyLev) ;
|
||||
int nDebug = GetPrivateProfileInt( "General", "Debug", 0, sFileIni.c_str()) ;
|
||||
int nUserLev = min( GetPrivateProfileInt( S_GENERAL, K_USERLEVEL, 1, sFileIni.c_str()), nKeyLev) ;
|
||||
int nDebug = GetPrivateProfileInt( S_GENERAL, K_DEBUG, 0, sFileIni.c_str()) ;
|
||||
// Imposto file di log
|
||||
string sLogFile = sTempDir + "\\EgtEngineLog" + sInstance + ".txt" ;
|
||||
// Imposto messaggio iniziale di Log
|
||||
@@ -109,28 +136,43 @@ wmain( int argc, wchar_t* argv[])
|
||||
ExeInit( nDebug, sLogFile, sLogMsg) ;
|
||||
ExeSetUserLevel( nUserLev) ;
|
||||
// Leggo file messaggi
|
||||
string sMsgDir = GetPrivateProfileStringUtf8( "General", "MessagesDir", "", sFileIni.c_str()) ;
|
||||
string sMsgDir = GetPrivateProfileStringUtf8( S_GENERAL, K_MESSAGESDIR, "", sFileIni.c_str()) ;
|
||||
if ( sMsgDir.empty())
|
||||
sMsgDir = sConfigDir ;
|
||||
if ( ! ExeLoadMessages( sMsgDir + "\\EgalTechEng.txt"))
|
||||
ExeOutLog( "Error : ExeLoadMessages failed") ;
|
||||
// Imposto direttorio font Nfe e font di default
|
||||
string sNfeDir = GetPrivateProfileStringUtf8( "GeomDB", "NfeFontDir", "", sFileIni.c_str()) ;
|
||||
string sDefFont = GetPrivateProfileStringUtf8( "GeomDB", "DefaultFont", "", sFileIni.c_str()) ;
|
||||
string sNfeDir = GetPrivateProfileStringUtf8( S_GEOMDB, K_NFEFONTDIR, "", sFileIni.c_str()) ;
|
||||
string sDefFont = GetPrivateProfileStringUtf8( S_GEOMDB, K_DEFAULTFONT, "", sFileIni.c_str()) ;
|
||||
ExeSetFont( sNfeDir, sDefFont) ;
|
||||
// Imposto dir di default per libreria Lua e lancio libreria di base
|
||||
string sLuaLibsDir = GetPrivateProfileStringUtf8( "Lua", "LibsDir", "", sFileIni.c_str()) ;
|
||||
string sLuaLibsDir = GetPrivateProfileStringUtf8( S_LUA, K_LIBSDIR, "", sFileIni.c_str()) ;
|
||||
ExeSetLuaLibs( sLuaLibsDir) ;
|
||||
string sLuaBaseLib = GetPrivateProfileStringUtf8( "Lua", "BaseLib", "EgtBase", sFileIni.c_str()) ;
|
||||
string sLuaBaseLib = GetPrivateProfileStringUtf8( S_LUA, K_BASELIB, "EgtBase", sFileIni.c_str()) ;
|
||||
ExeLuaRequire( sLuaBaseLib) ;
|
||||
// Imposto direttorio ausiliario per import/gestione BTL (sempre dopo impostazioni lua)
|
||||
string sBtlAuxDir = GetPrivateProfileStringUtf8( S_IMPORT, K_BTLAUXDIR, "", sFileIni.c_str()) ;
|
||||
ExeSetBtlAuxDir( sBtlAuxDir) ;
|
||||
// Imposto abilitazione interfaccia (per dialoghi da script lua)
|
||||
bool bEnableUi = ( GetPrivateProfileInt( S_SCENE, K_ENABLE, 0, sFileIni.c_str()) != 0) ;
|
||||
ExeSetEnableUI( bEnableUi) ;
|
||||
// Imposto unità di misura di interfaccia (per generazione CN)
|
||||
bool bMM = ( GetPrivateProfileInt( S_SCENE, K_MMUNITS, 1, sFileIni.c_str()) != 0) ;
|
||||
ExeSetUiUnits( bMM) ;
|
||||
// Imposto direttorio temporaneo a EgtInterface
|
||||
ExeSetTempDir( sTempDir) ;
|
||||
// Imposto IniFile a EgtInterface
|
||||
ExeSetIniFile( sFileIni) ;
|
||||
// Verifiche chiave e licenza
|
||||
if ( ! bKey) {
|
||||
if ( nKeyLev == -1)
|
||||
ExeOutLog( "Error : Missing Protection Key") ;
|
||||
if ( nKeyLev == -1 || nKeyLev == -2) {
|
||||
if ( ! ExeGetNetHwKey())
|
||||
ExeOutLog( "Error : Missing Protection Key") ;
|
||||
else
|
||||
ExeOutLog( "Error : Net Key is full") ;
|
||||
}
|
||||
else if ( nKeyLev == -9)
|
||||
ExeOutLog( "Error : Missing Link with Net Key") ;
|
||||
else
|
||||
ExeOutLog( "Error : Missing or Expired Licence") ;
|
||||
ExeExit() ;
|
||||
@@ -143,11 +185,13 @@ wmain( int argc, wchar_t* argv[])
|
||||
return 2 ;
|
||||
}
|
||||
ExeInitTscExec() ;
|
||||
// Disabilito utilizzo UI perchè non definita
|
||||
ExeSetEnableUI( false) ;
|
||||
// Impostazioni per macchine
|
||||
// Inizializzo gestore lavorazioni
|
||||
ExeInitMachMgr( sMachinesRoot, sToolMakersDir) ;
|
||||
|
||||
// Eventuale inizializzazione gestore travi e pareti
|
||||
if ( ( nKeyOptions & 64) != 0 || ( nKeyOptions & 512) != 0) {
|
||||
int nFlag = GetPrivateProfileInt( S_IMPORT, K_BTLFLAG, 0, sFileIni.c_str()) ;
|
||||
ExeInitBeamMgr( nFlag) ;
|
||||
}
|
||||
// Verifico definizione script lua
|
||||
if ( sLuaPath.empty()) {
|
||||
ExeOutLog( "Error : Empty lua script path") ;
|
||||
|
||||
+20
-20
@@ -56,8 +56,8 @@ VS_VERSION_INFO$(_DEB32) VERSIONINFO
|
||||
#else
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
#endif
|
||||
FILEVERSION 2,5,11,5
|
||||
PRODUCTVERSION 2,5,0,0
|
||||
FILEVERSION 3,1,4,2
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -74,12 +74,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Egalware s.r.l."
|
||||
VALUE "FileDescription", "EgtEngine Debug Version"
|
||||
VALUE "FileVersion", "2.5k5"
|
||||
VALUE "FileVersion", "3.1d2"
|
||||
VALUE "InternalName", "EgtEngine"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2023 by Egalware s.r.l."
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2026 by Egalware s.r.l."
|
||||
VALUE "OriginalFilename", "EgtEngineD32.exe"
|
||||
VALUE "ProductName", "Egalware Engine"
|
||||
VALUE "ProductVersion", "2.5"
|
||||
VALUE "ProductVersion", "3.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
@@ -95,8 +95,8 @@ VS_VERSION_INFO$(NDEB32) VERSIONINFO
|
||||
#else
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
#endif
|
||||
FILEVERSION 2,5,11,5
|
||||
PRODUCTVERSION 2,5,0,0
|
||||
FILEVERSION 3,1,4,2
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -113,12 +113,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Egalware s.r.l."
|
||||
VALUE "FileDescription", "EgtEngine"
|
||||
VALUE "FileVersion", "2.5k5"
|
||||
VALUE "FileVersion", "3.1d2"
|
||||
VALUE "InternalName", "EgtEngine"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2023 by Egalware s.r.l."
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2026 by Egalware s.r.l."
|
||||
VALUE "OriginalFilename", "EgtEngineR32.exe"
|
||||
VALUE "ProductName", "Egalware Engine"
|
||||
VALUE "ProductVersion", "2.5"
|
||||
VALUE "ProductVersion", "3.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
@@ -134,8 +134,8 @@ VS_VERSION_INFO$(_DEB64) VERSIONINFO
|
||||
#else
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
#endif
|
||||
FILEVERSION 2,5,11,5
|
||||
PRODUCTVERSION 2,5,0,0
|
||||
FILEVERSION 3,1,4,2
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -152,12 +152,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Egalware s.r.l."
|
||||
VALUE "FileDescription", "EgtEngine Debug Version"
|
||||
VALUE "FileVersion", "2.5k5"
|
||||
VALUE "FileVersion", "3.1d2"
|
||||
VALUE "InternalName", "EgtEngine"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2023 by Egalware s.r.l."
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2026 by Egalware s.r.l."
|
||||
VALUE "OriginalFilename", "EgtEngineD64.exe"
|
||||
VALUE "ProductName", "Egalware Engine"
|
||||
VALUE "ProductVersion", "2.5"
|
||||
VALUE "ProductVersion", "3.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
@@ -173,8 +173,8 @@ VS_VERSION_INFO$(NDEB64) VERSIONINFO
|
||||
#else
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
#endif
|
||||
FILEVERSION 2,5,11,5
|
||||
PRODUCTVERSION 2,5,0,0
|
||||
FILEVERSION 3,1,4,2
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -191,12 +191,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Egalware s.r.l."
|
||||
VALUE "FileDescription", "EgtEngine"
|
||||
VALUE "FileVersion", "2.5k5"
|
||||
VALUE "FileVersion", "3.1d2"
|
||||
VALUE "InternalName", "EgtEngine"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2023 by Egalware s.r.l."
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023-2026 by Egalware s.r.l."
|
||||
VALUE "OriginalFilename", "EgtEngineR64.exe"
|
||||
VALUE "ProductName", "Egalware Engine"
|
||||
VALUE "ProductVersion", "2.5"
|
||||
VALUE "ProductVersion", "3.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
+7
-6
@@ -23,19 +23,19 @@
|
||||
<ProjectGuid>{85FFCC70-F711-43E9-80D9-A2CD755C20A2}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>EgtConverter</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -114,6 +114,7 @@
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -143,7 +144,7 @@
|
||||
</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>
|
||||
</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -181,7 +182,7 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -224,7 +225,7 @@
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<IntelJCCErratum>true</IntelJCCErratum>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
</ClCompile>
|
||||
|
||||
Reference in New Issue
Block a user