Renaming external NBR on compile

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Locked
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Renaming external NBR on compile

Post by HPW »

Hello,

In times where Antivirus/real time protektion software gets more and more pitty about software which extracts
and call DLL's from TEMPDIR it might be an option to let NBR stay external.

So I consider to use:

Compile/Publish Book\Files\
Compile only files that do not need to be extracted (best for CD-ROMs)
Copy external files to this folder

With this I get my neobook-app together with the needed NBR in one folder (also faster loading because no unpacking).

Here I would like to see an extension:

A new compiler-option: Rename NBR to EXE-name on copy/linking

neobook-app: 'MyAppName.EXE'
Example1: 'hpwUtility.NBR' => 'MyAppName_1.NBR'
Example2: 'hpwControl.NBR' => 'MyAppName_2.NBR'

The linking should use then the new NBR-Names from PUBDIR instead of temporary generated NBR-names from TEMPDIR on Load-Time.
And no more deleting on Shutdown!

This would avoid version-conflicts between APP's installed in the same folder and would show to any observer which files belong together.
APP's could use different versions of same plugin (older vs.new).

The installer has then to put all-together into the setup-package.

Regards

Hans-Peter
Hans-Peter
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Post by Neosoft Support »

That's a good idea. I'll add it to the list.

Thank you.
NeoSoft Support
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Post by HPW »

Another thought:

The new compiler-option: Rename NBR to EXE-name with DLL's on copy/linking

neobook-app: 'MyAppName.EXE'
Example1: 'hpwUtility.NBR' => 'MyAppName_1.DLL'
Example2: 'hpwControl.NBR' => 'MyAppName_2.DLL'

This would be even more common for windows software.

Regards

Hans-Peter
Hans-Peter
User avatar
chromebandit
Posts: 285
Joined: Wed Nov 24, 2010 5:00 pm
Contact:

Post by chromebandit »

I have realized that also its much better to let them stay external i tested with 20 Antivirus solutions not online scanner! on my system i installed any Antivirus and i tested for performance and warnings... i can post it if somebody is interested....

Extracting slows down extremly when real time scanners are enabled it would be a good thing to keep them external its also much much faster. I think in the future there is no way around and this and the option should be added very soon the avoid more conflicts with antivirus software

The only thing plugin developers must protect commercial plugins in other ways so they get not stolen...

Regards
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Post by Neosoft Support »

I agree. It's being considered.
NeoSoft Support
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Post by HPW »

Hello,

Just made a small test:

I have a ready to compile PUB.
I copy and renamed a used plugin (either NBP or NBR) to MyAppName_1.DLL
I removed the original plugin from neobook IDE and installed the DLL in the plugin-install dialog.
(Type a *.dll in the name field and it shows the DLL)
The NBR/NBP shows up with its original name in the plugin-dialog.
Then I compile with the option to copy everything to the sub-folder.

The result is exactly the same as my suggestion should allow.
A EXE with external plugins-DLL's named like the EXE.
Only quite a bit of install-work prior to compile.

But no wait for NB6!
;-)
Hans-Peter
User avatar
chromebandit
Posts: 285
Joined: Wed Nov 24, 2010 5:00 pm
Contact:

Post by chromebandit »

Works great! thanks.
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Post by Neosoft Support »

Great idea!
NeoSoft Support
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Renaming external NBR on compile

Post by HPW »

Hello,

I have made a experimental pub that does all the stuff for me in one rush.
From the FileList of a pub I copy the requirred plugins into a textentry.
All plugins get copied to a new numbered name with dll-extension in a temp-folder and the deliver-folder.
The registry of neobook gets rewritten with the new names.
neobook gets started via commandline and /C option and the target pub.
Then a restore to resets the registry to the state before and deleting temp-files and folder.

Code: Select all

NBW Publication Source File
(C)1993-2013 NeoSoft Corp.
Title=Named Plugin-DLL neobook-Compiler
Author=H.P.Wickern
Language=US
NeoBookVer=5,80
ScreenColors=16777216
ScreenWidth=640
ScreenHeight=304
BkndColor=0
ScreenAutoSize=Yes
LinkColor=16711680
WindowStyle=0
WindowOrder=0
WindowPos=0
WindowProps=31
BiDiMode=0
UseUpdateTimer=Yes
ShowMarquee=Yes
ReturnTime=60
ShapeTransColor=536870912
SplashProps=3
CompressUPX=No
CompiledName=C:\Programme\NeoBook5\PluginCompile.exe
CompileType=0
MediaType=0
FilesIncluded=1
FontsIncluded=2
FontsToCompile=|
CopyExternalFiles=No
SetupMedia=3
SetupInstDir=C:\MyProgram
SetupTitle=Setup
SetupColors=16711680|0|65535
Variables=[#10]¶[#13]¶[AppName]¶[DeliverPath]¶[NewPluginName]¶[PluginList]¶[PluginNr]¶[RealPluginName]¶[TargetPubPath]¶[UsedPlugins]¶[UsedPluginsCount]¶[UsedPluginsNbp]¶
VersionMajor=1
VersionMinor=0
VersionRelease=0
VersionBuild=0
ReqExLevel=1
CustomFontName=Arial
CustomFontSize=9
CustomFontStyle=0
CustomCharset=1
CacheSize=30
ExtractOp=132
L_OK=OK
L_CANCEL=Cancel
L_YES=Yes
L_NO=No
L_CLOSE=Close
L_ERRORTITLE=Error
L_FINDTITLE=Find
L_FINDPROMPT=Find &What
L_FINDFIRST=&Find First
L_FINDNEXT=Find &Next
L_FINDERROR=Search text not found.
L_PWORDTITLE=Password required
L_PWORDMSG=Before continuing, you must first|enter the correct password.
L_PWORDPROMPT=&Password:
L_PWORDERROR=That's not the right password!
L_MEDIAERROR=In order to play this type of file you must install|the appropriate multimedia hardware and/or|software.
L_INTERNETERROR=Unable to locate Internet Browser software.
L_ABORTFUNCTION=Do you want to cancel this function?
L_EXTRACTERROR=This file could not be extracted and cannot be played.
L_INSTDIRPROMPT=Please enter the drive and directory where you would like this program to be installed. To accept the default drive and directory, simply press Enter.
L_INSTFOLDERPROMPT=Do you wish to create a program folder?
L_INSTRUNPROMPT=Do you want to run
L_INSTDISKPROMPT=Please insert disk #
L_INSTDISKERROR=That's not the correct disk, try again.
L_INSTGENERROR=The installation has terminated.
L_INSTEXITPROMPT=Do you really want to cancel the installation?
L_INSTWINTITLE=Setup
L_INSTPROGTITLE=Extracting Files...
L_SENDEMAIL=Sending Mail...
L_MAILSERVER=Please enter the name of your outgoing email server:
L_COPY=Copy to Clipboard
L_SELECTALL=Select All
L_DONWLOADFILE=Downloading: %s
L_PLEASEWAIT=Please wait...
TrayMenuBegin
MenuName=TrayOpen
MenuText=Open
MenuState=3
MenuKey=0
MenuAction=SetVar "[WindowState]" "Normal"
MenuName=TrayExit
MenuText=Exit
MenuState=3
MenuKey=0
MenuAction=Exit "" ""
MenuEnd
MasterPage
NewPage=New Page
PageStyle=0
PageColor=-16777215
PageGradient1=16711680
PageGradient2=255
PageGradientDir=1
WallpaperStyle=0
EffectSpeed=0
ObjectType=9
Name=EAppName
X=8
Y=8
W=120
H=32
Anchor=0
Text=TetrisPlaner
VarName=[AppName]
Align=1
EditLen=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=0
ObjectType=9
Name=EPluginList
X=8
Y=88
W=624
H=168
Anchor=0
Text=C:\Programme\NeoBook5\Plugins\hpwControl\hpwControl.nbr¶C:\Programme\NeoBook5\Plugins\hpwNewLISP\hpwNewLISP.nbr¶C:\Programme\NeoBook5\Plugins\hpwUtility\hpwUtility.nbr¶C:\Programme\NeoBook5\Plugins\hpwImage\hpwImage.nbr¶C:\Programme\NeoBook5\PlugIns\NeoBookFMFTP\NeoBookFMFTP.nbr¶
VarName=[PluginList]
Align=1
EditMultiLine=Yes
WordWrap=No
EditLen=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ObjectType=9
Name=ETargetPubPath
X=128
Y=8
W=504
H=32
Anchor=0
Text=C:\Schrank\WIN\Woint\Tetris\Xassist\TetrisPlaner.pub
VarName=[TargetPubPath]
Align=1
EditLen=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=1
ObjectType=3
Name=BCompile
X=8
Y=264
W=232
H=32
Anchor=0
Text=Rename/Compile/Restore
Align=2
ImageStyle=0
BevelWidth=1
XPTheme=Yes
ObjAction=StrParse "[PluginList]" "[#13][#10]" "[UsedPlugins]" "[UsedPluginsCount]"¶CreateFolder "[TempDir][AppName]"¶Loop "1" "[UsedPluginsCount]" "[PluginNr]"¶  hpwGetPluginName "[UsedPlugins[PluginNr]]" "[RealPluginName[PluginNr]]"¶  SetVar "[NewPluginName[PluginNr]]" "[AppName][PluginNr].dll"¶.  AlertBox "Test" "[UsedPlugins[PluginNr]] - [TempDir][NewPluginName[PluginNr]]"¶  FileCopy "[UsedPlugins[PluginNr]]" "[TempDir][AppName]\[NewPluginName[PluginNr]]"¶  FileCopy "[UsedPlugins[PluginNr]]" "[DeliverPath]\[NewPluginName[PluginNr]]"¶  RegistryWrite "HKEY_CURRENT_USER" "Software\NeoSoft\NeoBook 5\PlugIns\[RealPluginName[PluginNr]]" "[TempDir][AppName]\[NewPluginName[PluginNr]]"¶EndLoop¶¶.AlertBox "Test" "Registry Kontrollieren"¶Run "!C:\Programme\NeoBook5\NeoBook.exe" "/c [TargetPubPath]" "Wait" "" ""¶¶Loop "1" "[UsedPluginsCount]" "[PluginNr]"¶  ChangeFileExt "[UsedPlugins[PluginNr]]" ".nbp" "[UsedPluginsNbp[PluginNr]]"¶  RegistryWrite "HKEY_CURRENT_USER" "Software\NeoSoft\NeoBook 5\PlugIns\[RealPluginName[PluginNr]]" "[UsedPluginsNbp[PluginNr]]"¶  FileErase "[TempDir][AppName]\[NewPluginName[PluginNr]]"¶EndLoop¶RemoveFolder "[TempDir][AppName]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=-16777201
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=4
ObjectType=9
Name=EDeliverPath
X=8
Y=48
W=624
H=32
Anchor=0
Text=C:\Schrank\WIN\Woint\Tetris\Xassist\Deliver
VarName=[DeliverPath]
Align=1
EditLen=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=2
ObjectType=3
Name=BSave
X=368
Y=264
W=128
H=32
Anchor=0
Text=Save
Align=2
ImageStyle=0
BevelWidth=1
XPTheme=Yes
ObjAction=Loop "1" "20" "[PluginNr]"¶  SetVar "[RealPluginName[PluginNr]]" ""¶  SetVar "[NewPluginName[PluginNr]]" ""¶EndLoop¶SetVar "[PluginNr]" ""¶¶FileSaveBox "Save Project Data" "Any File|*.*" "[PubDir]" "[SavePathFile]"¶SaveVariables "[SavePathFile]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=-16777201
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=5
ObjectType=3
Name=BLoad
X=504
Y=264
W=128
H=32
Anchor=0
Text=Load
Align=2
ImageStyle=0
BevelWidth=1
XPTheme=Yes
ObjAction=FileOpenBox "Load Project Data" "Any File|*.*" "[PubDir]" "[LoadPathFile]" ""¶LoadVariables "[LoadPathFile]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=-16777201
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=6
Edit: Added a DeliverPath TextEntry to copy the renamed DLL to it.
Edit2: Added Load and Save option for all settings
Hans-Peter
UltraVox
Posts: 469
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Renaming external NBR on compile

Post by UltraVox »

I'm not sure I understand, but the idea of ​​renaming plugins to .dll files, I'm very interested !

Unfortunately I can not open the Pub file provided by HPW.

I guess that's normal?
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Renaming external NBR on compile

Post by HPW »

I guess that's normal?
No, when it does not open, then it is the usual Problem that the Forum Software adds something to the text on copying.
Use select all and past it into Notepad or a good Editor. Save it from there and it should open.

Regards
Hans-Peter
UltraVox
Posts: 469
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Renaming external NBR on compile

Post by UltraVox »

In fact, it works better with Notepad++.
Your PUB is great. :)

Many thanks!
slipstream
Posts: 3
Joined: Sun Jun 15, 2014 5:42 am

Re: Renaming external NBR on compile

Post by slipstream »

This may be a bump but no need to start a new thread for this..

Why not implement a loading dll in memory function so that the plugins don't need to hit the HD?

I believe this library will help (for Delphi): http://code.google.com/p/memorymodule/downloads/list
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Renaming external NBR on compile

Post by Neosoft Support »

That's an interesting concept and worth experimenting with.
NeoSoft Support
Locked