Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors on MacOS #223

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion NifSkope.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
TEMPLATE = app
TARGET = NifSkope

ICON = nifskope.icns

QT += xml opengl network widgets

# Require Qt 5.7 or higher
Expand Down Expand Up @@ -346,7 +348,7 @@ gli {
}

zlib {
!*msvc*:QMAKE_CFLAGS += -isystem ../nifskope/lib/zlib
!*msvc*:QMAKE_CFLAGS += -isystem ../nifskope/lib/zlib -DHAVE_UNISTD_H
!*msvc*:QMAKE_CXXFLAGS += -isystem ../nifskope/lib/zlib
else:INCLUDEPATH += lib/zlib
HEADERS += $$files($$PWD/lib/zlib/*.h, false)
Expand Down Expand Up @@ -498,7 +500,14 @@ win32:contains(QT_ARCH, i386) {

copyDirs( $$SHADERS, shaders )
#copyDirs( $$LANG, lang )

unix:!macx {
copyFiles( $$XML $$QSS )
}

macx {
copyFiles( $$XML $$QSS , "NifSkope.app/Contents/MacOS")
}

# Copy Readmes and rename to TXT
copyFiles( $$READMES,,,, md:txt )
Expand Down
4 changes: 3 additions & 1 deletion NifSkope_targets.pri
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ exists($$qhgen):GENERATE_QHP = YES

HAVE_DOT = NO
DOT_PATH = " " # Using space because sed on Windows errors on s%@DOT_PATH@%%g for some reason
exists($$dot) {
if(!isEmpty(dot)) {
exists($$dot) {
HAVE_DOT = YES
DOT_PATH = $$re_escape($${dot})
}
}

TAGS = $${PWD}/build/doxygen/tags
Expand Down
69 changes: 69 additions & 0 deletions kfm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE niftoolsxml>
<niftoolsxml version="0.7.0.0">

<version num="1.0">Civilization IV</version>
<version num="1.2.4b">Oblivion, Civilization IV, Pro Cycling Manager, The Guild 2, Prison Tycoon, Red Ocean, Loki</version><!--16927488-->
<version num="2.0.0.0b">Civilization IV, Sid Meier's Railroads</version>
<version num="2.1.0.0b">Emerge, Megami Tensei: Imagine</version>
<version num="2.2.0.0b">Emerge</version><!--33685515-->
<version num="2.2.0.1b">Dragonica</version><!--33685531-->

<compound name="IntermediateAnim">
<add name="Unknown Int" type="int" />
<add name="Event" type="SizedString" />
</compound>

<compound name="Transition">
<add name="Animation" type="int">Refers to another animation</add>
<add name="Type" type="int" />
<add name="Duration" type="float" cond="Type != 5" />
<add name="Num Intermediate Anims" type="int" cond="Type != 5" />
<add name="Intermediate Anims" type="IntermediateAnim" arr1="Num Intermediate Anims" cond="Type != 5" />
<add name="Num TextKeyPairs" type="int" cond="Type != 5" />
</compound>

<compound name="UnknownData">
<add name="String 1" type="SizedString" />
<add name="String 2" type="SizedString" />
<add name="Unk Float 1" type="float" />
<add name="Unk Float 2" type="float" />
<add name="Unk Float 3" type="float" />
<add name="Unk Float 4" type="float" />
</compound>

<compound name="UnknownData2">
<add name="String 1" type="SizedString" />
<add name="Unk Float" type="float" />
</compound>

<compound name="Animation">
<add name="Event Code" type="int" />
<add name="Name" type="SizedString" ver2="16927488" />
<add name="KF File Name" type="SizedString" />
<add name="Index" type="int">An index?</add>
<add name="Num Transitions" type="int" />
<add name="Transitions" type="Transition" arr1="Num Transitions">Max = Num Animations -1? No transition from animation to itself.</add>
<add name="Num Unknown Data" type="uint" ver1="33685531" ver2="33685531" />
<add name="Unknown Data" type="UnknownData" arr1="Num Unknown Data" ver1="33685531" ver2="33685531" />
<add name="Unknown Int" type="uint" ver1="33685531" ver2="33685531" />
<add name="Num Unknown Data 2" type="uint" ver1="33685531" ver2="33685531" />
<add name="Unknown Data 2" type="UnknownData2" arr1="Num Unknown Data 2" ver1="33685531" ver2="33685531" />
</compound>

<compound name="Kfm">
<add name="Header String" type="HeaderString" />
<add name="Unknown Byte" type="byte" ver1="33554432" />
<add name="NIF File Name" type="SizedString" ver1="16909312" />
<add name="Master" type="SizedString" ver1="16909312" />
<add name="Unknown Int 1" type="int" ver1="16909312" />
<add name="Unknown Int 2" type="int" ver1="16909312" />
<add name="Unknown Float 1" type="float" ver1="16909312" />
<add name="Unknown Float 2" type="float" ver1="16909312" />
<add name="Num Animations" type="int" ver1="16909312" />
<add name="Animations" type="Animation" arr1="Num Animations" ver1="16909312" />
<add name="Unknown Int 3" type="int" ver1="16909312" />
</compound>

</niftoolsxml>

Loading