Skip to content

Commit 146918e

Browse files
committed
Windows support for NetBeans project and easy make script
1 parent 4663c14 commit 146918e

File tree

5 files changed

+199
-17
lines changed

5 files changed

+199
-17
lines changed

make.sh

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ if [ "$1" == "--help" ]; then
1818
echo " --without-config | -c Do not copy config file to dist directory."
1919
echo " --without-doc | -d Do not generate documentation."
2020
echo " --without-exec | -e Do not make executable VTApi program (VTCli)."
21-
21+
# else if nbwinconfig
2222
else
2323
MAKETXT=Making
2424
for i in $*; do
2525
case $i in
26+
--remake|-r)
27+
REMAKE=1
28+
MAKETXT=Remaking
29+
;;
30+
2631
--without-config|-c)
2732
CONFIG=0
2833
;;
@@ -34,22 +39,27 @@ else
3439
--without-exec|-e)
3540
EXECUTABLE=0
3641
;;
37-
38-
--remake|-r)
39-
REMAKE=1
40-
MAKETXT=Remaking
41-
;;
4242
esac
4343
done
44+
45+
# Arguments of making depends of operating system, which is detected by uname
46+
if [ "`uname -s | grep "MINGW32_NT"`" != "" ]; then
47+
MAKEARGS=Windows
48+
echo "OS Windows was detected - making configuration is set to Windows..."
49+
else
50+
MAKEARGS=Debug
51+
echo "Not Windows OS was detected (most probably it is *nix-like OS) - making configuration is set to Debug..."
52+
fi
53+
MAKEARGS="-f Makefile CONF=$MAKEARGS"
4454

4555
# documentation
4656
if [ $REMAKE -eq 1 ]; then
47-
echo "Clean documentation..."
57+
echo "Cleaning documentation..."
4858
cd doc
4959
rm -rf html latex
5060
cd ..
5161
fi
52-
if [ $DOXYGEN -ne 0 ]; then
62+
if [ $DOXYGEN -eq 1 ]; then
5363
echo "Generating documentation..."
5464
cd doc
5565
doxygen
@@ -62,26 +72,24 @@ else
6272
if [ $REMAKE -eq 1 ]; then
6373
make clean
6474
fi
65-
make
75+
make $MAKEARGS
6676

6777
# libvtapi
6878
echo "$MAKETXT libvtapi..."
6979
cd ../../src
7080
if [ $REMAKE -eq 1 ]; then
7181
make clean
7282
fi
73-
make
83+
make $MAKEARGS
7484
cd ..
7585

7686
# VTApi executable
77-
if [ $EXECUTABLE -ne 0 ]; then
87+
if [ $REMAKE -eq 1 ]; then
88+
make clean
89+
fi
90+
if [ $EXECUTABLE -eq 1 ]; then
7891
echo "$MAKETXT executable vtapi (VTCli)..."
79-
make
80-
else
81-
if [ $REMAKE -eq 1 ]; then
82-
echo "Cleaning documentation because it is not required..."
83-
make clean
84-
fi
92+
make $MAKEARGS
8593
fi
8694

8795
# Configuration file
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configurationDescriptor version="69">
3+
<projectmakefile>Makefile</projectmakefile>
4+
<defaultConf>2</defaultConf>
5+
<confs>
6+
<conf name="Debug" type="1">
7+
<gizmo_options version="3">
8+
<profileOnRun>false</profileOnRun>
9+
<configurationname>GizmoSimple</configurationname>
10+
</gizmo_options>
11+
<runprofile version="6">
12+
<args>test</args>
13+
<rundir></rundir>
14+
<buildfirst>true</buildfirst>
15+
<console-type>1</console-type>
16+
<terminal-type>1</terminal-type>
17+
<remove-instrumentation>0</remove-instrumentation>
18+
<environment>
19+
</environment>
20+
</runprofile>
21+
</conf>
22+
<conf name="Release" type="1">
23+
<gizmo_options version="3">
24+
<configurationname>GizmoSimple</configurationname>
25+
</gizmo_options>
26+
<runprofile version="6">
27+
<args></args>
28+
<rundir></rundir>
29+
<buildfirst>true</buildfirst>
30+
<console-type>0</console-type>
31+
<terminal-type>0</terminal-type>
32+
<remove-instrumentation>0</remove-instrumentation>
33+
<environment>
34+
</environment>
35+
</runprofile>
36+
</conf>
37+
<conf name="Windows" type="1">
38+
<gizmo_options version="3">
39+
<configurationname>GizmoSimple</configurationname>
40+
</gizmo_options>
41+
<runprofile version="6">
42+
<args></args>
43+
<rundir></rundir>
44+
<buildfirst>true</buildfirst>
45+
<console-type>0</console-type>
46+
<terminal-type>0</terminal-type>
47+
<remove-instrumentation>0</remove-instrumentation>
48+
<environment>
49+
</environment>
50+
</runprofile>
51+
</conf>
52+
</confs>
53+
</configurationDescriptor>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configurationDescriptor version="69">
3+
<projectmakefile>Makefile</projectmakefile>
4+
<defaultConf>2</defaultConf>
5+
<confs>
6+
<conf name="Debug" type="2">
7+
<gizmo_options version="3">
8+
<configurationname>GizmoSimple</configurationname>
9+
</gizmo_options>
10+
<runprofile version="6">
11+
<args></args>
12+
<rundir></rundir>
13+
<buildfirst>true</buildfirst>
14+
<console-type>0</console-type>
15+
<terminal-type>0</terminal-type>
16+
<remove-instrumentation>0</remove-instrumentation>
17+
<environment>
18+
</environment>
19+
</runprofile>
20+
</conf>
21+
<conf name="Release" type="2">
22+
<gizmo_options version="3">
23+
<configurationname>GizmoSimple</configurationname>
24+
</gizmo_options>
25+
<runprofile version="6">
26+
<args></args>
27+
<rundir></rundir>
28+
<buildfirst>true</buildfirst>
29+
<console-type>0</console-type>
30+
<terminal-type>0</terminal-type>
31+
<remove-instrumentation>0</remove-instrumentation>
32+
<environment>
33+
</environment>
34+
</runprofile>
35+
</conf>
36+
<conf name="Windows" type="2">
37+
<gizmo_options version="3">
38+
<configurationname>GizmoSimple</configurationname>
39+
</gizmo_options>
40+
<runprofile version="6">
41+
<args></args>
42+
<rundir></rundir>
43+
<buildfirst>true</buildfirst>
44+
<console-type>0</console-type>
45+
<terminal-type>0</terminal-type>
46+
<remove-instrumentation>0</remove-instrumentation>
47+
<environment>
48+
</environment>
49+
</runprofile>
50+
</conf>
51+
</confs>
52+
</configurationDescriptor>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configurationDescriptor version="69">
3+
<projectmakefile>Makefile</projectmakefile>
4+
<defaultConf>2</defaultConf>
5+
<confs>
6+
<conf name="Debug" type="1">
7+
<gizmo_options version="3">
8+
<profileOnRun>false</profileOnRun>
9+
<configurationname>GizmoSimple</configurationname>
10+
</gizmo_options>
11+
<runprofile version="6">
12+
<args>test</args>
13+
<rundir></rundir>
14+
<buildfirst>true</buildfirst>
15+
<console-type>1</console-type>
16+
<terminal-type>1</terminal-type>
17+
<remove-instrumentation>0</remove-instrumentation>
18+
<environment>
19+
</environment>
20+
</runprofile>
21+
</conf>
22+
<conf name="Release" type="1">
23+
<gizmo_options version="3">
24+
<configurationname>GizmoSimple</configurationname>
25+
</gizmo_options>
26+
<runprofile version="6">
27+
<args></args>
28+
<rundir></rundir>
29+
<buildfirst>true</buildfirst>
30+
<console-type>0</console-type>
31+
<terminal-type>0</terminal-type>
32+
<remove-instrumentation>0</remove-instrumentation>
33+
<environment>
34+
</environment>
35+
</runprofile>
36+
</conf>
37+
<conf name="Windows" type="1">
38+
<gizmo_options version="3">
39+
<configurationname>GizmoSimple</configurationname>
40+
</gizmo_options>
41+
<runprofile version="6">
42+
<args></args>
43+
<rundir></rundir>
44+
<buildfirst>true</buildfirst>
45+
<console-type>0</console-type>
46+
<terminal-type>0</terminal-type>
47+
<remove-instrumentation>0</remove-instrumentation>
48+
<environment>
49+
</environment>
50+
</runprofile>
51+
</conf>
52+
</confs>
53+
</configurationDescriptor>

setwinconfig.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#
3+
# Set configuration for Netbeans on Windows OS of VTApi project
4+
# by Tomas Volf,
5+
# bugreport: ivolf(at)fit.vutbr.cz
6+
7+
8+
# copying NetBeans configuration files for Windows
9+
echo "Copying NetBeans config files for Windows..."
10+
for i in nbprivatecfg-win/*;
11+
do
12+
if [ ! -d "$i" ]; then
13+
continue
14+
fi
15+
cp -bfR "$i" ./
16+
done

0 commit comments

Comments
 (0)