Skip to content

Commit

Permalink
add version to start message
Browse files Browse the repository at this point in the history
  • Loading branch information
bakatrouble committed Feb 7, 2020
1 parent 4348035 commit 9de76a5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Refer to the LICENSE file included.
#
# libnx CMake template for Nintendo Switch homebrew development.
project(screenuploader)

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.8)
project(screenuploader)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(options)
Expand Down Expand Up @@ -45,7 +45,7 @@ set(APP_AUTHOR "bakatrouble")

set(VERSION_MAJOR 0)
set(VERSION_MINOR 0)
set(VERSION_MICRO 1)
set(VERSION_MICRO 8)
set(APP_VERSION
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}")

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)

configure_file(${SOURCE_DIR}/project.h.in ${SOURCE_DIR}/project.h)
file(GLOB SOURCE_FILES RELATIVE ${SOURCE_DIR}
"*.c"
"*.cc"
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "upload.hpp"
#include "utils.hpp"
#include "config.hpp"
#include "project.h"

using namespace std;

Expand Down Expand Up @@ -114,7 +115,7 @@ int main(int argc, char **argv) {
cerr.rdbuf(log.rdbuf());

cout << "=============================" << endl << endl << endl;
cout << "ScreenUploader is starting..." << endl;
cout << "ScreenUploader v" << APP_VERSION << " is starting..." << endl;

Result rc;
CapsAlbumStorage storage;
Expand Down
11 changes: 11 additions & 0 deletions src/project.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef INCLUDE_GUARD
#define INCLUDE_GUARD

#define APP_TITLE "screenuploader"
#define APP_AUTHOR "bakatrouble"
#define APP_VERSION "0.0.8"
#define VERSION_MAJOR "0"
#define VERSION_MINOR "0"
#define VERSION_MICRO "8"

#endif // INCLUDE_GUARD
11 changes: 11 additions & 0 deletions src/project.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef INCLUDE_GUARD
#define INCLUDE_GUARD

#define APP_TITLE "@APP_TITLE@"
#define APP_AUTHOR "@APP_AUTHOR@"
#define APP_VERSION "@APP_VERSION@"
#define VERSION_MAJOR "@VERSION_MAJOR@"
#define VERSION_MINOR "@VERSION_MINOR@"
#define VERSION_MICRO "@VERSION_MICRO@"

#endif // INCLUDE_GUARD

0 comments on commit 9de76a5

Please sign in to comment.