Topic: ShortcutsPE  (Read 22026 times)

ShortcutsPE
« on: October 23, 2010, 05:49:56 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I've been working on a new shortcut generating application so as to do away with shortcutParse.exe and shortcutWinExp.exe. The main reason for this is that they've caused much bloat to CAPI, with many workarounds having to be added to support the awkward commandline syntax.

New shortcut mechanism is much simplier and arguements are passed to it the same as CAPI. Hence CAPI only does the minimum before handing over to the shortcut script. Other updated scripts and apps are in the test package which are needed to support the new mechanism.

http://galapo.boot-land.net/temp/ShortcutsPE.rar

A few scripts need to be updated at some stage to remove either dependency upon %BuildModelScript% (whick won't be working any more).
  • 10CoreMMC.script
  • MMC.script (I think this one's been done?)
  • xpe-pnp-aio.script

Regards,
Galapo.

Re: ShortcutsPE
« Reply #1 on: October 23, 2010, 10:32:41 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
May I kiss you :) from your chicks, and hug you strongly  :wub: than throw you to air 3 times saying HURRRAAA HUUURAAAA HURRRAA
 :fountain:
I can not stop my smile of hapiness. :V:

I gave my self 10 days to work on this :turtle:, you finished all of a sudden and very well   :worship::good_job:

Besides all other advantages, %25 faster here  :grin:

I do not think MMC.script have such dependency, neither xpe-pnp-aio.script ([createshortcuts-save] commented out long while ago) but yes RF scripts need to be checked  :lol: which is nothing compared to what you did.

Ahh a dream come true  :happy: :dance:

I need to read more and comment here more in some time  :smile: :smile: :smile:
« Last Edit: October 23, 2010, 10:33:16 PM by Lancelot »

Re: ShortcutsPE
« Reply #2 on: October 23, 2010, 11:58:13 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
about the question if active shell needed..

in fact active shell defined with %Shell% ;). let me call %Shell% as "Real Active Shell" for now to avoid confusion.

as far as I know, %ActiveShell% (with a bad name ;) ) only used (more or lessss) define the shortcut method (bad methodology) hence not needed anymore. (only 4 scripts around that have %ActiveShell% line: 0 CampPE, 4 - BuildModel, Explorer, Wimpack)

Also keep in mind, %Shell% defines "Real Active Shell" on pe2/3 projects which currently matches with Gena.  :thumbsup:

Re: ShortcutsPE
« Reply #3 on: October 24, 2010, 12:33:21 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
As I wrote before,
It will be better to add Hotkey support to capi today to finish all shortcut paremeters.  :thumbsup:

Add_Shortcut,[Type],[StartMenuFolder],[(Full)FileName],[Title],[Work Folder],[Parameters],[(path)IconFile(#$cIconIndex)],[StartMode=1, 2, or 3],[ToolTip Comment]
==>
Add_Shortcut,[Type],[StartMenuFolder],[(Full)FileName],[Title],[Work Folder],[Parameters],[(path)IconFile(#$cIconIndex)],[StartMode=1, 2, or 3]#$cHotkey,[ToolTip Comment]

well, hotkey not have to be supported by shortcut tools, only capi support is enough to have future ShortcutPE tools compatible eachother.

adding hotkey to capi like above is compatible to all pe2/3 proejcts since they do not have startmode support today   :lol:.

Re: ShortcutsPE
« Reply #4 on: October 24, 2010, 12:39:18 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I like how ShortcutPE.exe works  :great: as quick as possible  :thumbsup:
but I guess better not to have PE in the name, it is not special to PE ;).
Script name can be something like: Shortcut Central
and tool name can be something like: ShortcutG.exe (G for Galapo ;))  :grin:

See you tomorrow...  :zzz:

Re: ShortcutsPE
« Reply #5 on: October 24, 2010, 04:43:02 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Ok, package has been updated. Redownload from link in first post.

ShortcutPE.exe is now called ShortcutCentral.exe. Hotkey support is now implemented. CAPI needs to be coded with the option as you've suggested, I haven't done that myself, but ShortcutCentral.exe is ready and waiting.

I'm pleased to know that %Shell% is used the same in PE2/3 world -- I was hoping that was the case, but wasn't sure.

Glad to hear of the speed increase, which was one of my primary motivations.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #6 on: October 24, 2010, 06:26:13 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Package again updated.

Did some tidying up of ShortcutsPE script to make it easier for expandability.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #7 on: October 24, 2010, 09:17:56 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
memo for script name:
ShortcutCentral
ShortcutStation

memo for .exe name:
shortcutg.exe
shortcutd.exe

personal memo:
at projectinfo only [TargetPaths] section required

Further about shortcut creator:

Let me go 1 by 1, here is first:

%ProjectTemp%\ShortcutCentral.exe,"#$q%ProjectInfo% ....

1)
wouldn't it be better to extract shortcut..exe to "%ProjectTemplates%\ShortcutG\" folder
2)
connected to 1 ;).
Instead of having parameter %ProjectInfo% , copy %ProjectInfo% to "%ProjectTemplates%\ShortcutG\"
hence have
%ProjectTemp%\ShortcutCentral.exe,"#$qProjectInfo.ini ....


Reason behind:
to use shorcut.. exe widely, mostly hardcoded ProjectInfo.ini is enough for PE2/3 projects , they only need to iniwrite some values..
« Last Edit: October 24, 2010, 11:27:19 AM by Lancelot »

Re: ShortcutsPE
« Reply #8 on: October 24, 2010, 12:08:49 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo

this is what I had tried to explain

Set,%ProgramTitle%,ImgBurn
Set,%ProgramEXE%,ImgBurn.exe
Set,%ProgramFolder%,ImgBurn
Add_Shortcut,Desktop,,,1n,,noquoteparameters
Add_Shortcut,Desktop,,,2q,,#$q #$qI like quoted parameters#$q #$q

you will notice 2q not created with parameters ;).

let me rewrite:
//Add_Shortcut,Type,StartMenuFolder,(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3)#$cHotkey,ToolTipText(only Gena/LiveXP)
only 2 parameter is toxic (bolded) since they can contain annything and I do not like the story of escape from escape from escape  ....


My basic idea is to create an ini file.
*
Basically creating an ini file with all 11 parameter, than shortcutd.exe have all required info from .ini file and projectinfo.

*
speed enhancements
1)
creating an ini file with 9 parameter is enough
shorcutd.exe can already know Par7 and Par8 are in fact contains 2 parameters seperated with comma ;).

2)
creating an ini file only 2 parameter is enough. (which I did with add_pin)
trick is
IniWrite,blabla,blabla,main,#1|#2|#3|#4|#5|#7|#8||#6
IniWrite,blabla,blabla,description,#9

#6 (shortcut parameter) being at the end of main list , shortcutd.exe will count number of | (above example 8) and read all lines after 8th for shortcut parameter.

3)
following 2) even iniwrite is not necessary IF no description given for shortcut , but you must use | (or similar but not quotes) for seperator.

If,-#9-,Equal,--,.....ShortcutCentral.exe,"#$q%ProjectInfo%|#1|#2|#3|#4|#5|#7|#8||#6"

4)
even when desciption given, ini file still not a must if it does not contain | ;).
StrFormat,REPLACE,#9,|,%test%
but I feel this 4th step will not gain speed, only writing to inform.

5) ah yes ;) , IF ini file created during process, better shortcutd.exe (NOT wb) rename this ini file to something else.
ex: shortcutd.ini created and used to create shortcut, at the end of process (in AU3) check if shortcutd_Finished.ini exists and delete if there is any, rename shortcutd.ini to shortcutd_Finished.ini
--> speed and easy testing ;).



I hope you could follow, if any confusion better to contact before you start coding :).

about previous post and projectinfo, give me some time, I have to go out for a while.  :skate:
« Last Edit: October 24, 2010, 12:10:00 PM by Lancelot »

Re: ShortcutsPE
« Reply #9 on: October 24, 2010, 10:56:45 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Ok, I see what's hgoing on. I'll change the implementation.  :transformer:

Thanks,
Galapo.
« Last Edit: October 24, 2010, 11:34:59 PM by Galapo »

Re: ShortcutsPE
« Reply #10 on: October 24, 2010, 11:45:46 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
:)

and for 4th step I forgot to write
StrFormat,REPLACE,#9,|,%test%
.....
... ShortcutCentral.exe,"#$q%ProjectInfo%|#1|#2|#3|#4|#5|#7|#8|#9|#6"

which will show more clearly why I used emptly ||
....|#8||#6
in 2) and 3)

btw, I like robo Galapo :).

Re: ShortcutsPE
« Reply #11 on: October 25, 2010, 11:05:32 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

I just made a minor update on Gena server
not a must, but to avoid confusion here is updated "1 PrepPE.script" of post1
http://www.mediafire.com/?ytdkjauds4bb588
 :thumbsup:

Re: ShortcutsPE
« Reply #12 on: October 25, 2010, 11:47:57 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

following a last milisecond request (after giving 1 week time   :smile: ), capi also updated too, only 1 line added.
There have to be always a last second change  :lol: :grin:
Again to avoid confusion, here is updated capi of post 1
http://www.mediafire.com/?zqw15hizr3z25jo
 :thumbsup:

Re: ShortcutsPE
« Reply #13 on: October 25, 2010, 11:58:04 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Thanks for posting the updated scripts -- that makes it easier for these scripts I'm working on at the moment.

I had hoped the shortcut EXE might be finished by now, but I'm nearly there. Just need to do a few more tests with it before I upload here for testing. That'll be in the morning now as I need to have some sleep.

Options so far working:
-generating buildtime link from projectinfo
-generating link from supplied options (can be used for host shortcut creation)
-generating loader CFG from supplied options

Just need to test
-generating loader CFG from projectinfo

Regards,
Galapo.

Re: ShortcutsPE
« Reply #14 on: October 25, 2010, 12:17:20 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

-generating loader CFG from projectinfo

Please pospone this step (or better totally ignore), after thinking a lot more I figure out I was wrong on this idea. (If you ask I can write reasons..)
your utility using projectinfo directly is the right choice like in your initial design  :thumbsup: :thumbsup:


As I wrote before, at my side, I need to check projectinfo of pe2/3  projects to easly follow your shortcut creator,
I need to be at home, since I need to check all 3 projects starting with vistape-capi
Tip: vistape-capi is best reference for backward compatibility besides there are differences...

Than I can figure out which section etc. of pe2/3 projects projectinfo is available (and suits nicely) for such task and can provide them a small script for their basic scripts syncronising with your utility.

Besides Shortcut, Such an adding will also help having scripts with iniread..projectinfo hopefully (if section available) directly work with pe2/3 projects without workaround or long codes. Even if section not available it will be still easier to code.

I feel (%90) Things,  out of box,  will work quickly with pe2/3 project's projectinfo so pospone that step (idea) you wrote :great:

Only time and homepc required for this turtle :turtle:, Meanwhile when I find time I will continue other tasks I can do in todo list (which gets longer and shorter dynamically :w00t:) a bit slower this week compared to last week.

See you  :cheers:

Re: ShortcutsPE
« Reply #15 on: October 25, 2010, 10:16:58 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
-generating loader CFG from projectinfo

Please pospone this step (or better totally ignore), after thinking a lot more I figure out I was wrong on this idea.
Sorry, I cannot postpone this step and I have it already coded, just need to test if it's fully working. Providing this option is essential for Gena, otherwise RunFromCD will stop working. That is, we need this option in order to generate boot-time icons.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #16 on: October 26, 2010, 12:59:12 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I thought of another possible name: what do you think of ShortcutsCentro?

Then we'd have:
CampCentro
EnvironmentCentro
RAMDriveCentro
ProgramFilesCentro
BootsectorCentro
ShortcutsCentro

What do you think?

Thanks,
Galapo.

Re: ShortcutsPE
« Reply #17 on: October 26, 2010, 02:45:00 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Package has now been updated. Link is in first post. Replace project files with the files in that package for testing.

New ShortcutCentral.exe syntax:

ShortcutCentral.exe /TYPE:loader|icon /ENV:direct|projectinfo [/LF:loader_file,section /PI:projectinfo_file /LWM:ANSI|UTF16LE /TL:enable|disable /PRE:prefix /D] |SHORTCUT PARAMETERS|

SHORTCUT PARAMETERS syntax:
|Shortcut_folder|Target_file|LNK_name[|Work_folder|Arguements|Icon[,Index]|State[,Hotkey]|Description|[StartMenu_subfolder|]]

Explanation:
/TYPE:loader - sets shortcut generation to loader CFG type rather than icon (to be used in conjunction with /LF:)
/TYPE:icon - sets shortcut generation to icon

/ENV:direct - sets environment variables etc to directly supplied parameters
/ENV:projectinfo - sets environment variables etc from supplied projectinfo file (to be used in conjunction with /PI:

/LF:loader_file,section - sets loader CFG file and INI section to write to

/PI:projectinfo_file - sets path to projectinfo file

/LWM:ANSI - sets loader write mode to ANSI
/LWM:UTF16LE - sets loader write mode to UTF-16 Little Endian

/TL:enable - removes tag line at the end of each INI write to loader file
/TL:disable - does not remove tag line at the end of each INI write to loader file (speed improvement when loader doesn't care about the ending "=ENDOFSECTIONTODELETE"

/PRE:prefix - adds specified prefix to each INI write to loader file

/D - write debug log to ShortcutCentral.exe directory

SHORTCUT PARAMETERS should hopefully be self-explanatory.

Examples:
Code: [Select]
ShortcutCentral.exe /TYPE:icon /ENV:projectinfo /PI:%ProjectInfo% |......]would generate an icon based upon envoronment variables specified in projectinfo and from paramters given. This is Gena's build-time command.

Code: [Select]
ShortcutCentral.exe /TYPE:loader /ENV:projectinfo /LF:%target_sys%\ExpEnvVar.txt,PE1Shc /PI:%ProjectInfo% /LWM:UTF16LE /TL:disable /PRE:PE1Shc |.....|would generate a section in ExpEnvVar.txt loader file section in UTF16LE encoding PE1Shc based upon envoronment variables specified in projectinfo and from paramters given prefixing each line with "PE1Shc" and not removing tag line remaining in each INI write. This is Gena's boot-time command.

Code: [Select]
ShortcutCentral.exe /TYPE:icon /ENV:direct "|Desktop|%ProgramFiles%\ImgBurn\ImgBurn.exe|ImgBurn|"would generate an icon on the the desktop for ImgBurn.exe.

Code: [Select]
ShortcutCentral.exe /TYPE:icon /ENV:direct "|%userprofile%\Desktop|%ProgramFiles%\ImgBurn\ImgBurn.exe|ImgBurn|"would do exactly the same thing as the above.

Regards,
Galapo.
« Last Edit: October 28, 2010, 05:27:14 AM by Galapo »

Re: ShortcutsPE
« Reply #18 on: October 26, 2010, 06:58:20 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I just have to fix one issue I've now noticed: native AutoIt INI command don't support utf-8. Just testing a solution now and will hopefully have a new update soon.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #19 on: October 26, 2010, 10:19:23 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I've now found out that the INI AutoIt functions do support unicode files if they're UTF-16 Little Endian. So I think that should be enough. Unless I can discover how to write a function itself which essentially does some string manipulation to with UTF-8 files.

Regards,
Galapo.

 

Powered by EzPortal