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
377433b5
Commit
377433b5
authored
Jun 12, 2014
by
Fabio Bas
Browse files
CPack generator; removed old prepareMacRelease.sh
By now tested on OSX only
parent
1260ccc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
377433b5
...
@@ -79,11 +79,51 @@ set(CMAKE_AUTOMOC TRUE)
...
@@ -79,11 +79,51 @@ set(CMAKE_AUTOMOC TRUE)
# Find other needed libraries
# Find other needed libraries
FIND_PACKAGE
(
Protobuf REQUIRED
)
FIND_PACKAGE
(
Protobuf REQUIRED
)
# Package builder
set
(
CPACK_PACKAGE_CONTACT
"Daenyth+github@gmail.com"
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
${
PROJECT_NAME
}
)
set
(
CPACK_PACKAGE_VENDOR
"Cockatrice Development Team"
)
set
(
CPACK_PACKAGE_DESCRIPTION_FILE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/README.md"
)
set
(
CPACK_RESOURCE_FILE_LICENSE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/COPYING"
)
set
(
CPACK_PACKAGE_VERSION_MAJOR
"
${
PROJECT_VERSION_MAJOR
}
"
)
set
(
CPACK_PACKAGE_VERSION_MINOR
"
${
PROJECT_VERSION_MINOR
}
"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"
${
PROJECT_VERSION_PATCH
}
"
)
if
(
UNIX
)
if
(
APPLE
)
set
(
CPACK_GENERATOR DragNDrop
${
CPACK_GENERATOR
}
)
set
(
CPACK_GENERATOR
"DragNDrop"
)
set
(
CPACK_DMG_FORMAT
"UDBZ"
)
set
(
CPACK_DMG_VOLUME_NAME
"
${
PROJECT_NAME
}
"
)
set
(
CPACK_SYSTEM_NAME
"OSX"
)
set
(
CPACK_PACKAGE_FILE_NAME
"
${
PROJECT_NAME
}
-
${
PROJECT_VERSION
}
"
)
set
(
CPACK_PACKAGE_ICON
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cockatrice/resources/appicon.icns"
)
else
()
# linux
set
(
CPACK_GENERATOR DEB
${
CPACK_GENERATOR
}
)
set
(
CPACK_PACKAGE_INSTALL_DIRECTORY
"
${
PROJECT_NAME
}
/
${
PROJECT_VERSION
}
"
)
set
(
CPACK_STRIP_FILES
"bin/
${
PROJECT_NAME
}
"
)
set
(
CPACK_SOURCE_STRIP_FILES
""
)
endif
()
elseif
(
WIN32
)
set
(
CPACK_GENERATOR NSIS
${
CPACK_GENERATOR
}
)
set
(
CPACK_PACKAGE_INSTALL_DIRECTORY
"
${
PROJECT_NAME
}
\\\\
${
PROJECT_VERSION
}
"
)
set
(
CPACK_NSIS_INSTALLED_ICON_NAME
"bin
\\\\
${
PROJECT_NAME
}
.exe"
)
set
(
CPACK_NSIS_DISPLAY_NAME
"
${
CPACK_PACKAGE_INSTALL_DIRECTORY
}
${
PROJECT_NAME
}
"
)
set
(
CPACK_NSIS_HELP_LINK
"https://github.com/Daenyth/Cockatrice"
)
set
(
CPACK_NSIS_URL_INFO_ABOUT
"https://github.com/Daenyth/Cockatrice"
)
set
(
CPACK_NSIS_CONTACT
"Daenyth+github@gmail.com"
)
set
(
CPACK_NSIS_MODIFY_PATH ON
)
endif
()
include
(
CPack
)
# Compile servatrice (default off)
# Compile servatrice (default off)
option
(
WITH_SERVER
"build servatrice"
OFF
)
option
(
WITH_SERVER
"build servatrice"
OFF
)
add_subdirectory
(
common
)
add_subdirectory
(
common
)
if
(
WITH_SERVER
)
if
(
WITH_SERVER
)
add_subdirectory
(
servatrice
)
add_subdirectory
(
servatrice
)
SET
(
CPACK_INSTALL_CMAKE_PROJECTS
"servatrice;servatrice;ALL;/"
${
CPACK_INSTALL_CMAKE_PROJECTS
}
)
endif
()
endif
()
# Compile cockatrice (default on)
# Compile cockatrice (default on)
...
@@ -92,12 +132,14 @@ if(WITH_CLIENT)
...
@@ -92,12 +132,14 @@ if(WITH_CLIENT)
add_subdirectory
(
cockatrice
)
add_subdirectory
(
cockatrice
)
add_subdirectory
(
sounds
)
add_subdirectory
(
sounds
)
add_subdirectory
(
zonebg
)
add_subdirectory
(
zonebg
)
SET
(
CPACK_INSTALL_CMAKE_PROJECTS
"cockatrice;cockatrice;ALL;/"
${
CPACK_INSTALL_CMAKE_PROJECTS
}
)
endif
()
endif
()
# Compile oracle (default on)
# Compile oracle (default on)
option
(
WITH_ORACLE
"build oracle"
ON
)
option
(
WITH_ORACLE
"build oracle"
ON
)
if
(
WITH_ORACLE
)
if
(
WITH_ORACLE
)
add_subdirectory
(
oracle
)
add_subdirectory
(
oracle
)
SET
(
CPACK_INSTALL_CMAKE_PROJECTS
"release/oracle.app;oracle;ALL;/"
${
CPACK_INSTALL_CMAKE_PROJECTS
}
)
endif
()
endif
()
# Compile testclient (default off)
# Compile testclient (default off)
...
...
prepareMacRelease.sh
deleted
100644 → 0
View file @
1260ccc5
#!/bin/sh
FRAMEWORKS
=
"Core Gui Multimedia Network Svg Xml"
DATE
=
`
date
'+%Y%m%d'
`
#QTDIR="/Users/brukie/QtSDK/Desktop/Qt/474/gcc"
QTLIB
=
"/Users/brukie/qt_leopard/lib"
QTPLUGINS
=
"/Users/brukie/qt_leopard/plugins"
PROTOBUF
=
"/Users/brukie/protobuf_leopard"
DIR
=
cockatrice_mac_
$DATE
if
[
-d
$DIR
]
;
then
echo
"delete old dir first"
;
exit
1
;
fi
mkdir
$DIR
cp
-R
build/cockatrice/cockatrice.app
$DIR
cp
-R
build/oracle/oracle.app
$DIR
mkdir
$DIR
/Frameworks
cp
-R
sounds zonebg
$DIR
mkdir
$DIR
/translations
cp
build/cockatrice/
*
.qm
$DIR
/translations
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
cp
$PROTOBUF
/lib/libprotobuf.7.dylib
$DIR
/Frameworks
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
install_name_tool
-id
@executable_path/../../../libprotobuf.7.dylib Frameworks/libprotobuf.7.dylib
install_name_tool
-change
$PROTOBUF
/lib/libprotobuf.7.dylib @executable_path/../../../Frameworks/libprotobuf.7.dylib cockatrice.app/Contents/MacOS/cockatrice
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