NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Forum Issues & Documentation v
« Previous 1 … 5 6 7 8 9 … 11 Next »
Skin Nullsoft installer program tutorial

 
  • 0 Vote(s) - 0 Average
Skin Nullsoft installer program tutorial
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#1
2006-06-13, 11:35 AM (This post was last modified: 2006-06-13, 02:02 PM by Fatman_do.)
This tutorial is a walkthrough of methods that are on the InstallerScriptFiles wiki site.

First steps are to download the free Nullsoft scriptable installer and install it.

Next, download this free NSIS editor (with built in wizards) and install it.

This is going to be for a large skin. For a small plugin with only a few files, you can cut and paste the example from the wiki and change names to files you need.


This example will be what the next version of Chameleon will use to install, complete with uninstaller.

First thing I do is copy everything I will need for the skin into a "working" directory so I can prune out anything I don't need to be installed. My working directory will be c:Installer\skin\chameleon. (I find it easier if I use "Installer" as if it was the directory c:\program files\devnz\gbpvr" and keep all files and folders underneath in the same relative path.)

Next, I will open the HM NIS editor and start a new script from wizard.
[ATTACHMENT NOT FOUND]

Fill in your information.
[ATTACHMENT NOT FOUND]

Name your setup file and choose LZMA compression.
[ATTACHMENT NOT FOUND]

Set the default install directory and choose your license file or readme.txt
(I will use a more advanced method later for choosing install directory so I will uncheck the box to allow users to choose directory)
[ATTACHMENT NOT FOUND]
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#2
2006-06-13, 02:21 PM (This post was last modified: 2006-06-13, 02:27 PM by Fatman_do.)
With this dialoge box, select and delete the items listed (the "X" above is to delete.)
[ATTACHMENT NOT FOUND]

Then, the button two places to the left is to select directory tree.
I will select my c:\installer directory. (Remember, this is to simulate the install directory, so the \Skin\Chameleon folders will be placed in the right location)

The next button is for start menu items and icons. I clear everything from this page and delete all text and remove shortcuts.
[ATTACHMENT NOT FOUND]

Next is the program I want to run after install. I will enter $INSTDIR\skin\chameleon\skinroot.exe

[ATTACHMENT NOT FOUND]

I will click next, and that will bring up uninstaller options.
I want an uninstaller so I will leave everything like it is here.

Click next to go to the final page.

Check boxes for Save your script, and convert files to relative paths.

Now you have made a simple installer. Compile your script and test it out only if you left the user option for choosing directories checked.

I unchecked it so I need to do more advanced things that I will cover in the next post.


In this example, I had a 30.4MB directory that created a 8.5MB setup file. Nice compression.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#3
2006-06-13, 02:38 PM (This post was last modified: 2006-06-14, 01:43 PM by Fatman_do.)
In the script editor window, I find this code down just a bit from the beginning:

Code:
Section "MainSection" SEC01
  SetOutPath "$INSTDIR\Skin\Chameleon\Advisor.Chameleon"
  SetOverwrite try

and I replace it with this:
Code:
Section "MainSection" SEC01
  ReadRegStr $INSTDIR HKLM "software\devnz" "GBPVR InstallDir" ; Find GB-PVR
  DetailPrint "GBPVR is installed at: $INSTDIR"
  SetOutPath "$INSTDIR\Skin\Chameleon\Advisor.Chameleon"
  SetOverwrite ifnewer

This will change the install directory to be where GB-PVR is installed.
It will also set the overwrite to only if newer (The gui wizard fails on this).

Ok, now I want maximum compression. So find the code near the beginning of the file:
Code:
SetCompressor lzma

And add this to it
Code:
SetCompressor [B]/SOLID[/B] lzma

I compiled this script and got 7.8MB out of a 30.4MB package.

Also, lets be nice and name the uninstaller to something better than "uninst.exe". Do a Search>Replace and replace uninst.exe
with uninst_Chameleon Skin.exe (this will be done three places).

If I were smart enough, I could figure out how to edit the finish up page on the installer to not say "Run Chameleon....." but instead say "Run Skinroot.."

But that is good enough for me.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#4
2006-06-13, 02:54 PM (This post was last modified: 2006-06-14, 01:34 AM by Fatman_do.)
A walkthrough on how to create an installer with:
  • An uninstaller
  • Finds GB-PVR from the registry and auto-installs to the proper directory without user needing to browse to proper directory.

Re-read if you have read this thread before this post. I may have edited the instructions a little bit.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
tipstir
Offline

Member

Posts: 62
Threads: 0
Joined: Dec 2004
#5
2006-06-13, 11:45 PM
Oh why are you doing this? I've done this with MS InstallShield before, but users got mad so I've done it another way where you don't have to impact their system. But still they didn't like that. So it's better to just let them put the skin in the right folders. Hey if you want to do this it's up to you.. Nice instructions though, I thought I was bad... Smile
[SIGPIC][/SIGPIC][SIZE="7"]GOOD BYE![/SIZE].
(..forgot to take my medication this morning...)
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#6
2006-06-14, 01:23 AM
It seems like it was only [URL="http://forums.nextpvr.com/showthread.php?p=68227&highlight=install#post68227"]8 months ago.....
[/URL]

I was one of those you are talking aboutBig Grin

If I remember correctly, something went FUBAR and deleted the GBPVR directory or something like that. This cannot do that, it will only delete files in the script period.

I liked the concept of a mistake-proof install, just something went wrong. I hopefully am a little wiser now, but I know nothing of the MS Installshield installer.

I know with this, I am not removing anything that was not put there by me. The script is very explicit on files removed, no wildcards involved. If there is a file there that was not installed by the script, it will fail to remove that file and directory.

I was looking into ways to remove previous versions, but decided against it.

Thanks for the feedback though.
Quote:Nice instructions though, I thought I was bad...

For some reason I talk the talk, but I don't walk the walk.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
MixMan
Offline

Posting Freak

Posts: 1,239
Threads: 100
Joined: Oct 2005
#7
2006-06-14, 10:42 AM (This post was last modified: 2006-06-14, 12:39 PM by MixMan.)
I changed the english language file in the Modern UI .....Added: - Set SkinRoot Variable in the NSIS\Contrib\Modern UI\Language files\English.nsh

Is this how the NSH file should look like?
Showing the correct extraction directory.....seem to be a problem sometimes
Best Regards
MixMan
[SIZE="1"]
Antec Fusion case with Gigabyte GA-MA78GM-SH, AMD X2 4850e, 2GB RAM, AMD780G Onboard graphics. WinTV-PVR 150 MCE (With FM), Twinhan DVB-T, 750GB + 250GB HDD. Windows XP Pro SP3, MCE 2005 Remote, 29" 4:3 monitor and a 47" Philips 9603H LCD[/SIZE]
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#8
2006-06-14, 11:46 AM
Just found your files and will look at them.


I think I found something on setting environment variables:

Section "Add Env Var"
Push MyEnvVar
Push MyEnvVarValue
Call WriteEnvStr
SectionEnd

I will test this out later.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#9
2006-06-14, 11:54 AM
Ok now I understand the -set skinroot variable part of your message. I will check it out.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
MixMan
Offline

Posting Freak

Posts: 1,239
Threads: 100
Joined: Oct 2005
#10
2006-06-14, 12:26 PM
I think the InstallDir string should look like this.....so path shows up right.
InstallDir "$INSTDIR\skin\BaseSkin\"
Best Regards
MixMan
[SIZE="1"]
Antec Fusion case with Gigabyte GA-MA78GM-SH, AMD X2 4850e, 2GB RAM, AMD780G Onboard graphics. WinTV-PVR 150 MCE (With FM), Twinhan DVB-T, 750GB + 250GB HDD. Windows XP Pro SP3, MCE 2005 Remote, 29" 4:3 monitor and a 47" Philips 9603H LCD[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  New Wiki Look & skin? steeb 5 10,327 2010-01-15, 02:04 PM
Last Post: systemshark
  CommunitySkin Skinning Tutorial Fatman_do 81 27,718 2008-06-07, 12:39 PM
Last Post: Fatman_do
  Added 16:9 skin section to wiki... Fatman_do 4 3,109 2006-12-28, 06:19 PM
Last Post: Fatman_do
  BaseSkin Tutorial Comments. Fatman_do 47 15,073 2006-07-06, 04:39 PM
Last Post: Fatman_do
  BaseSkin\Themepack Skinning Tutorial Fatman_do 20 8,846 2006-07-06, 04:22 PM
Last Post: Fatman_do
  I updated the Skin main wiki page. Fatman_do 0 1,790 2006-04-05, 05:39 PM
Last Post: Fatman_do
  Annotated XSearch/FastFind Skin.xml File (Updated: 10/5/2005) Necro 0 2,179 2005-10-05, 10:54 PM
Last Post: Necro

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode