Porting to LogicLab: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 137: Line 137:


'''ISS changes'''
'''ISS changes'''
* Add in the ISS file the copy of this file
* Add in the ISS file the copy of those files


  ;-------------RESOURCE FILES FOR PROPERTIES VIEW-----------------------------------------------------
  ;-------------RESOURCE FILES FOR PROPERTIES VIEW-----------------------------------------------------
Line 143: Line 143:


  ;-------------SHARED COMPONENTS----------------------------------
  ;-------------SHARED COMPONENTS----------------------------------
Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsnosharedfileprompt
  Source: Shared\ToolkitPro1850vc150U.dll; DestDir: {sys}; Flags: sharedfile
  Source: Shared\ToolkitPro1850vc150U.dll; DestDir: {sys}; Flags: sharedfile



Revision as of 14:12, 10 June 2019

Porting procedure from LogicLab 4 to LogicLab 5.0.0.x :

WARNING: Those steps are strictly required because LogicLab5 has a different file and folder organization (the folder name inside the redist has changed from LogicLab4 to LogicLab5, and the executable name from LogicLab4.exe to LogicLab.exe)

ISS changes

  • modify the application name (da LogicLab4 a LogicLab5) in ISS (#define NameApp)
  • modify the folder name (from LogicLab4 to LogicLab5) in the ISS file (#define LLSrcDir)
  • modify the executable file name (from LogicLab4.exe to LogicLab.exe) in the ISS file (#define LLNameExe)
  • Remove the old version (LogicLab4) in the ISS file with InstallDelete, if desired
[InstallDelete]
Name: {app}\LogicLab4; Type: filesandordirs
  • Add in the ISS file the copy of the LogicLab\styles folder
Source: ..\{#LLSrcDir}\Styles\*.*; DestDir: {app}\{#LLDestDir}\Styles; Flags: ignoreversion
  • Remove the AlUIExt.dll installation, not existing anymore
Source: ..\{#LLSrcDir}\AlUIExt.dll; DestDir: {app}\{#LLDestDir}; Flags: ignoreversion

LLMakeCustomVersion.bat changes

  • modify the path (from LogicLab4 to LogicLab5) (set BUILDPATH)
  • modify the executable file name (from LogicLab4.exe to LogicLab.exe) in the CustomVersions script (set SRC), in the :Init function

PCT catalog changes

  • Modify the PCT file of every target of your catalog if they have any reference <loadExternalTemplate> that points to LogicLab4 in LogicLab5
  • Modify the relative path of system libraries in the catalog, e.g. "<library>..\..\LogicLab5\Libraries\Standard.pll</library>"
  • Modify the templates\LogicLab.pct file substituting <extension><dll> LogicLab4.exe in %APPEXENAME%

PageLab changes

  • If you have Pagelab on your suite, modify the PLMakeCustomVersion.bat file and updating the NAMELLC and LOGICLAB_PATH variables

Porting procedure to LogicLab 5.6.0.x :

Script catalog changes

  • If any target in your catalog has HTML pages that create or modify global PLC variables (like 'Parameters', 'Status variables', fieldbus configuration, etc...), you have to:

- Edit CheckGlobalVarsModified() function in LogicLab5\template\script.js, and make sure the actual code is

function CheckGlobalVarsModified(group)
{
	// se variabili globali già modificate e non salvate non permette l'operazione
	if (app.CallFunction("extfunct.IsGlobalVarsModified", group))
	{
		var msg;		
		if(group)
			msg = app.Translate("Global variables group %1 is modified.\nPlease save before continuing.").replace("%1", group)
		else
			msg = app.Translate("Global variables have been is modified but not saved.\nPlease save before continuing.")
			
		app.MessageBox(msg, "", MSGBOX.MB_ICONEXCLAMATION)
		return false
	}
	// ulteriore controllo se la dichiarazione testuale IEC è valida
	else if (!app.CallFunction("extfunct.IsGlobalVarsIECDeclarationValid", group))
	{
		var msg;		
		if(group)
			msg = app.Translate("Global variables group %1 has an invalid IEC declaration.\nPlease fix it before continuing.").replace("%1", group)
		else
			msg = app.Translate("Global variables have an invalid IEC declaration.\nPlease fix it before continuing.")
			
		app.MessageBox(msg, "", MSGBOX.MB_ICONEXCLAMATION)
		return false
	}	
	else
		return true
}

- Get the latest version of the script in Common\Script\PLCVars.js from [here]

Porting procedure to LogicLab 5.8.0.x :

  • LLMakeCustomVersion.BAT must be changed, because internal resource IDs have been revised. Change:
set IDS_AXEL_VERSION=10525
set IDS_CUSTOM_EXT=10529
set IDS_CUSTOM_COPYPASTE=10530
set IDS_CUSTOM_ID=10531

To:

set IDS_AXEL_VERSION=1890
set IDS_CUSTOM_EXT=1893
set IDS_CUSTOM_ID=1895
  • ISS setup script MakeCustomLL.ISS must be changed, because now LogicLab uses a new shared DLL

Download it from [here] and put it in your Setup\Shared folder.

In the ISS script please add under [Files] section:

Source: Shared\ToolkitPro1801vc120U.dll; DestDir: {sys}; Flags: sharedfile

Porting procedure to LogicLab 5.10.0.x :

  • ATCServer.exe is no longer present and not distributed in the LogicLab_xxx_Redist.zip.

Please remove any occurrence of "ATCServer" from the ISS script file.

Porting procedure to LogicLab 5.12.0.x :

  • All files generated by the compilation are now saved inside a folder named "Build". All the targets that download the symbol table (tipically LLExec) will need some modifications to the scripts in the catalog

LLExec.js (or similar, maybe with a different name): add the functions

function GetBuildDir()
{
	var prjDir = m_fso.GetParentFolderName(app.CallFunction("logiclab.get_ProjectPath")) + "\\";
	if (m_fso.FolderExists(prjDir + "Build"))
		return prjDir + "Build\\";  // le nuove versioni di LogicLab hanno la sottocartella "build" con tutti gli output di compilazione
	else
		return prjDir;  // vecchie versioni salvano tutto nella cartella di progetto
}

function GetSymbolTableFilename()
{
	var prjpath = app.CallFunction("logiclab.get_ProjectPath");
	var symtab = GetBuildDir() + "\\" + m_fso.GetBaseName(prjpath) + ".sym.xml";
	return symtab;
}

function GetSymbolTableNameOnTarget()
{
	return "PLC.sym.xml";
}

download_cfg.js (or similar): change the PreDownload() function, from

	if (downloadSymTab)
	{
		// la symbol table ha il path completo del progetto con estensione .sym.xml
		var prjpath = app.CallFunction("logiclab.get_ProjectPath")
		var symtab = m_fso.GetParentFolderName(prjpath) + "\\" + m_fso.GetBaseName(prjpath) + ".sym.xml"
		
		var result = app.CallFunction("GDBFileTransfer.GDBCopyFileToDevice", devlink, symtab, "PLC.sym.xml")
		app.PrintMessage("Downloading Symbol table : " + (result ? "OK" : "FAILED"))
	}

to

	if (downloadSymTab)
	{
		var symtab = GetSymbolTableFilename();
		
		var result = app.CallFunction("GDBFileTransfer.GDBCopyFileToDevice", devlink, symtab, GetSymbolTableNameOnTarget())
		app.PrintMessage("Downloading Symbol table : " + (result ? "OK" : "FAILED"))
	}
  • Download the latest versione of ToolkitPro shared dll.

Download it from [here] and put it in your Setup\Shared folder.

ISS changes

  • Add in the ISS file the copy of those files
;-------------RESOURCE FILES FOR PROPERTIES VIEW-----------------------------------------------------
Source: "..\{#LLSrcDir}\htmlObjInfo.js"; DestDir: "{app}\{#LLDestDir}"; Flags: ignoreversion;
;-------------SHARED COMPONENTS----------------------------------
Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsnosharedfileprompt
Source: Shared\ToolkitPro1850vc150U.dll; DestDir: {sys}; Flags: sharedfile
;-------------MICROSOFT LIBRARIES (vs2017)---------------------------------------------------------------
Source: shared\mfc140u.dll; DestDir: {sys}; Flags: uninsneveruninstall restartreplace
Source: shared\mfc140enu.dll; DestDir: {sys}; Flags: uninsneveruninstall restartreplace
Source: shared\msvcp140.dll; DestDir: {sys}; Flags: uninsneveruninstall restartreplace