Skip to content

Commit 36ebfdd

Browse files
committed
Merge pull request #13 from amorilia/release/1.1.3
Preparing 1.1.3 release.
2 parents 1ba7221 + cd9ae74 commit 36ebfdd

13 files changed

Lines changed: 305 additions & 113 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Makefile.Debug
44
Makefile.Release
55
moc_*.cpp
66
qrc_*.cpp
7+
ui_*.h
78

89
# compiled
910
*.o
@@ -13,6 +14,9 @@ qrc_*.cpp
1314
.cproject
1415
.settings
1516

17+
# qtcreator
18+
NifSkope.pro.user
19+
1620
# binary
1721
NifSkope
1822

CHANGELOG.TXT

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
== CHANGELOG ==
22

3-
This is version 1.1.2 of NifSkope.
3+
This is version 1.1.3 of NifSkope.
4+
5+
changes since 1.1.2:
6+
* Fix accidently broken xml for Fallout 3 (contributed by ttl269).
7+
* Qmake getting git hash no longer relies on git executable.
8+
* Code refactor: xml for ui of about form.
9+
* Fix for registry entry proliferation (niftools issue #3584193, reported by neomonkeus).
410

511
changes since 1.1.1:
612
* When combining material properties, keep original material names as much as possible (reported by koniption).

NifSkope.pro

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,26 @@ DESTDIR = .
2828
DEFINES += NIFSKOPE_VERSION=\\\"$$cat(VERSION)\\\"
2929

3030
# build NIFSKOPE_REVISION macro
31-
unix {
32-
system(git --version > /dev/null 2>&1):DEFINES += NIFSKOPE_REVISION=\\\"$$system(git log -1 --pretty=format:%h)\\\"
33-
else:DEFINES += NIFSKOPE_REVISION=\\\"unknown\\\"
31+
GIT_HEAD = $$cat(.git/HEAD)
32+
# at this point GIT_HEAD either contains commit hash, or symbolic ref:
33+
# GIT_HEAD = 303c05416ecceb3368997c86676a6e63e968bc9b
34+
# GIT_HEAD = ref: refs/head/feature/blabla
35+
contains(GIT_HEAD, "ref:") {
36+
# resolve symbolic ref
37+
GIT_HEAD = .git/$$member(GIT_HEAD, 1)
38+
# GIT_HEAD now points to the file containing hash,
39+
# e.g. .git/refs/head/feature/blabla
40+
exists($$GIT_HEAD) {
41+
GIT_HEAD = $$cat($$GIT_HEAD)
42+
} else {
43+
clear(GIT_HEAD)
44+
}
3445
}
35-
win32 {
36-
system(git --version > NUL 2>&1):DEFINES += NIFSKOPE_REVISION=\\\"$$system(git log -1 --pretty=format:%h)\\\"
37-
else:DEFINES += NIFSKOPE_REVISION=\\\"unknown\\\"
46+
count(GIT_HEAD, 1) {
47+
# single component, hopefully the commit hash
48+
# fetch first seven characters (abbreviated hash)
49+
GIT_HEAD ~= s/^(.......).*/\\1/
50+
DEFINES += NIFSKOPE_REVISION=\\\"$$GIT_HEAD\\\"
3851
}
3952

4053
HEADERS += \
@@ -115,7 +128,8 @@ HEADERS += \
115128
widgets/refrbrowser.h \
116129
widgets/uvedit.h \
117130
widgets/valueedit.h \
118-
widgets/xmlcheck.h
131+
widgets/xmlcheck.h \
132+
ui/about_dialog.h
119133

120134
SOURCES += \
121135
basemodel.cpp \
@@ -196,11 +210,15 @@ SOURCES += \
196210
widgets/refrbrowser.cpp \
197211
widgets/uvedit.cpp \
198212
widgets/valueedit.cpp \
199-
widgets/xmlcheck.cpp
213+
widgets/xmlcheck.cpp \
214+
ui/about_dialog.cpp
200215

201216
RESOURCES += \
202217
nifskope.qrc
203218

219+
FORMS += \
220+
ui/about_dialog.ui
221+
204222
fsengine {
205223
DEFINES += FSENGINE
206224
HEADERS += \

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.2
1+
1.1.3

config.h

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4343
* Include this if you want to access the current version or persistent QSettings.
4444
*/
4545

46-
//! QSettings keys for older versions of nifskope
47-
/*!
48-
* Add versions to this list (most recent first) whenever incrementing NIFSKOPE_VERSION
49-
*/
50-
const QStringList NIFSKOPE_OLDERVERSIONS = (QStringList()
51-
<< "NifSkope-1.0.22"
52-
<< "NifSkope-1.0.21"
53-
<< "NifSkope-1.0.20"
54-
<< "NifSkope-1.0.19"
55-
<< "NifSkope-1.0.18"
56-
<< "NifSkope-1.0.17"
57-
<< "NifSkope-1.0.16"
58-
<< "NifSkope-1.0.15"
59-
<< "NifSkope-1.0.14"
60-
<< "NifSkope-1.0.13"
61-
<< "NifSkope-1.0.12"
62-
<< "NifSkope-1.0.11"
63-
<< "NifSkope-1.0.10"
64-
<< "NifSkope-1.0.9"
65-
<< "NifSkope-1.0.8"
66-
<< "NifSkope-1.0.7"
67-
<< "NifSkope-1.0.6"
68-
<< "NifSkope-1.0.5"
69-
<< "NifSkope");
70-
7146
//! Create or use a QSettings variable for nifskope
72-
#define NIFSKOPE_QSETTINGS(config) QSettings config( "NifTools", "NifSkope-"NIFSKOPE_VERSION )
47+
#define NIFSKOPE_QSETTINGS(config) QSettings config( "NifTools", "NifSkope" )
7348

7449
#endif

docsys

Submodule docsys updated from 52bbd89 to cf44594

linux-install/maketarball.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ FILES="NifSkope.pro \
7272
shaders/*.vert
7373
nifexpr.cpp
7474
nifexpr.h
75+
ui/*.h
76+
ui/*.cpp
77+
ui/*.ui
7578
lang/*.ts
7679
lang/*.qm
7780
qhull.h

linux-install/nifskope.spec.in

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ make %{?_smp_mflags}
2626

2727
%install
2828
rm -rf $RPM_BUILD_ROOT
29-
%{__install} -Dp -m0755 nifskope $RPM_BUILD_ROOT/%{_bindir}/nifskope
29+
%{__install} -Dp -m0755 release/nifskope $RPM_BUILD_ROOT/%{_bindir}/nifskope
3030
%{__install} -Dp -m0644 nifskope.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/nifskope.png
3131
%{__install} -d $RPM_BUILD_ROOT/%{_datadir}/nifskope/doc
3232
%{__install} -d $RPM_BUILD_ROOT/%{_datadir}/nifskope/shaders
@@ -81,6 +81,21 @@ rm -rf $RPM_BUILD_ROOT
8181
%{!?_without_freedesktop:%{_datadir}/applications/%{desktop_vendor}-nifskope.desktop}
8282

8383
%changelog
84+
* Sat Nov 17 2012 amorilia - 1.1.3-1
85+
- Fix accidently broken xml for Fallout 3 (contributed by ttl269).
86+
- Qmake getting git hash no longer relies on git executable.
87+
- Code refactor: xml for ui of about form.
88+
- Fix for registry entry proliferation (niftools issue #3584193, reported by neomonkeus).
89+
* Sun Oct 28 2012 amorilia - 1.1.2-1
90+
- When combining material properties, keep original material names as much as possible (reported by koniption).
91+
- Fix display of transformed havok shapes (reported by koniption).
92+
- Skyrim material updates (contributed by ttl269).
93+
- Skyrim body part updates.
94+
- Document sane defaults for Skyrim bhkRigidBody "Unknown 7 Shorts" (reported by ttl296).
95+
- Rename: binormals are now more accurately called bitangents.
96+
- Collada export improvements (contributed by mharj).
97+
- Support node culling by regular expression in collada/obj export (contributed by mharj).
98+
- Fix block order of bhkCompressedMeshShapeData (reported by ttl269).
8499
* Mon Oct 1 2012 amorilia - 1.1.1-1
85100
- Fix unsigned int enum issue.
86101
* Tue Sep 18 2012 amorilia - 1.1.0-1

nifskope.cpp

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -101,84 +101,30 @@ FSManager * fsmanager = 0;
101101

102102
//! \file nifskope.cpp The main file for NifSkope
103103

104-
void NifSkope::copySettings(QSettings & cfg, const QSettings & oldcfg, const QString name) const
105-
{
106-
if ((!cfg.contains(name)) && oldcfg.contains(name)) {
107-
//qDebug() << "copying nifskope setting" << name;
108-
cfg.setValue(name, oldcfg.value(name));
109-
}
110-
}
111-
112104
void NifSkope::migrateSettings() const
113105
{
114106
// load current nifskope settings
115107
NIFSKOPE_QSETTINGS(cfg);
116-
// do nothing if already migrated; this prevents re-importing of corrupt / otherwise not-working values
117-
if( cfg.contains( "migrated" ) ) return;
118-
// check for older nifskope settings
119-
for (QStringList::ConstIterator it = NIFSKOPE_OLDERVERSIONS.begin(); it != NIFSKOPE_OLDERVERSIONS.end(); ++it ) {
120-
QSettings oldcfg( "NifTools", *it );
121-
// check for missing keys and copy them from old settings
122-
QStringList keys = oldcfg.allKeys();
108+
// check if we are running a new version of nifskope
109+
if (cfg.value("version").toString() != NIFSKOPE_VERSION) {
110+
// check all keys and delete all binary ones
111+
//to prevent portability problems between Qt versions
112+
QStringList keys = cfg.allKeys();
123113
for (QStringList::ConstIterator key = keys.begin(); key != keys.end(); ++key) {
124-
//qDebug() << "checking" << *key << oldcfg.value(*key).type();
125-
switch (oldcfg.value(*key).type()) {
126-
case QVariant::Bool:
127-
case QVariant::ByteArray:
128-
case QVariant::Color:
129-
case QVariant::Double:
130-
case QVariant::Int:
131-
case QVariant::String:
132-
case QVariant::StringList:
133-
case QVariant::UInt:
134-
// copy settings for these types
135-
copySettings(cfg, oldcfg, *key);
136-
default:
137-
; // do nothing
114+
if (cfg.value(*key).type() == QVariant::ByteArray) {
115+
qDebug() << "removing config setting" << *key
116+
<< "whilst migrating settings from previous nifskope version";
117+
cfg.remove(*key);
138118
}
139119
}
120+
// set version key to current version
121+
cfg.setValue("version", NIFSKOPE_VERSION);
140122
}
141-
cfg.setValue( "migrated", 1 );
142123
}
143124

144125
/*
145126
* main GUI window
146127
*/
147-
148-
void NifSkope::about()
149-
{
150-
QString text = tr(
151-
"<p style='white-space:pre'>NifSkope is a tool for analyzing and editing NetImmerse/Gamebryo '.nif' files.</p>"
152-
"<p>NifSkope is based on NifTool's XML file format specification. "
153-
"For more information visit our site at <a href='http://niftools.sourceforge.net'>http://niftools.sourceforge.net</a></p>"
154-
"<p>NifSkope is free software available under a BSD license. "
155-
"The source is available via <a href='http://niftools.git.sourceforge.net/git/gitweb.cgi?p=niftools/nifskope'>git</a> "
156-
"(<a href='git://niftools.git.sourceforge.net/gitroot/niftools/nifskope'>clone</a>) on <a href='http://sourceforge.net'>SourceForge</a>. "
157-
"Instructions on compiling NifSkope are available on the <a href='http://niftools.sourceforge.net/wiki/NifSkope/Compile'>NifTools wiki</a>.</p>"
158-
"<p>The most recent version of NifSkope can always be downloaded from the <a href='https://sourceforge.net/projects/niftools/files/nifskope/'>"
159-
"NifTools SourceForge Project page</a>.</p>"
160-
// only the windows build uses havok
161-
// (Q_OS_WIN32 is also defined on win64)
162-
#ifdef Q_OS_WIN32
163-
"<center><img src=':/img/havok_logo' /></center>"
164-
"<p>NifSkope uses Havok(R) for the generation of mopp code. "
165-
"(C)Copyright 1999-2008 Havok.com Inc. (and its Licensors). "
166-
"All Rights Reserved. "
167-
"See <a href='http://www.havok.com'>www.havok.com</a> for details.</p>"
168-
#endif
169-
"<center><img src=':/img/qhull_logo' /></center>"
170-
"<p>NifSkope uses Qhull for the generation of convex hulls. "
171-
"Copyright(c) 1993-2010 C.B. Barber and The Geometry Center. "
172-
"Qhull is free software and may be obtained from <a href='http://www.qhull.org'>www.qhull.org</a>. "
173-
"See Qhull_COPYING.txt for details."
174-
);
175-
176-
QMessageBox mb( tr("About NifSkope %1 (revision %2)").arg(NIFSKOPE_VERSION).arg(NIFSKOPE_REVISION), text, QMessageBox::Information,
177-
QMessageBox::Ok + QMessageBox::Default, 0, 0, this);
178-
mb.setIconPixmap( QPixmap( ":/res/nifskope.png" ) );
179-
mb.exec();
180-
}
181-
182128
void NifSkope::sltResetBlockDetails()
183129
{
184130
if (tree)
@@ -188,6 +134,9 @@ void NifSkope::sltResetBlockDetails()
188134
NifSkope::NifSkope()
189135
: QMainWindow(), selecting( false ), initialShowEvent( true )
190136
{
137+
// init UI parts
138+
aboutDialog = new AboutDialog(this);
139+
191140
// migrate settings from older versions of NifSkope
192141
migrateSettings();
193142

@@ -351,7 +300,7 @@ NifSkope::NifSkope()
351300
connect( aNifToolsDownloads, SIGNAL( triggered() ), this, SLOT( openURL() ) );
352301

353302
aNifSkope = new QAction( tr("About &NifSkope"), this );
354-
connect( aNifSkope, SIGNAL( triggered() ), this, SLOT( about() ) );
303+
connect( aNifSkope, SIGNAL( triggered() ), aboutDialog, SLOT( open() ) );
355304

356305
aAboutQt = new QAction( tr("About &Qt"), this );
357306
connect( aAboutQt, SIGNAL( triggered() ), qApp, SLOT( aboutQt() ) );

nifskope.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class QUdpSocket;
6363

6464
#include "message.h"
6565

66+
#include "ui/about_dialog.h"
67+
6668
//! \file nifskope.h The main header for NifSkope
6769

6870
//! The main application class for NifSkope.
@@ -130,9 +132,6 @@ public slots:
130132
//! A slot for starting the XML checker.
131133
void sltShredder();
132134

133-
//! Display the "About NifSkope" window.
134-
void about();
135-
136135
//! Reset "block details"
137136
void sltResetBlockDetails();
138137

@@ -183,15 +182,12 @@ protected slots:
183182
void initDockWidgets();
184183
void initToolBars();
185184
void initMenu();
185+
186+
//! "About NifSkope" dialog.
187+
QWidget *aboutDialog;
186188

187189
void setViewFont( const QFont & );
188190

189-
//! Copy settings from one config to another, without overwriting keys.
190-
/*!
191-
* This is a helper function for migrateSettings().
192-
*/
193-
void copySettings(QSettings & cfg, const QSettings & oldcfg, const QString name) const;
194-
195191
//! Migrate settings from older versions of nifskope.
196192
void migrateSettings() const;
197193

0 commit comments

Comments
 (0)