You are here

[Outdated] NIS Edit 2.03 Development Test 13

83 posts / 0 new
Last post
TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
[Outdated] NIS Edit 2.03 Development Test 13

This is now official. See here.

Application: HM NIS Edit
Category: Development
Description: (Taken from the web site) HM NIS Edit is the best Editor/IDE for Nullsoft Scriptable Install System (NSIS). Its useful for experts and beginners in the creation of Setup programs with the NSIS.
Download:
http://padp.googlecode.com/files/HMNISEditPortable_2.03_DT13.paf.exe
Release Notes:
Development Test 13 (24FEB11):
Removed NSIS from the package so NSIS Portable is used instead. Hmmm, 13 feels unlucky...
Development Test 12 (19FEB11):
Updated to use Unicode NSIS, fixed an obscure bug or two and updated to the latest PAF specs.
Development Test 11 (1-04-2009):
re-ordered and fixed language switching code, made the installer multi-lingual, added an INI option and changed name to NIS Edit.
Development Test 10 (30-03-2009):
Fixed problem with language switching code.
Development Test 9 (28-03-2009):
big code cleaning, fixed a lot of problems.
Note:HM NIS Edit now installs to NISEditPortable (I'm dropping the HM) so to upgrade from DT8 you will need to copy over Data\settings\nisedit.ini and manually adjust any paths.
Development Test 8 (1-12-2008):
code cleaning, plus fixed the DefaultData bug.
Development Test 7 (31-07-2008):
fixed a bug where the INI wasn't being moved.
Development Test 6 (22-07-2008):
fixed the DefaultData problem, and made changes suggested by OliverK.... again.
Development Test 5 (04-07-2008):
fixed problems listed by OliverK.
Development Test 4 (28-06-2008):
fixed ReplaceInFile problems.
Development Test 3 (17-06-2008):
fixed up the integrated NSIS support.
Development Test 2 (13-06-2008):
Fixed some Typos.
Development Test 1 (6-06-2008):
Initial Release

Kim_Wood
Offline
Last seen: 11 years 8 months ago
Joined: 2007-09-20 01:43
Seems to work o/k

Have had a quick look. Quite a nice NSIS editor that lets you edit & compile in one application. Doesn't seem to have been updated in a long time though. I could be tempted to use this for script work instead of Notepad++/NSIS. I had a little bit of trouble configuring the compiler option, until I figured out it was looking for the original NSIS exe rather than the portablised NSIS launcher exe. Anyway, I like this little integrated editor/compiler. Good effort.

Kim

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
it is prety good, yeah. I was

it is prety good, yeah. I was using notepad++ for a bit, but then someone reccomemended this for some other guy, and I liked it. also, does anyone know what stuff the NSIS Portable launcher cleans up? like does makensis.exe leave anything or is it just the GUI?

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
The NSISPortable launcher

The NSISPortable launcher will clean up the registry entries left by makensis.exe. I wrote the launcher to monitor nsis.exe, makensis.exe and zip2exe.exe, and only close if none of those are running.

The developer formerly known as ZGitRDun8705

richo
richo's picture
Offline
Last seen: 6 days 8 hours ago
Joined: 2007-01-31 22:03
makensis.exe/makensisw.exe

From looking at the source code for 'makensis.exe', I believe that it is only the GUI that uses the registry. The only things 'makensis.exe' uses are the following environment variables:

APPDATA (Windows)
HOME (Linux, Unix, etc)
NSISCONFDIR

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
I see no indication of that

I see no indication of that in the AppData folder or the Launcher source code.

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

richo
richo's picture
Offline
Last seen: 6 days 8 hours ago
Joined: 2007-01-31 22:03
RE: makensis.exe/makensisw.exe

It is in the actual source code for makensis.exe (makenssi.cpp).

True, it doesn't actually use the AppData folder (from what I could see), but it's there in the source.

If you have the source code archive for NSIS, just look in the file 'makenssi.cpp'.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Fair enough

Fair enough

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

Jacob Mastel
Offline
Last seen: 5 days 14 hours ago
Developer
Joined: 2007-06-13 19:36
Program looks nice.

I'm downloading and will test later.

Release Team Member

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
new version

Zach, i stole some of your nsis portable code and added it in. dev test 3 now available.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
its not stealing since it's

its not stealing since it's all OSS Wink

The developer formerly known as ZGitRDun8705

Jacob Mastel
Offline
Last seen: 5 days 14 hours ago
Developer
Joined: 2007-06-13 19:36
Settings

It doesn't remember where NSIS is. You need to replace the drive letter in it's options file.

Release Team Member

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
fixed in dev test 4.

fixed in dev test 4.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Issues: Just downloaded Dev

Issues:

Just downloaded Dev Test 4-without NSIS.

Relaunches HM NIS edit after I close. If I remember correctly, this means you need a Goto TheEnd after your after your launch and exit, as well as when your down putting the registry back together. i.e.

     RemoveNSISSettings:
        	${registry::SaveKey} "HKEY_CURRENT_USER\Software\NSIS" "$SETTINGSDIRECTORY\NSIS_portable.reg" "" $0
                ${registry::DeleteKey} "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
		${registry::MoveKey} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		Goto TheEnd
	LaunchAndExit:
		Exec $EXECSTRING
		Goto TheEnd

Doesn't appear to be fixing the path to my flash drive. Loses it when I go from computer to computer.- Figured it out! You don't seem to have your nisedit.ini anywhere. Put that in App/DefaultData to be copied in if the script can't find any setting in Data.

Also, MakeNSIS gives the following errors:
2 warnings:
Variable "MUI_TEMP1" not referenced or never set, wasting memory!
Variable "MUI_TEMP2" not referenced or never set, wasting memory!

Sorry if I seen to be burying you. We can work out the PAF specific things after that. Good job, and a great app! Wish I'd found it.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
thanks for the feedback.

thanks for the feedback. fixed in Dev test 5, which i will release.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Doesn't appear to be fixing

Doesn't appear to be fixing drive paths either.

I went wild on the code the other night, if you want, I'll post it for you, though I still haven't gotten it to adjust the paths. Also, you'll need to move all of the files for the plugins, as per https://portableapps.com/node/11715#comment-76948. I didn't know this at the time of coding.

I would suggest figuring out of you are going to support an external compiler (one not under HM NIS EditPortable/App/nsis). If you do, well, its a barrel full.

Alright. I'll get off your case for now.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
hmmm. i took the download

hmmm. i took the download link down becuase it wasn't properly doing the paths. seems like a common problem. also, what the launcher is meant to do in order:

  1. Move the INI from the data folder to the app dir.
  2. Adjust the paths in the INI.
  3. Move nsisconf.nsh to the nsis dir.
  4. Do some registry stuff for NSIS.
  5. Launch the app.
  6. Move the INI and nsisconf.nsh back to the data dir.
  7. Put the registry back.

there is a splash screen in there somewhere, but this is a list of the basic functions.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Here's where I'm at. I still

Here's where I'm at. I got the AdjustPaths to work. If you want to be nice, you can mention me, but you don't have to.

;Copyright (C) 2004-2008 John T. Haller of PortableApps.com
;Copyright (C) 2008 Taneth111
;Website: https://portableapps.com/Development/Test

;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.

!define PORTABLEAPPNAME "HM NIS Edit Portable"
!define APPNAME "HMNISEdit"
!define NAME "HMNISEditPortable"
!define VER "1.5.5.0"
!define WEBSITE "PortableApps.com/DevelopmentTest"
!define DEFAULTEXE "nisedit.exe"
!define DEFAULTAPPDIR "NISEdit"

;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}Alternate.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
VIAddVersionKey Comments "Allows ${APPNAME} to be run from a removable drive.  For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com And Contributors"
VIAddVersionKey LegalCopyright "John T. Haller And Contributors"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

; Best Compression
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On

;=== Include
!include "FileFunc.nsh"
!insertmacro GetParameters
!insertmacro GetRoot
!include "ReplaceInFile.nsh"
!include "StrRep.nsh"
!include "MUI.nsh"
!include "registry.nsh"
;=== Program Icon
Icon "..\..\App\AppInfo\appicon.ico"

;=== Icon & Stye ===
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

;=== Languages
;!insertmacro MUI_LANGUAGE "English"

LangString LauncherFileNotFound ${LANG_ENGLISH} "${PORTABLEAPPNAME} cannot be started. You may wish to re-install to fix this issue. (ERROR: $MISSINGFILEORPATH could not be found)"
LangString LauncherAlreadyRunning ${LANG_ENGLISH} "Another instance of ${APPNAME} is already running. Please close other instances of ${APPNAME} before launching ${PORTABLEAPPNAME}."
LangString LauncherAskCopyLocal ${LANG_ENGLISH} "${PORTABLEAPPNAME} appears to be running from a location that is read-only. Would you like to temporarily copy it to the local hard drive and run it from there?$\n$\nPrivacy Note: If you say Yes, your personal data within ${PORTABLEAPPNAME} will be temporarily copied to a local drive. Although this copy of your data will be deleted when you close ${PORTABLEAPPNAME}, it may be possible for someone else to access your data later."
LangString LauncherNoReadOnly ${LANG_ENGLISH} "${PORTABLEAPPNAME} can not run directly from a read-only location and will now close."

Var PROGRAMDIRECTORY
Var SETTINGSDIRECTORY
Var ADDITIONALPARAMETERS
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var SECONDARYLAUNCH
Var DISABLESPLASHSCREEN
Var LASTDRIVE
Var CURRENTDRIVE
Var MISSINGFILEORPATH
Var ALTERNATENSISPATH

Section "Main"
	;=== Check if already running
	System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}") i .r1 ?e'
	Pop $0
	StrCmp $0 0 CheckINI
		StrCpy $SECONDARYLAUNCH "true"

	CheckINI:
		;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" CheckSubINI
			StrCpy "$INIPATH" "$EXEDIR"
			Goto ReadINI

	CheckSubINI:
		IfFileExists "$EXEDIR\${NAME}\${NAME}.ini" "" NoINI
			StrCpy "$INIPATH" "$EXEDIR\${NAME}"
			Goto ReadINI

	ReadINI:
		;=== Read the parameters from the INI file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Directory"
		StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
		StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "AlternateNSISPath"
		StrCpy "$ALTERNATENSISPATH" "$EXEDIR\$0"
	

		;=== Check that the above required parameters are present
		IfErrors NoINI
		ReadINIStr $ADDITIONALPARAMETERS "$INIPATH\${NAME}.ini" "${NAME}" "AdditionalParameters"
		ReadINIStr $DISABLESPLASHSCREEN "$INIPATH\${NAME}.ini" "${NAME}" "DisableSplashScreen"

	;CleanUpAnyErrors:
		;=== Any missing unrequired INI entries will be an empty string, ignore associated errors
		ClearErrors

		;=== Correct PROGRAMEXECUTABLE if blank
		StrCmp $PROGRAMEXECUTABLE "" "" EndINI
			StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
			Goto EndINI

	NoINI:
		;=== No INI file, so we'll use the defaults
		StrCpy "$ADDITIONALPARAMETERS" ""
		StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"

		IfFileExists "$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\Data\settings"
			GoTo EndINI

	EndINI:
		IfFileExists "$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where expected
		StrCpy $MISSINGFILEORPATH $PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherFileNotFound)`
		Abort
		
	FoundProgramEXE:
		;=== Check if running
		StrCmp $SECONDARYLAUNCH "true" GetPassedParameters
		FindProcDLL::FindProc "${DEFAULTEXE}"
		StrCmp $R0 "1" WarnAnotherInstance DisplaySplash

	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONINFORMATION `$(LauncherAlreadyRunning)`
		Abort
	
	DisplaySplash:
		StrCmp $DISABLESPLASHSCREEN "true" GetPassedParameters
			;=== Show the splash screen while processing registry entries
			InitPluginsDir
			File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"
			newadvsplash::show /NOUNLOAD 1000 100 0 -1 /L $PLUGINSDIR\splash.jpg
	
	GetPassedParameters:
		;=== Get any passed parameters
		${GetParameters} $0
		StrCmp "'$0'" "''" "" LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE"`
		Goto AdditionalParameters

	LaunchProgramParameters:
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" $0`

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" SettingsDirectory

		;=== Additional Parameters
		StrCpy $EXECSTRING `$EXECSTRING $ADDITIONALPARAMETERS`
	
	SettingsDirectory:
		;=== Set the settings directory if we have a path
		IfFileExists "$SETTINGSDIRECTORY\*.*" CheckForSettings
			CreateDirectory $SETTINGSDIRECTORY
	
	CheckForSettings:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" AdjustPaths
		Rename "$EXEDIR\App\DefaultData\nisedit.ini" "$PROGRAMDIRECTORY\nisedit.ini"
		Goto AdjustPaths
		;IfFileExists "$EXEDIR\App\DefaultData\nisedit.ini" "" Launch
		;	CopyFiles /SILENT "$EXEDIR\App\DefaultData\nisedit.ini" "$PROGRAMDIRECTORY"
		;	Goto Launch	
		
    AdjustPaths:
		ReadINIStr $LASTDRIVE "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive"
		${GetRoot} $EXEDIR $CURRENTDRIVE
		StrCmp $LASTDRIVE $CURRENTDRIVE StoreCurrentDriveLetter
		IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" "" StoreCurrentDriveLetter
			${ReplaceInFile} "$SETTINGSDIRECTORY\nisedit.ini" '$LASTDRIVE' '$CURRENTDRIVE'
			Delete "$SETTINGSDIRECTORY\nisedit.ini.old"
		Goto NSISDirectorySetup

	StoreCurrentDriveLetter:
		WriteINIStr "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive" "$CURRENTDRIVE"
	
	NSISDirectorySetup:
		Rename "$SETTINGSDIRECTORY\nisedit.ini" "$PROGRAMDIRECTORY\nisedit.ini"
		IfFileExists "$SETTINGSDIRECTORY\nsisconf.nsh" MoveNSISSettings CheckAlternateNSIS
		
    MoveNSISSettings:
        Rename "$SETTINGSDIRECTORY\nsisconf.nsh" "$EXEDIR\App\nsis\nsisconf.nsh"
		Goto Launch
		
	CheckAlternateNSIS:
		IfFileExists "$CURRENTDRIVE\PortableApps\NSISPortable\NSISPortable.exe" FixNSH UseINIAlternatePath
	
	FixNSH:
	Rename "$CURRENTDRIVE\PortableApps\NSISPortable\Data\settings\nsisconf.nsh" "$CURRENTDRIVE\PortableApps\NSISPortable\App\NSIS\nsisconf.nsh"
	Goto Launch
	
	UseINIAlternatePath:
	Rename "$CURRENTDRIVE\$ALTERNATENSISPATH\Data\settings\nsisconf.nsh" "$CURRENTDRIVE\$ALTERNATENSISPATH\NSISPortable\App\nsis\nsisconf.nsh"
	Goto Launch
	
	Launch:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		Exec $EXECSTRING
		;=== Backup the registry
		${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
		${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS" $R0
		${registry::MoveKey} "HKEY_CURRENT_USER\Software\NSIS" "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
		Sleep 100
		NsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\NSIS_portable.reg"`
		
	CheckRunning:
		Sleep 1000
		FindProcDLL::FindProc "${DEFAULTEXE}"                  
		StrCmp $R0 "1" CheckRunning

	;=== Put the settings file back
	Sleep 500
	Rename "$PROGRAMDIRECTORY\nisedit.ini" "$SETTINGSDIRECTORY\nisedit.ini"
        IfFileExists "$EXEDIR\App\nsis\*.*" "" RemoveNSISSettings
        Goto TheEnd
        
        RemoveNSISSettings:
        	${registry::SaveKey} "HKEY_CURRENT_USER\Software\NSIS" "$SETTINGSDIRECTORY\NSIS_portable.reg" "" $0
                ${registry::DeleteKey} "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
		${registry::MoveKey} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		Goto TheEnd
	LaunchAndExit:
		Exec $EXECSTRING
		Goto TheEnd

	TheEnd:
		newadvsplash::stop /WAIT
SectionEnd

Your problem was here:

${ReplaceInFile} "$SETTINGSDIRECTORY\nisedit.ini" '$LASTDRIVE' '$CURRENTDRIVE'

You had added some extra gobble-de-gook, which was messing up the replace. It stores in the manner of "X:"

I also added some ini gobble-de-gook which allows for the NSIS portable to be in more places then

  1. PortableApps\NSISPortable
  2. HM NIS Portable\App\nsis

Good work on the base. Continue the project. I still get the mui temp warnings, I haven't figured out where those are from.

Enjoy
OliverK

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

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
MUI: kill it!

(I got caught with this also, in BPBible Portable!)

MUI is not needed unless you need a page like the Mozilla thing on the first run of FF
You aren't doing that, so you can remove the lines:

!include "MUI.nsh"
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"
;!insertmacro MUI_LANGUAGE "English"

You'll save at least 5KB if you disable it! Shock

Also, you use registry.nsh. You really MUST HAVE

${registry::Unload}

in TheEnd - otherwise it'll leave stuff in %TEMP%

And no, I can't test it yet - I'm only going on what OliverK posted! I would have downloaded it, but you removed the link... Sad

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

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

Thanks

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
i noticed you referenced to

i noticed you referenced to PortableApps\NSISPortable\NSISPortable.exe.
HM NIS Edit only likes to reference to the actual command line file, makensis.exe.
fixed that and uploaded new version.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

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

look again.

NSISDirectorySetup:
		Rename "$SETTINGSDIRECTORY\nisedit.ini" "$PROGRAMDIRECTORY\nisedit.ini"
		IfFileExists "$SETTINGSDIRECTORY\nsisconf.nsh" MoveNSISSettings CheckAlternateNSIS
		
    MoveNSISSettings:
        Rename "$SETTINGSDIRECTORY\nsisconf.nsh" "$EXEDIR\App\nsis\nsisconf.nsh"
		Goto Launch
		
	CheckAlternateNSIS:
		IfFileExists "$CURRENTDRIVE\PortableApps\NSISPortable\NSISPortable.exe" FixNSH UseINIAlternatePath
	
	FixNSH:
	Rename "$CURRENTDRIVE\PortableApps\NSISPortable\Data\settings\nsisconf.nsh" "$CURRENTDRIVE\PortableApps\NSISPortable\App\NSIS\nsisconf.nsh"
	Goto Launch

It only does this for using the NSIS Portable if its not under App/nsis
Which it checks first.
By the way, the INI alternate path allows someone not using stuff under the PApps folder. Or, using it inside of another folder.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
yes but: IfFileExists

yes but:

IfFileExists "$CURRENTDRIVE\PortableApps\NSISPortable\NSISPortable.exe" FixNSH UseINIAlternatePath

refers to NSISPortable.exe and HM NIS Edit only likes makensis.exe, as in the command line version.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
It uses to see whether to

It uses to see whether to flop X:/PortableApps/NsisPortable/App/nsis/config or X:/PortableApps/HM NIS Edit Portable/App/nsis

I'll leave you alon, and see if your version is working- mine is having trouble storing the directory letter.

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

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Should I leave you

Should I leave you alone?
Nether set up paths properly.
The problem is here:

AdjustPaths:
		ReadINIStr $LASTDRIVE "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive"
		${GetRoot} $EXEDIR $CURRENTDRIVE
		StrCmp $LASTDRIVE $CURRENTDRIVE StoreCurrentDriveLetter
		IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" "" StoreCurrentDriveLetter
			${ReplaceInFile} "$SETTINGSDIRECTORY\nisedit.ini" '$LASTDRIVE' '$CURRENTDRIVE'
			Delete "$SETTINGSDIRECTORY\nisedit.ini.old"
		Goto NSISDirectorySetup

Those extra "" in IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" "" StoreCurrentDriveLetter are throwing things off.

You still need to put a nisedit.ini in the defualtdata directory! Its saving to the registry.

I really like this app, and I'm trying to help. You are, however, more then welcome to tell me to buzz off and go away.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
actually, i like your

actually, i like your criticism, i usually dont get anywhere near as much as i like. Blum
fixing as you read this.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Okay. I feel like a dufas

Okay. I feel like a dufas and shall apologize. When I added in some extra code- I broke the path adjustment, since it wasn't able to store the new drive letter. So, then I make it store the letter- bet then it never gets around to actually replacing the drive letter.

So . . . I broke you script. I busted it and busted it good. But, thankfully, I've gotten the problem fixed. Now, if all the other features work . . .

;Copyright (C) 2004-2008 John T. Haller of PortableApps.com

;Website: https://portableapps.com/Development/Test

;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.

!define PORTABLEAPPNAME "HM NIS Edit Portable"
!define APPNAME "HMNISEdit"
!define NAME "HMNISEditPortable"
!define VER "1.5.5.0"
!define WEBSITE "PortableApps.com/DevelopmentTest"
!define DEFAULTEXE "nisedit.exe"
!define DEFAULTAPPDIR "NISEdit"

;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
VIAddVersionKey Comments "Allows ${APPNAME} to be run from a removable drive.  For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com And Contributors"
VIAddVersionKey LegalCopyright "John T. Haller And Contributors"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

; Best Compression
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On

;=== Include
!include "FileFunc.nsh"
!insertmacro GetParameters
!insertmacro GetRoot
!include "ReplaceInFile.nsh"
!include "StrRep.nsh"
!include "registry.nsh"
;=== Program Icon
Icon "..\..\App\AppInfo\appicon.ico"

;=== Icon & Stye ===

LangString LauncherFileNotFound ${LANG_ENGLISH} "${PORTABLEAPPNAME} cannot be started. You may wish to re-install to fix this issue. (ERROR: $MISSINGFILEORPATH could not be found)"
LangString LauncherAlreadyRunning ${LANG_ENGLISH} "Another instance of ${APPNAME} is already running. Please close other instances of ${APPNAME} before launching ${PORTABLEAPPNAME}."
LangString LauncherAskCopyLocal ${LANG_ENGLISH} "${PORTABLEAPPNAME} appears to be running from a location that is read-only. Would you like to temporarily copy it to the local hard drive and run it from there?$\n$\nPrivacy Note: If you say Yes, your personal data within ${PORTABLEAPPNAME} will be temporarily copied to a local drive. Although this copy of your data will be deleted when you close ${PORTABLEAPPNAME}, it may be possible for someone else to access your data later."
LangString LauncherNoReadOnly ${LANG_ENGLISH} "${PORTABLEAPPNAME} can not run directly from a read-only location and will now close."

Var PROGRAMDIRECTORY
Var SETTINGSDIRECTORY
Var ADDITIONALPARAMETERS
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var SECONDARYLAUNCH
Var DISABLESPLASHSCREEN
Var LASTDRIVE
Var CURRENTDRIVE
Var MISSINGFILEORPATH
Var ALTERNATENSISPATH

Section "Main"
	;=== Check if already running
	System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}") i .r1 ?e'
	Pop $0
	StrCmp $0 0 CheckINI
		StrCpy $SECONDARYLAUNCH "true"

	CheckINI:
		;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" CheckSubINI
			StrCpy "$INIPATH" "$EXEDIR"
			Goto ReadINI

	CheckSubINI:
		IfFileExists "$EXEDIR\${NAME}\${NAME}.ini" "" NoINI
			StrCpy "$INIPATH" "$EXEDIR\${NAME}"
			Goto ReadINI

	ReadINI:
		;=== Read the parameters from the INI file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Directory"
		StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
		StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "AlternateNSISPath"
		StrCpy "$ALTERNATENSISPATH" "$EXEDIR\$0"
	

		;=== Check that the above required parameters are present
		IfErrors NoINI
		ReadINIStr $ADDITIONALPARAMETERS "$INIPATH\${NAME}.ini" "${NAME}" "AdditionalParameters"
		ReadINIStr $DISABLESPLASHSCREEN "$INIPATH\${NAME}.ini" "${NAME}" "DisableSplashScreen"

	;CleanUpAnyErrors:
		;=== Any missing unrequired INI entries will be an empty string, ignore associated errors
		ClearErrors

		;=== Correct PROGRAMEXECUTABLE if blank
		StrCmp $PROGRAMEXECUTABLE "" "" EndINI
			StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
			Goto EndINI

	NoINI:
		;=== No INI file, so we'll use the defaults
		StrCpy "$ADDITIONALPARAMETERS" ""
		StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"

		IfFileExists "$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\Data\settings"
			GoTo EndINI

	EndINI:
		IfFileExists "$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where expected
		StrCpy $MISSINGFILEORPATH $PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherFileNotFound)`
		Abort
		
	FoundProgramEXE:
		;=== Check if running
		StrCmp $SECONDARYLAUNCH "true" GetPassedParameters
		FindProcDLL::FindProc "${DEFAULTEXE}"
		StrCmp $R0 "1" WarnAnotherInstance DisplaySplash

	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONINFORMATION `$(LauncherAlreadyRunning)`
		Abort
	
	DisplaySplash:
		StrCmp $DISABLESPLASHSCREEN "true" GetPassedParameters
			;=== Show the splash screen while processing registry entries
			InitPluginsDir
			File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"
			newadvsplash::show /NOUNLOAD 1000 100 0 -1 /L $PLUGINSDIR\splash.jpg
	
	GetPassedParameters:
		;=== Get any passed parameters
		${GetParameters} $0
		StrCmp "'$0'" "''" "" LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE"`
		Goto AdditionalParameters

	LaunchProgramParameters:
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" $0`

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" SettingsDirectory

		;=== Additional Parameters
		StrCpy $EXECSTRING `$EXECSTRING $ADDITIONALPARAMETERS`
	
	SettingsDirectory:
		;=== Set the settings directory if we have a path
		IfFileExists "$SETTINGSDIRECTORY\*.*" CheckForSettings
			CreateDirectory $SETTINGSDIRECTORY
	
	CheckForSettings:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" AdjustPaths
		Rename "$EXEDIR\App\DefaultData\nisedit.ini" "$PROGRAMDIRECTORY\nisedit.ini"
		Goto AdjustPaths
		
    AdjustPaths:
		ReadINIStr $LASTDRIVE "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive"
		${GetRoot} $EXEDIR $CURRENTDRIVE
		StrCmp $LASTDRIVE $CURRENTDRIVE StoreCurrentDriveLetter
		IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" UpdateSettings StoreCurrentDriveLetter
		
	UpdateSettings:
		${ReplaceInFile} "$SETTINGSDIRECTORY\nisedit.ini" '$LASTDRIVE\' '$CURRENTDRIVE\'
		Delete "$SETTINGSDIRECTORY\nisedit.ini.old"
		Goto StoreCurrentDriveLetter

	StoreCurrentDriveLetter:
		WriteINIStr "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive" "$CURRENTDRIVE"
		Goto NSISDirectorySetup
		
	NSISDirectorySetup:
		Rename "$SETTINGSDIRECTORY\nisedit.ini" "$PROGRAMDIRECTORY\nisedit.ini"
		IfFileExists "$SETTINGSDIRECTORY\nsisconf.nsh" MoveNSISSettings CheckAlternateNSIS
		
    MoveNSISSettings:
        Rename "$SETTINGSDIRECTORY\nsisconf.nsh" "$EXEDIR\App\nsis\nsisconf.nsh"
		Goto Launch
		
    CheckAlternateNSIS:
		IfFileExists "$CURRENTDRIVE\PortableApps\NSISPortable\NSISPortable.exe" FixNSH UseINIAlternatePath
	
    FixNSH:
		Rename "$CURRENTDRIVE\PortableApps\NSISPortable\Data\settings\nsisconf.nsh" "$CURRENTDRIVE\PortableApps\NSISPortable\App\NSIS\nsisconf.nsh"
		Goto Launch
	
    UseINIAlternatePath:
		Rename "$CURRENTDRIVE\$ALTERNATENSISPATH\Data\settings\nsisconf.nsh" "$CURRENTDRIVE\$ALTERNATENSISPATH\NSISPortable\App\nsis\nsisconf.nsh"
		Goto Launch
	
    Launch:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
			;=== Backup the registry
			${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
			${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS" $R0
			${registry::MoveKey} "HKEY_CURRENT_USER\Software\NSIS" "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
			Sleep 100
			NsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\NSIS_portable.reg"`
       	Exec $EXECSTRING
       	
	CheckRunning:
		Sleep 1000
		FindProcDLL::FindProc "${DEFAULTEXE}"                  
		StrCmp $R0 "1" CheckRunning

	;=== Put the settings file back
	Sleep 500
	Rename "$PROGRAMDIRECTORY\nisedit.ini" "$SETTINGSDIRECTORY\nisedit.ini"
        IfFileExists "$EXEDIR\App\nsis\*.*" "" RemoveNSISSettings
        Goto TheEnd
        
        RemoveNSISSettings:
        	${registry::SaveKey} "HKEY_CURRENT_USER\Software\NSIS" "$SETTINGSDIRECTORY\NSIS_portable.reg" "" $0
                ${registry::DeleteKey} "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		${registry::KeyExists} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" $R0
		${registry::MoveKey} "HKEY_CURRENT_USER\Software\NSIS-BackupByNSISPortable" "HKEY_CURRENT_USER\Software\NSIS" $R0
		Sleep 100
		Goto TheEnd
	LaunchAndExit:
		Exec $EXECSTRING
		Goto TheEnd

	TheEnd:
		${registry::Unload}
		newadvsplash::stop /WAIT
SectionEnd

Now, I'll shut my stupid mouth and leave you alone.

I due hope this goes official.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
thanks for all of your

thanks for all of your criticism, and re-writing. hopefully this should be all that needs to be done, but i cant do a compile a school, so i'll get the new version up at home.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Okay. Again, I'm sorry about

Okay. Again, I'm sorry about screwing it up.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
don't worry about it. i'm not

don't worry about it. i'm not too stressed. Blum
EDIT: made fixes, and released a new version.
EDIT2: fixed a problem, new version. see main post.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Testing

Just testing HM NIS Edit 2.03 Development Test 7 with NSIS Preconfigured.

  • Clicking File->Reopen shows your recently used files
  • The compiler path is C:\Documents and Settings\Taffin.UPSTAIRS-1\Desktop\HMNISEditPortable\App\NSIS\makensis.exe
  • The compiler help path is C:\Documents and Settings\Taffin.UPSTAIRS-1\Desktop\HMNISEditPortable\App\NSIS\NSIS.chm
  • The BrowserHome is set to http://forums.winamp.com/forumdisplay.php?s=&forumid=65
  • Maybe you should create a default nisedit.ini in the DefaultData folder, with adjusted paths inside.
TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Fixed, and uploading new

Fixed, and uploading new version now.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
http://portableapps.com/node/

https://portableapps.com/node/15916

I don't know if you've solved the inital setup location, but you could use something like the code there.

I'll post here just for fun:

SkipSplashScreen:
		;=== Check for data files
		IfFileExists "$PROGRAMDIRECTORY\config.conf" GetPassedParameters ;=== settings already in program directory
		IfFileExists "$SETTINGSDIRECTORY\config.conf" MoveSettings ;=== settings found in data directory
		
		;=== Copy the default settings files
		StrCmp $DEFAULTLOCATION "true" "" GetPassedParameters ;=== if not default location, user is on their own
		CreateDirectory "$SETTINGSDIRECTORY"
		CopyFiles /SILENT "$EXEDIR\App\DefaultData\settings\*.*" "$SETTINGSDIRECTORY\"
		;${StrReplace} $0 '\' '/' '$PROGRAMDIRECTORY\bin\ffmpeg.exe' ;you don't usually need these, unless the app is . . .  funny :D
		;${StrReplace} $1 '/' '\\' '$FFMPEGPATH'
		${ConfigWrite} "$SETTINGSDIRECTORY\config.conf" "ffmpegLibLocation=" "$FFMPEGPATH" $R0
		${GetRoot} $EXEDIR $0
		${DirState} "$0\Documents\Videos\" $VIDEOEXIST
		StrCmp $VIDEOEXIST "-1" SetAtRoot SetAtVideos
		       SetAtVideos:
                                   ${ConfigWrite} "$SETTINGSDIRECTORY\config.conf" "downloadDir=" '$0\\Documents\\Videos\\' $R0
                                   Goto MoveSettings
                        SetAtRoot:
                                  ${ConfigWrite} "$SETTINGSDIRECTORY\config.conf" "downloadDir=" '$0\\' $R0

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

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Bugs and other small things :-(

I'm still using HM_NIS_Edit_Portable_NSIS_Preconfigured_2.03_Dev_Test_7.

Bugs:

  • After the first run all files from DefaultData are renamed, the folder is empty. If you delete the Data folder all default settings will be lost.
    And now the big issue: If you then run HM NIS Portable again, new settings will be created. But these new settings won't be saved in an INI-file (which could be handled by the launcher), they will be saved in the registry (HKCU\Software\HM Software).
    The registry keys will be created on each machine you run HM NIS Portable and they will be left behind.
  • HMNISEditPortable.nsi: line 246 FindProcDLL::FindProc "${DEFAULTEXE}", should be FindProcDLL::FindProc "$PROGRAMEXECUTABLE"

Minor things:

  • appinfo.ini: [Version] false version numbers
  • Readme.txt:
    -Remove false version number
    -Copyright 2004-2007
  • PortableApps.comInstaller.nsi: false version number (1.2.3.4)
  • Maybe you could add the INI-option to change the ProgramExecutable
  • The launcher has the ability to use an alternative NSIS path ($ALTERNATENSISPATH), but this option isn't documented. Improve the Readme.txt and add a line AlternateNSISPath= to HMNISEditPortable.ini

Blum

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Language

Oh, and there is another task for you Wink
HM NIS is multilingual, but your launcher doesn't include language switcher code.
The language is saved in nisedit.ini:

[Options]
Language=German

@mods: Is this site messed somehow, cause it's the only one with a scrollbar left right!

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
http://portableapps.com/node/

https://portableapps.com/node/16822 For language switching in the manner John's thinking of.

I think the left right is from long solid block of text like the one I'm trying to type right here to prove the point and yes I think its a drupal bug Biggrin

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

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Registry handling

Sorry, but the registry handling is messy. After each ${registry::KeyExists}-line a distinction of cases is missing. Something like StrCmp $R0 "-1" Label1 Label2.
You could look at WinMergePortable.nsi, it is a good example for the registry stuff.

I'm sorry, I don't want to disaggregate your launcher, I just want to help. After I found the first bug (DefaultData), I took a closer look at the launcher and the whole package.
Many guys think HM NIS Portable is ready and should go official soon, but in my opinion there is some work to do.

I hope my criticism don't discourage you from developing further portable apps.
Keep up your work Smile

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
thanks for the feedback.

thanks for the feedback. there is a fair bit that needs to be done on NIS Edit portable, incuding the language switching and that path replacement oliverK seems to be fond of, plus all of those little bugs that you've found.
i'll get the next dev test out as soon as possible, but i've been (and still am) sick so it may take a bit.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Don't worry about the path

Don't worry about the path replacement if you don't want to, I won't feel (to) bad Biggrin

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
new version, did a lot of

new version, did a lot of minor code fixes.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Bug (Dev Test 8) :-(

The launcher doesn't copy the default nisedit.ini --> HM NIS Portable saves settings to the registry.

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
found and fixed. I won't

found and fixed. I won't increment it as it was a slight typo that was causing the problem.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Feedback

Well, sorry dude, but HM NIS Portable is still buggy.
And, in my opinion, the launcher code is very unstructered, so it's hard to understand (and to debug).
Anyway, I'll try to help Smile

  • The DefaultData won't be copied to the settingsdirectory (this bug isn't fixed). Replace line 268-279 with

    	IfFileExists "$SETTINGSDIRECTORY\nisedit.ini" AdjustPaths
    		CreateDirectory $SETTINGSDIRECTORY
    		CopyFiles /SILENT "$EXEDIR\App\DefaultData\*.*" "$SETTINGSDIRECTORY\"
    
  • You could improve your DefaultData:
    1. change nisedit.ini: remove all recent files, change the compiler and helpfile path to

      Compiler=X:\PortableApps\HMNISEditPortable\App\NSIS\makensis.exe
      HelpFile=X:\PortableApps\HMNISEditPortable\App\NSIS\NSIS.chm
    2. add HMNISEditPortableSettings.ini:
      [HMNISEditPortableSettings]
      LastDrive=X:
    3. make sure that the DefaultData will be copied to the settingsdirectory

    That way HM NIS Portable is really preconfigured

  • launcher line 319, should be: StrCmp $R0 "0" 0 +2 (+1 is the same as 0)
  • launcher line 336, add Rename "$EXEDIR\App\nsis\nsisconf.nsh" "$SETTINGSDIRECTORY\nsisconf.nsh"
  • your launcher read the INI-parameters Programdirectory, Settingsdirectory, AlternateNSISpath, Additionalparameters and DisableSplashscreen, but your INI has the following parameters:
    Programdirectory, Programexecutable, AlternateNSISpath, Additionalparameters and DisableSplashscreen. Equalize them and don't forget the Readme.txt.
  • PortableApps.comInstallerConfig.nsh: false version number (0.71.3.0)
  • Remove thumbs.db files

I haven't checked the language switcher code.
That's all by now Blum

AlexH
Offline
Last seen: 15 years 8 months ago
Joined: 2009-03-26 19:53
Download

The download link for NSIS Preconfigured is broken, there's not longer available.

Regards/Gruß
AlexH

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Update

The download is down as I'm planning a big rewrite of the launcher to fix a lot of problems, and I re-organised my download section.
A new version should be out by the end of this weekend hopefully.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Good News :-)

Taffin, I think you could remove the complete registry stuff in your launcher. I'm using HMNIS Portable for a long time and I have never found the key HKCU\Software\NSIS.
I think HMNIS doesn't create this key, so there is no need to handle that.
Thanks for your work on HMNIS Portable!

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
when suing the built in

when suing the built in compile feature for NSIS it does Biggrin

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

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Hmmm,

not here. I've compiled all my packages with HMNIS Portable. No HKCU\Software\NSIS registry keys on my WinXP SP3, no "HMNISEditPortable\Data\settings\NSIS_portable.reg".

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
New version! I stripped all

New version! I stripped all the registry code seeming how it was doing nothing, and fixed up the entire package in general.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
:-)

Thanks very much, Taffin. I'll test that next week.

r.brem
r.brem's picture
Offline
Last seen: 1 day 22 hours ago
Joined: 2008-12-29 13:50
[BUG] language...

I have your Version tested. There is a mistake with the local language. This is not saved. So if i German system and later the program again start, is everything again English.

Roland Brem
Zwickau, Germany

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Fixed in DT10.

Fixed in DT10.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

perwhis
Offline
Last seen: 15 years 8 months ago
Joined: 2006-03-15 15:44
Relative paths for compiler and help file?

I normally use AutoIt to make a program portable, but want to learn nsis scripting. I found this program which I think would be perfect for me to learn how to make portable apps.

However, the help file and the compiler do not seem to use relative paths, so I have to change them manually if I move the folder. Is there a way to easily give relative paths to the ini-file with NSIS? (In AutoIt you just use @ScriptDir, and it works.)

The paths I'm talking about are found in the configuration window, and are linking to makensis.exe and NSIS.chm.

richo
richo's picture
Offline
Last seen: 6 days 8 hours ago
Joined: 2007-01-31 22:03
RE: Relative paths for compiler and help file?

"$EXEDIR" for the compile script's directory, "$OUTDIR" for current directory.

Bart.S
Offline
Last seen: 5 months 4 weeks ago
Developer
Joined: 2008-07-23 07:56
Feedback Dev Test 10
  • I'm a bit confused about the HM. Sometimes I read the appname with HM, sometimes without HM :S
  • the default nisedit.ini contains still custom stuff (e.g. ReplaceHistory, SearchHistory)
  • all copyrights could be changed to -2009
  • the installer could be multilingual
  • Bug: Language Switching 1: You compare the $APPLANGUAGE with false locale codes (e.g. zh, pt-br, en_us, ...). Use correct Localeglibc codes
  • Bug: Language Switching 2: You set false strings into $APPLANGUAGE (e.g. porteguese). Look at $EXEDIR\App\nisedit\Lang\*.* for correct names.
  • Bug: Language Switching 3: (line 165) Settings.ini exists nowhere
  • Bug: Language Switching 4: The language switching code is placed too early. Move it above MoveSettings. Why? At the moment, the language can't be set into $SETTINGSDIRECTORY\nisedit.ini, because $SETTINGSDIRECTORY hasn't been created.
    If you create the $SETTINGSDIRECTORY before and the language switching is succesful, the default nisedit.ini won't be copied (and the compiler won't be configured). So just move it down Smile

Sorry for being nit-picky, but for me that aren't showstoppers. HM NIS Portable is great. Thanks for your work.
I don't care about the language switching bugs.

Cheers Bart.S
President of the "'DisableAppLanguageSwitching=true' forever"-club

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Thanks for those. New

Thanks for those. New version, details in initial post.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

scriptdaemon
Offline
Last seen: 5 years 3 days ago
Developer
Joined: 2008-10-10 17:40
I don't mean to send you back

I don't mean to send you back to the drawing board, but I see it referred to as HM NIS Edit far more than without the HM, especially on their official site.

Mark Sikkema
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-07-20 14:55
Is this app still being

Is this app still being developed ???

I quite like using NISEditPortable.
Or can anybody advise me an app simular to this ?

Formerly Gringoloco
Windows XP Pro sp3 x32

computerfreaker
computerfreaker's picture
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-08-11 11:24
I really like using NISEdit

I really like using NISEdit Portable, too - I won't work with NSIS in any other editor.
Unfortunately, it seems to have been abandoned - the last release dates were in 2005, according to the NIS Edit download page.

I second your question about a similar app, though.

EDIT: how about Venis IX? It seems to be dead too - last release was January 2007 - but it's more up-to-date than NISEdit.

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
gVim

I've tried HM NIS Edit briefly - I only liked its GUI tool - and Venis IX as well which in my opinion was just lacking in anything to make it better than my favourite code editor... gVim. What's more, it has available for it good NSIS syntax highlighting which I improve from time to time and is better NSIS syntax highlighting than I've seen in any other text editor or online syntax highlighter (like GeSHI). I personally very much like Vim, though it's not to everyone's taste.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
try them! Otherwise, try

try them! Otherwise, try Geany or Notepad++ which has sntax highlighting. I'm hoping that the new build system for Geany will better implement some NSIS stuff, I but I haven't tested it in the nightlies I've been building.

And, why does it matter if its abandoned? I mean, it works right? It gets the job done. There's nothing in the system that could (theoretically) produce a vulnerability. That being said, why does it matter how old it is? If it works, it works!

Lets stop slamming old software that works. It works, which is most important to me Smile

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

computerfreaker
computerfreaker's picture
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-08-11 11:24
Bit confused

I did mention that "I won't work with NSIS in any other editor", so I'm a bit confused by your "try them" statement.

Incidentally, I don't mind old software (as long as it still works, that is); I do think it's time to move on when a program's both old and abandoned (unless someone wants to resurrect the project?)

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
I did mention that "I won't

I did mention that "I won't work with NSIS in any other editor", so I'm a bit confused by your "try them" statement.

Sorry. I thought that you meant you were lookign for another editor. If you aren't, then disregard Smile I won't be offended.

Incidentally, I don't mind old software (as long as it still works, that is); I do think it's time to move on when a program's both old and abandoned (unless someone wants to resurrect the project?)

Don't really care if its abandoned myself, but to each his own. I just want it to WORK.

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

computerfreaker
computerfreaker's picture
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-08-11 11:24
Re:

OliverKSorry. I thought that you meant you were lookign for another editor. If you aren't, then disregard Smile I won't be offended.

Going to disregard, then. I'm happy with NISEdit; I'd switch in a heartbeat (as with any app) if I can find something better, but I've yet to find a better NSIS editor.

OliverKDon't really care if its abandoned myself, but to each his own. I just want it to WORK.

My only problem with abandoned apps is that they generally can't handle newer technologies and nobody's around to update them (e.g. Windows Vista broke a lot of abandoned apps, IIRC). As long as the abandoned apps still work and there's nothing better out there, I'm happy; if I find something better, no matter how new my current app is, I'll switch.

Cheers!

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
My only problem with

My only problem with abandoned apps is that they generally can't handle newer technologies and nobody's around to update them (e.g. Windows Vista broke a lot of abandoned apps, IIRC). As long as the abandoned apps still work and there's nothing better out there, I'm happy; if I find something better, no matter how new my current app is, I'll switch.

Then it doesn't WORK Blum

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

computerfreaker
computerfreaker's picture
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-08-11 11:24
yes, it still works - on

yes, it still works - on older machines. I've heard (don't quote me) that there are still businesses on Win98 or earlier because mission-critical apps haven't been updated. That's that kind of thing I hate. Wink

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 7 months ago
Developer
Joined: 2008-09-30 19:18
Update installer version

to 1.0.3

Still disappointed that only like, a tenth of it is in English Sad Luckily the icons help!

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
I doubt that the installer

I doubt that the installer will be being updated anytime soon. Its not worth the work when the old installer works fine.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Yeah

Since the app itself isn't updated anymore I'm only supporting bugs. If someone posts a noticable bug then I'll upgrade the installer and fix bugs, but otherwise why fix that which is not broken?

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Mark Sikkema
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-07-20 14:55
Is there any good reason why

Is there any good reason why you don't have the SecondaryLanch functionality included for it?

I've implemented it for my personal use a while ago and it doesn't give me any issues.
This way it will work with association better, like expresso or Xyplorer, etc !

Formerly Gringoloco
Windows XP Pro sp3 x32

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Registry entries is what I

Registry entries is what I can think of. Unless you wrote your own or copied somebodies code Blum

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

Mark Sikkema
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-07-20 14:55
I don't think NISEditPortable

I don't think NISEditPortable does use the registry.

I haven't specifically checked, but nor does the original script deal with the registry and nor did I ever find NISEdit keys in my registry !
NISEdit uses nisedit.ini for it's settings.

But even if it did use the registry, still it could do a 'SecondaryLaunch' !

Formerly Gringoloco
Windows XP Pro sp3 x32

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Ahh, well, NISEdit doesn't

Ahh, well, NISEdit doesn't use the registry. But NSIS does. You must have it set up in a different manner.

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

Mark Sikkema
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-07-20 14:55
See :

Formerly Gringoloco
Windows XP Pro sp3 x32

OliverK
OliverK's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2007-03-27 15:21
Forgot that. Must be due to

Forgot that. Must be due to using the window. Commanline doesn't generate anything then.

Sweet Smile

And, thanks for pointing that out.

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

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
I don't particularly like

I don't particularly like multiple instances, and if I recall correctly it caused some minor problem somewhere that would have taken too much effort to fix. Besides, I always just open multiple files in the one instance Blum

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Mark Sikkema
Offline
Last seen: 13 years 2 months ago
Developer
Joined: 2009-07-20 14:55
But it just keeps the one

But it just keeps the one instance open, and opens multiple-tabs with secondary launch functionality !

But not sure about the minor problem. I haven't encountered it, as I'm just running it from my local hard-drive.

Anyway, don't worry about it for me, I just wanted to let you know !

Formerly Gringoloco
Windows XP Pro sp3 x32

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Update

Just some updates to the latest PAF spec and unicode NSIS.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

John T. Haller
John T. Haller's picture
Online
Last seen: 21 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nice!

I was just looking at this and wondering what would be involved. Are you using a standard NSIS Unicode build? If so, wouldn't it make more sense to have it require NSIS Portable installed next to it and use that (ala PA.c Launcher)? Also, why NISEditPortable instead of HMNISEditPortable? I'd like to get this out maybe this week.

Sometimes, the impossible can become possible, if you're awesome!

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
NISEditPortable was partly me

NISEditPortable was partly me getting a little lazy with typing out the name every time Blum
It's actually just the PA.c Unicode NSIS so that anyone using it got all of the extras that NSIS Portable has without relying on it, but since PAL does that anyway I may as well do that and go over and change it all to HM NIS Edit Portable.
Is there code in the PAL installer to check for NSIS Portable, or is it just assumed to be present?

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

John T. Haller
John T. Haller's picture
Online
Last seen: 21 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Error

I believe it is assumed to be present by the installer but the launcher checks for it.

Sometimes, the impossible can become possible, if you're awesome!

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
Custom code

The Launcher Generator uses NSIS Portable, requiring the user to specify a path before it can start; if you want to use NSIS, it's best to use %PAL:PortableAppsDir%\NSISPortable by default with the possibility of an override in the INI file next to the launcher executable; here's approximately what you need for App\AppInfo\Launcher\Custom.nsh (PAL 2.1):

${SegmentFile}

${SegmentPre}
	; In Pre rather than Init so PAL:PortableAppsDir is available
	ExpandEnvStrings $0 %PAL:PortableAppsDir%\NSISPortable
	${ReadUserConfigWithDefault} $0 NSISPortable $0
	${IfNot} ${FileExists} $0
		; Read the existing value from user config, so it isn't changed
	${EndIf}
	SetEnvStr NSIS_PATH $0
!macroend

(Can't remember whether ReadUserConfigWithDefault is defined, may need to work around it. I'll put it in 2.1 final if it's not.)

I think it's best to make it a "passive" search for NSIS, rather than an active requirement-or-I-won't-start as it is in the PAL Generator - HM NIS Edit doesn't require NSIS if I recall correctly.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 11 months ago
Developer
Joined: 2006-12-14 17:24
Updated

Right, updated it to use NSIS portable.

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

Topic locked