Integration with other IDEs
Posted: Sat Jul 15, 2023 2:53 pm
When using in AkelPad, I found myself having to write my own reading settings at the end of the source code in order to add an icon to the application, as well as the name of the file to be created. In this regard, I wanted to ask if there is an intermediate official analyzer of this data in order to form the compiler command line? And if not, then using a third-party IDE is not very convenient.
Here is a JavaScript example to get the filename and icon path, I did it myself. But this is simplistic, I don't know how it will work with paths, and also there is no version number import and stuff.
Here is a JavaScript example to get the filename and icon path, I did it myself. But this is simplistic, I don't know how it will work with paths, and also there is no version number import and stuff.
Code: Select all
function ExeFindSource(pFile, pExt) {
var pTmp = AkelPad.ReadFile(pFile);
var Pos1 = pTmp.indexOf('; Executable = ')
if (Pos1 != -1)
{
Pos1 += 15 // pStart.length
var Pos2 = pTmp.indexOf('.' + pExt, Pos1)
if (Pos2 != -1)
{
pTmp = pTmp.substring(Pos1, Pos2 + 4)
pTmp = sFileDir + '\\' + pTmp
return pTmp
}
}
return sFileWiExt + pExt
}
function IconFindSource(pFile) {
var pTmp = AkelPad.ReadFile(pFile);
var Pos1 = pTmp.indexOf('; UseIcon = ')
if (Pos1 != -1)
{
Pos1 += 12 // pStart.length
var Pos2 = pTmp.indexOf('.ico', Pos1)
if (Pos2 != -1)
{
pTmp = pTmp.substring(Pos1, Pos2 + 4)
var fso = new ActiveXObject("Scripting.FileSystemObject");
pTmp = sFileDir + '\\' + pTmp
if (fso.FileExists(pTmp))
{
pTmp = ' /ICON "' + pTmp + '"'
} else {
pTmp = ''
}
}
}
return pTmp
}