Compare commits

...

6 Commits

Author SHA1 Message Date
WerWolv
72d5707d33 build: Bumped version to 1.34.0 2024-06-03 22:22:33 +02:00
WerWolv
a491b85737 build: Added simple script to generate release notes 2024-06-03 22:14:08 +02:00
Alexander Wilms
d9d85cbfcc impr: Added keywords to .desktop file (#1732)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
This adds a list of strings which may be used in addition to other
metadata to describe the application. This can be useful e.g. to
facilitate searching through entries.

Reference:
https://webcache.googleusercontent.com/search?q=cache:https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

(The original site is currently down due to a Gitlab upgrade)

These keywords are used by
[Flathub](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#launchable),
[KDE
Discover](https://discuss.kde.org/t/does-kde-discover-parse-the-desktop-file-for-categories-and-keywords/7041)
and [Gnome
Software](https://blogs.gnome.org/hughsie/2016/01/07/the-importance-of-keywords-for-the-software-center/).

### Implementation description
<!-- Explain what you did to correct the problem -->
Add a `Keywords` entry to the .desktop file.

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

Here's how the tags are displayed for TeXstudio on its Flathub page: 

![image](https://github.com/WerWolv/ImHex/assets/3226457/35e00272-433e-46cd-9a9e-c42913aefe3f)


### Additional things
<!-- Anything else you would like to say -->
2024-06-03 19:44:05 +02:00
iTrooz
283fe46230 git: Replace Ubuntu 23.04 with 24.04 LTS (#1731) 2024-06-03 17:25:50 +02:00
iTrooz
2c00aa5def fix: Do not use custom repo gcc 13 for Ubuntu because it doesn't run on vanilla Ubuntu (#1730) 2024-06-03 08:06:49 +00:00
iTrooz
984438e98d feat: show Linux distribution information on startup (#1729) 2024-06-03 10:02:29 +02:00
7 changed files with 88 additions and 8 deletions

View File

@@ -354,7 +354,7 @@ jobs:
matrix:
include:
- release_num: 22.04
- release_num: 23.04
- release_num: 24.04
name: 🐧 Ubuntu ${{ matrix.release_num }}
runs-on: ubuntu-latest
@@ -384,11 +384,6 @@ jobs:
apt update
bash dist/get_deps_debian.sh
apt install software-properties-common -y
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt update
apt install -y gcc-13 g++-13
- name: ⬇️ Install .NET
uses: actions/setup-dotnet@v4
with:
@@ -402,7 +397,7 @@ jobs:
git config --global --add safe.directory '*'
mkdir -p build
cd build
CC=gcc-13 CXX=g++-13 cmake -G "Ninja" \
CC=gcc-12 CXX=g++-12 cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \

View File

@@ -1 +1 @@
1.33.0
1.34.0

48
dist/gen_release_notes.py vendored Normal file
View File

@@ -0,0 +1,48 @@
import subprocess
import sys
def get_commits(branch: str, start_tag: str, end_tag: str) -> list[str]:
try:
commits_raw = subprocess.check_output([ "git", "--no-pager", "log", branch, "--no-color", "--pretty=oneline", "--abbrev-commit", f"{start_tag}..{end_tag}"], stderr=subprocess.DEVNULL).decode("UTF-8").split("\n")
except:
return []
commits = []
for line in commits_raw:
commits.append(line[9:])
return commits
def main(args: list) -> int:
if len(args) != 2:
print(f"Usage: {args[0]} prev_minor")
return 1
last_minor_version = f"v1.{args[1]}"
master_commits = get_commits("master", f"{last_minor_version}.0", "master")
for i in range(1, 100):
branch_commits = get_commits(f"releases/{last_minor_version}.X", f"{last_minor_version}.0", f"{last_minor_version}.{i}")
if len(branch_commits) == 0:
break
master_commits = [commit for commit in master_commits if commit not in branch_commits]
sorted_commits = {}
for commit in master_commits:
category, commit_name = commit.split(":", 1)
if category not in sorted_commits:
sorted_commits[category] = []
sorted_commits[category].append(commit_name)
for category in sorted_commits:
print(f"## {category}\n")
for commit in sorted_commits[category]:
print(f"- {commit}")
print(f"\n")
if __name__ == "__main__":
exit(main(sys.argv))

1
dist/imhex.desktop vendored
View File

@@ -8,3 +8,4 @@ Type=Application
StartupNotify=true
Categories=Development;IDE;
StartupWMClass=imhex
Keywords=static-analysis;reverse-engineering;disassembler;disassembly;hacking;forensics;hex-editor;cybersecurity;security;binary-analysis;

View File

@@ -597,6 +597,16 @@ namespace hex {
*/
std::string getArchitecture();
struct LinuxDistro {
std::string name;
std::string version;
};
/**
* @brief Gets information related to the Linux distribution, if running on Linux
*/
std::optional<LinuxDistro> getLinuxDistro();
/**
* @brief Gets the current ImHex version
* @return ImHex version

View File

@@ -15,6 +15,8 @@
#include <imgui.h>
#include <imgui_internal.h>
#include <set>
#include <fstream>
#include <algorithm>
#include <GLFW/glfw3.h>
#if defined(OS_WINDOWS)
@@ -742,6 +744,25 @@ namespace hex {
#endif
}
std::optional<LinuxDistro> getLinuxDistro() {
std::ifstream file("/etc/os-release");
std::string name;
std::string version;
std::string line;
while (std::getline(file, line)) {
if (line.find("PRETTY_NAME=") != std::string::npos) {
name = line.substr(line.find("=") + 1);
name.erase(std::remove(name.begin(), name.end(), '\"'), name.end());
} else if (line.find("VERSION_ID=") != std::string::npos) {
version = line.substr(line.find("=") + 1);
version.erase(std::remove(version.begin(), version.end(), '\"'), version.end());
}
}
return {{name, version}};
}
std::string getImHexVersion(bool withBuildType) {
#if defined IMHEX_VERSION
if (withBuildType) {

View File

@@ -43,6 +43,11 @@ int main(int argc, char **argv) {
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion());
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
log::info("Running on {} {} ({})", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture());
#if defined(OS_LINUX)
auto distro = ImHexApi::System::getLinuxDistro().value();
log::info("Linux distribution: {}. Version: {}", distro.name, distro.version == "" ? "None" : distro.version);
#endif
// Run ImHex
return init::runImHex();