Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
fb3d74c1
Commit
fb3d74c1
authored
Nov 17, 2011
by
brukie
Browse files
mac fixes
parent
6b18ba6b
Changes
5
Hide whitespace changes
Inline
Side-by-side
cockatrice/cockatrice.pro
View file @
fb3d74c1
...
@@ -202,6 +202,6 @@ win32 {
...
@@ -202,6 +202,6 @@ win32 {
}
}
macx
{
macx
{
ICON
=
resources
/
appicon
.
icns
ICON
=
resources
/
appicon
.
icns
CONFIG
+=
x86_64
release
CONFIG
+=
x86
ppc
x86_64
release
LIBS
+=
-
bind_at_load
LIBS
+=
-
bind_at_load
}
}
cockatrice/src/phasestoolbar.cpp
View file @
fb3d74c1
...
@@ -167,31 +167,33 @@ void PhasesToolbar::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*
...
@@ -167,31 +167,33 @@ void PhasesToolbar::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*
painter
->
fillRect
(
boundingRect
(),
QColor
(
50
,
50
,
50
));
painter
->
fillRect
(
boundingRect
(),
QColor
(
50
,
50
,
50
));
}
}
const
double
PhasesToolbar
::
marginSize
=
3
;
void
PhasesToolbar
::
rearrangeButtons
()
void
PhasesToolbar
::
rearrangeButtons
()
{
{
for
(
int
i
=
0
;
i
<
buttonList
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
buttonList
.
size
();
++
i
)
buttonList
[
i
]
->
setWidth
(
symbolSize
);
buttonList
[
i
]
->
setWidth
(
symbolSize
);
nextTurnButton
->
setWidth
(
symbolSize
);
nextTurnButton
->
setWidth
(
symbolSize
);
double
y
=
margin
;
double
y
=
margin
Size
;
buttonList
[
0
]
->
setPos
(
margin
,
y
);
buttonList
[
0
]
->
setPos
(
margin
Size
,
y
);
buttonList
[
1
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
1
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
buttonList
[
2
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
2
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
y
+=
ySpacing
;
y
+=
ySpacing
;
buttonList
[
3
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
3
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
y
+=
ySpacing
;
y
+=
ySpacing
;
buttonList
[
4
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
4
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
buttonList
[
5
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
5
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
buttonList
[
6
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
6
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
buttonList
[
7
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
7
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
buttonList
[
8
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
8
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
y
+=
ySpacing
;
y
+=
ySpacing
;
buttonList
[
9
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
9
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
y
+=
ySpacing
;
y
+=
ySpacing
;
buttonList
[
10
]
->
setPos
(
margin
,
y
+=
symbolSize
);
buttonList
[
10
]
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
y
+=
ySpacing
;
y
+=
ySpacing
;
y
+=
ySpacing
;
y
+=
ySpacing
;
nextTurnButton
->
setPos
(
margin
,
y
+=
symbolSize
);
nextTurnButton
->
setPos
(
margin
Size
,
y
+=
symbolSize
);
}
}
void
PhasesToolbar
::
setHeight
(
double
_height
)
void
PhasesToolbar
::
setHeight
(
double
_height
)
...
@@ -199,9 +201,9 @@ void PhasesToolbar::setHeight(double _height)
...
@@ -199,9 +201,9 @@ void PhasesToolbar::setHeight(double _height)
prepareGeometryChange
();
prepareGeometryChange
();
height
=
_height
;
height
=
_height
;
ySpacing
=
(
height
-
2
*
margin
)
/
(
buttonCount
*
5
+
spaceCount
);
ySpacing
=
(
height
-
2
*
margin
Size
)
/
(
buttonCount
*
5
+
spaceCount
);
symbolSize
=
ySpacing
*
5
;
symbolSize
=
ySpacing
*
5
;
width
=
symbolSize
+
2
*
margin
;
width
=
symbolSize
+
2
*
margin
Size
;
rearrangeButtons
();
rearrangeButtons
();
}
}
...
...
cockatrice/src/phasestoolbar.h
View file @
fb3d74c1
...
@@ -44,7 +44,7 @@ private:
...
@@ -44,7 +44,7 @@ private:
double
width
,
height
,
ySpacing
,
symbolSize
;
double
width
,
height
,
ySpacing
,
symbolSize
;
static
const
int
buttonCount
=
12
;
static
const
int
buttonCount
=
12
;
static
const
int
spaceCount
=
6
;
static
const
int
spaceCount
=
6
;
static
const
double
margin
=
3
;
static
const
double
margin
Size
;
void
rearrangeButtons
();
void
rearrangeButtons
();
public:
public:
PhasesToolbar
(
QGraphicsItem
*
parent
=
0
);
PhasesToolbar
(
QGraphicsItem
*
parent
=
0
);
...
...
oracle/oracle.pro
View file @
fb3d74c1
...
@@ -10,7 +10,6 @@ HEADERS += src/oracleimporter.h src/window_main.h ../cockatrice/src/carddatabase
...
@@ -10,7 +10,6 @@ HEADERS += src/oracleimporter.h src/window_main.h ../cockatrice/src/carddatabase
SOURCES
+=
src
/
main
.
cpp
src
/
oracleimporter
.
cpp
src
/
window_main
.
cpp
..
/
cockatrice
/
src
/
carddatabase
.
cpp
..
/
cockatrice
/
src
/
settingscache
.
cpp
SOURCES
+=
src
/
main
.
cpp
src
/
oracleimporter
.
cpp
src
/
window_main
.
cpp
..
/
cockatrice
/
src
/
carddatabase
.
cpp
..
/
cockatrice
/
src
/
settingscache
.
cpp
macx
{
macx
{
#
CONFIG
+=
x86
ppc
CONFIG
+=
x86
ppc
x86_64
release
CONFIG
+=
x86_64
release
LIBS
+=
-
bind_at_load
LIBS
+=
-
bind_at_load
}
}
prepareMacRelease.sh
0 → 100644
View file @
fb3d74c1
#!/bin/sh
FRAMEWORKS
=
"Core Gui Multimedia Network Svg Xml Script"
DATE
=
`
date
'+%Y%m%d'
`
#QTDIR="/Users/brukie/QtSDK/Desktop/Qt/474/gcc"
QTLIB
=
"/usr/local/Qt4.7/lib"
QTPLUGINS
=
"/usr/local/Qt4.7/plugins"
DIR
=
cockatrice_mac_
$DATE
if
[
-d
$DIR
]
;
then
echo
"delete old dir first"
;
exit
1
;
fi
mkdir
$DIR
cp
-R
cockatrice/cockatrice.app
$DIR
cp
-R
oracle/oracle.app
$DIR
mkdir
$DIR
/decks
mkdir
$DIR
/pics
mkdir
$DIR
/Frameworks
cp
-R
sounds zonebg
$DIR
cp
-R
$QTPLUGINS
$DIR
/PlugIns
for
f
in
$FRAMEWORKS
;
do
cp
-R
$QTLIB
/Qt
"
$f
"
.framework
$DIR
/Frameworks
done
find
$DIR
/Frameworks
-name
'*debug*'
|xargs
-n
1
rm
-f
find
$DIR
/Frameworks
-name
'Headers'
|xargs
-n
1
rm
-rf
find
$DIR
/PlugIns
-name
'*debug*'
|xargs
-n
1
rm
-f
cd
$DIR
for
f
in
$FRAMEWORKS
;
do
echo
"Framework
$f
"
echo
"step 1"
install_name_tool
-id
@executable_path/../../../Frameworks/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
Frameworks/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
for
g
in
$FRAMEWORKS
;
do
install_name_tool
-change
$QTLIB
/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
@executable_path/../../../Frameworks/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
Frameworks/Qt
"
$g
"
.framework/Versions/4/Qt
"
$g
"
done
echo
"step 2"
for
g
in
cockatrice oracle
;
do
install_name_tool
-change
$QTLIB
/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
@executable_path/../../../Frameworks/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
"
$g
"
.app/Contents/MacOS/
$g
done
echo
"step 3"
for
g
in
`
find
.
-name
'*.dylib'
`
;
do
install_name_tool
-change
$QTLIB
/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
@executable_path/../../../Frameworks/Qt
"
$f
"
.framework/Versions/4/Qt
"
$f
"
"
$g
"
done
done
cd
..
VOL
=
cockatrice_mac_
${
DATE
}
DMG
=
"tmp-
$VOL
.dmg"
SIZE
=
`
du
-sk
$DIR
|
cut
-f1
`
SIZE
=
$((${
SIZE
}
/
1000
+
10
))
hdiutil create
"
$DMG
"
-megabytes
${
SIZE
}
-ov
-type
UDIF
-fs
HFS+
-volname
"
$VOL
"
hdid
"
$DMG
"
cp
-R
"
${
DIR
}
"
"/Volumes/
$VOL
"
hdiutil detach
"/Volumes/
$VOL
"
#osascript -e "tell application "Finder" to eject disk "$VOL"" &&
# convert to compressed image, delete temp image
rm
-f
"
${
VOL
}
.dmg"
hdiutil convert
"
$DMG
"
-format
UDZO
-o
"
${
VOL
}
.dmg"
rm
-f
"
$DMG
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment