diff --git a/CMakeLists.txt b/CMakeLists.txt index 06043bc..76e3761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,17 @@ cmake_minimum_required(VERSION 3.8) project(CedarLogic) +set(CEDARLOGIC_MAJOR 2) +set(CEDARLOGIC_MINOR 3) +set(CEDARLOGIC_PATCH 5) + +add_definitions( + -DCEDARLOGIC_MAJOR=${CEDARLOGIC_MAJOR} + -DCEDARLOGIC_MINOR=${CEDARLOGIC_MINOR} + -DCEDARLOGIC_PATCH=${CEDARLOGIC_PATCH} +) + + ### ### *.cpp and *.h files ### @@ -221,9 +232,9 @@ set(CPACK_PACKAGE_NAME "CedarLogic") # UPDATE: You can change 'bin' to '.' by setting CPACK_NSIS_EXECUTABLES_DIRECTORY. set(CPACK_PACKAGE_EXECUTABLES ..\\\\CedarLogic "CedarLogic" ..\\\\Uninstall "Uninstall CedarLogic") set(CPACK_PACKAGE_VENDOR "Cedarville University") -set(CPACK_PACKAGE_VERSION_MAJOR "2") -set(CPACK_PACKAGE_VERSION_MINOR "3") -set(CPACK_PACKAGE_VERSION_PATCH "4") +set(CPACK_PACKAGE_VERSION_MAJOR "${CEDARLOGIC_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${CEDARLOGIC_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${CEDARLOGIC_PATCH}") set(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/cmake\\\\InstallSmall.bmp) set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/res/LICENSE.txt) set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/cmake\\\\icon.ico) diff --git a/README.md b/README.md index 52ae52e..dd94ea3 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,9 @@ CedarLogic is Cedarville University's digital logic simulator. Run `git tag` to view all the tagged versions of CedarLogic. v2.2017.01.16 - Buggy first release with busses. + v2.2017.01.18 - Fixed bugs. + v2.2017.05.02 - Borken version with lots of good, but enough bad to warrant abandonment. + v2.2018.01.26 - Branch from v2.2017.01.18, stable bus support with an installer and file associations. diff --git a/src/gui/MainFrame.cpp b/src/gui/MainFrame.cpp index 7cc285e..c92f850 100644 --- a/src/gui/MainFrame.cpp +++ b/src/gui/MainFrame.cpp @@ -733,6 +733,7 @@ void MainFrame::OnPaste(wxCommandEvent& event) { } void MainFrame::OnExportBitmap(wxCommandEvent& event) { + bool showGrid = false; wxMessageDialog gridDialog(this, "Export with Grid?", "Export", wxYES_DEFAULT | wxYES_NO | wxCANCEL | wxICON_QUESTION); switch (gridDialog.ShowModal()) { @@ -743,7 +744,20 @@ void MainFrame::OnExportBitmap(wxCommandEvent& event) { return; } + bool showColor = false; + wxMessageDialog colorDialog(this, "Export with Color?", "Export", wxYES_DEFAULT | wxYES_NO | wxCANCEL | wxICON_QUESTION); + switch (colorDialog.ShowModal()) { + case wxID_YES: + showColor = true; + break; + case wxID_CANCEL: + return; + } + wxBitmap bitmap = getBitmap(showGrid); + if (!showColor) { + bitmap = wxBitmap(bitmap.ConvertToImage().ConvertToGreyscale()); + } wxString caption = "Export Circuit"; wxString wildcard = "PNG (*.png)|*.png|JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|Bitmap (*.bmp)|*.bmp"; diff --git a/src/version.cpp b/src/version.cpp index a9a8fe8..e8e6fe3 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -4,8 +4,9 @@ using namespace std; namespace { - const int VERSION_MAJOR = 2; - const int VERSION_MINOR = 3; + const int VERSION_MAJOR = CEDARLOGIC_MAJOR; + const int VERSION_MINOR = CEDARLOGIC_MINOR; + const int VERSION_PATCH = CEDARLOGIC_PATCH; } string VERSION_NUMBER_STRING() { @@ -40,7 +41,8 @@ string VERSION_NUMBER_STRING() { // Version in format: "MAJOR.MINOR|YYYY-MM-DD HH:MM:SS" return std::to_string(VERSION_MAJOR) + "." + - std::to_string(VERSION_MINOR) + " | " + + std::to_string(VERSION_MINOR) + "." + + std::to_string(VERSION_PATCH) + " | " + year + "-" + month + "-" + day + " " + hms; } @@ -55,6 +57,7 @@ string VERSION_ABOUT_TEXT() { R"===( Copyright (c) 2007, Cedarville University, Benjamin Sprague, Matthew Lewellyn, David Knierim, Joshua Lansford, Nathan Harro. Copyright (c) 2017, Cedarville University, Tyler Drake, Julian Pernia, Jackson Vaugn, Colin Broberg. +Copyright (c) 2018, Cedarville University, Tyler Drake. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: