FORUMS
Remove All Ads from XDA

[APP][RC3.1][24Oct09]TICS-Installer-install plg in all cpr's[RC-THREAD][6.5]

2,222 posts
Thanks Meter: 272
 
By MichelDiamond, Retired Recognized Developer on 26th September 2009, 06:40 PM
Post Reply Email Thread
Hi,
ATPluginInstaller was a great idea-but we missed some things-and TICS can do it -especially installing a .plg in EACH .cpr!

TICS is short for Titanium Installator Controller Saver

TICS is upward-compatible to ATPluginInstaller in its Doing - but will do much more.

To introduce it, a little example to call TICS_installer, so you can already see, what's now possible:

TICS_installer.exe -addchange -plg:\\Internal Storage\\Sandbox\\default.plg -cpr:currentPortrait -silent


but also possible:

TICS_installer.exe -addchange -plg:\\Internal Storage\\Sandbox\\test.plg -cpr:\\Internal Storage\\Sandbox\\Titanium_480x640.cpr

and:

TICS_installer.exe -delete -plugin:Test -cpr:currentLandscape

Direct Download of TICS_installer - new RC3.1

Now, you have seen the "specials" of TICS - but the first question of te Plugin-Makers will be: "what about the setup.dll?"
And that's very easy: ATPluginInstaller installed or uninstalled only the default.plg in Titanium_<res>.cpr - so it was possible.

TICS has to much options for this - and so you need another interface -but you already have it:

The Setup.dll from Mortscript calls "install.mscr" after installing a cab - and "uninstall.mscr" before uninstalling a cab.

The only MUST is: the Mortscript.exe, TitaniumRefresh.exe and the both mscr-Files and TICS_installer.exe must be installed in your main Directory of your Plugin.
But so we can also be asure, that each Plugin has now its right MortScript-Version - and everybody of us has a simple-to-use interface.
I will post an example for an install.mscr in Post #2

But now the Syntax of TICS-installer(and 4 now it's changeable, after Release no more! It can only be expanded - but each Skinner, Themer, Plugin-Developer,... must rely on, that the Parameters from TICS_installer always be upward-compatible)

Usage:

Install/Change:
TICS_installer.exe -addchange -plg:<absolutePathToPlg> -cpr:currentPortrait|currentLandscape|<absolutePath ToCpr> [-silent]

Uninstall:
TICS_installer.exe -delete -plugin:<PluginName> -cpr:currentPortrait|currentLandscape|<absolutePath ToCpr> [-silent]

The Example in Post #2 will show the same thing as that was ATPluginInstaller did... almost... because "current" is the ative cpr - e.g. if you are using NeoTitanium - then TICS will install the .plg in NeoTitanium...

For whom it is needful to use TICS in future?
For the Users of course - no more problems to install Skins to whatever he uses in Titanium
For Developers of Plugins: their Plugins can now be used in each Titanium-Theme without adapting of the Theme-Makers - only depends from the ideas of the Skinners. Also they have a new interface after installing/before uninstalling a .cab - and Mortsript-knowledge would be enough
For Titanium-Theme-Makers: Now they can get help from the Skinners and the Plugin-Makers for a specific Plugin and no more for a whole cpr. Also the additional Parameters will help them, too
For Skinners: Much more possibilities to skin now Only by making that, what they can: Making great .plg's and Images!

TICS is free - like ATPluginInstaller - for each non-profit CHome-/Titanium-Plugin - so I'm only interested in enjoying this new possibilities of ech of you, too


Some important explanations:
- TICS_installer will only write in "ExtensibilityXML", "DefaultXML" and "Plugins" to CHome-Registry, if the Parameter for CPR is a "current..."-Parameter
- but then in "HKCU/Software/TICS" - with "newExtensibilityXML","new..."
- TICS uses "ExtensibilityXML" and "CPRFile" from CHome-Registry to identify the current CPR - it's automatically set by Windows-system because of ExtensibilityXML
- and you can use them by simple Registry-Copy in install.mscr or your Program like you need it for your Plugin
- You must set the <Position> in .plg - but if the Plugin already exists, then TICS ignores the Position in .plg - because it assumes, that the User has moved the Plugin to a better place for him (e.g. with CHome-Editor) - so it's more User-friendly
- TICS has definite Error-Messages and Number - which you can capture&handle while Installing a .plg - everything to find in "HKCU/Software/TICS"
- TICS recognizes your current resolution of your device - and only installs in the .cpr of this Resolution - no more in the other unused one
- Code optimization fast&small
- TICS makes a different between portrait and landscape in the .plg - so you have to call TICS twice if you want the same behaviour like ATPluginInstaller- but so you can also handle the different Sizes or can install different .plgs to Landscape and portrait... nice opportunity for Skinners
- it creates two temporary files direct in MainStorage "tempTitaniumLandscapeCpr.txt" and "tempTitaniumPortraitCpr.txt" which are the output files of - also a successful like a buggy call, too - of TICS - so you can handle it without need to copy something from Windows-Directory.
Of course will TICS change the current .cpr, too. And overwrite the temporary Files after next call of TICS

Everything else is already explained with ATPluginInstaller - but don't forget: CESetupDLL = "setup.dll" in TICS! :
http://forum.xda-developers.com/showthread.php?t=509492

Only a summary of the new advantages of TICS:
- fast - written in C with MSDN - nothing else! Needs only 20ms for a complete operation on a .cpr
- You can handle EACH .cpr now The most important of all
- .plg can be everywhere - you can also save the .plg in Internal Storage together with the Images to copy full Skins to your Plugins
- Post-Installation-Hook - you can handle everything which you need for yor Plugin now while installing the cab (install.mscr)
- Pre-Deinstallation-Hook - you can handle everything which you need for yor Plugin now before uninstalling the cab (uninstall.mscr)
- in pre- and post- un/installation you can handle everything also before calling TICS and also after calling TICS
-Detailed Error Messages and Numbers to handle them
- Special support-parameters for JMLToday & TitaniumRSS and some other Plugins
- Silent-Mode - TICS can suppress the Error-Messages and only write them to Registry - and you can handle them on your own
- Change View of Titanium to TitaniumListView or BronzeListView (disabled in Beta)
- Makes differences between portrait and landscape - and so the possibiity to have abolutely different Skins in this directions
- only installs in your Resolution - so it's fast and need less storage in your Windows-Directory
- User-friendly (e.g. Position - see above)
- Let you handle the both last calls of TICS by providing everything about them in Registry.


Download attached
Please: It's a RC: Before you try it - save your .cpr and the Values "ExtensibilityXML" and "Plugins" in Registry of CHome.

First File is Mortscript.exe (4.2-feel free to use,what you want) , TitaniumRefresh.exe, the setup.dll and an example for install.mscr and uninstall.mscr
Second File is TICS_installer.exe itself as zip

-------

last change 3.1:
- "-change" to TitaniumListView bugfix
*FULL CHANGELOG*

-------------

Thanx to Mort for providing the Setup.dll!!!
And AppStar for his great initial concept of ATPluginInstaller!!!

And I'm looking forward to new Themes & Skins, which are now much easier possible


Cheers & Thanxs
Micha



Like my work? For a new device to test, motivation, better developing environment and especially coffee - to spend much more nights, you can donate a cup of coffee for me.
 
 
26th September 2009, 06:41 PM |#2  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
Short Description: HowTo easily change your Plugin from ATPluginInstaller to TICS_installer (for Plugin-Developers) - needs only some minutes :

1. use the attached install.mscr and uninstall.mscr from Post #1 ("SetupDll_and_Mort.zip")

2. In install.mscr only put these Lines:
Code:
instPath = SystemPath( "ScriptPath" )
plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentPortrait"
RunWait(instPath\"TICS_installer.exe", callParameter)
callParameter="-addchange -plg:"&plgPath&" -cpr:currentLandscape"
RunWait(instPath\"TICS_installer.exe", callParameter)
RunWait(instPath\"CHomeRefresh.exe","")
If you use another .plg - not default.plg - just change second line to the name of the .plg you want to install with .cab

3. In uninstall.mscr only put these Lines:
Code:
instPath = SystemPath( "ScriptPath" )
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:YourPlugin -cpr:currentLandscape")
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:YourPlugin -cpr:currentPortrait")
RunWait(instPath\"CHomeRefresh.exe","")
Only replace "YourPlugin" with the name of yourPlugin - e.g. "CNitrogen"

4. Put this install.mscr, uninstall.mscr, TICS_installer.exe, setup.dll, MortScript.exe (don't forget! use Version, you want) and CHomeRefresh.exe to your Main Directory of your Plugin. Delete "ATPluginInstaller.exe" and "CEsetupDLL.dll"

5. Add the new Files to your .inf-File

6. Change in [DefaultInstall]-Section of your inf the Line to: CESetupDLL = "setup.dll"

7. Cab your Plugin - ready - now your Plugin works with TICS - and therefore for all Themes



Longer Example MortScript:

Here's the Mortscript, what would almost do the same while installing a cab for a Titanium Pluing like ATPluginInstaller,
but with the difference: In the current (=active) CPR - it's also attached as example in Post #1 as download
Code:
### Sample: Installation for TICS - called by setup.dll

instPath = SystemPath( "ScriptPath" )

###          Code before call of TICS_Installer                ###

# empty

###          TICS_Installer  call portrait		       ###

plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentPortrait"
message(callParameter)
RunWait(instPath\"TICS_installer.exe", callParameter)

###          Handle here returned Error-Code: portrait	       ###

errorcode=RegRead("HKCU", "Software\TICS","ErrorNumber")
if (errorcode ne "0")
	messagetext="Portrait Installation failed: "& RegRead("HKCU", "Software\TICS","ErrorDescription")
	message(messagetext)
	exit
endif

###          TICS_Installer  call landscape		       ###

plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentLandscape"
RunWait(instPath\"TICS_installer.exe", callParameter)

###          Handle here returned Error-Code: portrait	       ###

errorcode=RegRead("HKCU", "Software\TICS","ErrorNumber")
if (errorcode ne "0")
	messagetext="Landscape Installation failed: "& RegRead("HKCU", "Software\TICS","ErrorDescription")
	message(messagetext)
	exit
endif

###          Code after call of TICS_Installer                 ###

Sleep(500)
RunWait(instPath\"CHomeRefresh.exe","")

message("finished")
exit


An example for uninstallation (parly) - it will uninstall your Plugin with the Name "Test" - replace it with the Name of your Plugin and it will work

Code:
...
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:Test -cpr:currentLandscape")
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:Test -cpr:currentPortrait")
...

Some other possible calls - e.g. also from C-/C++/-C#-/Whatever-Program:

// LPCWSTR ganzPar= L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:\\Interner Speicher\\Sandbox\\Titanium_480x640.cpr" ;
// LPCWSTR ganzPar = L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:currentPortrait";
// LPCWSTR ganzPar = L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:currentLandscape -isTICSSystemCall";
// LPCWSTR ganzPar = L"-delete -plugin:JMLToday -cpr:\\Interner Speicher\\Sandbox\\Titanium2_480x640.cpr";
// LPCWSTR ganzPar = L"-delete -plugin:Test -cpr:currentPortrait";
// LPCWSTR ganzPar = L"-delete -plugin:Test -cpr:currentLandscape";
// LPCWSTR ganzPar = L"-delete -plugin:Testplugin -cpr:all";
// LPCWSTR ganzPar = L"-delete -plugin:Testplugin -cpr:\\Interner Speicher\\Sandbox\\Titanium_480x640.cpr";





And here the Listings of the Registry-Keys in HKCU/Software/TICS :

callAction: Last kind of Call, e.g. addchange
callCPR: full-qualified path of CPR which should be changed
callOrgDefaultXML/callOrgExtXML/callOrgPlugins: Saves the DefaultXML/ExtensibilityXML/Plugins before Changing
callOverall: All Parameters which were given to TICS_installer
callPLG: full-qualified path of PLG which should be injected
callTypeCPR: direct or current
ErrorDescription: Long description of Error Message
ErrorNumber: Number of the Error
last...: The same as above for the Call before
new...: The changes of TICS in Registry - with "current" also in your Titanium - otherwise only here, so you can copy it after installation e.g. in install.mscr


Nice day 4 U

Micha
26th September 2009, 06:41 PM |#3  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
Changelogs of former Versions:

changelog ReleaseCandidate 3.1:
- -change to TitaniumListView now works (not necessary to update from RC3.0 if you are a Plugin-Developers, who doesn't use "-change")

changelog ReleaseCandidate 3.0:
- Wrong Upload - therefore RC2.0 no more exists
- Bugfix: in seldom constallations other Plugins disappeared
- Added 2 more understandable Error Messages

changelog ReleaseCandidate 1.0
- added "ForbiddenList"
- added check of ExtensibilityXML to get the correct cpr-Name
- added possibility to change a cpr to TitaniumListView / BronzeListview
- increased speed - reduced filesize

Changelog Beta2:
- Made a Fix to Compiler-Options - in the optimization it made something wrong sometimes in .exe
- Some Bugfixes because of Feedback (now it's stable with changing the Windows-CPR)
- Implemented this to JMLToday-cab and tested it: All works - and if this works, so we can be very sure, that it works for all Plugins instead of ATPluginInstaller
- added Parameters:
-- The Version-Number of TICS will alway be transmitted to Registry HKCU/Software/TICS:Version
-- "-nochangechomereg" : Independent from -current..., TICS_installer won't change the Registry of CHome - only create the key in HKCU/Software/CHome, which you can copy or use afterwards.
-- "-nochangecpr" : Independent from -current..., TICS won't write back the cpr-File to the original and will only provide the temp-File, which you can use by your install-script
-- "-isTICSSystemCall": This will be a reserved Parameter for the whole TICS-System - and you can never rely on,what it does-so never use it - it's only for "C" and "S" of TICS - and can change its behaviour
- Some small optimizations in code
- Tested it very hard
-------
26th September 2009, 06:57 PM |#4  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
OK - I must go now for today - thanx for Feedback, how we can alltogether get it appropriate for each special wishes of the Themers, Skinners and Plugin-Developers.

Have Fun with TICS-Checking
Micha
26th September 2009, 07:37 PM |#5  
drkfngthdragnlrd's Avatar
Retired Recognized Developer
Flag Palmdale, CA
Thanks Meter: 272
 
Donate to Me
More
Nice, now if someone wants a specific plugin for say my NeoTitanium or the Windows 7 Titanium or any other Titanium skin that uses custom named CPR's, the developer can make the layout or any skinner can make their own. Will make my job a lot easier, Thank you!!!

Enjoy your coffee, it's well earned.

Unique Transaction ID #4HH62607UX4580321
26th September 2009, 08:01 PM |#6  
claus1953's Avatar
Senior Member
Thanks Meter: 89
 
More
You have really outdone yourself Micha, that is great.
I am no skinner and also cannot program, but i will dig into this to understand it fully as it very interesting and opens a lot of possibilities.
27th September 2009, 05:52 PM |#7  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
Thank you! I'm looking forward to everything what the Skinners will do with your NeoTitanium

Thanx, too, Claus! You had so much effort increating and providing your cpr's for all resolutions and themes - I hope it's now much easier for you.
And hey - there's no need to programming - only using the Parameters

I hope some Plugins will test soon the changing of the files (setup.dll, TICS_installer.exe) - and the most of them can overtake almost blind (only changing the PluginName) the install.mscr and uninstall.mscr of the download (and shown in Post #2) - it would almost do the same as PluginInstaller before - but now for each Titanium-Theme - and I think that's interesting for all Plugin-Developers.

I will insert it also in JMLToday andsend it to JMHL afterwards - but there will be much more needed than only the Installation-Part.
The same later on with TitaniumRSS (because TitaniumRSS has already since the first Release TICS inside for changing to FullView and some more things- so I learned, what's important).

I want to explain some additional Parameters here - only to discuss, if they would be necessary for you:

- The Version-Number of TICS will alway be transmitted to Registry - better then a "-version"-Parameter - ok?

- There will be a "-change" - Parameter - e.g. then with "-cprchange:titaniumlistview|bronzelistview" - I don't think I have to explain, what it means
- Perhaps some Parameters there in "-change" which changes the Action-Areas and some more (proposals... we will see)

- "-nochangechomereg" : Independent from -current..., TICS_installer won't change the Registry of CHome - only create he key in HKCU/Software/CHome, which you can copy or use afterwards.

- "-nochangecpr" : Independent from -current..., TICS won't write back the cpr-File to the original and will only provide the temp-File, which you can use by your install-script

- "-isTICSSystemCall": This will be a reserved Parameter for the whole TICS-System - and you can never rely on,what it does-so never use it - it's only for "C" and "S" of TICS - and can change its behaviour

I didn't write this proposals of the Parameters to Post #1 (some of them are already implemented, but disabled in Beta) - not toconfuse to much - they would be seldom used - and the most important for Plugin-Developers,Skinners, Theme-Makers,... are in Post #1

But nevertheless: If you want something special of functionality for your Theme oder your Plugin or to help for skinning .plg's - it's the best now before Iwill open the Release-Thread of TICS.

Later on - I will add each Betas here - and the Releases with the official implemented and upward-compatible functionalities in the Release-Thread of the whole TICS-Suite.

Especially from Theme-Makers and Plugin-Developers: I hope you have a look at the Parameters of Post #1 - and can tell me, what you would like to have for your Plugin.

Cheers
Micha
28th September 2009, 01:52 PM |#8  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
Ok - thanx for the Feedbacks (better here in Thread as via PN - so I would see it much faster)

I have changed the things - and deleted Beta1 from Download and added Beta2 in Post #2

I have tested it hard - and I already integrated it in JMLToday.cab to see, if everything will work (JMLToday is very complex in installing and using .plg) - and it's stable with TICS Beta2 - so you can test it also with your Plugins.

Also I had to optimize the code a little bit and added some of the Parameters, I mentioned.
I only want to run it with some further informations - therefore the .exe is a little bit bigger now. But no bad effect on the speed.

I also have put each "Beta"-Status out of the Beta - no limitations and also no more messages and Silent-Mode is activated, if set.
The Message - if activated - are now also shown in Foreground

Works really stable to integrate it.

So - Beta2 is also Release Candidate 1
Please Feedback for wishes,...

Cheers
Micha
28th September 2009, 02:14 PM |#9  
adwinp's Avatar
Senior Member
Flag urandom
Thanks Meter: 273
 
Donate to Me
More
It would be nice to have a replacement for CHomeRefresh
After each CHomeRefresh, some keys I deleted from the registry get restored, amongst other things.

We could perhaps call it via:
TICS_Installer.exe -refresh
28th September 2009, 02:28 PM |#10  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
You now already have a replacement, adwin - because it's only called from the mortscripts

I did it on purpose So everybody can choose if he wants to handle the Return-Values before or make a Refresh.

So - TICS.exe will NEVER call a Refresh by itself - you can rely on
So you can use RedrawToday from Mortscript or RefreshToday.exe or nothing (or something else - there are some more programs). What's better for you (Therefore also the additional parameters, which only write to shadows)

Don't forget - now you have an Interface while installing/uninstalling the cab. So I had no reason to integrate the Refresh into the TICS-exe.

And because of the Restored Keys after Refresh - Beta2 also sets DefaultXML now - just uploaded some minutes before to Post #1

OK so?
Micha
28th September 2009, 09:06 PM |#11  
aaronpoweruser's Avatar
Recognized Developer
earth
Thanks Meter: 7,551
 
Donate to Me
More
mind realeasing the jmltoday version with this
n if possible have it take the red f the main clock in the bliss theme
Post Reply Subscribe to Thread

Tags
tics, titanium, titaniumrss, windows mobile 6.5

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes