Porting from LogicView2: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
Customizations (configurator name, extension, splash ecc) can then be applied in the same ways as old LogicView2
Customizations (configurator name, extension, splash ecc) can then be applied in the same ways as old LogicView2


* Backup LogicView2
* Backup SetupKit folder, procedures requires different steps so it is better to save a copy


* Rename files:
* Rename files:
Line 17: Line 17:
- Search "LogicView2" and replace it with "SoftTune" in all .js html files where it is used as an "extension" keyword
- Search "LogicView2" and replace it with "SoftTune" in all .js html files where it is used as an "extension" keyword
(es: app.CallFunction( "LogicView2.func" ) to app.CallFunction( "SoftTune.func" )
(es: app.CallFunction( "LogicView2.func" ) to app.CallFunction( "SoftTune.func" )
 
* Update [youTarget].pct device files into Catalog folder adding "<protocol>Configurator_root</protocol>" in <protocols> node
* Update [youTarget].pct device files into Catalog folder adding "<protocol>Configurator_root</protocol>" in <protocols> node


* Update [SetupKit]\Common\Script\common.js files with these function definitions required by maingrid.js:
* Update [SetupKit]\Common\Script\common.js files with these function definitions required by maingrid.js:


function GridLoadSettings_byColNames(grid, gridName, columns)
function GridLoadSettings_byColNames(grid, gridName, columns)
{
{
for (var colName in columns)
for (var colName in columns)
{
{
var colIdx = columns[colName];
var colIdx = columns[colName];
 
var width = app.ReadINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, "-1")
var width = app.ReadINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, "-1")
if (width == -1)
if (width == -1)
return  // se valore non trovato in ini esce subito, inutile proseguire a cercare anche le altre colonne
return  // se valore non trovato in ini esce subito, inutile proseguire a cercare anche le altre colonne
 
// imposta la dimensione della colonna letta da file solo se la colonna non è già nascosta
// imposta la dimensione della colonna letta da file solo se la colonna non è già nascosta
if (grid.ColWidth(colIdx) != 0)
if (grid.ColWidth(colIdx) != 0)
grid.ColWidth(colIdx) = width
grid.ColWidth(colIdx) = width
}
}
}
}
 
function GridSaveSettings_byColName(grid, gridName, columns, originalColumnsWidth)
{
// effettua salvataggio solo se le colonne sono effettivamente state modificate
if (!m_gridColumnsChanged)
return
for (var colName in columns)
{
var colIdx = columns[colName];
 
// se la colonna era originariamente nascosta non ne salva la dimensione
if (originalColumnsWidth && originalColumnsWidth[colIdx] == 0)
continue


var width = grid.ColWidth(colIdx)
function GridSaveSettings_byColName(grid, gridName, columns, originalColumnsWidth)
app.WriteINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, width)
{
}
// effettua salvataggio solo se le colonne sono effettivamente state modificate
}
if (!m_gridColumnsChanged)
return
for (var colName in columns)
{
var colIdx = columns[colName];
// se la colonna era originariamente nascosta non ne salva la dimensione
if (originalColumnsWidth && originalColumnsWidth[colIdx] == 0)
continue
var width = grid.ColWidth(colIdx)
app.WriteINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, width)
}
}


* Add to Setup\Shared folder these files
* Add to Setup\Shared folder these files
Line 65: Line 65:
* Update iss sections
* Update iss sections


[Files]
[Files]
Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsneveruninstall
Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsneveruninstall
Source: Shared\ToolkitPro1850vc150U.dll; DestDir: "{sys}"; Flags: sharedfile
Source: Shared\ToolkitPro1850vc150U.dll; DestDir: "{sys}"; Flags: sharedfile
Source: Shared\redist\2017\vc_redist.x86.exe; DestDir: {tmp}; Flags: deleteafterinstall
Source: Shared\redist\2017\vc_redist.x86.exe; DestDir: {tmp}; Flags: deleteafterinstall


[Run]
[Run]
Filename: {tmp}\vc_redist.x86.exe; StatusMsg: "Installing Visual C++ 2017 Redistributable..."; Parameters: "/install /quiet /norestart"; Flags: waituntilterminated
Filename: {tmp}\vc_redist.x86.exe; StatusMsg: "Installing Visual C++ 2017 Redistributable..."; Parameters: "/install /quiet /norestart"; Flags: waituntilterminated




[[Category:SoftTune]]
[[Category:SoftTune]]

Revision as of 09:18, 24 July 2019

Porting procedure from LogicView2 1.4.0.x to SoftTune 5.0.0.x :

Here follows some operations to do on the SetupKit to use SoftTune redistributable file instead of LogicView2 redistributable files. Customizations (configurator name, extension, splash ecc) can then be applied in the same ways as old LogicView2

  • Backup SetupKit folder, procedures requires different steps so it is better to save a copy
  • Rename files:

- LogicView2.pct --> SoftTune.pct - LogicView2.js --> SoftTune.js

  • Download and unzip into configurator folder SoftTune_Redist_1.5.0.x_yymmdd.zip

NB: for retrocompatibility a "LogicView2.pct" that symply includes "SoftTune.pct" file will be added to SetupKit

  • Replace contents

- Search "LogicView2" and replace it with "SoftTune" in SoftTune.pct - Search "LogicView2" and replace it with "SoftTune" in all .js html files where it is used as an "extension" keyword (es: app.CallFunction( "LogicView2.func" ) to app.CallFunction( "SoftTune.func" )

  • Update [youTarget].pct device files into Catalog folder adding "<protocol>Configurator_root</protocol>" in <protocols> node
  • Update [SetupKit]\Common\Script\common.js files with these function definitions required by maingrid.js:
function GridLoadSettings_byColNames(grid, gridName, columns)
{
	for (var colName in columns)
	{
		var colIdx = columns[colName];

		var width = app.ReadINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, "-1")
		if (width == -1)
			return   // se valore non trovato in ini esce subito, inutile proseguire a cercare anche le altre colonne

		// imposta la dimensione della colonna letta da file solo se la colonna non è già nascosta
		if (grid.ColWidth(colIdx) != 0)
			grid.ColWidth(colIdx) = width
	}
}
function GridSaveSettings_byColName(grid, gridName, columns, originalColumnsWidth)
{
	// effettua salvataggio solo se le colonne sono effettivamente state modificate
	if (!m_gridColumnsChanged)
		return
	
	for (var colName in columns)
	{
		var colIdx = columns[colName];

		// se la colonna era originariamente nascosta non ne salva la dimensione
		if (originalColumnsWidth && originalColumnsWidth[colIdx] == 0)
			continue

		var width = grid.ColWidth(colIdx)
		app.WriteINIString(INI_GRIDSETTINGS_PREFIX + gridName, INI_COLWIDTH_PREFIX + "_" + colName, width)
	}
}
  • Add to Setup\Shared folder these files

- Shared\redist\2017\vc_redist.x86.exe - AlCatalogManager5.dll - ToolkitPro1850vc150U.dll

  • Update iss sections
[Files]
Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsneveruninstall
Source: Shared\ToolkitPro1850vc150U.dll; DestDir: "{sys}"; Flags: sharedfile
Source: Shared\redist\2017\vc_redist.x86.exe; DestDir: {tmp}; Flags: deleteafterinstall
[Run]
Filename: {tmp}\vc_redist.x86.exe; StatusMsg: "Installing Visual C++ 2017 Redistributable..."; Parameters: "/install /quiet /norestart"; Flags: waituntilterminated