Browse files

Fixed automated library dump

Automated library dump is working on EAGLE-6.0.3 on Windows.
  • Loading branch information...
1 parent f9d1178 commit 39b4b02cbc591183dbfd7d62f6f39689cf6e424a @Gussy Gussy committed Dec 11, 2012
Showing with 30 additions and 12 deletions.
  1. +0 −1 .gitignore
  2. +14 −0 Library/_dump_library.bat
  3. +13 −9 Library/lbrdump.ulp
  4. +3 −2
@@ -6,4 +6,3 @@
# EAGLE Library Files
@@ -0,0 +1,14 @@
+REM Path to the eagle binaries
+set EAGLE_PATH=C:\Program Files (x86)\EAGLE-6.3.0\bin\
+set LIBRARY_PATH=%~dp0
+REM Delete all existing scripts
+DEL *.scr
+REM Generates full eagle script of entire library
+"%EAGLE_PATH%eagle.exe" -C'EXPORT SCRIPT _full_library.scr; QUIT' C:\Users\Angus\Dropbox\Electronics\Eagle\lbr\OmniLoco.lbr
+REM Run the ULP dump script
+"%EAGLE_PATH%eagle.exe" -C'RUN %LIBRARY_PATH%\lbrdump.ulp %LIBRARY_PATH% _full_library.scr; QUIT;' C:\Users\Angus\Dropbox\Electronics\Eagle\lbr\OmniLoco.lbr
@@ -1,6 +1,13 @@
-#usage "exports the library as an script, chop it into (managable) pieces"
+#usage "exports the library as an script, chop it into (managable) pieces, run from command line only"
// Written by Chris van Dongen for Dangerous Prototypes
+// updated by angus peart for OmniLoco
+// NOTICE: This script is only for use from the command line, there is no GUI
+// USAGE: lbrdump.ulp path script
+// path = The path to where the full library script is
+// script = The full library script file
// copied MakeValidFileName from written by Francesco Montorsi <>
@@ -32,12 +39,9 @@ string notadded="Skipped:";
string added="Added:";
int numFiles;
-// some info :)
-dlgMessageBox("!This script will take an export>script from a library and splits it into small scripts. This will (hopefully) prevent overwritting parts other people added and help the svn to track. If a small script already exist it will not be exported!!!");
// ask user for script
-fname = dlgFileOpen("Select the library.scr", "", "*.scr");
-path = filedir(fname);
+path = filedir(argv[1]);
+fname = argv[2];
// read scripts in directory
numFiles=fileglob(files, path + "*.scr");
@@ -137,8 +141,8 @@ while(!stop)
// display the ones we (didn't) add
-if(notadded!="Skipped:") dlgMessageBox(notadded);
-if(added!="Added:") dlgMessageBox(added);
+//if(notadded!="Skipped:") dlgMessageBox(notadded);
+//if(added!="Added:") dlgMessageBox(added);
// thank you for flying DP airlines..
@@ -26,13 +26,14 @@ part of the library, rather than simply tracking one monolithic binary file.
Exporting the library must be done before every commit which which includes changes to the
library. This process could be automated, although it's much easier to do it by hand for now.
-### Building the library
+### Building the library from this repo
1. Open a new library (or open an existing OmniLoco library)
2. Run the lbrbuild.ulp script (located in the `Library` directory)
3. Point to the generated (or downloaded from git) `librarydefaults.scr` when prompted
4. All the packages/devices/symbols are added to the new/existing library
-### Exporting the library
+### Exporting the library after making changes
+0. If you are on Windows and using EAGLE 6.3.0 you can use the `Library/_dump_library.bat` script
1. Open the OmniLoco library
2. File > Export > Script (This will generate one large script with all the devices in it)
3. Save it to the `Library` directory as `_full_library.scr`

0 comments on commit 39b4b02

Please sign in to comment.