Build prepared for Xcode and hopefully for QtCreator. Closed beta 9049002.

This commit is contained in:
John Preston 2016-06-08 13:24:20 +03:00
parent 0a96f633d5
commit fadd531fbb
11 changed files with 73 additions and 41 deletions

View file

@ -23,5 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
using "basic_types.style";
using "basic.style";
using "dialogs/dialogs.style";
using "history/history.style";
using "overview/overview.style";
using "profile/profile.style";

View file

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,49,1
PRODUCTVERSION 0,9,49,1
FILEVERSION 0,9,49,2
PRODUCTVERSION 0,9,49,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -51,10 +51,10 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.9.49.1"
VALUE "FileVersion", "0.9.49.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.49.1"
VALUE "ProductVersion", "0.9.49.2"
END
END
BLOCK "VarFileInfo"

View file

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,49,1
PRODUCTVERSION 0,9,49,1
FILEVERSION 0,9,49,2
PRODUCTVERSION 0,9,49,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -43,10 +43,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Updater"
VALUE "FileVersion", "0.9.49.1"
VALUE "FileVersion", "0.9.49.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.49.1"
VALUE "ProductVersion", "0.9.49.2"
END
END
BLOCK "VarFileInfo"

View file

@ -1615,26 +1615,6 @@ HistoryItem *History::addNewInTheMiddle(HistoryItem *newItem, int32 blockIndex,
return newItem;
}
template <typename CreateGroup, typename UniteGroup>
void History::addMessageGroup(CreateGroup create, UniteGroup unite) {
HistoryItem *previous = nullptr;
if (isBuildingFrontBlock()) {
if (_buildingFrontBlock->block) {
previous = _buildingFrontBlock->block->items.back();
}
} else {
if (!blocks.isEmpty()) {
previous = blocks.back()->items.back();
}
}
if (previous && previous->type() == HistoryItemGroup) {
unite(static_cast<HistoryGroup*>(previous));
} else {
addItemToBlock(create(previous));
}
}
void History::startBuildingFrontBlock(int expectedItemsCount) {
t_assert(!isBuildingFrontBlock());
t_assert(expectedItemsCount > 0);
@ -1848,7 +1828,7 @@ const ChannelHistory *History::asChannelHistory() const {
}
bool History::isDisplayedEmpty() const {
return isEmpty() || (blocks.size() == 1) && blocks.front()->items.size() == 1 && blocks.front()->items.front()->isEmpty();
return isEmpty() || ((blocks.size() == 1) && blocks.front()->items.size() == 1 && blocks.front()->items.front()->isEmpty());
}
void History::clear(bool leaveItems) {

View file

@ -492,7 +492,7 @@ bool MembersWidget::addUsersToEnd(ChannelData *megagroup) {
}
void MembersWidget::setMemberFlags(Member *member, ChannelData *megagroup) {
auto amCreatorOrAdmin = (peerFromUser(member->user->id) == MTP::authedId()) && (megagroup->amCreator() || megagroup->amEditor());
auto amCreatorOrAdmin = (peerToUser(member->user->id) == MTP::authedId()) && (megagroup->amCreator() || megagroup->amEditor());
auto isAdmin = megagroup->mgInfo->lastAdmins.contains(member->user);
member->isAdmin = amCreatorOrAdmin || isAdmin;
if (member->user->isSelf()) {

View file

@ -31,8 +31,6 @@ HistoryDownButton::HistoryDownButton(QWidget *parent) : Button(parent)
, _a_arrowOver(animation(this, &HistoryDownButton::step_arrowOver)) {
setCursor(style::cur_pointer);
resize(st::historyToDown.width(), st::historyToDownPaddingTop + st::historyToDown.height());
connect(this, SIGNAL(stateChanged(int,ButtonStateChangeSource)), this, SLOT(onStateChange(int,ButtonStateChangeSource)));
}
void HistoryDownButton::paintEvent(QPaintEvent *e) {
@ -51,7 +49,7 @@ void HistoryDownButton::paintEvent(QPaintEvent *e) {
}
}
void HistoryDownButton::onStateChange(int oldState, ButtonStateChangeSource source) {
void HistoryDownButton::onStateChanged(int oldState, ButtonStateChangeSource source) {
a_arrowOpacity.start((_state & (StateOver | StateDown)) ? st::btnAttachEmoji.overOpacity : st::btnAttachEmoji.opacity);
if (source == ButtonByUser || source == ButtonByPress) {

View file

@ -25,8 +25,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
namespace Ui {
class HistoryDownButton : public Button {
Q_OBJECT
public:
HistoryDownButton(QWidget *parent);
@ -38,8 +36,7 @@ public:
protected:
void paintEvent(QPaintEvent *e) override;
private slots:
void onStateChange(int oldState, ButtonStateChangeSource source);
void onStateChanged(int oldState, ButtonStateChangeSource source) override;
private:
void step_arrowOver(float64 ms, bool timer);

View file

@ -68,6 +68,8 @@ SOURCES += \
./GeneratedFiles/numbers.cpp \
./GeneratedFiles/styles/style_basic.cpp \
./GeneratedFiles/styles/style_basic_types.cpp \
./GeneratedFiles/styles/style_dialogs.cpp \
./GeneratedFiles/styles/style_history.cpp \
./GeneratedFiles/styles/style_overview.cpp \
./GeneratedFiles/styles/style_profile.cpp \
./SourceFiles/main.cpp \
@ -125,9 +127,11 @@ SOURCES += \
./SourceFiles/core/click_handler.cpp \
./SourceFiles/core/click_handler_types.cpp \
./SourceFiles/core/observer.cpp \
./SourceFiles/data/drafts.cpp \
./SourceFiles/dialogs/dialogs_indexed_list.cpp \
./SourceFiles/dialogs/dialogs_layout.cpp \
./SourceFiles/dialogs/dialogs_list.cpp \
./SourceFiles/dialogs/dialogs_row.cpp \
./SourceFiles/history/field_autocomplete.cpp \
./SourceFiles/inline_bots/inline_bot_layout_internal.cpp \
./SourceFiles/inline_bots/inline_bot_layout_item.cpp \
@ -170,6 +174,7 @@ SOURCES += \
./SourceFiles/profile/profile_widget.cpp \
./SourceFiles/serialize/serialize_common.cpp \
./SourceFiles/serialize/serialize_document.cpp \
./SourceFiles/ui/buttons/history_down_button.cpp \
./SourceFiles/ui/buttons/left_outline_button.cpp \
./SourceFiles/ui/buttons/peer_avatar_button.cpp \
./SourceFiles/ui/buttons/round_button.cpp \
@ -208,6 +213,8 @@ HEADERS += \
./GeneratedFiles/numbers.h \
./GeneratedFiles/styles/style_basic.h \
./GeneratedFiles/styles/style_basic_types.h \
./GeneratedFiles/styles/style_dialogs.h \
./GeneratedFiles/styles/style_history.h \
./GeneratedFiles/styles/style_overview.h \
./GeneratedFiles/styles/style_profile.h \
./SourceFiles/stdafx.h \
@ -268,6 +275,7 @@ HEADERS += \
./SourceFiles/core/observer.h \
./SourceFiles/core/vector_of_moveable.h \
./SourceFiles/core/version.h \
./SourceFiles/data/drafts.h \
./SourceFiles/dialogs/dialogs_common.h \
./SourceFiles/dialogs/dialogs_indexed_list.h \
./SourceFiles/dialogs/dialogs_layout.h \
@ -317,6 +325,7 @@ HEADERS += \
./SourceFiles/pspecific.h \
./SourceFiles/serialize/serialize_common.h \
./SourceFiles/serialize/serialize_document.h \
./SourceFiles/ui/buttons/history_down_button.h \
./SourceFiles/ui/buttons/left_outline_button.h \
./SourceFiles/ui/buttons/peer_avatar_button.h \
./SourceFiles/ui/buttons/round_button.h \
@ -450,5 +459,7 @@ OTHER_FILES += \
./Resources/langs/lang_de.strings \
./Resources/langs/lang_nl.strings \
./Resources/langs/lang_pt_BR.strings \
./SourceFiles/dialogs/dialogs.style \
./SourceFiles/history/history.style \
./SourceFiles/overview/overview.style \
./SourceFiles/profile/profile.style

View file

@ -83,6 +83,13 @@
0716C9891D0594C000797B22 /* round_button.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C9861D0594C000797B22 /* round_button.cpp */; };
0716C98C1D05950F00797B22 /* observer_peer.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C98A1D05950F00797B22 /* observer_peer.cpp */; };
0716C9901D05954900797B22 /* observer.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C98D1D05954900797B22 /* observer.cpp */; };
0716C9991D08225000797B22 /* dialogs_row.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C9971D08225000797B22 /* dialogs_row.cpp */; };
0716C99A1D08225000797B22 /* dialogs.style in Resources */ = {isa = PBXBuildFile; fileRef = 0716C9981D08225000797B22 /* dialogs.style */; };
0716C9A01D08251C00797B22 /* style_dialogs.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C99C1D08251C00797B22 /* style_dialogs.cpp */; };
0716C9A11D08251C00797B22 /* style_history.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C99E1D08251C00797B22 /* style_history.cpp */; };
0716C9A51D08256C00797B22 /* drafts.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C9A31D08256C00797B22 /* drafts.cpp */; };
0716C9A71D08258A00797B22 /* history.style in Resources */ = {isa = PBXBuildFile; fileRef = 0716C9A61D08258A00797B22 /* history.style */; };
0716C9AA1D0825A800797B22 /* history_down_button.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0716C9A81D0825A800797B22 /* history_down_button.cpp */; };
071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D11C5E8E6D008C9E90 /* zip.c */; };
071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8F71C5E99D6008C9E90 /* ioapi.c */; };
0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; };
@ -442,6 +449,17 @@
0716C98D1D05954900797B22 /* observer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = observer.cpp; path = SourceFiles/core/observer.cpp; sourceTree = SOURCE_ROOT; };
0716C98E1D05954900797B22 /* observer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = observer.h; path = SourceFiles/core/observer.h; sourceTree = SOURCE_ROOT; };
0716C98F1D05954900797B22 /* vector_of_moveable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vector_of_moveable.h; path = SourceFiles/core/vector_of_moveable.h; sourceTree = SOURCE_ROOT; };
0716C9971D08225000797B22 /* dialogs_row.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dialogs_row.cpp; path = SourceFiles/dialogs/dialogs_row.cpp; sourceTree = SOURCE_ROOT; };
0716C9981D08225000797B22 /* dialogs.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dialogs.style; path = SourceFiles/dialogs/dialogs.style; sourceTree = SOURCE_ROOT; };
0716C99C1D08251C00797B22 /* style_dialogs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = style_dialogs.cpp; path = GeneratedFiles/styles/style_dialogs.cpp; sourceTree = SOURCE_ROOT; };
0716C99D1D08251C00797B22 /* style_dialogs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_dialogs.h; path = GeneratedFiles/styles/style_dialogs.h; sourceTree = SOURCE_ROOT; };
0716C99E1D08251C00797B22 /* style_history.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = style_history.cpp; path = GeneratedFiles/styles/style_history.cpp; sourceTree = SOURCE_ROOT; };
0716C99F1D08251C00797B22 /* style_history.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_history.h; path = GeneratedFiles/styles/style_history.h; sourceTree = SOURCE_ROOT; };
0716C9A31D08256C00797B22 /* drafts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = drafts.cpp; path = SourceFiles/data/drafts.cpp; sourceTree = SOURCE_ROOT; };
0716C9A41D08256C00797B22 /* drafts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = drafts.h; path = SourceFiles/data/drafts.h; sourceTree = SOURCE_ROOT; };
0716C9A61D08258A00797B22 /* history.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = history.style; path = SourceFiles/history/history.style; sourceTree = SOURCE_ROOT; };
0716C9A81D0825A800797B22 /* history_down_button.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = history_down_button.cpp; path = SourceFiles/ui/buttons/history_down_button.cpp; sourceTree = SOURCE_ROOT; };
0716C9A91D0825A800797B22 /* history_down_button.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = history_down_button.h; path = SourceFiles/ui/buttons/history_down_button.h; sourceTree = SOURCE_ROOT; };
071AD86B1C5E8536008C9E90 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crypt.h; path = ThirdParty/minizip/crypt.h; sourceTree = SOURCE_ROOT; };
071AD86C1C5E8536008C9E90 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ioapi.h; path = ThirdParty/minizip/ioapi.h; sourceTree = SOURCE_ROOT; };
071AD86E1C5E8536008C9E90 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zip.h; path = ThirdParty/minizip/zip.h; sourceTree = SOURCE_ROOT; };
@ -917,6 +935,15 @@
name = profile;
sourceTree = "<group>";
};
0716C9A21D08255E00797B22 /* data */ = {
isa = PBXGroup;
children = (
0716C9A31D08256C00797B22 /* drafts.cpp */,
0716C9A41D08256C00797B22 /* drafts.h */,
);
name = data;
sourceTree = "<group>";
};
071AD8691C5E8504008C9E90 /* ThirdParty */ = {
isa = PBXGroup;
children = (
@ -969,6 +996,10 @@
0747FF7D1CC6435100096FC3 /* style_basic.h */,
0747FF7A1CC6435100096FC3 /* style_basic_types.cpp */,
0747FF7B1CC6435100096FC3 /* style_basic_types.h */,
0716C99C1D08251C00797B22 /* style_dialogs.cpp */,
0716C99D1D08251C00797B22 /* style_dialogs.h */,
0716C99E1D08251C00797B22 /* style_history.cpp */,
0716C99F1D08251C00797B22 /* style_history.h */,
078500381CC94D9600168DBB /* style_overview.cpp */,
078500391CC94D9600168DBB /* style_overview.h */,
0716C95E1D058C6600797B22 /* style_profile.cpp */,
@ -1024,6 +1055,7 @@
076B1C561CBFC8C9002C0BC2 /* history */ = {
isa = PBXGroup;
children = (
0716C9A61D08258A00797B22 /* history.style */,
076C51D21CE205120038F22A /* field_autocomplete.cpp */,
076C51D31CE205120038F22A /* field_autocomplete.h */,
076B1C571CBFC8D9002C0BC2 /* history_common.h */,
@ -1092,6 +1124,7 @@
07B816FF1CB9A219006F7869 /* dialogs */ = {
isa = PBXGroup;
children = (
0716C9981D08225000797B22 /* dialogs.style */,
07B817011CB9A235006F7869 /* dialogs_common.h */,
07B817021CB9A235006F7869 /* dialogs_indexed_list.cpp */,
07B817031CB9A235006F7869 /* dialogs_indexed_list.h */,
@ -1099,6 +1132,7 @@
07B817051CB9A235006F7869 /* dialogs_layout.h */,
07B817061CB9A235006F7869 /* dialogs_list.cpp */,
07B817071CB9A235006F7869 /* dialogs_list.h */,
0716C9971D08225000797B22 /* dialogs_row.cpp */,
07B817081CB9A235006F7869 /* dialogs_row.h */,
);
name = dialogs;
@ -1135,6 +1169,8 @@
07E373901CBBBFDE00934F77 /* buttons */ = {
isa = PBXGroup;
children = (
0716C9A81D0825A800797B22 /* history_down_button.cpp */,
0716C9A91D0825A800797B22 /* history_down_button.h */,
0716C9841D0594C000797B22 /* left_outline_button.cpp */,
0716C9851D0594C000797B22 /* left_outline_button.h */,
07E373921CBBC11000934F77 /* peer_avatar_button.cpp */,
@ -1263,6 +1299,7 @@
children = (
ADC8DBF4C6F26E14C77F68B4 /* boxes */,
076B1C4F1CBFC6DC002C0BC2 /* core */,
0716C9A21D08255E00797B22 /* data */,
07B816FF1CB9A219006F7869 /* dialogs */,
076B1C561CBFC8C9002C0BC2 /* history */,
07C8FDF81CB66D80007A8702 /* inline_bots */,
@ -1679,6 +1716,8 @@
0716C95A1D0589B600797B22 /* overview.style in Resources */,
0716C9291D05893900797B22 /* basic_types.style in Resources */,
07D7EABA1A597DD000838BA2 /* Localizable.strings in Resources */,
0716C9A71D08258A00797B22 /* history.style in Resources */,
0716C99A1D08225000797B22 /* dialogs.style in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1801,6 +1840,7 @@
6E4DB0CBEF415196AFD4149F /* fileuploader.cpp in Compile Sources */,
700925F3B2C6163D38140CEA /* history.cpp in Compile Sources */,
0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */,
0716C9991D08225000797B22 /* dialogs_row.cpp in Compile Sources */,
077A4B041CA41EE2002188D2 /* moc_connection_auto.cpp in Compile Sources */,
1DF53374E3B6A31661548D08 /* historywidget.cpp in Compile Sources */,
078A2FCD1A811CA600CCC7A0 /* backgroundbox.cpp in Compile Sources */,
@ -1892,6 +1932,7 @@
4BF3F8D0797BC8A0C1FAD13C /* introphone.cpp in Compile Sources */,
4978DE680549639AE9AA9CA6 /* introsignup.cpp in Compile Sources */,
076B1C551CBFC6F2002C0BC2 /* click_handler.cpp in Compile Sources */,
0716C9A51D08256C00797B22 /* drafts.cpp in Compile Sources */,
8B22E794EFF0EAFF964A3043 /* introstart.cpp in Compile Sources */,
74343521EECC740F777DAFE6 /* pspecific_mac.cpp in Compile Sources */,
26A81090DC8B5BCF7278FDFF /* qrc_telegram.cpp in Compile Sources */,
@ -1912,8 +1953,10 @@
98E4F55DB5D8E64AB9F08C83 /* moc_localimageloader.cpp in Compile Sources */,
A24E4B5B683764E07683ECEC /* moc_mainwidget.cpp in Compile Sources */,
0710CA051B0B9404001B4272 /* moc_stickersetbox.cpp in Compile Sources */,
0716C9AA1D0825A800797B22 /* history_down_button.cpp in Compile Sources */,
0716C94A1D0589A700797B22 /* profile_actions_widget.cpp in Compile Sources */,
0716C9761D058C8600797B22 /* moc_profile_settings_widget.cpp in Compile Sources */,
0716C9A11D08251C00797B22 /* style_history.cpp in Compile Sources */,
0716C94D1D0589A700797B22 /* profile_cover.cpp in Compile Sources */,
0716C95D1D058C1B00797B22 /* report_box.cpp in Compile Sources */,
07DE92A71AA4925B00A18F6F /* autolockbox.cpp in Compile Sources */,
@ -1952,6 +1995,7 @@
0716C9801D058F2400797B22 /* section_widget.cpp in Compile Sources */,
B2F5B08BFFBBE7E37D3863BB /* moc_button.cpp in Compile Sources */,
0716C9901D05954900797B22 /* observer.cpp in Compile Sources */,
0716C9A01D08251C00797B22 /* style_dialogs.cpp in Compile Sources */,
0716C94E1D0589A700797B22 /* profile_fixed_bar.cpp in Compile Sources */,
6A8BC88AB464B92706EFE6FF /* moc_countryinput.cpp in Compile Sources */,
0764D55A1ABAD6F900FBFEED /* apiwrap.cpp in Compile Sources */,
@ -2096,7 +2140,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = NO;
CLANG_WARN_CONSTANT_CONVERSION = NO;
@ -2235,7 +2279,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = NO;
CLANG_WARN_CONSTANT_CONVERSION = NO;

View file

@ -41,7 +41,7 @@ Replace () {
CheckCount=$(eval $CheckCommand)
if [ "$CheckCount" -gt 0 ]; then
echo "Requested '$1' to '$2', found - replacing.."
ReplaceCommand="sed -i 's/$1/$2/g' Makefile"
ReplaceCommand="sed -i '' 's/$1/$2/g' Makefile"
eval $ReplaceCommand
else
echo "Skipping '$1' to '$2'"

View file

@ -82,7 +82,7 @@ repl () {
CheckCount=`eval $CheckCommand`
set -e
if [ "$CheckCount" -gt 0 ]; then
ReplaceCommand="sed -i 's/$Pattern/$Replacement/g' $File"
ReplaceCommand="sed -i '' 's/$Pattern/$Replacement/g' $File"
eval $ReplaceCommand
else
echo "Not found $Pattern"