You are here

A solution to the development how to's.

8 posts / 0 new
Last post
digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
A solution to the development how to's.

I just performed a search browse on for beginner forum topics, here's the relevant results:

  1. https://portableapps.com/node/14148
  2. https://portableapps.com/node/13702
  3. https://portableapps.com/node/13627
  4. https://portableapps.com/node/12569
  5. https://portableapps.com/node/12488
  6. https://portableapps.com/node/11959
  7. https://portableapps.com/node/11997

That's just the tip of the iceberg (it took 5 minutes to find these). We really need a how to.
I know about the PAF Specs, but that only covers the file system and the basic launcher goal. Perhaps there be a Launcher Specs, but on the other hand, there is a PortableApps.nsh coming out.
I'll add more after the computer returns to my possession }:)...
*Edit:* I'm back. So anyway, we would either need a launcher spec or a PortableApps.nsh how to for the upcoming Platform and PAF Specs. And not only that, we need a clear step-by-step how to for self-described newbies (I was being nice ;)) or we could just repeat everything all over again on all those posts :(.
BTW, which of you mods deleted my <pre> tag???

haustin
Offline
Last seen: 13 years 3 months ago
Joined: 2007-09-19 17:59
Hmmm.

Not so sure about PortableApps.nsh at this point.

It has been demonstrated (without dispute) that PortableApps.nsh could help:

  1. standardize and simplify launcher code,
  2. reduce opportunities for launcher coding errors (i.e., DRY code),
  3. incorporate future Platform functionality into compliant launchers with a simple re-compile, and
  4. provide an automatic mechanism to clean up after the unmentionable unclean failure mode of nearly all the major Portable Apps.

It has also been demonstrated that there is near-zero interest from the developers who visit these forums. I assume folks are interested in improving the Platform (including the launchers), but my suggestions and contributions have utterly failed to capture any of that interest.

So, I haven't prioritized the release of any new features. Don't reckon I'll be working on a How-To real soon, either.

-hea

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
I dont think your efforts are

I dont think your efforts are without lack of interest, just a lack of free time and everybody seems to be unwilling to make any changes to the core code without John's review of the suggested changes first. Personally, I think your .nsh files could be extremely useful in simplifying development and improving the backup/cleanup/restore capabilities of the launchers. I just have next to no free time anymore.

The developer formerly known as ZGitRDun8705

haustin
Offline
Last seen: 13 years 3 months ago
Joined: 2007-09-19 17:59
Re:

Fortunately, John has given tacit approval since he first weighed in here and provided further feedback here, here and here. Just today, he provided more explicit backing here. Remember, he's a busy man.  Smile

I can empathize with the free time problem. But as an old-timer and trendsetter, your vote of confidence in the approach is quite valuable support in and of itself.

Thanks!  -hea

Jacob Mastel
Offline
Last seen: 1 month 21 hours ago
Developer
Joined: 2007-06-13 19:36
Well,

I personally could see it usefull but I think many people are like me in the fact that although we are fairly competent in NSIS have no clue how to create a .nsh. I could see this being very helpful but to be honest I could find anything on how to actually use it so I just decided to stay out of the way.

Release Team Member

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
I found some stuff.

Here: http://nsis.sourceforge.net/Docs/Chapter5.html#5.1
http://nsis.sourceforge.net/Docs/Chapter5.html#5.4

Basically, this is the basic structure:

!ifndef CONSTANT
!error "CONSTANT not defined"
!endif
!define MACRONAME "!insertmacro MACRONAME"
!macro MACRONAME _PARAM1 _PARAM2
Function ${_PARAM1}
Function bla ${_PARAM2}
!macroend

Insert original signature here with Greasemonkey Script.

haustin
Offline
Last seen: 13 years 3 months ago
Joined: 2007-09-19 17:59
Re:

It's not quite ready to be used yet — it's still in development.

But, you can get a good idea of how the header file would be used in a launcher by looking at the test-FooPortable.nsi test launcher included in the PortableApps.nsh test suite. Note that that example doesn't do everything a normal launcher does, since its primary purpose is actually to test the functionality of the header file itself. It does show what the corresponding launcher sections would look like, however.

As far as creating NSH header files, they basically just contain any code that can be inserted at the top of an NSI file (outside of a Function or Section). So, it could be as simple as a collection of !includes, !defines or !macros, or be as complicated as WordFunc.nsh or PortableApps.nsh. The best way to learn is by example.

Thanks!  -hea

haustin
Offline
Last seen: 13 years 3 months ago
Joined: 2007-09-19 17:59
clarification

Please see this post.

Thanks. -hea

Log in or register to post comments