Skip to content

Commit

Permalink
fixed with-ui merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy Schoenberg committed Jun 25, 2018
1 parent 0ef421b commit 3d0607a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
1 change: 1 addition & 0 deletions build/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ else
rm -f ./third_party/include/QtWidgets
ln -s -f $QTDIR/lib/QtWidgets.framework/Headers ./third_party/include/QtWidgets
fi
fi
2 changes: 1 addition & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi
export GYP_GENERATORS=$generator
export GYPDEFS="-Dqtdir=$QTDIR -Dwith_ui=$gyp_ui"

"./build/bin/gyp" -Dcwd=`pwd` $gypfile --toplevel-dir=`pwd` --depth=0
"./build/bin/gyp" -Dcwd=`pwd` $GYPDEFS $gypfile --toplevel-dir=`pwd` --depth=0
result=$?


Expand Down
26 changes: 26 additions & 0 deletions qt_generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
mkdir -p "$PWD/out/generated"

input_dir="$PWD/src"
output_dir="$PWD/out/generated"

echo "Generate QT files: $input_dir"

find $input_dir -name '*.h' | xargs grep -l 'Q_OBJECT' | sed 's/\.h$//' | while read f; do
output_file="${output_dir}/moc_$(basename $f).cpp"
if ! test -f ${output_file} || test $f.h -nt ${output_file}; then
$QTDIR/bin/moc -o ${output_file} $f.h
fi
done

find $input_dir -name '*.ui' | sed -e 's/\.ui$//' | while read f; do
output_file="${output_dir}/ui_$(basename $f).h"
if ! test -f ${output_file} || test $f.ui -nt ${output_file}; then
$QTDIR/bin/uic -o ${output_file} $f.ui
fi
done

find $input_dir -name '*.qrc' | sed -e 's/\.qrc$//' | while read f; do
output_file="${output_dir}/qrc_$(basename $f).cpp"
$QTDIR/bin/rcc -o ${output_file} $f.qrc -name $(basename $f)
done
25 changes: 1 addition & 24 deletions src/XMUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,36 +112,12 @@ int main(int argc, char* argv[])
// connections try to put them in the right place
m->AttachStragglers();



boost::filesystem::path p(argv[1]);
p.replace_extension(".xmile");

std::vector<std::string> errs;
m->WriteToXMILE(p.string(), errs);

BOOST_FOREACH(const std::string& err, errs)
{
std::cout << err << std::endl;
}

// mark variable types and potentially convert INTEG equations involving expressions
// into flows (a single net flow on the first pass though this)
m->MarkVariableTypes();

// if there is a view then try to make sure everything is defined in the views
// put unknowns in a heap in the first view at 20,20 but for things that have
// connections try to put them in the right place
m->AttachStragglers();



boost::filesystem::path p(argv[1]);
p.replace_extension(".xmile");

std::vector<std::string> errs;
m->WriteToXMILE(p.string(), errs);

BOOST_FOREACH(const std::string& err, errs)
{
std::cout << err << std::endl;
Expand All @@ -160,6 +136,7 @@ int main(int argc, char* argv[])
window.show();

ret = app.exec();
#endif
delete m ;
CloseUCaseMap() ;
//CheckMemoryTrack(1) ;
Expand Down

0 comments on commit 3d0607a

Please sign in to comment.