Old 18th November 2005, 22:13   #1
dandaman32
Senior Member
 
dandaman32's Avatar
 
Join Date: Jan 2005
Location: Look behind you.
Posts: 209
Lightbulb Component Manager

I have created a new way to automatically handle repair, adding/removing components, and removal (uninstall) through dynamic script generation. I call it Component Manager, and I have already released the first beta.

Component Manager (CM for short :P ) replaces the Section, SectionEnd, File, CopyFiles, and SetOutPath commands in NSIS with its own modifications, allowing for a list of files, directories, componens, and (soon) shortcuts to be created without using an MSI-style database system. CM is kind of big (180-200KB for the runtime incl. the ExperienceUI) but it makes larger programs with a lot of optional components (like Winamp) easy to repair, modify, and remove, plus the installer is much more efficient. If you've used Winamp recently, you'll notice that it deletes ALL AVS scenes, MilkDrop scenes, etc. when you uninstall it. It leaves plugins and skins (last I checked) but not much else. With CM, a list of files is created while the script is compiled, meaning that each file is logged, but at compile time, and that means only, like, 2 lines of code for each file instead of a huge database in the Registry.

CM's only in beta, so it might (and probably does) have bugs. One bug in particular is it works great with the ExperienceUI, somewhat with the Modern UI, and hardly at all with the UltraModern UI. I haven't tried it with the InstallSpider UI yet.

Behind the scenes, is uses <Program Files>\Common Files\NSIS Installation Data\ComponentDatabase.ini to keep track of which components are installed. You can't change this filename yet, but I want to make it possible to write to either an INI or a registry key.

Links:
Wiki Page
Website
Downloads
Support forum

-dandaman32

ExperienceUI for NSIS | Latest project: Enano CMS
Do not PM me on the Winamp forums, I hardly ever check my messages here; you are more likely to get my attention through the ExperienceUI forum.
dandaman32 is offline   Reply With Quote
Old 19th November 2005, 09:19   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
This looks very nice!
I'll try it some day if I ever need to create a big installer.

-Stu
Afrow UK is offline   Reply With Quote
Old 21st November 2005, 03:24   #3
dandaman32
Senior Member
 
dandaman32's Avatar
 
Join Date: Jan 2005
Location: Look behind you.
Posts: 209
Forgot to note in documentation:
${File} command does NOT take wildcards - will try to implement in the future.

-dandaman32

ExperienceUI for NSIS | Latest project: Enano CMS
Do not PM me on the Winamp forums, I hardly ever check my messages here; you are more likely to get my attention through the ExperienceUI forum.
dandaman32 is offline   Reply With Quote
Old 21st November 2005, 14:34   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
To implement wildcards with my Self-Extractor I had to use an external executable.

-Stu
Afrow UK is offline   Reply With Quote
Old 21st November 2005, 21:20   #5
JCD29
Junior Member
 
Join Date: Sep 2003
Location: FRANCE
Posts: 34
I don't understand
I don't manage compiling the example based on your CM...is it normal ?

JCD
JCD29 is offline   Reply With Quote
Old 22nd November 2005, 00:01   #6
dandaman32
Senior Member
 
dandaman32's Avatar
 
Join Date: Jan 2005
Location: Look behind you.
Posts: 209
I'm not sure what you mean by "compiling the example based on my CM"...could you provide more details please?

-dandaman32

ExperienceUI for NSIS | Latest project: Enano CMS
Do not PM me on the Winamp forums, I hardly ever check my messages here; you are more likely to get my attention through the ExperienceUI forum.
dandaman32 is offline   Reply With Quote
Old 22nd November 2005, 12:48   #7
bhaelochon
Junior Member
 
Join Date: Nov 2005
Location: Kansas City, MO, USA
Posts: 35
Send a message via ICQ to bhaelochon Send a message via AIM to bhaelochon Send a message via Yahoo to bhaelochon
He can't compile the example based on your Component Manager.

"Never hold your farts in. They travel up your spine and into your brain, and that's where you get shitty ideas from." - Unknown
bhaelochon is offline   Reply With Quote
Old 22nd November 2005, 15:45   #8
dandaman32
Senior Member
 
dandaman32's Avatar
 
Join Date: Jan 2005
Location: Look behind you.
Posts: 209
Quote:
Originally posted by Afrow UK
To implement wildcards with my Self-Extractor I had to use an external executable.
How so? The NSIS 2.11 !tempfile, !appendfile, and !delfile commands would probably be best, but CM includes support for <=2.10 with an external file-writing utility. It's very limited (files must be under 8kb, and lines must be under 1kb) but it works.

Quote:
He can't compile the example based on your Component Manager
I see..."based on"? If you're getting compile errors, JCD29, what error are you getting? I tried installing CM on a fresh copy of NSIS, and it worked fine. I didn't put a check for this in the installer, but CM requires Windows XP or some files won't copy. If you really want to know, these files are:

<Program Files>\Windows NT\Accessories\Wordpad.exe
<Program Files>\Windows NT\Accessories\Mswrd6.wpc
<Program Files>\Windows NT\Accessories\Mswrd8.wpc
<Program Files>\Windows NT\Accessories\write.wpc
<Windows>\Notepad.exe

All of these files go to <NSIS>\Examples\ComponentManager\Data.

If you aren't using Windows XP (or maybe Win2000) these files will be in <Program Files>\Accessories - I think, it's been a year and a half since I upgraded to Windows XP from Windows ME.

I copy them around your machine because they're too big to include in the installer, plus I don't want to help pirate Windows components.

-dandaman32

ExperienceUI for NSIS | Latest project: Enano CMS
Do not PM me on the Winamp forums, I hardly ever check my messages here; you are more likely to get my attention through the ExperienceUI forum.
dandaman32 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump