Skip to content

Commit

Permalink
Move version number to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightkingale committed Apr 22, 2024
1 parent 3de0e19 commit c45a2c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TOPDIR ?= $(CURDIR)
APP_NAME := Wii U Account Swap
APP_SHORTNAME := Wii U Account Swap
APP_AUTHOR := Nightkingale
APP_VERSION := v1.0.0

include $(DEVKITPRO)/wut/share/wut_rules

Expand Down Expand Up @@ -49,7 +50,7 @@ CFLAGS := -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-align \
-O2 -fipa-pta -pipe -ffunction-sections \
$(MACHDEP)

CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ -DAPP_VERSION=\"$(APP_VERSION)\"

CXXFLAGS := $(CFLAGS)

Expand Down Expand Up @@ -144,7 +145,7 @@ all: $(BUILD)

$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile V=$(V)
@$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile V=$(V)

#-------------------------------------------------------------------------------
clean:
Expand Down
2 changes: 0 additions & 2 deletions include/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include <string>


extern const std::string VERSION_NUMBER;

extern const int BUFFER_SIZE;

extern unsigned int USER_ID;
Expand Down
1 change: 0 additions & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "../include/unlink.hpp"
#include "../include/utils.hpp"

const std::string VERSION_NUMBER = "v1.0.0"; // The current version number of the program.
const int BUFFER_SIZE = 0x2000; // The buffer size allocated for reading and writing files.

unsigned int USER_ID; // The current user persistant ID.
Expand Down
2 changes: 1 addition & 1 deletion source/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void printMainMenu() {
OSScreenClearBufferEx(SCREEN_DRC, 0x4A198500);

std::stringstream versionLine; // Create a stringstream to format the version line.
versionLine << "Wii U Account Swap (" << VERSION_NUMBER << ")";
versionLine << "Wii U Account Swap (" << APP_VERSION << ")";
int currentLength = versionLine.str().length();
int numSpaces = 56 - currentLength - 11; // 11 is the length of " Nightkingale"
for (int i = 0; i < numSpaces; i++) {
Expand Down

0 comments on commit c45a2c0

Please sign in to comment.