Page 1 of 1

Integration with other IDEs

Posted: Sat Jul 15, 2023 2:53 pm
by AZJIO
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.

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
}

Re: Integration with other IDEs

Posted: Sat Jul 13, 2024 9:02 pm
by Quin
+1

Re: Integration with other IDEs

Posted: Sun Jul 14, 2024 8:47 am
by User_Russian
AZJIO wrote: Sat Jul 15, 2023 2:53 pmIn this regard, I wanted to ask if there is an intermediate official analyzer of this data in order to form the compiler command line?
The analyzer is in an IDE, and the IDE is open source. https://github.com/fantaisie-software/p ... reBasicIDE