Skip to content
Permalink
Browse files

config: cmake-gui and build mode changing

  • Loading branch information...
TotallyNotElite committed Jun 19, 2019
1 parent b2c5fe8 commit 4cc77266c9a536cc86e5baf49ea1db0944075f59
Showing with 44 additions and 11 deletions.
  1. +1 −1 CMakeLists.txt
  2. +43 −10 config
@@ -147,7 +147,7 @@ configure_file(include/version.h.in ${CMAKE_SOURCE_DIR}/include/version.h @ONLY)

set(CMAKE_CXX_FLAGS "-m32 -march=native -fexceptions -fno-gnu-unique -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-rdynamic -ggdb -Og")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -s -fvisibility=hidden -fvisibility-inlines-hidden")

target_compile_definitions(cathook PRIVATE
_GLIBCXX_USE_CXX11_ABI=0
53 config
@@ -20,18 +20,51 @@ if [ "$exists" == false ]; then
./update
fi

response=$(dialog --keep-tite --title "Config" --menu "Select a config submenu:" 0 0 0 1 "Update channel" --output-fd 1)

if [ "$response" == 1 ]; then
response=$(dialog --keep-tite --title "Config" --menu "Select a config submenu:" 0 0 0 1 "Stable (Recommended)" 2 "Master (Bleeding Edge)" 3 "Developer (Possible git issues, doesn't wipe modified files)" --output-fd 1)
while true
do
response=$(dialog --keep-tite --title "Config" --menu "Select a config submenu:" 0 0 0 1 "Update channel" 2 "Build mode" 3 "CMake-GUI" --output-fd 1)
if [ "$response" == "" ]; then
break;
fi

if [ "$response" == 1 ]; then
cfg_write $configfile update_channel stable
response=$(dialog --keep-tite --title "Config" --menu "Select update channel" 0 0 0 1 "Stable (Recommended)" 2 "Master (Bleeding Edge)" 3 "Developer (Possible git issues, doesn't wipe modified files)" --output-fd 1)
if [ "$response" == 1 ]; then
cfg_write $configfile update_channel stable
elif [ "$response" == 2 ]; then
cfg_write $configfile update_channel master
elif [ "$response" == 3 ]; then
cfg_write $configfile update_channel developer
else
continue
fi
./update
elif [ "$response" == 2 ]; then
cfg_write $configfile update_channel master
if [ ! -x "$(command -v cmake)" ]; then
dialog --keep-tite --title "Config" --msgbox "CMake is not installed!" 0 0
continue
fi
response=$(dialog --keep-tite --title "Config" --menu "Select build mode" 0 0 0 1 "Release (Performance)" 2 "Debug (Debug Symbols)" --output-fd 1)
if [ "$response" == 1 ]; then
pushd build
cmake -DCMAKE_BUILD_TYPE=Release ..
popd
elif [ "$response" == 2 ]; then
pushd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
popd
else
continue
fi
./update
elif [ "$response" == 3 ]; then
cfg_write $configfile update_channel developer
else
exit 0
if [ ! -x "$(command -v cmake-gui)" ]; then
dialog --keep-tite --title "Config" --msgbox "CMake-GUI is not installed!" 0 0
continue
fi
pushd build
cmake-gui ..
popd
fi
./update
fi
done

0 comments on commit 4cc7726

Please sign in to comment.
You can’t perform that action at this time.