You are here

Redundant $Bits variable removal

5 posts / 0 new
Last post
Gord Caswell
Gord Caswell's picture
Offline
Last seen: 3 hours 56 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
Redundant $Bits variable removal

With the release of the PortableApps.com Launcher version 2.1, the $Bits variable is set by PAL itself.
As such, setting this variable in Custom.nsh can be removed for the following applications, see applicable edits to the Custom.nsh files here:

  • 7-Zip **
  • AkelPad
  • Avidemux
  • Blender
  • Daphne
  • KVIrc
  • Krita
  • Listary
  • ProcessHacker
  • RapidCRCUnicode
  • RawTherapee **
  • TEncoder
  • UltraDefrag
  • VirtualDub
  • WaveShop
  • WinMTR
  • ** These applications require moving small pieces of code that were handled within the general code. See the github commit for details.

    This post has been stickied, with applications being removed from the list once updated.

Bart.S
Offline
Last seen: 1 week 2 days ago
Developer
Joined: 2008-07-23 07:56
x64.nsh

Why not '${If} ${RunningX64}' and drop $Bits?

demon.devin
demon.devin's picture
Offline
Last seen: 11 months 3 days ago
Developer
Joined: 2007-08-02 09:04
Already in the codebase.

PAL uses the same means of detecting bit depth just like the x64.nsh header file. There's no need to include that extra file when the same thing is already being done.

Edit:
Here's an example of what you can use without the x64.nsh include file..

${If} $Bits == 32
 ; Blah blah blah
${ElseIf} $Bits == 64
 ; Blah blah blah
${Else}
 ; this should never execute and is unnecessary.. lol. 
${EndIf}

daemon.devin

Bart.S
Offline
Last seen: 1 week 2 days ago
Developer
Joined: 2008-07-23 07:56
Standard NSIS

x64.nsh is part of NSIS. Using upstream code (functions, variables) is better than duplicate things in custom code.
Just my 2 cents.

demon.devin
demon.devin's picture
Offline
Last seen: 11 months 3 days ago
Developer
Joined: 2007-08-02 09:04
Okay.

Why would we want to include a file that uses the same code that PAL is already using?

This would just create more overhead, which can build up and in the long run is a bad thing.

daemon.devin

Log in or register to post comments