+if [[ -f vg.conf ]]; then
+ source vg.conf
+else
+ error "Directory is not a VG project"
+ exit 1
+fi
+
+detect_os(){
+ if [[ "$OSTYPE" != "linux-gnu"* ]]; then
+ host_os=win32
+ target_os_windows
+ else
+ host_os=linux
+ target_os_linux
+ fi
+}
+
+detect_os
+
+titleit " vgc ver: $vg_version\n host: $host_os"
+logit " assets: $opt_assets"
+logit " shaders: $opt_shaders"
+logit " release: $opt_release"
+logit " play: $opt_play"
+logit " build-linux: $opt_linux"
+logit "build-windows: $opt_windows"
+logit " build-tools: $opt_tools"
+logit " steam: $opt_steam"
+logit " miniaudio: $opt_recompile_mini_audio"
+
+# Main build steps
+
+if [ $opt_tools = true ]; then detect_os; compile_tools; fi
+if [ $opt_assets = true ]; then compile_assets; fi
+if [ $opt_shaders = true ]; then compile_shaders; fi
+if [ $opt_linux = true ]; then target_os_linux; compile_main; fi
+if [ $opt_windows = true ]; then
+ target_os_windows
+ compile_main
+
+ cp $vg_root/dep/glfw/glfw3.dll $target_dir/glfw3.dll
+fi
+
+success "Build completed (check compiler results)"
+
+if [ $opt_play = true ]; then
+
+ if [ $host_os = linux ]; then
+ target_os_linux
+ else
+ target_os_windows
+ fi
+
+ echo ""
+ logit "======= exec: $target_dir/$vg_target$target_ext ======="
+ echo ""
+
+ cd $target_dir
+ ./$vg_target$target_ext
+ cd ./../
+
+fi