Jump to content











Photo
- - - - -

Winbuilder 2015 HowTo create own plugins

plugin template

  • Please log in to reply
18 replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 March 2014 - 11:29 AM

0. Prerequisites

  • $BaseDir$ is the directory where WinBuilder is installed
  • Paths are relative to $BaseDir$
  • <Key> means the actual value of "Key"
  • Always keep in mind that path and file names are case sensitive when the project is built in an OS other than Windows.
  • In this tutorial paths are written with the Windows backslash separator. When you work in a different host OS, then maybe the separator is a slash
  • "INSTALL" means the INSTALL command in the running WinBuilder CLI
  • Just a reminder: Empty keys have the format <entry key="KeyName"/>

1. Preparation

  • Be sure to have your personal registration key in $BaseDir$, e.g. "thatsme.wbc".
    Some developers already have it. Seriously developing members can get it on request (PM to pscEx or Nuno Brito).
  • Download the plugin template to $BaseDir$\downloads
  • Choose an (3 digit numerical) ID and a name for your plugin
  • Rename the Template to <ID>-<Name>.zip
  • Create a new folder downloads\<ID>-<Name>
  • Unzip the contents of <ID>-<Name>.zip into <ID>-<Name>

2. General customization

  • Edit $BaseDir$\downloads\<ID>-<Name>\settings.xml
  • Change the first part (up to the first blank line) according your project names etc.

3. Add plugin application

 

Decide for one of three possible methods:

  • Attach the application to the plugin.
    The user can INSTALL the plugin and has nothing more to to. The plugin is ready to be added to the PE build.
    This method is recommended exclusivelly for own applications.
    Use step 3.1
  • Prepare to download the application and store locally during INSTALL. 
    The user can INSTALL the plugin and has nothing more to to. The plugin is ready to be added to the PE build.
    This method is recommended for applications which can be downloaded and extracted easily by 7-zip (WinBuilder internal extractor)
    Use step 3.2
  • Applications not covered by 3.1 and 3.2.
    Use step 3.3

3.1 Provide the plugin application locally

 

This method uses a zipped image of the application which during build is unzipped into the wim-boot or bootdisk directory.

  • Edit $BaseDir$\downloads\<ID>-<Name>\settings.xml
  • Define <entry key="InstallFromLocal">False</entry>
  • Define <entry key="IsAttached">True</entry>
  • Save <ID>-<Name>\settings.xml
  • Create an empty plugin_APP.zip file in $BaseDir$\downloads\<ID>-<Name> folder
  • Zip the contents of your plugin application directory into this zip.

3.2 Download the plugin during INSTALL

  • Edit $BaseDir$\downloads\<ID>-<Name>\settings.xml
  • Define <entry key="InstallFromLocal">True</entry>
  • Define: <entry key="DownloadURL">http://app.deliverer.com\myapp.zip</entry> with your actual link
  • Define <DoExtract>
    • $Default

    • True

    • False

$Default: Extract:

  • *.paf.exe
  • *.7z
  • *.zip

All other files types are copied.
 

True: Force extract, independent from file type. This can be done e.g. with install *.exe files.

False: Do not extract, independent from file type

 

This method causes a download during INSTALL, and copying / extracting the app files into <LocalFolder>.

 

Remark: Usually *.paf.exe files can be extracted. But there is a bug in the used SevenZipBindings, which prohibits some files to be extracted correctly.

Maybe also install *.exe files cannot be extracted into an usable application.

In this case set <DoExtract> = False

 

3.3 Make the user responsible to provide the plugin application

  • Edit $BaseDir$\downloads\<ID>-<Name>\settings.xml
  • Define <entry key="InstallFromLocal">False</entry>
  • Define: <entry key="DownloadURL"/>
  • Define a install message for the user:
    Edit $BaseDir$\downloads\<ID>-<Name>\Readme.txt and uncomment the message you want to show, or add your own message.
    In this case during INSTALL the user will get a log message like

 

2014/03/26 15:26:09 [INFO] Before you can add the PiriformClamWinPortable plugin in your project, you have to install it into V:\WB2_A\WB2\winbuilder\run\lib\plugins\AntiVir\PiriformClamWinPortable.
2014/03/26 15:26:09 [INFO] Then run it once in order to do some initialisations / updates, etc.

and has to act accordingly.

 

Sorry, there is no way that you perform that user's job.

 

4 Advanced

4.1 Shortcuts

 

Shortcuts are also defined in $BaseDir$\downloads\<ID>-<Name>\settings.xml.

 

By default, there is no shortcut on the desktop, and a shortcut with default values in StartMenu\<!Category>.

When you agree to this behaviour, you usually can continue.

There is one exception: When the application executable is different from <!Name>.exe, you must replace $Default by the real exe name in <entry key="ShortcutTarget">$Default</entry>.

 

All other shortcut definitions may be changed optionally, according your preferences.

 

4.2 RunFromRAM

 

There is an entry <entry key="RunFromRAM"> in $BaseDir$\downloads\<ID>-<Name>\settings.xml.

It defines where the applicaton directory is placed

  • True: $BaseDir$\output\wim-boot: Is added to the PE's boot.wim
  • False: $BaseDir$\output\bootdisk: Is added to the ISO body

That is valid for all three methods 3.1, 3.2 and 3.3.

When there are files to be placed independent of RunFromRAM, zip them into:

  • plugin_RAM.zip: Place into $BaseDir$\output\wim-boot.
  • plugin_CD.zip: $BaseDir$\output\bootdisk.

Take care, that in this case differently from 3.1 the zip file must contain the complete path inside wim-boot / bootdisk.

Example: Windows\inf\mydriver.inf

 

4.3 main.bsh

 

There is a file $BaseDir$\downloads\<ID>-<Name>\main.bsh.

It defines actions of the plugin during INSTALL and during BUILD.

Usually it can be used unchanged. But sometimes you want to have some additional actions when the plugin is added to the PE source.

You can see comments in $BaseDir$\downloads\<ID>-<Name>\main.bsh informing you about the possibilities.

 

5 Finalise

  • IMPORTANT: Close open editors with $BaseDir$\downloads\<ID>-<Name> files and save then on close.
  • IMPORTANT: Copy the contents of the $BaseDir$\downloads\cache\settings-<ID>.xml to $BaseDir$\downloads\<ID>-<Name>\settings.xml (overwrite!)
  • IMPORTANT: Zip the contents of the $BaseDir$\downloads\<ID>-<Name> directory into $BaseDir$\downloads\<ID>-<Name>.zip
  • Upload your plugin to the reboot.pro download center.

6 Examples

  • Download examples: http://winbuilder.ex...wCollection.zip
  • Unzip into the $BaseDir$\downloads directory and rename as if you would create your own plugin (See above).
    - most of the work is already done in the examples.
  • INSTALL the plugin.

  • lemon likes this

#2 zerovirus

zerovirus
  • Members
  • 3 posts
  •  
    United States

Posted 27 April 2015 - 06:42 PM

I followed 3.1, but I'm confused as to where to put the plugin to get it to show up in the INSTALL list. For your examples you say to put it in $BaseDir$\downloads, but that's not working for me. Any suggestions?



#3 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 April 2015 - 08:42 PM

The INSTALL list shows only plugins available on reboot.pro download area.
 
When you create a new local plugin like described above, it is of course not on reboot.pro and therefore not in the list.
 
Just command INSTALL <myplugin>, and next build will include the new plugin (provided it is error-free).
 
The log text looks like this:

Spoiler

 

Peter



#4 zerovirus

zerovirus
  • Members
  • 3 posts
  •  
    United States

Posted 27 April 2015 - 09:59 PM

Install can't find it.
 
[COMMAND] install WinDirStat
[NOTFOUND] No results found for: WinDirStat
 
<entry key="!Name">WinDirStat</entry>
 
D:\winbuilder_2015.03.07\downloads\600-WinDirStat


#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 28 April 2015 - 07:45 AM

 

  • IMPORTANT: Close open editors with $BaseDir$\downloads\<ID>-<Name> files and save then on close.
  • IMPORTANT: Zip the contents of the $BaseDir$\downloads\<ID>-<Name> directory into $BaseDir$\downloads\<ID>-<Name>.zip

 

Dou you also have the file:

D:\winbuilder_2015.03.07\downloads\600-WinDirStat.zip?

 

Peter



#6 zerovirus

zerovirus
  • Members
  • 3 posts
  •  
    United States

Posted 28 April 2015 - 08:19 PM

Ah, no, I forgot to copy that over. Of course I'd not do the one thing in bold, red text!

 

The install runs, but I end up with an empty directory under lib\$category\WinDirStat



#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 April 2015 - 09:47 AM

Send me the D:\winbuilder_2015.03.07\downloads\600-WinDirStat.zip by e-mail.

(As new member you cannot yet attach something here in a post or PM)

 

Peter



#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 02 May 2015 - 11:39 AM

Two items are wrong.

First is my fault and forgotten in documentation and template.

When you want to deliver an attached application, you must define <entry key="IsAttached">True</entry>

Template and docu are already changed.

The second is:

You use the standard <entry key="ShortcutTarget">$Default</entry>. $default will bring a shortcut to WinDirStat.exe.
But the exe is really WinDirStatPortable.exe. So you must define:
<entry key="ShortcutTarget">WinDirStatPortable.exe</entry>

After doing the changes (in the .zip!), delete downloads\cache\600-settings.xml and INSTALL again
There will be no windirstat file under plugins. The app is added during build directly from plugin_APP.zip to the target.

You will get an error message, if you do not have the plugin certified. Certification will be automatically done, when you have a developer key in the $BaseDir. I'll PM you one.

Peter



#9 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 05 May 2015 - 07:22 PM

In the root directory of the Win builder > Download!
“C:\Java Builder\winbuilder_2015.03.07\downloads\370-mozilla”
I created the folder “370-mozilla”,
I rename the “Template.zip” to “370-mozilla.zip” & un zip the file to the root of 370-mozilla folder I now have “Readme.txt, main.bsh, settings.html, & settings.xml”!
The Mozilla.exe is in the same folder!
I open the settings.xml in Notepad.
I am stuck on how to edit the “.xml” file?



"<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/...roperties.dtd">
<properties>
<comment>Settings for MyPlugin</comment>
<entry key="!Name">MyPlugin</entry>
<entry key="!Type">Plugin</entry> <!-- Plugin / Component -->
<entry key="!Category">MyCategory</entry> <!-- recommended not to create new category, use existing when possible -->
<entry key="!Author">ThatsMe</entry>
<entry key="!Version">2014.03.26</entry>
<entry key="!Credits">All the nice people who developed the app</entry>
<entry key="RunFromRAM">True</entry>

<entry key="IsAttaced">False</entry>
<entry key="InstallFromLocal">True</entry>
<entry key="LocalFolder">$Default</entry> <!-- plugins\<!Category>\<!Name> -->
<entry key="TargetFolder">$Default</entry> <!-- plugins\<!Category>\<!Name> -->
<entry key="DownloadURL">http://app.deliverer...app.zip</entry>
<entry key="DoDownload">False</entry>
<entry key="DoExtract">$Default</entry> <!-- *.zip, *.7z, *.paf.exe = True; else False -->

<entry key="ShortcutFileName">$Default</entry> <!-- <!Name>.lnk -->
<entry key="ShortcutTarget">$Default</entry> <!-- <!Name>.exe -->
<entry key="ShortcutArguments"/>
<entry key="ShortcutWorkDir"/>
<entry key="ShortcutComment"/>
<entry key="ShortcutIconFile"/>
<entry key="ShortcutIconIndex"/>
<entry key="OpenModus">SW_SHOWNORMAL</entry>
<entry key="StartMenuShortcut">True</entry>
<entry key="StartMenuFolder">$Default</entry> <!-- <!Category> -->
<entry key="DesktopShortcut">False</entry>
<entry key="DesktopFolder"/>
</properties>
"

#10 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 May 2015 - 09:05 AM

Following Step 2 of the description, edit:

 

<entry key="!Name">Mozilla</entry>
<entry key="!Type">Plugin</entry> <!-- Plugin / Component -->
<entry key="!Category">Internet</entry> <!-- recommended not to create new category, use existing when possible -->
<entry key="!Author">Jonas Voll</entry>
<entry key="!Version">2015.05.06</entry>
<entry key="!Credits">All the nice people who developed the app</entry>
<entry key="RunFromRAM">True</entry>

 

Follow step 3.1 and create plugin_APP.zip containing mozilla.exe

CAUTION: There is a typo: isAttached is missing a character h. I'll correct in the template.

 

BTW: I do not understand why you want to have mozilla.exe as plugin. Do you want to add FireFox.exe? Then naming should be corresponding.

 

Peter



#11 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 06 May 2015 - 12:03 PM

If you know of a better way for Mozilla to be included in the PE, I will try I do not have the experience or knowledge as you!
Just remember I need a Plugins to be added to Mozilla (Webvisum)
http://www.webvisum.com/

#12 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 06 May 2015 - 12:17 PM

For a new user to Win Builder, and depending on the software it’s confusion!
For Exammpel Mozilla has like 3 downloads, how does one know wich one to use?

#13 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 08 May 2015 - 01:07 PM

Hey what do you recommend for a Iso mounting utility I can use in the PE?

#14 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 08 May 2015 - 03:04 PM

Nvda is giving me eross!
xxxxx
xnnx
xnx
xnx
xnx
xnx
xxxxx xn xx xnxxxxxx
nnnnx xn xx xxxxxxxnx
xxnx xnn xx xnxx xnx
xnx xnn xx xnx nx
xnx xxnn xx xxxx xnx
xnx x nn xx xnx xnx
xnxxx nn xx xnx xnx
xnxx nnxxx xnx xxx
xnxx nnxx xnx xxxx
xnx nnx xnx xxxx
x nx xxxxxxx

winbuilder (version 2015.05.05) is proudly brought to you by http://reboot.pro

steve6375 once said: "What was on your PC hard disk before? XP, Vista, Win7, Ubuntu, OSX? Was it multiboot or just a single OS? What bootloader did it have?" (http://reboot.pro/10126/#entry164956)


09:55:54 [COMMAND] tts on
09:55:54 [INFO] TTS set to ON
09:56:00 [COMMAND] SOURCE C:\Builder\source\win7_en_x86_sp1
09:56:00 [ACCEPTED] Defined source as Windows 7 Ultimate 32 bit en-US 6.1.7601.17514 with SP1 at location C:\Builder\source\win7_en_x86_sp1
09:56:20 [COMMAND] build
09:56:20 [COMMAND] BUILD CORE

xnx xnnxx xnx nn nnnnnnnnnnn nnnnnnnxxxx nnnnnnnnnnnnn
xnx xnnnx xnx nn nnnnnnnnnnx nnnnnnnnnnnx nnnnnnnnnnnnn
xnx xnxnx xnx xnx nn xxxnx nn
xnx xxxxxxx xnx xxx nn xnx nn
xnx xnx xnx xnx nn nn xxxxxx xxxx nn xnx nn
xnx xnx xnx xnx nn nnxxnnnnxx xnx nn xnx nn
xnx xxnx xnx xnx nn nnxxx xxnx xxxx nn xnx nn
xnx xnx xnx xnx nn nnx xnx xnx nn xxxxnx nnnnnnnnnnnn
xxxx xnx xnx xxxx nn nnx xnx xxxx nnnnnnnnnnnx nnnnnnnnnnnn
xnx xnx xnx xnx nn nn nn xnx nnnnnnnxxxx nn
xnx xnx xnx xnx nn nn nn xnx nn nn
xnx xnx xnx xnx nn nn nn xxx nn nn
xxxxxnx xnxxxxx nn nn nn xnx nn nn
xnxnx xnxnx nn nn nn xnx nn nn
xnxnx xnxnx nn nn nn xnx nn nn
xnnnx xnnnx nn nn nn xnx nn nnnnnnnnnnnnn
xnnxx xxnnx nn nn nn xnx nn nnnnnnnnnnnnn

reboot friends proudly present Win7PE

Source: Windows 7 Ultimate 32 bit en-US 6.1.7601.17514 with SP1

09:56:20 [STARTING] Asynchronously delete files from previous build
09:56:20 [CREATING] Basic ISO folder structure
09:56:20 [CREATING] Basic WIM folder structure
09:56:20 [OPENING] Source WIM archives
09:56:22 [FINISHED] Asynchronously deleted files from previous build
09:56:23 [ADDING] CORE: BaseHive
09:56:24 [ADDING] COMPONENT: Localise
09:56:25 [STARTING] Extract Basic Files from source WIMs to C:\Builder\output\wim-boot
09:57:00 [FINISHED] Extract Basic Files
09:57:00 [STARTING] Copy Components to C:\Builder\output\wim-boot
09:57:00 [INFO] Adding Win7PE x86 drivers..
09:57:00 [INFO] Adding Win7PE x86 plugins..
09:57:00 [ADDING] PLUGIN: NVDA
09:57:01 [ERROR] Error while interpreting C:\Builder\downloads\344-NVDA\main.bsh, the error message is: Sourced file: inline evaluation of: ``processHook();'' : Error in method invocation: Method startAtShell() not found in class'win7pecore.Win7PE' : at Line: 9 : in file: C:\Builder\downloads\344-NVDA\main.bsh : winpe .startAtShell ( )

09:57:01 [ADDING] COMPONENT: DriverPacks
09:57:02 [ADDING] COMPONENT: CustomDrivers
09:57:02 [ADDING] CORE: ShutDownPE
09:57:02 [ADDING] CORE: StartupCode
09:57:04 [ADDING] CORE: Grub4DOS
09:57:04 [CLOSING] Source WIM archives
09:57:05 [CLOSING] Target registry hives
09:57:07 [DONE] wim-boot directory built
09:57:07 [COMMAND] BUILD WIM
09:57:07 [STARTING] Creating a new WIM archive, using the files from wim-boot as source, compression "NONE"
09:57:08 [RUNNING] 5% done
09:57:08 [RUNNING] 15% done
09:57:09 [RUNNING] 25% done
09:57:09 [RUNNING] 35% done
09:57:09 [RUNNING] 47% done
09:57:10 [RUNNING] 57% done
09:57:10 [RUNNING] 72% done
09:57:11 [RUNNING] 82% done
09:57:11 [RUNNING] 92% done
09:57:12 [DONE] The WIM file is available at C:\Builder\output\bootdisk\sources\boot.wim and is sized in 266 Mb.
09:57:12 [COMMAND] BUILD ISO
09:57:13 [STARTING] Creating the ISO image
09:57:21 [DONE] The ISO file is available at C:\Builder\output\bootdisk.iso and is sized in 271 Mb.
09:57:21 [COMPLETED] Project build was concluded in 1 minute and 1 second.
> BUILD ISO

#15 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 10 May 2015 - 03:43 PM

Nvda is giving me eross!
09:57:00 [ADDING] PLUGIN: NVDA
09:57:01 [ERROR] Error while interpreting C:\Builder\downloads\344-NVDA\main.bsh, the error message is: Sourced file: inline evaluation of: ``processHook();'' : Error in method invocation: Method startAtShell() not found in class'win7pecore.Win7PE' : at Line: 9 : in file: C:\Builder\downloads\344-NVDA\main.bsh : winpe .startAtShell ( )

I think, that's my fault.

 

Will test and fix tomorrow.

 

Peter



#16 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 11 May 2015 - 08:02 PM

The bug is caught and fixed.

 

Needs some time for tests before publication.

 

Peter



#17 Jonas Voll

Jonas Voll

    Newbie

  • Members
  • 27 posts
  • Location:Wichita
  • Interests:Low vision, Computers, Blindness, Beer, Jeep's, & all the good stuff!
  •  
    United States

Posted 14 May 2015 - 03:42 PM

Hello I was looking at the command “Config xxx” using the web interface after typing config xxx a new window opens!
After filling in some info in the new window I find the submit button& press enter!
Where can I find the new file I just edited in my web browser?
If I look in Downloads > #-xxx > settings.xml, no change was made!

#18 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 May 2015 - 03:51 PM

When designing the new winbuilder we wanted to avoid one issue: When you download a new version, all current settings are reset to factory settings. The user must redefine all settings.

We use following solution:

The actual settings are a copy of the downloaded settings. The copy resides in <basedir>\lib\corefiles.
When installing a new version, the copy is not changed. So you hold your actual settings.

To see your changes, look at <basedir>\lib\corefiles\xxx.xml

Peter

EDIT: Sorry, This is for core components. I'm going to look for plugins

Edited by pscEx, 14 May 2015 - 04:01 PM.
New Knowledge


#19 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 May 2015 - 04:25 PM

Solved!

 

My first description is valid besides:

 

The actual settings for downloaded plugins are in <basedir>\downloads\cache\settings-<id>.xml

 

Peter






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users