[ptx] HuginOSX.app Mac Carbon Application!!!
Ippei UKAI
ippei_ukai at mac.com
Thu Jun 17 23:32:11 BST 2004
Thank you for all the works in bringing hugin to mac and wx 2.5.
I have compiled current cvs into Carbon application, which means not
command line application that opens window anymore.
This is what I wanted from Xcode. (Just choosing "Carbon Application"
easily creates neat working APP.)
The layout of the main window is somehow messy, and does not work
except a few components.
But most of the menu command is fully functional (like Save
As/About/Help... stuff).
This app is not yet standalone as I cannot bundle the resource yet.
Probably wx's xrc sample will be the key hint for bringing it.
(But it may be also possible to bundle xrc and other resource files by
just copying into Application package, and let hugin find the Resources
directory by relative path.)
Anyway, take a look at the screen-shots.
http://homepage.mac.com/ippei_ukai/temp/HuginOSX1.pdf
http://homepage.mac.com/ippei_ukai/temp/HuginOSX2.pdf
For Panther users, here are the files should be added or changed in
hugin folder (where configure is).
http://homepage.mac.com/ippei_ukai/temp/HuginOSX-Xcode.zip
Changes (this "diff" thing is quite impressive... :)
Index: configure
===================================================================
RCS file: /cvsroot/hugin/hugin/configure,v
retrieving revision 1.11
diff -p -w -B -r1.11 configure
*** configure 12 May 2004 20:48:27 -0000 1.11
--- configure 17 Jun 2004 22:11:25 -0000
*************** configure - prepare hugin for compilatio
*** 11,21 ****
options:
--help this text
--prefix prefix install program to prefix
! --platform=(unix|win32) specify platform.
defaults to unix.
--gtk=(1|2) specify which gtk has been used to compile
wxwindows, default 1. Only used on unix
--debug enables debug output and assertations
EOF
}
--- 11,23 ----
options:
--help this text
--prefix prefix install program to prefix
! --platform=(unix|win32|mac) specify platform. (gtk on mac is unix)
defaults to unix.
--gtk=(1|2) specify which gtk has been used to compile
wxwindows, default 1. Only used on unix
--debug enables debug output and assertations
+ --cflags cflags Extra cflags eg. for mac "-I/sw/include
-I/usr/local/include/boost-1_31 -I/usr/local/include/pano12"
+ --xw=(2.4|2.5) specify wx version.
EOF
}
*************** my $prefix = "/usr/local";
*** 27,33 ****
$result = GetOptions ("prefix=s" => \$prefix, # string
"platform=s" => \$platform, # string
"debug" => \$debug, # flag
! "gtk-version" => \$gtk_vers, #string
"help" => \$help); # flag
if (!$result) {
--- 29,37 ----
$result = GetOptions ("prefix=s" => \$prefix, # string
"platform=s" => \$platform, # string
"debug" => \$debug, # flag
! "gtk-version=s" => \$gtk_vers, #string
! "wx-version=s" => \$wx_vers, #string
! "cflags=s" => \$USERS_CFLAGS, #string
"help" => \$help); # flag
if (!$result) {
*************** if (!$gtk_vers) {
*** 47,60 ****
$gtk_vers=1;
}
! if (!($platform eq "unix" || $platform eq "win32")) {
print "Invalid platform specified: $platform\n";
print_help();
exit(1);
}
! print "checking for wxwin32 2.4 or greater: ";
! $_ = `wx-config --version`;
chomp;
m/^(\d).(\d).(\d)/;
--- 51,80 ----
$gtk_vers=1;
}
! if (!$wx_vers) {
! $wx_vers=2.4;
! }
!
! if (!($platform eq "unix" || $platform eq "win32" || $platform eq
"mac")) {
print "Invalid platform specified: $platform\n";
print_help();
exit(1);
}
! if ($platform eq "unix" && $gtk_vers==2) {
! $WXPLATFORM = "gtk2d";
! } elsif ($platform eq "mac") {
! $WXPLATFORM = "mac";
! }
!
! if ($WXPLATFORM) {
! $WXCONFIG_COMMAND="wx" . $WXPLATFORM . "-" . $wx_vers . "-config";
! } else {
! $WXCONFIG_COMMAND="wx-config";
! }
!
! print "checking for wxwin 2.4 or greater: ";
! $_ = `$WXCONFIG_COMMAND --version`;
chomp;
m/^(\d).(\d).(\d)/;
*************** if (($1 == 2 && $2 >= 4) || $1 >2 ) {
*** 65,72 ****
exit(1);
}
! my $WXWIN_CFLAGS=`wx-config --cxxflags`;
! my $WXWIN_LFLAGS=`wx-config --libs`;
chomp($WXWIN_CFLAGS);
chomp($WXWIN_LFLAGS);
--- 85,93 ----
exit(1);
}
!
! my $WXWIN_CFLAGS=`$WXCONFIG_COMMAND --cxxflags`;
! my $WXWIN_LFLAGS=`$WXCONFIG_COMMAND --libs`;
chomp($WXWIN_CFLAGS);
chomp($WXWIN_LFLAGS);
*************** if ($debug) {
*** 75,89 ****
# $WXWIN_CFLAGS="$WXWIN_CFLAGS -D__WXDEBUG__";
$EXTRA_CFLAGS="$EXTRA_CFLAGS -g -DDEBUG";
} else {
! $EXTRA_CFLAGS="$EXTRA_CFLAGS -O2";
}
print "checking for xrc extension of wxwin.\n";
my $XRC_LFLAGS;
if ($platform eq "win32") {
! $XRC_LFLAGS="-lwx_msw_xrc-2.4";
} elsif ($platform eq "unix") {
! $XRC_LFLAGS="-lwx_gtk_xrc-2.4";
# add gtk path.
if ($gtk_vers == 1) {
$WXWIN_CFLAGS = $WXWIN_CFLAGS . " " . `gtk-config --cflags`;
--- 96,112 ----
# $WXWIN_CFLAGS="$WXWIN_CFLAGS -D__WXDEBUG__";
$EXTRA_CFLAGS="$EXTRA_CFLAGS -g -DDEBUG";
} else {
! $EXTRA_CFLAGS="$EXTRA_CFLAGS -O2" . " " . $USERS_CFLAGS;
}
print "checking for xrc extension of wxwin.\n";
my $XRC_LFLAGS;
if ($platform eq "win32") {
! $XRC_LFLAGS="-lwx_msw_xrc-" . $wx_vers;
! } elsif ($platform eq "mac") {
! $XRC_LFLAGS="-lwx_mac_xrc-" . $wx_vers;
} elsif ($platform eq "unix") {
! $XRC_LFLAGS="-lwx_gtk_xrc-" . $wx_vers;
# add gtk path.
if ($gtk_vers == 1) {
$WXWIN_CFLAGS = $WXWIN_CFLAGS . " " . `gtk-config --cflags`;
Index: UniversalCursor.cpp
===================================================================
RCS file: /cvsroot/hugin/hugin/src/hugin/UniversalCursor.cpp,v
retrieving revision 1.3
diff -p -w -B -r1.3 UniversalCursor.cpp
*** UniversalCursor.cpp 13 Jun 2004 22:03:13 -0000 1.3
--- UniversalCursor.cpp 17 Jun 2004 22:15:45 -0000
*************** UniversalCursor::UniversalCursor(const w
*** 241,247 ****
#else
! wxUniversalCursor::wxUniversalCursor(const wxImage & img)
: wxCursor(img)
{
--- 241,247 ----
#else
! UniversalCursor::UniversalCursor(const wxImage & img)
: wxCursor(img)
{
Index: panorama.h
===================================================================
RCS file: /cvsroot/hugin/hugin/src/PanoImage/panorama.h,v
retrieving revision 1.1
diff -p -w -B -r1.1 panorama.h
*** panorama.h 10 Jul 2003 23:39:50 -0000 1.1
--- panorama.h 17 Jun 2004 22:11:30 -0000
***************
*** 42,48 ****
// Create a definition if we're on a Macintosh:
#ifndef __Mac__
! #if (defined(macintosh) || defined(__MC68K__) ||
defined(__POWERPC__) || defined(__powerc))
#define __Mac__ 1
#define BIGENDIAN 1
#endif
--- 42,48 ----
// Create a definition if we're on a Macintosh:
#ifndef __Mac__
! #if (defined(macintosh) || defined(__MC68K__))
#define __Mac__ 1
#define BIGENDIAN 1
#endif
>>> 鵜飼 一平 (UKAI Ippei) >>>>>>>>>>>>>>>>>>>>>>>>>
My general e-mail and AIM: ippei_ukai at mac.com
Homepage: http://homepage.mac.com/ippei_ukai/
More information about the ptX
mailing list