Use NotePad++ to create orca build script quickly

When creating orcascipt, usually I start from the existing PBT file which contains the huge lib list:

LibList "myapp_appl.pbl\\myapp_appl.pbl;myapp_attachment.pbl\\myapp_attachment.pbl;myapp_br.pbl\\myapp_br.pbl;myapp_casefile.pbl\\myapp_casefile.pbl;myapp_casefile_related.pbl\\myapp_casefile_related.pbl;myapp_dddw.pbl\\myapp_dddw.pbl;myapp_disciplinary_action.pbl\\myapp_disciplinary_action.pbl;myapp_licensee.pbl\\myapp_licensee.pbl;myapp_list.pbl\\myapp_list.pbl;myapp_mass_entry.pbl\\myapp_mass_entry.pbl;myapp_registration.pbl\\myapp_registration.pbl;myapp_report.pbl\\myapp_report.pbl;myapp_resource.pbl\\myapp_resource.pbl;myapp_schedule.pbl\\myapp_schedule.pbl;myapp_security.pbl\\myapp_security.pbl;myapp_ticket.pbl\\myapp_ticket.pbl;im_lls_rc_dws.pbl\\im_lls_rc_dws.pbl;im_lls_rc_rpt_dws.pbl\\im_lls_rc_rpt_dws.pbl;pies_shared.pbl\\pies_shared.pbl;reg_01.pbl\\reg_01.pbl;"

I want the orca format like this:

build executable "myapp.exe" "myapp.ico" "myapp.pbr" "yyyyyyyyyyyyyyyyyyy"

build Library "myapp_appl.pbl\myapp_appl.pbl" "" PBD
build Library "myapp_attachment.pbl\myapp_attachment.pbl" "" PBD
build Library "myapp_br.pbl\myapp_br.pbl" "" PBD
build Library "myapp_casefile.pbl\myapp_casefile.pbl" "" PBD
build Library "myapp_casefile_related.pbl\myapp_casefile_related.pbl" "" PBD
build Library "myapp_dddw.pbl\myapp_dddw.pbl" "" PBD
build Library "myapp_disciplinary_action.pbl\myapp_disciplinary_action.pbl" "" PBD
build Library "myapp_licensee.pbl\myapp_licensee.pbl" "" PBD
build Library "myapp_list.pbl\myapp_list.pbl" "" PBD
build Library "myapp_mass_entry.pbl\myapp_mass_entry.pbl" "" PBD
build Library "myapp_registration.pbl\myapp_registration.pbl" "" PBD
build Library "myapp_report.pbl\myapp_report.pbl" "" PBD
build Library "myapp_resource.pbl\myapp_resource.pbl" "" PBD
build Library "myapp_schedule.pbl\myapp_schedule.pbl" "" PBD
build Library "myapp_security.pbl\myapp_security.pbl" "" PBD
build Library "myapp_ticket.pbl\myapp_ticket.pbl" "" PBD
build Library "im_lls_rc_dws.pbl\im_lls_rc_dws.pbl" "" PBD
build Library "im_lls_rc_rpt_dws.pbl\im_lls_rc_rpt_dws.pbl" "" PBD
build Library "pies_shared.pbl\pies_shared.pbl" "" PBD
build Library "reg_01.pbl\reg_01.pbl" "" PBD

Here is how I did it in minutes of work, using NotePad++ relace with regexp:

  1. Replace step 1, this is easy, replace all \\ with \, and ‘;’ with “\n”
  2. Replace step 2, using regexp, replace all
    ^(.*)
    with
    build Library “\1” “” PBD
  3. Done.

Notepad++ reference: http://notepad-plus.sourceforge.net/uk/regExpList.php

Advertisements

One thought on “Use NotePad++ to create orca build script quickly

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s