NifSkope for Mac

Meh! I've just tried recompiling Qt. It ran for *hours*, and then failed with problems linking to the mysql libraries.

And they wonder why Linux still hasn't made as the premier desktop solution yet! Any OS where you are required to rebuild software from source code and work out your own dependencies is DOOMED!
 
I use Parallels. You can choose from various levels of integration between OS X and Windows. At one extreme (the one I favour) you have Windows running in a separate OS X window. At the other extreme you can use 'Coherence' mode, where the Windows windows float among the OS X ones. You can even choose to have the windows displayed in OS X style, with the Close/Max/Min buttons on the left, looking like OS X ones. So they become almost indistinguishable from OS X ones. You can also choose the degree of file sharing, from separate home folders to a single shared home folder. And running Windows apps can appear in the dock, replacing the Windows start menu and so on.

I haven't looked at VMWare Fusion for a couple of years now, but I imagine it offers similar capabilities, since the two are head-to-head competitors.

Crossover saves you from having to have a Windows installation disk and license, as it emulates the Windows API. However, I have had poor experiences with its compatibility with the WIndows software I've tried to use. YMMV.

Nothing back from sedna yet, and I haven't had much time to investigate the problems further myself.

I've downloaded a trial of Fusion and set that up. It seems pretty cool, much more integrated and easy to use than I expected. I might see if there's a trial version of Parallels too and compare.

Meh! I've just tried recompiling Qt. It ran for *hours*, and then failed with problems linking to the mysql libraries.

And they wonder why Linux still hasn't made as the premier desktop solution yet! Any OS where you are required to rebuild software from source code and work out your own dependencies is DOOMED!

Agree completely. Linux is so ridiculously 'configurable' and 'open' that no setup of it is ever the same and requires far more knowledge than most computer users will ever be motivated to learn. I consider myself fairly computer literate and it certainly melts my brain.

It's why I like OSX so much. Most of the power and configurability of Unix is there if you need it, but it's wisely placed behind a very attractive, functional and intuitive 'default setup'.

Thanks so much for your efforts so far, I'll spare us both more compiling headaches by sticking with a virtualization option for now :)
 
I've now downloaded and installed the version 4.7.0 beta of the Qt binaries, having found various bug reports indicating that Mac compile problems are resolved in this version. If I now run sedna/Flintlock's NifSkope I get something that looks a lot like your error report ....

Code:
Process:         NifSkope [97549]
Path:            /Users/alan/Downloads/NifSkope_Mac/NifSkope_Intel.app/Contents/MacOS/NifSkope
Identifier:      NifSkope
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  launchd [343]

Date/Time:       2010-07-01 22:39:07.891 +0100
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Interval Since Last Report:          763116 sec
Crashes Since Last Report:           22
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      BFE4BA3E-603C-450F-9924-5BAC47540C89

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   QtGui                         	0x00899a26 QAbstractSlider::orientation() const + 6
1   QtGui                         	0x004c2b72 qt_aqua_get_known_size(QStyle::ContentsType, QWidget const*, QSize, QAquaWidgetSize) + 2018
2   QtGui                         	0x004c32fa QMacStylePrivate::aquaSizeConstrain(QStyleOption const*, QWidget const*, QStyle::ContentsType, QSize, QSize*) const + 90
3   QtGui                         	0x004c370f QMacStyle::sizeFromContents(QStyle::ContentsType, QStyleOption const*, QSize const&, QWidget const*) const + 175
4   NifSkope                      	0x000b09d4 FloatSlider::sizeHint() const + 180
5   NifSkope                      	0x000b01c0 FloatSlider::minimumSizeHint() const + 22
6   QtGui                         	0x0052a6bf qSmartMaxSize(QWidgetItem const*, QFlags<Qt::AlignmentFlag>) + 79
7   QtGui                         	0x0052cba5 QWidgetItem::maximumSize() const + 197
8   QtGui                         	0x009665bf QToolBarLayout::updateGeomArray() const + 895
9   QtGui                         	0x009670a2 QToolBarLayout::expandedSize(QSize const&) const + 1378
10  QtGui                         	0x00967199 QToolBarLayout::checkUsePopupMenu() + 169
11  QtGui                         	0x00964e4d QToolBar::event(QEvent*) + 253
12  QtGui                         	0x004f6b1c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 188
13  QtGui                         	0x004fe1a7 QApplication::notify(QObject*, QEvent*) + 327
14  QtCore                        	0x011ba0ac QCoreApplication::notifyInternal(QObject*, QEvent*) + 108
15  QtGui                         	0x0054fb64 QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) + 740
16  QtGui                         	0x00550185 QWidget::setParent(QWidget*) + 53
17  QtGui                         	0x00529402 QLayout::addChildWidget(QWidget*) + 578
18  QtGui                         	0x008ffa95 QMainWindowLayout::addToolBar(Qt::ToolBarArea, QToolBar*, bool) + 69
19  QtGui                         	0x008fc100 QMainWindow::addToolBar(Qt::ToolBarArea, QToolBar*) + 368
20  NifSkope                      	0x000307c4 NifSkope::NifSkope() + 9466
21  NifSkope                      	0x00033154 NifSkope::createWindow(QString const&) + 36
22  NifSkope                      	0x000332fe IPCsocket::openNif(QUrl const&) + 100
23  NifSkope                      	0x000338e3 IPCsocket::execCommand(QString const&) + 169
24  NifSkope                      	0x00034a45 main + 2075
25  NifSkope                      	0x00005726 _start + 216
26  NifSkope                      	0x0000564d start + 41

So it looks like it's not just you :)
 
I now have a NifSkope that runs on my Mac. I have hacked the NifSkope source to avoid a crash that happens in a Qt library. I assume the Qt bug has arisen from a change in OS X at 10.6.4.

My hack bypasses a scaling routine, and I think it means that the slider at the top of the main window, which I believe is related to animation, isn't displayed correctly.

Here is a copy of the compiled application. I'd be interested to know if it works for you.

Zipped NifScope
 
It works! :)
 
Great! I'll see if I can improve that slider.
 
I have built and uploaded a new version of NifSkope Mac with a better sized animation slider at the above link.

For the record, here's what I needed to do to compile and run NifSkope:

1. I have the Mac OS X developer tools on my Mac. If you don't, then you need to download and install them from Apple's Developer web site.

2. Download and install the Qt SDK. This is a simple Mac OSX installer in a disk image.

3. Download and install Git 1.7.1 for Leopard. This is a simple Mac OSX installer in a disk image.

4. Create a new folder called niftools. I have put it in my ~/Projects directory. It could be anywhere, but the following steps assume that's where it is.

5. In Terminal, type or copy/paste the following sequence of lines, each followed by return. Wait for the Terminal prompt to display after each one:

cd ~/Projects/niftools
git clone --recursive git://niftools.git.sourceforge.net/gitroot/niftools/nifskope
cd nifskope
./makeconfig.sh
/Developer/Tools/Qt/qmake

6. In Finder, open the newly created ~/Projects/niftools/nifskope folder.
Double click the file: NifSkope.xcodeproj.
This should open as an Xcode project.

7. The Project needs a few changes in order to build Nifskope correctly:

7.1 Include Cocoa,framework
Find /System/Library/Frameworks/Cocoa.framework in Finder.
Drag it into the 'External Frameworks and Libraries' group in the Xcode project window.

7.2 Add the XML files to the build
Find the following two files in the nifskope folder:

~/Projects/niftools/nifskope/docsys/nifxml/nif.xml
~/Projects/niftools/nifskope/docsys/kfmxml/kfm.xml

Drag each one onto 'NifSkope' in the Files and Groups list in the Xcode project window.
Highlight Bundle Resources in the Targets section of the Xcode project window.
Select the Project->New Build Phase->New Copy Files Build Phase menu item.
In the window that opens, select Destination: Executables. Close that window.
In the project window, drag the nif.xml and kfm.xml file icons to the new Copy Files item.

7.4 Workround for the Qt 'sizeFromContents()' crash
In the project window, select NifSkope->Sources->widgets->floatslider.cpp.
The source code for this file should display in the right hand window.
Use the function selection pop-up above the source code listing to find FloatSlider::sizeHint().
Change the last line of this function from:
Code:
return style()->sizeFromContents( QStyle::CT_Slider, &opt, QSize( w, h ), this ).expandedTo( QApplication::globalStrut() );
to:
Code:
return QSize( w*2, h*2 ).expandedTo( QApplication::globalStrut() );
To do a better job of fixing this, I probably need to build a debug version of the Qt frameworks.

7.3 Option: Target Leopard
I selected the Project->Edit Project Settings menu item and changed the 'Base SDK for All Configurations' pop-up to 'Mac OS X 10.5' instead of 'Current Mac OS' in order to build for Leopard, not just for 10.6.4. This isn't essential if you are only building for your own system.


8. Build the Application
Select 'Release' in the top left pop-up menu in the project window.
Hit the Build and Run button and go make coffee, spend quality time with your family, grow old ... while the compiler crunches the source code.

NifSkope should come up running at the end of all this. If not, retrace your steps and check for error messages. Please let me know what didn't work.

When it does build and run, you can find the built application in ~/Projects/niftools/nifskope/build/Release/NifSkope.app. Copy that to your /Applications directory for future use.

Or, install the Qt Mac OS X libraries and download the NifSkope copy I have built. There is no step 3. :)
 
Thanks for all that info Alan. I'm going to use your compiled version for now but I've learned a lot. Hopefully I'll be more able to handle such tasks by myself in future. A couple questions:

Are the OSX Developer Tools the same that are installed by the Xcode package on the disc that came with my computer?

It seemed to work fine without it but can you confirm that the opt/local/lib/libpng12.0.dylib that was talked about earlier in this thread is no longer necessary?
 
The OS X developer tools I have are the latest version. Xcode says it's version 3.2.3, and that's the version you can get at Apple's download page (free Apple Developer registration required). It was recently updated to support iPhone 4 development.

I guess the version you have on your OS X install disks will be pretty recent as you have a new Mac. I bought a new MBP in April, and it came with Xcode 3.2 which I'm sure would be capable of building NifSkope.

I'm not sure what that dylib was needed for. I still had the /opt/local/lib/ stuff on my system, but NifSkope only links to the Qt frameworks that are installed by the Qt SDK in /Library/Frameworks/. Just to be sure, I have put my entire /opt/ folder into the Trash and done a clean rebuild of Nifskope successfully.
 
I'm just saying I think he should be able to create the directory himself, since it doesn't exist, unless the app has any other dependencies from Macports that I'm not aware of (which I doubt.)
How do you create the directory, i had the same problem as him
 
Have you tried the copy I attached to Post #44?

As stated in my last paragraph of post #47 ...

Or, install the Qt Mac OS X libraries and download the NifSkope copy I have built. There is no step 3.

The Qt SDK installer is all you need for the Qt libraries
 
thanks for that
 
AlanH : any compatibility problem with Lion ?

I use your Nifskope for a while now ( Snow Leopard 10.6.8 for now ) and it works so fine I just fear a little bit about Lion compatibility. :D
 
Your guess is as good as mine.

I haven't touched Nifskope since the above work over a year ago. I don't actually use any of this stuff, I only - probably foolishly - took up a challenge to get it to work.

As it happens, I also don't run Lion on my main system yet. I have a laptop with Lion, but I haven't tried it there. I can't even recall what the dependencies were for it to work. For example, if it needs Java Runtime then you will need to install that yourself from Sun's site, because JRE doesn't come pre-installed in Lion.
 
I haven't noticed any problems so far with Nifskope on Lion.
 
Thanks to both of you for the answers i :)

Yes I wondered about java but if I have to re-install it after the upgrade, and if it is the "only" problem, then it's ok.

I don't call "foolish" a piece of software wich is a gem for mac modders !!! :lol:

Since I successed to install it, I don't have to install Parallels and gosh ... you don't imagine the spare of time it brings to my modding work ! :eek:

OK then. As I trust xyth a lot, going to install Lion now. And will do a feedback after it.

Modding on Mac only is a source of joy :king:
 
I don't call "foolish" a piece of software wich is a gem for mac modders !!! :lol:

The software isn't foolish, but I probably am for tilting at windmills :)
 
Don AlanH de la Mancha ... ;)

Just finished Lion install, just restarted and after a quick test, I can tell Nifskope is running just fine !

So thanks again to you and xyth for the fast answers :)
 
I can't believe I'm going to post after a 5 years post of mine :D Just to be curious ... what are the tools for modding now with the most recent OS X ?
 
I can't believe I'm going to post after a 5 years post of mine :D Just to be curious ... what are the tools for modding now with the most recent OS X ?

Nifskope still works fine on Sierra, as does Macapaka and Aorta (for converting to/from DDS).
 
Top Bottom