mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72d5707d33 | ||
|
|
a491b85737 | ||
|
|
d9d85cbfcc | ||
|
|
283fe46230 | ||
|
|
2c00aa5def | ||
|
|
984438e98d |
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -354,7 +354,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- release_num: 22.04
|
- release_num: 22.04
|
||||||
- release_num: 23.04
|
- release_num: 24.04
|
||||||
|
|
||||||
name: 🐧 Ubuntu ${{ matrix.release_num }}
|
name: 🐧 Ubuntu ${{ matrix.release_num }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -384,11 +384,6 @@ jobs:
|
|||||||
apt update
|
apt update
|
||||||
bash dist/get_deps_debian.sh
|
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
|
- name: ⬇️ Install .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
@@ -402,7 +397,7 @@ jobs:
|
|||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd 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_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
|||||||
48
dist/gen_release_notes.py
vendored
Normal file
48
dist/gen_release_notes.py
vendored
Normal 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
1
dist/imhex.desktop
vendored
@@ -8,3 +8,4 @@ Type=Application
|
|||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=Development;IDE;
|
Categories=Development;IDE;
|
||||||
StartupWMClass=imhex
|
StartupWMClass=imhex
|
||||||
|
Keywords=static-analysis;reverse-engineering;disassembler;disassembly;hacking;forensics;hex-editor;cybersecurity;security;binary-analysis;
|
||||||
|
|||||||
@@ -597,6 +597,16 @@ namespace hex {
|
|||||||
*/
|
*/
|
||||||
std::string getArchitecture();
|
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
|
* @brief Gets the current ImHex version
|
||||||
* @return ImHex version
|
* @return ImHex version
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include <imgui_internal.h>
|
#include <imgui_internal.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <fstream>
|
||||||
|
#include <algorithm>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(OS_WINDOWS)
|
||||||
@@ -742,6 +744,25 @@ namespace hex {
|
|||||||
#endif
|
#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) {
|
std::string getImHexVersion(bool withBuildType) {
|
||||||
#if defined IMHEX_VERSION
|
#if defined IMHEX_VERSION
|
||||||
if (withBuildType) {
|
if (withBuildType) {
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ int main(int argc, char **argv) {
|
|||||||
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion());
|
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion());
|
||||||
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
|
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
|
||||||
log::info("Running on {} {} ({})", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture());
|
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
|
// Run ImHex
|
||||||
return init::runImHex();
|
return init::runImHex();
|
||||||
|
|||||||
Reference in New Issue
Block a user