mirror of
https://github.com/exelix11/SwitchThemeInjector.git
synced 2024-11-23 01:39:54 +00:00
Move version string to a separate object file, finish build scripts, create github CI for theme installer
This commit is contained in:
parent
c350c4422e
commit
f772269ca1
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -1,2 +1,5 @@
|
||||
# Shell scripts should use LF
|
||||
*.sh text eol=lf
|
||||
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
* text=auto
|
26
.github/workflows/InstallerBuild.yml
vendored
Normal file
26
.github/workflows/InstallerBuild.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: InstallerBuild
|
||||
on:
|
||||
push:
|
||||
branches: [ master, githubCI ]
|
||||
paths:
|
||||
- SwitchThemesNX/**
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- SwitchThemesNX/**
|
||||
jobs:
|
||||
InstallerBuild:
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkita64:latest
|
||||
steps:
|
||||
- name: Checkout master branch
|
||||
run: git clone --recursive https://github.com/exelix11/SwitchThemeInjector.git $GITHUB_WORKSPACE
|
||||
|
||||
- name: Launch build script
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/SwitchThemesNX/
|
||||
scripts/cibuild.sh -j4
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Built
|
||||
path: Built.7z
|
@ -1,3 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Remove the object file containing the version string
|
||||
rm build/Version.o
|
||||
|
||||
ver=$(git describe --always --abbrev=40 --dirty)
|
||||
make all "GITVER=${ver}" $@
|
9
SwitchThemesNX/scripts/cibuild.sh
Normal file
9
SwitchThemesNX/scripts/cibuild.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Remove the object file containing the version string
|
||||
rm build/Version.o
|
||||
|
||||
ver=$(git describe --always --abbrev=40 --dirty)
|
||||
make all "GITVER=CI-${ver}" $@
|
||||
7z a -y -mx=7 Built.7z SwitchThemesNX.nro SwitchThemesNX.elf
|
@ -1,4 +1,5 @@
|
||||
#include "TextPage.hpp"
|
||||
#include "../Version.hpp"
|
||||
#include "../ViewFunctions.hpp"
|
||||
#include "../UI/imgui/imgui_internal.h"
|
||||
|
||||
@ -33,8 +34,8 @@ void TextPage::Update()
|
||||
}
|
||||
|
||||
CreditsPage::CreditsPage() :
|
||||
creditsText("NXThemes installer by exelix - " + VersionString + " - Core Ver." + SwitchThemesCommon::CoreVer +
|
||||
"\nCommit: " GITVER +
|
||||
creditsText("NXThemes installer by exelix - " + Version::Name + " - Core Ver." + SwitchThemesCommon::CoreVer +
|
||||
'\n' + Version::Commit +
|
||||
"\nSource: github.com/exelix11/SwitchThemeInjector"+
|
||||
"\nDonations: ko-fi.com/exelix11\n\n")
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "UI.hpp"
|
||||
#include "../ViewFunctions.hpp"
|
||||
#include "../Version.hpp"
|
||||
#include "../Platform/Platform.hpp"
|
||||
|
||||
using namespace std;
|
||||
@ -107,7 +108,7 @@ void TabRenderer::Render(int X, int Y)
|
||||
}
|
||||
|
||||
TabRenderer::TabRenderer() :
|
||||
Title("NXThemes Installer " + VersionString)
|
||||
Title("NXThemes Installer " + Version::Name)
|
||||
{
|
||||
CurrentControl = nullptr;
|
||||
}
|
||||
|
8
SwitchThemesNX/source/Version.cpp
Normal file
8
SwitchThemesNX/source/Version.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
#include "Version.hpp"
|
||||
|
||||
#ifndef GITVER
|
||||
#define GITVER "Unknown version"
|
||||
#endif
|
||||
|
||||
const std::string Version::Name = "Ver. 2.5.1";
|
||||
const std::string Version::Commit = "Commit: " GITVER;
|
7
SwitchThemesNX/source/Version.hpp
Normal file
7
SwitchThemesNX/source/Version.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace Version {
|
||||
extern const std::string Name;
|
||||
extern const std::string Commit;
|
||||
}
|
@ -7,11 +7,6 @@
|
||||
#include "UI/DialogPages.hpp"
|
||||
#include "Platform/Platform.hpp"
|
||||
|
||||
#ifndef GITVER
|
||||
#define GITVER "Unknown version"
|
||||
#endif
|
||||
|
||||
const std::string VersionString = "Ver. 2.5.1";
|
||||
extern std::string SystemVer;
|
||||
|
||||
void PushPage(IUIControlObj* page);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <filesystem>
|
||||
#include <variant>
|
||||
|
||||
#include "Version.hpp"
|
||||
#include "UI/UIManagement.hpp"
|
||||
#include "UI/UI.hpp"
|
||||
#include "Platform/Platform.hpp"
|
||||
@ -215,7 +216,7 @@ class QuitPage : public IPage
|
||||
void ShowFirstTimeHelp(bool WelcomeScr)
|
||||
{
|
||||
if (WelcomeScr)
|
||||
DialogBlocking("Welcome to NXThemes Installer " + VersionString + "!\n\nThese pages contains some important informations, it's recommended to read them carefully.\nThis will only show up once, you can read it again from the Credits tab.");
|
||||
DialogBlocking("Welcome to NXThemes Installer " + Version::Name + "!\n\nThese pages contains some important informations, it's recommended to read them carefully.\nThis will only show up once, you can read it again from the Credits tab.");
|
||||
|
||||
DialogBlocking(
|
||||
"Custom themes CANNOT brick your console because they're installed only on the SDcard. \n"
|
||||
|
Loading…
Reference in New Issue
Block a user