-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a5a6226
Showing
81 changed files
with
3,641 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
nbproject/ | ||
CMakeFiles/ | ||
Releases/ | ||
build/ | ||
src/Version.h | ||
cmake_install.cmake | ||
CMakeCache.txt | ||
compile_commands.json | ||
Makefile | ||
moc_*.cpp | ||
nbteditor_automoc.cpp | ||
ui_*.h | ||
nbteditor | ||
nbteditor.exe | ||
.dep.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.1.0) | ||
|
||
project(nbteditor VERSION 1.0) | ||
set (NBTEDITOR_VERSION 1.0) | ||
|
||
find_package(Qt5Widgets) | ||
|
||
find_package( ZLIB REQUIRED ) | ||
if (ZLIB_FOUND) | ||
include_directories(${ZLIB_INCLUDE_DIRS}) | ||
endif(ZLIB_FOUND) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -finput-charset=UTF-8 -fexec-charset=UTF-8 -Wall") | ||
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/src/Version.h") | ||
|
||
set(nbteditor_res "${CMAKE_CURRENT_SOURCE_DIR}/resources/resources.qrc") | ||
# For Windows release build: set(nbteditor_res "${CMAKE_CURRENT_SOURCE_DIR}/resources/resources.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/resources/nbteditor.rc" "${CMAKE_CURRENT_SOURCE_DIR}/resources/qt_de.qm") | ||
file(GLOB_RECURSE nbteditor_src "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/UI/*.ui") | ||
|
||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src") | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/window") | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/resources") | ||
include_directories( ${CMAKE_BINARY_DIR} ) | ||
|
||
## set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE "RELEASE") | ||
|
||
# Tell CMake to create the nbteditor executable | ||
add_executable(nbteditor ${MOC_HEADERS} ${nbteditor_src} ${nbteditor_res}) | ||
# For Windows release build: add_executable(nbteditor WIN32 ${MOC_HEADERS} ${nbteditor_src} ${nbteditor_res}) | ||
|
||
# Use the Widgets module from Qt 5. | ||
target_link_libraries(nbteditor Qt5::Widgets ${ZLIB_LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# NBTEditor (1.0) | ||
A nbt editor software to edit minecraft binary files. Currently it can be used to edit .dat and .schematic files. | ||
![NBTEditor](Image.png) | ||
|
||
## Download | ||
- Windows Portable: http://dl.howaner.de/NBTEditor/1.0/NBTEditor.zip | ||
- Windows Installer: http://dl.howaner.de/NBTEditor/1.0/NBTEditor.msi | ||
- Ubuntu 16.04 Deb: http://dl.howaner.de/NBTEditor/1.0/nbteditor_1.0-1_amd64.deb | ||
|
||
|
||
## Used frameworks | ||
The software is written in C++ with the Qt5 framework and Zlib. | ||
|
||
## How to compile it on linux | ||
``` | ||
apt-get install build-essential qt5-default qttools5-dev-tools cmake zlib1g-dev | ||
mkdir build | ||
cmake .. | ||
make | ||
./nbteditor | ||
``` | ||
|
||
## How to compile it on windows | ||
1. Install qt5 developer framework with mingw-32 compiler | ||
2. Install cmake | ||
3. Compile static zlib library | ||
4. Follow linux introductions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SOURCES = src/UI/TreeContextMenu.cpp src/UI/AddElementDialog.ui src/UI/EditArrayDialog.ui src/UI/MainForm.ui src/UI/AboutDialog.ui src/UI/MainForm.cpp | ||
TRANSLATIONS = resources/qt_de.ts |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE TS> | ||
<TS version="2.1" language="de_DE"> | ||
<context> | ||
<name>AboutDialog</name> | ||
<message> | ||
<location filename="../src/UI/AboutDialog.ui" line="32"/> | ||
<source>About</source> | ||
<translation>Info</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/AboutDialog.ui" line="75"/> | ||
<source>NBT Editor v%1</source> | ||
<translation>NBT Editor v%1</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/AboutDialog.ui" line="91"/> | ||
<source><html><head/><body><p>Copyright © 2018 Franz Reiter<br/>Used Frameworks: Qt5, Zlib</p><p>License: GNU General Public License 3</p></body></html></source> | ||
<translation><html><head/><body><p>Copyright © 2018 Franz Reiter<br/>Benutzte Frameworks: Qt5, Zlib</p><p>Lizenz: GNU General Public License 3</p></body></html></translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/AboutDialog.ui" line="101"/> | ||
<source><html><head/><body><p><a href="https://nbt-editor.com"><span style=" text-decoration: underline; color:#2980b9;">Open Internet Site</span></a></p></body></html></source> | ||
<translation><html><head/><body><p><a href="https://nbt-editor.com"><span style=" text-decoration: underline; color:#2980b9;">Internet Seite öffnen</span></a></p></body></html></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>AddElementDialog</name> | ||
<message> | ||
<location filename="../src/UI/AddElementDialog.ui" line="23"/> | ||
<source>Add element</source> | ||
<translation>Element hinzufügen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/AddElementDialog.ui" line="35"/> | ||
<source>Name:</source> | ||
<translation>Name:</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/AddElementDialog.ui" line="45"/> | ||
<source>Type:</source> | ||
<translation>Typ:</translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>EditArrayDialog</name> | ||
<message> | ||
<location filename="../src/UI/EditArrayDialog.ui" line="14"/> | ||
<source>Edit array</source> | ||
<translation>Array bearbeiten</translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>MainForm</name> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="95"/> | ||
<source>&File</source> | ||
<translation>&Datei</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="105"/> | ||
<source>&Help</source> | ||
<translation>&Hilfe</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="115"/> | ||
<source>toolBar</source> | ||
<translation>Toolbar</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="136"/> | ||
<source>&Open</source> | ||
<translation>&Öffnen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="148"/> | ||
<source>&Save</source> | ||
<translation>&Speichern</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="160"/> | ||
<source>Save as ...</source> | ||
<translation>Speichern unter ...</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="169"/> | ||
<source>&New</source> | ||
<translation>&Neu</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.ui" line="178"/> | ||
<source>&About</source> | ||
<translation>&Info</translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>UI::MainForm</name> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="74"/> | ||
<source>Can't load file</source> | ||
<translation>Fehler beim Laden</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="74"/> | ||
<source>The NBT file could not be loaded: | ||
%1</source> | ||
<translation>Die NBT Datei konnte nicht geladen werden: | ||
%1</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="89"/> | ||
<source>Can't save file</source> | ||
<translation>Fehler beim Speichern</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="89"/> | ||
<source>The NBT data could not be saved: | ||
%1</source> | ||
<translation>The NBT data could not be saved: | ||
%1</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="107"/> | ||
<location filename="../src/UI/MainForm.cpp" line="119"/> | ||
<location filename="../src/UI/MainForm.cpp" line="150"/> | ||
<source>Are you sure?</source> | ||
<translation>Bist du sicher?</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="107"/> | ||
<location filename="../src/UI/MainForm.cpp" line="150"/> | ||
<source>Do you really want to load a new file? All previous changes will be lost.</source> | ||
<translation>Willst du wirklich eine neue Datei laden? Alle bisherigen Änderungen gehen verloren.</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="119"/> | ||
<source>Do you really want to create a new NBT document? All previous changes will be lost.</source> | ||
<translation>Willst du wirklich ein neues NBT Dokument erstellen? Alle bisherigen Änderungen gehen verloren.</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="155"/> | ||
<source>Open file</source> | ||
<translation>Datei öffnen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="155"/> | ||
<location filename="../src/UI/MainForm.cpp" line="180"/> | ||
<source>NBT File (*.dat);;All Files (*)</source> | ||
<translation>NBT Datei (*.dat);;Alle Dateien (*)</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/MainForm.cpp" line="180"/> | ||
<source>Save file</source> | ||
<translation>Datei speichern</translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>UI::TreeContextMenu</name> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="67"/> | ||
<source>Add to element</source> | ||
<translation>In Element einfügen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="70"/> | ||
<source>Insert below</source> | ||
<translation>Darunter hinzufügen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="73"/> | ||
<source>Edit</source> | ||
<translation>Bearbeiten</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="76"/> | ||
<source>Remove</source> | ||
<translation>Entfernen</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="154"/> | ||
<source>Element already exists</source> | ||
<translation>Element bereits vorhanden</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="154"/> | ||
<source>A element with the name %1 is already existing</source> | ||
<translation>Es gibt bereits ein Element mit dem Namen %1</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="201"/> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="213"/> | ||
<source>Invalid data</source> | ||
<translation>Fehlerhafte Daten</translation> | ||
</message> | ||
<message> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="201"/> | ||
<location filename="../src/UI/TreeContextMenu.cpp" line="213"/> | ||
<source>The input data is invalid.</source> | ||
<translation>Die Eingabedaten sind ungültig.</translation> | ||
</message> | ||
</context> | ||
</TS> |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
IDR_MAINFRAME ICON "resources/application.ico" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<RCC> | ||
<qresource prefix="general"> | ||
<file>logo.png</file> | ||
</qresource> | ||
<qresource prefix="languages"> | ||
<file>lang_de.qm</file> | ||
</qresource> | ||
<qresource prefix="icons"> | ||
<file>icon-edit.png</file> | ||
<file>icon-delete.png</file> | ||
<file>icon-add.png</file> | ||
<file>icon-insertbelow.png</file> | ||
</qresource> | ||
<qresource prefix="treeview_icons"> | ||
<file>stylesheet-vline.png</file> | ||
<file>stylesheet-branch-closed.png</file> | ||
<file>stylesheet-branch-end.png</file> | ||
<file>stylesheet-branch-more.png</file> | ||
<file>stylesheet-branch-open.png</file> | ||
</qresource> | ||
<qresource prefix="nbt_icons"> | ||
<file>nbt-double.png</file> | ||
<file>nbt-float.png</file> | ||
<file>nbt-byte.png</file> | ||
<file>nbt-array.png</file> | ||
<file>nbt-compound.png</file> | ||
<file>nbt-int.png</file> | ||
<file>nbt-list.png</file> | ||
<file>nbt-long.png</file> | ||
<file>nbt-short.png</file> | ||
<file>nbt-string.png</file> | ||
</qresource> | ||
</RCC> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
#include <string> | ||
|
||
namespace Exception { | ||
|
||
class Exception : public std::exception { | ||
|
||
public: | ||
explicit Exception(const char* message): msg(message) | ||
{ | ||
} | ||
|
||
explicit Exception(const std::string& message): msg(message) | ||
{ | ||
} | ||
|
||
virtual ~Exception() throw () {}; | ||
|
||
const std::string& GetMessage() const { return msg; } | ||
|
||
virtual const char* what() const throw() { | ||
return msg.c_str(); | ||
} | ||
|
||
protected: | ||
std::string msg; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
#include "Exception.h" | ||
|
||
namespace Exception { | ||
class FileException : public Exception { | ||
public: | ||
FileException(const char* error, const char* filePath, int ioErrorCode) | ||
: Exception("Exception while reading file " + std::string(filePath) + ": " + std::string(error) + ", code " + std::to_string(ioErrorCode)) | ||
{ | ||
} | ||
|
||
private: | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
#include "Exception.h" | ||
|
||
namespace Exception { | ||
class GzipException : public Exception { | ||
public: | ||
explicit GzipException(const char* message): Exception(message) | ||
{ | ||
} | ||
|
||
explicit GzipException(const std::string& message): Exception(message) | ||
{ | ||
} | ||
}; | ||
} |
Oops, something went wrong.