Rev | Line | |
---|
[14982] | 1 | #!/bin/bash -x
|
---|
| 2 |
|
---|
| 3 | #create an object file (extension .o) for each file to bundle
|
---|
| 4 | objcopy -I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar build/greenstone3.jar.o
|
---|
| 5 |
|
---|
| 6 | #create a header file declaring the bundled files and their sizes
|
---|
| 7 | rm build/mywrapper.h
|
---|
| 8 | size=`du -b greenstone3.jar | sed 's/[^0-9].*//g'`
|
---|
| 9 | echo "extern const char greenstone3jar[$size];" >> build/mywrapper.h
|
---|
| 10 |
|
---|
| 11 | #compile the wrapper program
|
---|
| 12 | g++ -Wall -c -o build/mywrapper.o mywrapper.c
|
---|
| 13 |
|
---|
| 14 | #link, bundling the files to be bundled
|
---|
| 15 | g++ -o greenstone3 build/mywrapper.o build/greenstone3.jar.o
|
---|
Note:
See
TracBrowser
for help on using the repository browser.