You are here

Simplest How-To request

14 posts / 0 new
Last post
fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Simplest How-To request

I guess I'm just dense, but I've been to https://portableapps.com/development , https://portableapps.com/node/12851 , https://portableapps.com/node/14939 , copied the code for PortableApps.comInstaller.nsi and PortableApps.comInstallerConfig.nsh and seem to understand how to modify it.

Ok, now all I need to do is install a bunch of files in "AppNamePortable" and "App" directories. Should be the simplest script entries ever - Right?

Well, looking at other installations, as suggested, gets me nowhere. Looking at the NSIS simple examples make sense, but require editing the .nsi script. But it says "PortableApps.comInstaller.nsi which should not be edited".

I admit it. I'm lost. Help? How do I install my files, where do the instructions go to just put some stuff in his "APP" directory, and how do I end up with an ApplicationPortabple.paf.exe?

There are a lot of very interesting sophisticated questions being answered here, but I get started. It seems making the code work is simple compared to installation.

Point me at something simple? I know everyone's going to fall over laughing, but I'm getting frustrated.

Thanks.

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
Try this:

Try this: https://portableapps.com/node/14868

If its just the installer, you should configure the PortableApps.comInstalerConfig.nsh file (at least, thats what I think its called)

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Thanks but. Yeah, I've been

Thanks but.

Yeah, I've been there too. It leads you right back to https://portableapps.com/node/14939 for the official installer, where you can pickup PortableApps.comInstaller.nsi (not to be modified) and PortableApps.comInstallerConfig.nsh which is editable by the developer.

All I want to do is end up with an AppNamePortable.paf.exe that puts the files that normally get installed to "C:\Program Files\AppName" into the USB drive AppNamePortable\App\AppName or wherever, as outlined at https://portableapps.com/node/12851

This should be the most fundamental part of any installer, but I guess everyone sees it as so simple, you should know how without instructions. Well, not this dummy. Sad

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
;This software is OSI
;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

;EXCEPTION: Can be used with non-GPL apps distributed by PortableApps.com

;OVERVIEW: This file is used to hold configuration data for the PortableApps.comInstaller
;It should be placed in the Other\Source directory along with PortableApps.comInstaller.nsi.
;All configuration data is contained within it.  If any custom pre-install, post-install or
;cleanup when the optional features are not selected is needed, it can be included in the
;PortableApps.comInstallerCustom.nsi which is detailed within that file.

;LAST UPDATED FOR INSTALLER VERSION: 0.10.1

;== Basic Information.  Basic information about the portable app
!define NAME "PNotes Portable"
!define SHORTNAME "PNotesPortable"
!define VERSION "4.5.106.0"
!define FILENAME "PNotesPortable_Portable_4.5.106.0_PRERELEASE_4"
!define CHECKRUNNING "PNotes.exe"
!define CLOSENAME "PNotes Portable"
!define ADDONSDIRECTORYPRESERVE "NONE" ;use "NONE" for no plugins directory or relative to install directory: App\AppName\plugins
!define INSTALLERCOMMENTS "For additional details, visit PortableApps.com"
!define INSTALLERADDITIONALTRADEMARKS "" ;end this entry with a period and a space if used
!define INSTALLERLANGUAGE "English" ;one of the NSIS pre-defined languages supported: English, French, Italian, German, Japanese, SimpChinese

;== License.  For no license agreement, comment out the next line by placing a semicolon at the start of it
;!define LICENSEAGREEMENT "eula.rtf"

;== Multi-Installer.  If making an installer with no options (like additional languages), comment out the next line by placing a semicolon at the start of it
!define MAINSECTIONTITLE "PNotes Portable (English) [Required]" ;>>>>>>>>Have you commented out this line?
!ifdef MAINSECTIONTITLE
	!define MAINSECTIONDESCRIPTION "Install the portable app"
	!define OPTIONALSECTIONTITLE "Additional Languages"
	!define OPTIONALSECTIONDESCRIPTION "Add multilingual support for this app"
	!define OPTIONALSECTIONSELECTEDAPPINFOSUFFIX "(Multilingual)"
	!define OPTIONALSECTIONNOTSELECTEDAPPINFOSUFFIX "(English)"
!endif

;== Plugin Installer.  If this is a plugin installer (not a full app installer), uncomment this line to skip adding the app size to the free space calculation and files in root directory
;!define PLUGININSTALLER "true"

;== Remove Main Directories.  If you want to remove one of the main directories before installing (useful with upgrades) uncomment the appropriate line.
;!define REMOVEAPPDIRECTORY "true"
;!define REMOVEDATADIRECTORY "true" ;Normally this should not be used
;!define REMOVEOTHERDIRECTORY "true"

;== Preserve Specific Directories.  If you are removing directories but wish to preserve a specific directory, define them here.
;!define PRESERVEDIRECTORY1 "App\Example\Plugins"
;!define PRESERVEDIRECTORY2 ""
;!define PRESERVEDIRECTORY3 ""
;!define PRESERVEDIRECTORY4 ""
;!define PRESERVEDIRECTORY5 ""
;!define PRESERVEDIRECTORY6 ""
;!define PRESERVEDIRECTORY7 ""
;!define PRESERVEDIRECTORY8 ""
;!define PRESERVEDIRECTORY9 ""
;!define PRESERVEDIRECTORY10 ""

;== Preserve Specific Files.  If you are removing directories but wish to preserve a specific file, define them here.  Wildcards work.
;!define PRESERVEFILE1 "App\Example\Plugin.dll"
;!define PRESERVEFILE2 ""
;!define PRESERVEFILE3 ""
;!define PRESERVEFILE4 ""
;!define PRESERVEFILE5 ""
;!define PRESERVEFILE6 ""
;!define PRESERVEFILE7 ""
;!define PRESERVEFILE8 ""
;!define PRESERVEFILE9 ""
;!define PRESERVEFILE10 ""

;== Remove Specific Directories.  If you wish to remove specific directories and all files within, define them here.
;!define REMOVEDIRECTORY1 "App\Example"
;!define REMOVEDIRECTORY2 ""
;!define REMOVEDIRECTORY3 ""
;!define REMOVEDIRECTORY4 ""
;!define REMOVEDIRECTORY5 ""
;!define REMOVEDIRECTORY6 ""
;!define REMOVEDIRECTORY7 ""
;!define REMOVEDIRECTORY8 ""
;!define REMOVEDIRECTORY9 ""
;!define REMOVEDIRECTORY10 ""

;== Remove Specific Files. If you wish to remove specific files, define them here.  Wildcards are acceptable: App\Example\Example.*
;!define REMOVEFILE1 "App\Example\example.exe"
;!define REMOVEFILE2 ""
;!define REMOVEFILE3 ""
;!define REMOVEFILE4 ""
;!define REMOVEFILE5 ""
;!define REMOVEFILE6 ""
;!define REMOVEFILE7 ""
;!define REMOVEFILE8 ""
;!define REMOVEFILE9 ""
;!define REMOVEFILE10 ""

;== Custom Code.  If you need custom code pre or post install or to cleanup when optional features are not selected, uncomment the appropriate lines here and include it in the PortableApps.comInstallerCustom.nsi file.
!define USESCUSTOMCODE "true"
;!define USESCONFIGREAD "true" ;Uncomment this line if you need to use ConfigRead functions in your custom code
;!define USESCONFIGREADS "true" ;Uncomment this line if you need to use ConfigReadS functions in your custom code
;!define USESCONFIGWRITE "true" ;Uncomment this line if you need to use ConfigWrite functions in your custom code
;!define USESCONFIGWRITES "true" ;Uncomment this line if you need to use ConfigWriteS functions in your custom code

Could you paste a output from the compiler so I can see what its trying to do?

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
That's kinda the problem. I

That's kinda the problem. I just can't find where to start. Everything I've tried so far is just laughable and wouldn't help anyone help me get started.

The situation is, we wrote the Virtual Keyboard at http://cnt.lakefolks.com and have had several requests to make a portable version. I will have no problem creating a modified version that leaves no traces of itself and uses the PortableApps file structure and handles the changeable device letter.

All I need to do is end up with a Click-N-TypePortable.paf.exe that just puts a few files into the "...Click-N-TypePortable\App\Click-N-Type" folder on the target device.

I have the files that I would normally install to "C:\Program Files\Click-N-Type\". I have the PortableApps.comInstaller.nsi from https://portableapps.com/node/14939 and the PortableApps.comInstallerConfig.nsh from the same place. I modified the .nsh file as directed to:
;== Basic Information. Basic information about the portable app
!define NAME Click-N-Type Portable"
!define SHORTNAME "Click-N-TypePortable"
!define VERSION "3.3.0.374"
!define FILENAME "Click-N-Type_Portable_3.3"
!define CHECKRUNNING "Click-N-TypePortable.exe"
!define CLOSENAME "Click-N-Type Portable "

What do I do with them?

Now all I need to get started is:
1) Where do I put these .nsi and .nsh files before I "Compile NSIS script"?
2) Where do I put my program files?
3) Where do I tell the script or .nsh the program filenames to install and how?

I just can't find the simple first step.

Very frustrating.........

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
You should have a directory

You should have a directory layout like:

App
Data
Other
-----Help
---------images
---------------donation_button.png
---------------faviocon.ico
---------------help_backrground_footer.png
---------------help_backrground_header.png
---------------help_logo_top.png
-----Source
-----------AppSource.txt
-----------AppNamePortable.ini
-----------GetParameters.nsh
-----------License.txt
-----------Other optional stuff depending on your app
These are the important ones that you have to have.
-----------PortableApps.comInstaller.bmp
-----------PortableApps.comInstaller.nsi
-----------PortableApps.comInstallerConfig.nsh
-----------PortableApps.comInstallerLANG_ENGLISH.nsh
-----------PortableApps.comLauncherLANG_ENGLISH.nsh

Everything else is taken care of by the installer. If you would like, I can do a mash-up of sorts for you to see. Just give me a direct link to the file.

Also, I don't know if you've considered using the irc room. Its great for getting real time help with this. The Guerrilla guide has link on how to get in.

Also note that as of yet, freeware apps aren't allowed to use the installer. However, if people want it to integrate with the menu, all they need to do is to stick a copy of the folder in X:\PortableApps

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Wow! Thank you for the good

Wow! Thank you for the good info. That would have been enough to get started.

However,

>Also note that as of yet, freeware apps aren't allowed to use the installer.

Leaves me out of this game. Sad We're just trying to help people.

>However, if people want it to integrate with
> the menu, all they need to do is to stick a copy
> of the folder in X:\PortableApps

Yeah, I saw that on some other site. I could code so that we follow your directory structure and still stay compatible with other launchers, I think. Installation might be a simple as a .bat file with maybe the device as an argument.

Only one problem I see: If the user chooses to install one of our Language Packs, he gets another .exe that he really doesn't need/want to execute himself. Yet, that CNTLC.exe shows on your menu. Any good way to hide it?

Thanks.....

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
I'm not putting you in any

I'm not putting you in any game. I personally leave those arguments to other people. Just giving you the heads up about what you'll be told.

no, there's no good way to hide CNTLC.exe other then sticking it in another folder so it won't show.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Sure. I wasn't grumbling.

Sure. I wasn't grumbling. Wink I'm glad you told me! Especially before I put a lot of work into it.

I just thought your (I mean the PortableApps) installer would make it simpler or unsophisticated users. They really don't even have to know what drive their stick is, in order to install an App. Really nice.

I can try to move CNTLC.exe to a subdirectory but that involves changing some 40 Language Packs. The Internal "Product Name" is unfortunately the same as Click-N-Type, since it *is* part of the same "Product" and that's what the PortableApps menu displays, rather than the file name. I could change its Product Name to "Click-N-Type Language Picker", so he'd know what he's running, but that also involves rebuilding some 40 Language packs. The two icons are slightly different anyway, and most of our users are United States where it's not an issue.

Anyway, thank you again. Now I can go off and do my own thing. Wink

horusofoz
horusofoz's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2008-04-03 22:45
How about creating some

How about creating some launchers of Freeware apps. One I know I'd Love is XnView.

PortableApps.com Advocate

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Well, there are all kinds of

Well, there are all kinds of Launchers like http://www.pegtop.net/start/ , http://www.aignes.com/psmenu.htm , etc., but none guarantee the launched App is Portable/Stealth. Even PortableApps just makes the rules. I don't know how well they're enforced.

Of course, launching a normal program, to be stealth and drive independent, requires work, and is differant for each app, and is not always possable without code changes and/or installed support libraries.

For now, I think I'll just modify my code so it can be "installed" with a Self Extracting Zip. The app will be flagged to act "Portable". The user will pick the "X:\" he wats to put it on. That'll work for all Launchers except Portableapps. If he want's it to be seen by PortableApps, he'll have to unzip to "X:\PartapleApps". I'll make the "Application Data" stuff go to ".\App\Data", the way PA likes it, so the Backup function works. It will work for a non-installed app - right??? I'll test it, but there's a good deal of work to do first.

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
That should work. Note that

That should work. Note that the data folder be:
AppNamePortable
--App
--DATA
Other.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

fidmas
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-19 09:00
Note: I just tried just that

Note: I just tried just that exactly. No workie. It'll only backup AppNamePortable\App\Data from apps it has installed. I couldn't find any .ini in any "installed" app that would direct that, so I gave up. They can always backup the Whole drive I guess.

Worse things could happen. I'm just shooting for usable with all launchers, at this point. If a launcher feature, here or there, looks a little funny or doesn't work, I'm not going to cry. So long as my app is portable and stealth.

Almost done, except for my Self Extracting WinZip "Installer". Smile

I'll be busy helping my wife for a few days, while I think about what I could have missed.

Thanks for all your help.

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
Alright. Well, you're more

Alright.

Well, you're more then welcome to stick around. At some point, the site is supposed to begin accepting freeware apps.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

Log in or register to post comments