A Simple Installer for Palm Applications: Difference between revisions
m (Reverted edits by 187.79.27.196 to last version by Kichik) |
RuthMartin (talk | contribs) (minor updates) |
||
Line 175: | Line 175: | ||
; Get a list of all Palm users on the PC | ; Get a list of all Palm users on the PC | ||
Call GetPalmUserList | Call GetPalmUserList | ||
; | ; ... \n | ||
== Seeking Silence & Stillness in the Rush of Business Life == | |||
Pico Iyer -- essayist, author, travel writer and thinker -- has a unique perspective on many things. His physical domain ranges from California (where he lived as a child) and England (where he studied) to Cuba, North Korea and Ethiopia (which he visited) and Japan (where he resides). His mental domain knows no limiting boundaries. In this interview with Wharton associate dean and chief information officer Deirdre Woods and Knowledge@Wharton | |||
[[http://goodvillenews.com/Seeking-Silence-Stillness-in-the-Rush-of-Business-Life-LCK85X.html Seeking Silence & Stillness in the Rush of Business Life]] | |||
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]] | |||
== What Is Your Legacy? Living A Meaningful life == | |||
I want the world to be better because I was here. I want my life, I want my work, my family, I want it to mean something and if you are not making someone elses life better then you are wasting your time Will Smith | |||
[[http://goodvillenews.com/What-Is-Your-Legacy-Living-A-Meaningful-life-oBtnrB.html What Is Your Legacy? Living A Meaningful life]] | |||
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]] | |||
== The Limitations of Positive Thinking == | |||
Positive thinking is so firmly enshrined in our culture that knocking it is a little like attacking motherhood or apple pie. Many persons swear by positive thinking and quite a few have been helped by it. Nevertheless, it is not a very effective tool and can be downright harmful in some cases. There are much better ways to get the benefits that positive thinking allegedly provides. | |||
[[http://goodvillenews.com/The-Limitations-of-Positive-Thinking-m3ZrTe.html The Limitations of Positive Thinking]] | |||
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]] | |||
== The Importance of Imagination == | |||
While growing up, Id never really considered how important it is to be imaginative. Its a childhood profession, you could say. It comes naturally. Then we hit an age when were presented with a scantron of bubble-in options, a template for a CV that we need to create, and Excel. At that point, our learning has to fit into certain parameters: within that little bubble, within the one page limit, and within a tiny digital graph. So, what happens to our imagination?It seems to fade. | |||
[[http://goodvillenews.com/The-Importance-of-Imagination-BvyL3n.html The Importance of Imagination]] | |||
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]] | |||
== The Relationship Between Gifts & Community == | |||
Wherever I go and ask people what is missing from their lives, the most common answer (if they are not impoverished or seriously ill) is "community." What happened to community, and why dont we have it any more? There are many reasons the layout of suburbia, the disappearance of public space, the automobile and the television, the high mobility of people and jobs and, if you trace the "whys" a few levels down, they all implicate the money system. | |||
[[http://goodvillenews.com/The-Relationship-Between-Gifts-Community-zbK8gw.html The Relationship Between Gifts & Community]] | |||
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]] | |||
Revision as of 20:01, 27 July 2012
Author: ellocogato (talk, contrib) |
Disclaimer
I am not particularly experienced with NSIS. I don't fully understand InstallOptions, the System plugin, or the Modern Interface. I needed an installer for a Palm application, and I could find no such existing NSIS example, so after hacking up an installer myself, I wrote an example based on what I did. It's probably not the most elegant, and it may not even be entirely correct. But it works.
If you find a mistake, find a better way of doing something, or add functionality that others might find useful, send me comments so that I can improve this example
The Script
<highlight-nsis>
- DESCRIPTION
- Example Installer for simple (i.e. no conduit program) Palm applications
- AUTHOR
- Gus Scheidt
- ellocogato <AT> gmail <DOT> com
- REQUIRES
- - The InstAide and UserData DLLs from the Palm Conduit Development Kit
- (copy to the same directory as the .nsi file)
- - Originally compiled with NSIS v2.11
- This script supports installation of one or more files (PRC,PDB) to a Palm OS
- handheld's internal memory plus one or more files to a memory slot (internal
- expansion or external flash memory card). It does not demonstrate installation
- of any kind of conduit. It does not demonstrate the ability to install for
- multiple Palm Users at once.
- If you don't need to install any files to a memory slot, then you won't need the
- following
- - The "Page custom ShowSlotList" line
- - The ShowSlotList function
- - The ShowSlotList.ini file
- - The GetPalmSlotList function
- - The CheckSlotMgrSupport function
- - The "INSTALL FILES TO EXPANSION MEMORY" section of the InstallFiles function
- - The second half of the RemoveInstallFiles function
- Script loosely based on the MUI Basic Example Script Written by Joost Verburg
- declare variables
Var PalmUserList ; Used to dynamically populate dropdown on User Selection page Var PalmSlotList ; Used to dynamically populate dropdown on Slot Selection page Var UserChoice ; Selected Palm Username Var UserChoiceID ; ID of selected Palm Username Var NumSlots ; How many memory slots available on the selected Palm User's handheld Var SlotChoice ; Selected memory slot Var SlotChoiceID ; ID of selected memory slot Var SlotSupport ; Does the selected Palm User's hanheld support slot management? Var InstallStatus ; Defined when the installer is aborting
- declare constants
!define MY_PRODUCT "My Palm App" ;Define your own software name here !define MY_VERSION "v1.0" ;Define your own software version here !define MY_BUILD "1234" Name "${MY_PRODUCT} ${MY_VERSION} (build ${MY_BUILD})" ;Display name for installer
!include "MUI.nsh"
- --------------------------------
- Configuration
; Name of the resulting executable installer file OutFile "${MY_PRODUCT}.exe"
; I don't intend to install any files permenantly on the PC, so ; use the system temporary directory InstallDir "$TEMP\MyAppSetup"
- --------------------------------
- Modern UI Configuration
; Show a license agreement page !define MUI_LICENSEPAGE ; Show a warning when the user cancels the install !define MUI_ABORTWARNING ; I'm using some custom pages !define MUI_CUSTOMPAGECOMMANDS ; Show a finish page at the end of the installation !define MUI_FINISHPAGE ; Don't present the option to reboot the computer on the finish page !define MUI_FINISHPAGE_NOREBOOTSUPPORT ; The icon for the installer title bar and .exe file ;!define MUI_ICON "myapp.ico" ; I want to use my product logo in the installer ;!define MUI_HEADERIMAGE ; Here is my product logo ;!define MUI_HEADERIMAGE_BITMAP "myapp.bmp" ; I want the logo to be on the right side of the installer, not the left ;!define MUI_HEADERIMAGE_RIGHT ; I've written a function that I want to be called when the user cancels the installation !define MUI_CUSTOMFUNCTION_ABORT myOnAbort ; Override the text on the Finish Page !define MUI_FINISHPAGE_TITLE "Installation Complete" !define MUI_FINISHPAGE_TEXT "${MY_PRODUCT} has been installed to your Palm device.\r\n\r\nClick Finish now to close the installation program."
- --------------------------------
- Pages
; These are the pages that I want my installer to consist of, in the order ; I want them to appear !insertmacro MUI_PAGE_LICENSE "License.txt" ; License agreement page. Use license text from License.txt !insertmacro MUI_PAGE_INSTFILES ; File installation page Page custom ShowUserList ; My custom page for choosing the Palm user Page custom ShowSlotList ; My custom page for choosing the Palm external memory slot Page custom InstallFiles ; My custom page for scheduling files to be installed ; and informing the user that a HotSync is required
; I've written a function that I want to be called just before the finish page is displayed !define MUI_PAGE_CUSTOMFUNCTION_PRE myFinishPre !insertmacro MUI_PAGE_FINISH ; the Finish page
- --------------------------------
- Languages
; I don't know anything about Internationalization. But I speak English !insertmacro MUI_LANGUAGE "English"
- --------------------------------
- Language Strings
;Description text that I want to appear while files are being copied LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copying the Palm files to your computer so they can be installed to your device."
;Header text for all pages in the installer LangString TEXT_IO_TITLE ${LANG_ENGLISH} "My Palm App" LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Install the Application and Data Files to your Device"
- --------------------------------
- Data
; Is this redundant? LicenseData "License.txt"
- --------------------------------
- Reserve Files
;Things that need to be extracted first (keep these lines before any File command!) ;Required for proper behavior when using BZIP2 compression
ReserveFile "showUserList.ini" ReserveFile "showSlotList.ini" ReserveFile "installFiles.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
- --------------------------------
- Installer Sections
Section "MyApp.prc" SecCopyUI
; Define what files go where SetOutPath "$INSTDIR" ; Copy the files that we will use File "UserData.dll" File "InstAide.dll" File "MyApp.prc" File "MyAppData.dat"
SectionEnd
- --------------------------------
- Descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
- --------------------------------
- Installer Functions
Function .onInit
;Extract InstallOptions INI Files !insertmacro MUI_INSTALLOPTIONS_EXTRACT "showUserList.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "showSlotList.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "installfiles.ini"
FunctionEnd
Function ShowUserList ; This function shows our custom "Select Palm User" page
; Get a list of all Palm users on the PC Call GetPalmUserList ; ... \n
Seeking Silence & Stillness in the Rush of Business Life
Pico Iyer -- essayist, author, travel writer and thinker -- has a unique perspective on many things. His physical domain ranges from California (where he lived as a child) and England (where he studied) to Cuba, North Korea and Ethiopia (which he visited) and Japan (where he resides). His mental domain knows no limiting boundaries. In this interview with Wharton associate dean and chief information officer Deirdre Woods and Knowledge@Wharton
[Seeking Silence & Stillness in the Rush of Business Life]
[GoodvilleNews.com - good, positive news, inspirational stories, articles]
What Is Your Legacy? Living A Meaningful life
I want the world to be better because I was here. I want my life, I want my work, my family, I want it to mean something and if you are not making someone elses life better then you are wasting your time Will Smith
[What Is Your Legacy? Living A Meaningful life]
[GoodvilleNews.com - good, positive news, inspirational stories, articles]
The Limitations of Positive Thinking
Positive thinking is so firmly enshrined in our culture that knocking it is a little like attacking motherhood or apple pie. Many persons swear by positive thinking and quite a few have been helped by it. Nevertheless, it is not a very effective tool and can be downright harmful in some cases. There are much better ways to get the benefits that positive thinking allegedly provides.
[The Limitations of Positive Thinking]
[GoodvilleNews.com - good, positive news, inspirational stories, articles]
The Importance of Imagination
While growing up, Id never really considered how important it is to be imaginative. Its a childhood profession, you could say. It comes naturally. Then we hit an age when were presented with a scantron of bubble-in options, a template for a CV that we need to create, and Excel. At that point, our learning has to fit into certain parameters: within that little bubble, within the one page limit, and within a tiny digital graph. So, what happens to our imagination?It seems to fade.
[The Importance of Imagination]
[GoodvilleNews.com - good, positive news, inspirational stories, articles]
The Relationship Between Gifts & Community
Wherever I go and ask people what is missing from their lives, the most common answer (if they are not impoverished or seriously ill) is "community." What happened to community, and why dont we have it any more? There are many reasons the layout of suburbia, the disappearance of public space, the automobile and the television, the high mobility of people and jobs and, if you trace the "whys" a few levels down, they all implicate the money system.
[The Relationship Between Gifts & Community]
[GoodvilleNews.com - good, positive news, inspirational stories, articles]