forked from wxphp/wxphp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregen.sh
executable file
·41 lines (33 loc) · 1.03 KB
/
regen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Script to regenerate the sources.
# Check if running script from wxphp root
if [ ! -e "php_wxwidgets.h" ]; then
echo "php_wxwidgets.h not found: Please run this script from the wxphp root directory"
exit 1
fi
# Copy the most recent classes binding file
cp tools/source_maker/class_selector/classes.json json
# Enter code generator directory
cd tools/source_maker/
# Run the code generator
php code_generator.php
# Copy non dynamic template files
rm ./../../includes/app.h
rm ./../../src/app.cpp
cp source_templates/app.h ./../../includes/
cp source_templates/app.cpp ./../../src/
rm ./../../includes/references.h
rm ./../../src/references.cpp
cp source_templates/references.h ./../../includes/
cp source_templates/references.cpp ./../../src/
# Return to main source directory
cd ../../
echo ""
echo "================================================="
echo "Sources successfully regenerated. To compile use:"
echo ""
echo " phpize"
echo " ./configure"
echo " make"
echo ""
echo "================================================="