<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I am now very confused. I have been told by someone on Lazarus Forums that to write an installer, I would need to use Resources. I have done some research into resources, and got this:<span class="Apple-style-span" style="font-family: sans-serif; font-size: 16px; line-height: 24px; "><h1 id="firstHeading" class="firstHeading" style="color: black; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; font-weight: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.1em; margin-left: 0px; padding-top: 0px; padding-bottom: 0px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); width: auto; font-size: 1.6em; line-height: 1.2em; background-position: initial initial; background-repeat: initial initial; ">Resource (Windows)</h1><div id="bodyContent" style="font-size: 0.8em; position: relative; width: 1070px; line-height: 1.5em; "><h3 id="siteSub" style="color: black; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; font-weight: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.3em; margin-left: 0px; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; width: auto; font-size: 12px; display: inline; background-position: initial initial; background-repeat: initial initial; ">From Wikipedia, the free encyclopedia</h3><div id="contentSub" style="font-size: 11px; line-height: 1.2em; margin-top: 0px; margin-right: 0px; margin-bottom: 1.4em; margin-left: 1em; color: rgb(125, 125, 125); width: auto; "></div>
<p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; ">In <a href="http://en.wikipedia.org/wiki/Microsoft_Windows" title="Microsoft Windows" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Microsoft Windows</a>, <b>resources</b> are <a href="http://en.wikipedia.org/wiki/Read-only" title="Read-only" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">read-only</a> <a href="http://en.wikipedia.org/wiki/Data_(computing)" title="Data (computing)" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">data</a> embedded in <a href="http://en.wikipedia.org/wiki/EXE" title="EXE" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">EXE</a>, <a href="http://en.wikipedia.org/wiki/Dynamic-Link_Library" title="Dynamic-Link Library" class="mw-redirect" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">DLL</a>, <a href="http://en.wikipedia.org/wiki/Control_Panel_(Windows)" title="Control Panel (Windows)" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">CPL</a> or (beginning with Windows Vista) <a href="http://en.wikipedia.org/wiki/Multilingual_User_Interface" title="Multilingual User Interface" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">MUI</a> files.</p>
<p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; ">The <a href="http://en.wikipedia.org/wiki/Windows_API" title="Windows API" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Windows API</a> provides for easy access to all applications' resources.</p>
<h2 style="color: black; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; font-weight: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); width: auto; font-size: 19px; background-position: initial initial; background-repeat: initial initial; "><span class="editsection" style="float: right; margin-left: 5px; font-size: 13px; ">[<a href="http://en.wikipedia.org/w/index.php?title=Resource_(Windows)&action=edit§ion=1" title="Edit section: Types" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">edit</a>]</span><span class="mw-headline" id="Types">Types</span></h2><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; ">Each resource has a type and a name, both being either numeric identifiers or strings.</p>
<p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; ">Windows has a set of predefined resource types:</p>
<ul style="line-height: 1.5em; list-style-type: square; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 1.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); "><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/Cursor_(computers)" title="Cursor (computers)" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Cursor</a> and animated cursor</li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/Icon_(computing)" title="Icon (computing)" class="mw-redirect" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Icon</a></li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/Bitmap" title="Bitmap" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Bitmap</a></li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/Dialog_box" title="Dialog box" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Dialog box</a> template</li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/Typeface" title="Typeface" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Font</a></li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/HTML" title="HTML" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">HTML</a> document</li><li style="margin-bottom: 0.1em; "><a href="http://en.wikipedia.org/wiki/String_(computer_science)" title="String (computer science)" style="text-decoration: none; color: rgb(6, 69, 173); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">String</a> and message template</li><li style="margin-bottom: 0.1em; ">Version data</li></ul><div>---------------------------------------------------------</div>
<div>So it seems that I cannot store a FILE in a resource. </div>
<div>All I wish to do is make a simple installer that installs an .exe onto the user's hard disk.</div>
<div>Thank you for the link, Mattias. It seems the page has been updated since I last saw it.</div>
<div>This is the code for my installer so far:</div><div><div>procedure TMainForm.InstallButtonClick(Sender: TObject);</div><div>begin</div><div>StatusMemo.Append('Attempting to retrive file...');</div><div>CRes := LazarusResources.Find('test');</div><div>StatusMemo.Append('test resource found.');</div><div>{So what do I do here to get the .exe stored in the resource</div><div>(Compiled with Lazres) and place it on the users hard disk?}</div></div><div>...</div><div><br></div><div>Do I have some mislead conception of a 'resource'?</div><div>What comes next in the code?</div><div>Thanks in advance,</div><div>- Josh</div><div>PS. Sorry for the repeated posts, I'm having time lag and I'm posting from a crappy device</div><div><br></div>
<div><br>
</div>
</div>
</span><div> </div>
<br /><hr />Get a free e-mail account with Hotmail. Sign-up now. <a href='' target='_new'></a></body>
</html>