forked from qt-creator/qt-creator
Separate documenttypeicons svg and export script
Change-Id: I903d84f26d698b838fd6e9a0684eed71d560b958 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 74 KiB |
1232
src/tools/icons/documenttypeicons.svg
Normal file
1232
src/tools/icons/documenttypeicons.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 44 KiB |
@@ -57,19 +57,11 @@ do
|
||||
done
|
||||
done
|
||||
|
||||
# Adding the icons for the OSX document type icon for .ui files
|
||||
for uiFileIconSize in 16 32 128 256 512;\
|
||||
do
|
||||
uiFileIconID=uifile_icon_${uiFileIconSize}x${uiFileIconSize}
|
||||
uiFileIconIDs="${uiFileIconIDs} ${uiFileIconID} ${uiFileIconID}@2x"
|
||||
done
|
||||
iconIDs="${iconIDs} ${uiFileIconIDs}"
|
||||
|
||||
# Copying the logos for Qt Creator's sources. Without shadows!
|
||||
creatorLogoDir="logo"
|
||||
rm -rf $creatorLogoDir
|
||||
mkdir $creatorLogoDir
|
||||
for uiFileIconSize in 16 24 32 64 128 256 512;\
|
||||
for uiFileIconSize in 16 24 32 48 64 128 256 512;\
|
||||
do
|
||||
creatorLogoSource="qtcreator_icon_${uiFileIconSize}x${uiFileIconSize}.png"
|
||||
creatorLogoTargetDir="${creatorLogoDir}/${uiFileIconSize}"
|
||||
@@ -130,21 +122,3 @@ do
|
||||
cp ${applicationName}_icon_512x512.png ${inconsetName}/icon_256x256@2x.png
|
||||
cp ${applicationName}_icon_1024x1024.png ${inconsetName}/icon_512x512@2x.png
|
||||
done
|
||||
# Prepaing the document type .iconset
|
||||
uiFileIconsetName=uifile_icon.iconset/
|
||||
rm -rf $uiFileIconsetName
|
||||
mkdir $uiFileIconsetName
|
||||
for uiFileIconID in $uiFileIconIDs;\
|
||||
do
|
||||
targetFileName=`echo $uiFileIconID | cut -c 8-`
|
||||
cp ${uiFileIconID}.png ${uiFileIconsetName}/${targetFileName}.png
|
||||
done
|
||||
|
||||
# Convertion the .iconsets to .icns files
|
||||
# iconutil is only available on OSX
|
||||
if hash iconutil 2>/dev/null; then
|
||||
for applicationName in $applicationNames;\
|
||||
do
|
||||
iconutil -c icns ${applicationName}.iconset
|
||||
done
|
||||
fi
|
||||
|
54
src/tools/icons/exportdocumenttypeicons.sh
Normal file
54
src/tools/icons/exportdocumenttypeicons.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2016 The Qt Company Ltd.
|
||||
# Contact: https://www.qt.io/licensing/
|
||||
#
|
||||
# This file is part of Qt Creator.
|
||||
#
|
||||
# Commercial License Usage
|
||||
# Licensees holding valid commercial Qt licenses may use this file in
|
||||
# accordance with the commercial license agreement provided with the
|
||||
# Software or, alternatively, in accordance with the terms contained in
|
||||
# a written agreement between you and The Qt Company. For licensing terms
|
||||
# and conditions see https://www.qt.io/terms-conditions. For further
|
||||
# information use the contact form at https://www.qt.io/contact-us.
|
||||
#
|
||||
# GNU General Public License Usage
|
||||
# Alternatively, this file may be used under the terms of the GNU
|
||||
# General Public License version 3 as published by the Free Software
|
||||
# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
# included in the packaging of this file. Please review the following
|
||||
# information to ensure the GNU General Public License requirements will
|
||||
# be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# optipng is required by this script
|
||||
if ! hash optipng 2>/dev/null; then
|
||||
echo "optipng was not found in PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
# Adding the icons for the OSX document type icon for .ui files
|
||||
for documentTypeName in "uifile" "profile" "prifile";\
|
||||
do
|
||||
inconsetName=${documentTypeName}.iconset
|
||||
rm -rf $inconsetName
|
||||
mkdir $inconsetName
|
||||
for iconSize in 16 32 128 256 512;\
|
||||
do
|
||||
iconShortID="icon_${iconSize}x${iconSize}"
|
||||
iconLongID="${documentTypeName}_${iconShortID}"
|
||||
for sizeVariation in "" "@2x";\
|
||||
do
|
||||
iconSourcePng="${iconLongID}${sizeVariation}.png"
|
||||
iconTargetPng="${inconsetName}/${iconShortID}${sizeVariation}.png"
|
||||
optipng $iconSourcePng -o 7 -strip all
|
||||
cp $iconSourcePng $iconTargetPng
|
||||
done
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user