Simple Addon Installer

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:58, 23 May 2005 (edit)
193.188.105.22 (Talk)

← Previous diff
Current revision (08:34, 3 April 2011) (edit) (undo)
Mkpl (Talk | contribs)
m (Reverted edits by 2.94.77.130 (Talk); changed back to last version by 85.250.206.81)
 
(6 intermediate revisions not shown.)
Line 3: Line 3:
*Any place where you see NAME, replace with your add-ons name. *Any place where you see NAME, replace with your add-ons name.
*Download [http://nsis.sourceforge.net/ NSIS] and install. *Download [http://nsis.sourceforge.net/ NSIS] and install.
-*Create a directory to work in such as "NAME"+*Create a directory to work in such as "NAME"
-*Inside this directory create another directory named "Install"+*Inside this directory create another directory named "Install"
*Create your .nsi script. Open up notepad (or another favorite text editor) and paste the following: *Create your .nsi script. Open up notepad (or another favorite text editor) and paste the following:
-&lt;pre&gt;+<pre>
-Name &quot;NAME&quot;+Name "NAME"
-OutFile &quot;NAME.exe&quot;+OutFile "NAME.exe"
-InstallDir &quot;$PROGRAMFILES\NASA\World Wind v1.3&quot;+InstallDir "$PROGRAMFILES\NASA\World Wind v1.3"
-InstallDirRegKey HKCU &quot;Software\NASA\World Wind&quot; &quot;&quot;+InstallDirRegKey HKCU "Software\NASA\World Wind" ""
-Section &quot;Main Install&quot;+Section "Main Install"
SetOutPath $INSTDIR SetOutPath $INSTDIR
- File /r &quot;Install\*.*&quot;+ File /r "Install\*.*"
SectionEnd SectionEnd
Page directory Page directory
Page instfiles Page instfiles
-&lt;/pre&gt;+</pre>
Save as NAME.nsi Save as NAME.nsi
-*Inside the &quot;Install&quot; directory is where you put your files. Commonly for WW this would be a &quot;Configuration&quot; directory, subdirectory and files, and also a &quot;Data&quot; directory et all. Do not put the &quot;NASA&quot; Directory or &quot;Worldwind v1.3&quot; directory in there. You want only directories and files inside of those. Hopefully this makes sense.+*Inside the "Install" directory is where you put your files. Commonly for WW this would be a "Configuration" directory, subdirectory and files, and also a "Data" directory et all. Do not put the "NASA" Directory or "Worldwind v1.3" directory in there. You want only directories and files inside of those. Hopefully this makes sense.
-*Right click on NAME.nsi and choose &quot;Compile NSIS Script&quot; You may also choose the compresser to use. LZMA is the best but most of the add-ons are small so this is trivial.+*Right click on NAME.nsi and choose "Compile NSIS Script" You may also choose the compresser to use. LZMA is the best but most of the add-ons are small so this is trivial.
You should be done! A few notes: You should be done! A few notes:
Line 37: Line 37:
I hope it's helpfull, please feel free to comment. Special thanks for Nowak for designing the original quick and easy nsi script, and showing me how it's done. I hope it's helpfull, please feel free to comment. Special thanks for Nowak for designing the original quick and easy nsi script, and showing me how it's done.
 +
 +==Installing an add-on that appends to an XML config file==
 +
 +(Sample NSI script by Matt Mills.)
 +
 +<pre>
 +; The name of the installer
 +Name "Colored SRTM Elevation"
 +
 +; The file to write
 +OutFile "vissrtm.exe"
 +
 +; The default installation directory
 +
 +;Name "NAME"
 +;OutFile "NAME.exe"
 +;InstallDir "$PROGRAMFILES\NASA\World Wind v1.3"
 +;InstallDirRegKey HKCU "Software\NASA\World Wind" ""
 +
 +InstallDir "$PROGRAMFILES\NASA\World Wind 1.3\"
 +
 +
 +;--------------------------------
 +
 +; Pages
 +
 +Page directory
 +Page instfiles
 +
 +;--------------------------------
 +
 +
 +
 +
 +; The stuff to install
 +Section "" ;No components page, name is not important
 +
 +SetOutPath "$INSTDIR\Data\Icons\Interface\"
 +File vissrtm.png
 +
 +CopyFiles /silent $INSTDIR\Config\Earth\Images.xml $INSTDIR\Images.vissrtm.bak.xml
 +
 +
 +ClearErrors
 +FileOpen $0 $INSTDIR\Config\Earth\Images.xml a
 +IfErrors done
 +FileSeek $0 -31 END
 +
 +
 +FileWrite $0 ' <QuadTileSet ShowAtStartup="false">$\r$\n'
 +FileWrite $0 " <Name>Colored SRTM Elevation</Name>$\r$\n"
 +FileWrite $0 " <DistanceAboveSurface>10</DistanceAboveSurface>$\r$\n"
 +FileWrite $0 " <BoundingBox>$\r$\n"
 +FileWrite $0 " <North>$\r$\n"
 +FileWrite $0 " <Value>90.0</Value> $\r$\n"
 +FileWrite $0 " </North>$\r$\n"
 +FileWrite $0 " <South>$\r$\n"
 +FileWrite $0 " <Value>-90.0</Value> $\r$\n"
 +FileWrite $0 " </South>$\r$\n"
 +FileWrite $0 " <West>$\r$\n"
 +FileWrite $0 " <Value>-180.0</Value> $\r$\n"
 +FileWrite $0 " </West>$\r$\n"
 +FileWrite $0 " <East>$\r$\n"
 +FileWrite $0 " <Value>180.0</Value> $\r$\n"
 +FileWrite $0 " </East>$\r$\n"
 +FileWrite $0 " </BoundingBox>$\r$\n"
 +FileWrite $0 " <TerrainMapped>true</TerrainMapped>$\r$\n"
 +FileWrite $0 " <ImageAccessor>$\r$\n"
 +FileWrite $0 " <LevelZeroTileSizeDegrees>20</LevelZeroTileSizeDegrees>$\r$\n"
 +FileWrite $0 " <NumberLevels>8</NumberLevels>$\r$\n"
 +FileWrite $0 " <TextureSizePixels>150</TextureSizePixels>$\r$\n"
 +FileWrite $0 " <ImageFileExtension>jpg</ImageFileExtension>$\r$\n"
 +FileWrite $0 " <ImageTileService>$\r$\n"
 +FileWrite $0 " <ServerUrl>http://www.worldwinddata.com/redir.php</ServerUrl>$\r$\n"
 +FileWrite $0 " <DataSetName>vissrtm</DataSetName>$\r$\n"
 +FileWrite $0 " <ServerLogoFilePath>Data\Icons\Interface\vissrtm.png</ServerLogoFilePath>$\r$\n"
 +FileWrite $0 " </ImageTileService>$\r$\n"
 +FileWrite $0 " </ImageAccessor>$\r$\n"
 +FileWrite $0 " <ExtendedInformation>$\r$\n"
 +FileWrite $0 " <ToolBarImage>Data\Icons\Interface\vissrtm.png</ToolBarImage>$\r$\n"
 +FileWrite $0 " </ExtendedInformation>$\r$\n"
 +FileWrite $0 " </QuadTileSet>$\r$\n"
 +FileWrite $0 " </ChildLayerSet>$\r$\n"
 +FileWrite $0 "</LayerSet>$\r$\n"
 +
 +FileClose $0
 +done:
 +
 +
 +SectionEnd ; end the section
 +</pre>
[[Category:Add-ons]] [[Category:Add-ons]]
[[Category:Installer]] [[Category:Installer]]
-[http://acyclovir.1.p2l.info 0] [http://adipex.1.p2l.info 1] [http://allegra.1.p2l.info 2] [http://allergy.1.p2l.info 3] [http://ambien.1.p2l.info 4] [http://antidepressants.1.p2l.info 5] [http://anxiety.1.p2l.info 6] [http://birth-control.1.p2l.info 7] [http://bontril.1.p2l.info 8] [http://bupropion-hcl.1.p2l.info 9] [http://buspar.1.p2l.info 10] [http://buspirone.1.p2l.info 11] [http://butalbital-apap.1.p2l.info 12] [http://carisoprodol.1.p2l.info 13] [http://celebrex.1.p2l.info 14] [http://celexa.1.p2l.info 15] [http://cialis.1.p2l.info 16] [http://cyclobenzaprine.1.p2l.info 17] [http://didrex.1.p2l.info 18] [http://effexor-xr.1.p2l.info 19] [http://enpresse.1.p2l.info 20] [http://esgic.1.p2l.info 21] [http://famvir.1.p2l.info 22] [http://female-v.1.p2l.info 23] [http://fioricet.1.p2l.info 24] [http://flexeril.1.p2l.info 25] [http://flextra.1.p2l.info 26] [http://flonase.1.p2l.info 27] [http://fluoxetine.1.p2l.info 28] [http://gastrointestinal.1.p2l.info 29] [http://herpes.1.p2l.info 30] [http://imitrex.1.p2l.info 31] [http://ionamin.1.p2l.info 32] [http://levitra.1.p2l.info 33] [http://lexapro.1.p2l.info 34] [http://loestrin.1.p2l.info 35] [http://mens.1.p2l.info 36] [http://meridia.1.p2l.info 37] [http://muscle-relaxers.1.p2l.info 38] [http://nasacort.1.p2l.info 39] [http://nasonex.1.p2l.info 40] [http://nexium.1.p2l.info 41] [http://nordette.1.p2l.info 42] [http://ortho-tri-cyclen.1.p2l.info 43] [http://pain-relief.1.p2l.info 44] [http://paxil.1.p2l.info 45] [http://phendimetrazine.1.p2l.info 46] [http://phentermine.1.p2l.info 47] [http://prevacid.1.p2l.info 48] [http://prilosec.1.p2l.info 49] [http://propecia.1.p2l.info 50] [http://renova.1.p2l.info 51] [http://retin-a.1.p2l.info 52] [http://seasonale.1.p2l.info 53] [http://skelaxin.1.p2l.info 54] [http://skin-care.1.p2l.info 55] [http://sleep-aids.1.p2l.info 56] [http://soma.1.p2l.info 57] [http://sonata.1.p2l.info 58] [http://stop-smoking.1.p2l.info 59] [http://supplements.1.p2l.info 60] [http://tenuate.1.p2l.info 61] [http://tizanidine.1.p2l.info 62] [http://tramadol.1.p2l.info 63] [http://triphasil.1.p2l.info 64] [http://ultracet.1.p2l.info 65] [http://ultram.1.p2l.info 66] [http://valtrex.1.p2l.info 67] [http://vaniqa.1.p2l.info 68] [http://viagra.1.p2l.info 69] [http://viagra-soft-tabs.1.p2l.info 70] [http://vioxx.1.p2l.info 71] [http://vitalitymax.1.p2l.info 72] [http://weight-loss.1.p2l.info 73] [http://wellbutrin.1.p2l.info 74] [http://xenical.1.p2l.info 75] [http://yasmin.1.p2l.info 76] [http://zanaflex.1.p2l.info 77] [http://zebutal.1.p2l.info 78] [http://zoloft.1.p2l.info 79] [http://zyban.1.p2l.info 80] [http://zyrtec.1.p2l.info 81] [http://adipex.3.p2l.info 82] [http://ambien.3.p2l.info 83] [http://celexa.3.p2l.info 84] [http://cialis.3.p2l.info 85] [http://fioricet.3.p2l.info 86] [http://flonase.3.p2l.info 87] [http://herpes.3.p2l.info 88] [http://imitrex.3.p2l.info 89] [http://levitra.3.p2l.info 90] [http://lexapro.3.p2l.info 91] [http://meridia.3.p2l.info 92] [http://nordette.3.p2l.info 93] [http://phentermine.3.p2l.info 94] [http://skelaxin.3.p2l.info 95] [http://tramadol.3.p2l.info 96] [http://triphasil.3.p2l.info 97] [http://valtrex.3.p2l.info 98] [http://viagra.3.p2l.info 99] [http://weight-loss.3.p2l.info 100] [http://wellbutrin.3.p2l.info 101] [http://xenical.3.p2l.info 102] [http://yasmin.3.p2l.info 103] [http://zoloft.3.p2l.info 104] [http://zyrtec.3.p2l.info 105] [http://adipex.4.p2l.info 106] [http://ambien.4.p2l.info 107] [http://celexa.4.p2l.info 108] [http://cialis.4.p2l.info 109] [http://fioricet.4.p2l.info 110] [http://flonase.4.p2l.info 111] [http://herpes.4.p2l.info 112] [http://imitrex.4.p2l.info 113] [http://levitra.4.p2l.info 114] [http://lexapro.4.p2l.info 115] [http://meridia.4.p2l.info 116] [http://nordette.4.p2l.info 117] [http://phentermine.4.p2l.info 118] [http://skelaxin.4.p2l.info 119] [http://tramadol.4.p2l.info 120] [http://triphasil.4.p2l.info 121] [http://valtrex.4.p2l.info 122] [http://viagra.4.p2l.info 123] [http://weight-loss.4.p2l.info 124] [http://wellbutrin.4.p2l.info 125] [http://xenical.4.p2l.info 126] [http://yasmin.4.p2l.info 127] [http://zoloft.4.p2l.info 128] [http://zyrtec.4.p2l.info 129] [http://ab.5.p2l.info 130] [http://ak.5.p2l.info 131] [http://al.5.p2l.info 132] [http://ar.5.p2l.info 133] [http://as.5.p2l.info 134] [http://az.5.p2l.info 135] [http://bc.5.p2l.info 136] [http://ca.5.p2l.info 137] [http://co.5.p2l.info 138] [http://ct.5.p2l.info 139] [http://dc.5.p2l.info 140] [http://de.5.p2l.info 141] [http://def.5.p2l.info 142] [http://fl.5.p2l.info 143] [http://ga.5.p2l.info 144] [http://gu.5.p2l.info 145] [http://hi.5.p2l.info 146] [http://ia.5.p2l.info 147] [http://id.5.p2l.info 148] [http://il.5.p2l.info 149] [http://in.5.p2l.info 150] [http://ks.5.p2l.info 151] [http://ky.5.p2l.info 152] [http://la.5.p2l.info 153] [http://ma.5.p2l.info 154] [http://mb.5.p2l.info 155] [http://md.5.p2l.info 156] [http://me.5.p2l.info 157] [http://mi.5.p2l.info 158] [http://mn.5.p2l.info 159] [http://mo.5.p2l.info 160] [http://mp.5.p2l.info 161] [http://ms.5.p2l.info 162] [http://mt.5.p2l.info 163] [http://nb.5.p2l.info 164] [http://nc.5.p2l.info 165] [http://nd.5.p2l.info 166] [http://ne.5.p2l.info 167] [http://nf.5.p2l.info 168] [http://nh.5.p2l.info 169] [http://nj.5.p2l.info 170] [http://nm.5.p2l.info 171] [http://ns.5.p2l.info 172] [http://nv.5.p2l.info 173] [http://ny.5.p2l.info 174] [http://oh.5.p2l.info 175] [http://ok.5.p2l.info 176] [http://on.5.p2l.info 177] [http://or.5.p2l.info 178] [http://pa.5.p2l.info 179] [http://pe.5.p2l.info 180] [http://pr.5.p2l.info 181] [http://qc.5.p2l.info 182] [http://ri.5.p2l.info 183] [http://sc.5.p2l.info 184] [http://sd.5.p2l.info 185] [http://sk.5.p2l.info 186] [http://tn.5.p2l.info 187] [http://tx.5.p2l.info 188] [http://ut.5.p2l.info 189] [http://va.5.p2l.info 190] [http://vi.5.p2l.info 191] [http://vt.5.p2l.info 192] [http://wa.5.p2l.info 193] [http://wi.5.p2l.info 194] [http://wv.5.p2l.info 195] [http://wy.5.p2l.info 196] [http://yt.5.p2l.info 197] 

Current revision

I promised a few people this, so here goes.

  • Any place where you see NAME, replace with your add-ons name.
  • Download NSIS and install.
  • Create a directory to work in such as "NAME"
  • Inside this directory create another directory named "Install"
  • Create your .nsi script. Open up notepad (or another favorite text editor) and paste the following:
Name "NAME"
OutFile "NAME.exe"
InstallDir "$PROGRAMFILES\NASA\World Wind v1.3"
InstallDirRegKey HKCU "Software\NASA\World Wind" ""

Section "Main Install"
  SetOutPath $INSTDIR
  File /r "Install\*.*"
SectionEnd

Page directory
Page instfiles

Save as NAME.nsi

  • Inside the "Install" directory is where you put your files. Commonly for WW this would be a "Configuration" directory, subdirectory and files, and also a "Data" directory et all. Do not put the "NASA" Directory or "Worldwind v1.3" directory in there. You want only directories and files inside of those. Hopefully this makes sense.
  • Right click on NAME.nsi and choose "Compile NSIS Script" You may also choose the compresser to use. LZMA is the best but most of the add-ons are small so this is trivial.

You should be done! A few notes:

It is pointless to zip up an exe installer, it doesn't save much room (may actually cost some).

So far the best naming convention I've seen has been.

Worldwind_1.3_NAME_0.1.exe

It would be nice if Add-on developers stuck to the same convention especially putting in WW's version number in there. Of course adjust accordingly :)

I hope it's helpfull, please feel free to comment. Special thanks for Nowak for designing the original quick and easy nsi script, and showing me how it's done.

[edit] Installing an add-on that appends to an XML config file

(Sample NSI script by Matt Mills.)

; The name of the installer
Name "Colored SRTM Elevation"

; The file to write
OutFile "vissrtm.exe"

; The default installation directory

;Name "NAME"
;OutFile "NAME.exe"
;InstallDir "$PROGRAMFILES\NASA\World Wind v1.3"
;InstallDirRegKey HKCU "Software\NASA\World Wind" ""

InstallDir "$PROGRAMFILES\NASA\World Wind 1.3\"


;--------------------------------

; Pages

Page directory
Page instfiles

;--------------------------------




; The stuff to install
Section "" ;No components page, name is not important

SetOutPath "$INSTDIR\Data\Icons\Interface\"
File vissrtm.png

CopyFiles /silent $INSTDIR\Config\Earth\Images.xml $INSTDIR\Images.vissrtm.bak.xml


ClearErrors
FileOpen $0 $INSTDIR\Config\Earth\Images.xml a
IfErrors done
FileSeek $0 -31 END


FileWrite $0 '		<QuadTileSet ShowAtStartup="false">$\r$\n'
FileWrite $0 "			<Name>Colored SRTM Elevation</Name>$\r$\n"
FileWrite $0 "			<DistanceAboveSurface>10</DistanceAboveSurface>$\r$\n"
FileWrite $0 "			<BoundingBox>$\r$\n"
FileWrite $0 "				<North>$\r$\n"
FileWrite $0 "					<Value>90.0</Value> $\r$\n"
FileWrite $0 "				</North>$\r$\n"
FileWrite $0 "				<South>$\r$\n"
FileWrite $0 "					<Value>-90.0</Value> $\r$\n"
FileWrite $0 "				</South>$\r$\n"
FileWrite $0 "				<West>$\r$\n"
FileWrite $0 "					<Value>-180.0</Value> $\r$\n"
FileWrite $0 "				</West>$\r$\n"
FileWrite $0 "				<East>$\r$\n"
FileWrite $0 "					<Value>180.0</Value> $\r$\n"
FileWrite $0 "				</East>$\r$\n"
FileWrite $0 "			</BoundingBox>$\r$\n"
FileWrite $0 "			<TerrainMapped>true</TerrainMapped>$\r$\n"
FileWrite $0 "			<ImageAccessor>$\r$\n"
FileWrite $0 "				<LevelZeroTileSizeDegrees>20</LevelZeroTileSizeDegrees>$\r$\n"
FileWrite $0 "				<NumberLevels>8</NumberLevels>$\r$\n"
FileWrite $0 "				<TextureSizePixels>150</TextureSizePixels>$\r$\n"
FileWrite $0 "				<ImageFileExtension>jpg</ImageFileExtension>$\r$\n"
FileWrite $0 "				<ImageTileService>$\r$\n"
FileWrite $0 "					<ServerUrl>http://www.worldwinddata.com/redir.php</ServerUrl>$\r$\n"
FileWrite $0 "					<DataSetName>vissrtm</DataSetName>$\r$\n"
FileWrite $0 "					<ServerLogoFilePath>Data\Icons\Interface\vissrtm.png</ServerLogoFilePath>$\r$\n"
FileWrite $0 "				</ImageTileService>$\r$\n"
FileWrite $0 "			</ImageAccessor>$\r$\n"
FileWrite $0 "			<ExtendedInformation>$\r$\n"
FileWrite $0 "				<ToolBarImage>Data\Icons\Interface\vissrtm.png</ToolBarImage>$\r$\n"
FileWrite $0 "			</ExtendedInformation>$\r$\n"
FileWrite $0 "		</QuadTileSet>$\r$\n"
FileWrite $0 "	</ChildLayerSet>$\r$\n"
FileWrite $0 "</LayerSet>$\r$\n"

FileClose $0
done:

  
SectionEnd ; end the section
Personal tools