upp.src: Universal POSIX installation now should include MacOS

This commit is contained in:
Mirek Fidler 2023-04-17 11:24:10 +02:00
parent 2ad32dd4fc
commit 90eab4d6e5
6 changed files with 95 additions and 60 deletions

5
configure vendored
View file

@ -2,3 +2,8 @@
./configure_makefile Makefile
./configure_makefile umkMakefile
uname=`uname`
if [[ "$uname" == 'Darwin' ]]; then
sed -i.bak 's/-DflagOSX/-DflagOSX -DflagNOMM/' umkMakefile
fi

View file

@ -67,5 +67,6 @@ if [[ "$uname" == 'Darwin' ]]; then
sed -i.bak 's/-Wl,-s/ /' $1
sed -i.bak 's/-Wl,--start-group/ /' $1
sed -i.bak 's/-Wl,--end-group/ /' $1
sed -i.bak 's/-DflagLINUX/-DflagBSD -DflagOSX -DflagNOMM/' $1
sed -i.bak 's/-DflagLINUX/-DflagBSD -DflagOSX/' umkMakefile
sed -i.bak 's/$(LIBPATH) -Wl,-O,2 $(LDFLAGS)/$(LIBPATH) $(LDFLAGS)/' $1
fi

View file

@ -130,7 +130,7 @@ CONSOLE_APP_MAIN
Syx(GetHomeDirFile("bin/umk") + " ./uppsrc umk GCC32 " OPTS + release + "/umks32");
#endif
Syx(GetHomeDirFile("bin/umk") + " ./uppsrc umk GCC -rvsM");
Syx(GetHomeDirFile("bin/umk") + " ./uppsrc umk GCC +NOMM -rvsM");
FixMakefile(release + "/umkMakefile.in", release + "/Makefile");
Syx(GetHomeDirFile("bin/umk") + " ./uppsrc ide GCC -rvsM theide");
FixMakefile(release + "/Makefile.in", release + "/Makefile");

View file

@ -11,6 +11,24 @@ AskContinue()
uname=`uname`
if [[ "$uname" == 'Darwin' ]]; then
DEP=""
if which brew; then
echo "Homebrew is already installed"
else
echo "Installing Homebrew package management system (to obtain openssl libraries required for U++)"
AskContinue
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew install openssl
if clang++ --version; then
echo "Commandline Development Tools already installed"
else
echo "Please install the Commandline Development Tools with GUI."
echo "Please wait until the installation is finished."
AskContinue
fi
else
if [ -x "$(command -v apt-get)" ]; then
DEP="apt-get install g++ clang clang-format git make libgtk-3-dev libnotify-dev libbz2-dev libssl-dev xdotool"
elif [ -x "$(command -v dnf)" ]; then
@ -66,6 +84,7 @@ else
AskContinue
fi
fi
fi
if ./umks32 >/dev/null; then
echo
@ -93,17 +112,26 @@ else
$UMK ./uppsrc umk GCC -brs ./umk
fi
if [ -x ./theide ]; then
echo Install process has been finished, TheIDE is built as ./theide
theide=./theide
if [[ "$uname" == 'Darwin' ]]; then
theide=./theide.app/Contents/MacOS/theide
fi
if [ -x "$theide" ]; then
echo Install process has been finished, TheIDE is built as $theide
read -p "Do you want to start TheIDE now? (Y/n):" answer
if [ "$answer" == "${answer//[nN]/x}" ]; then
./theide
if [[ "$uname" == 'Darwin' ]]; then
open theide.app
else
$theide
fi
fi
else
echo Something went wrong.
echo Please use 'make' to compile theide and/or notify developers.
echo Please notify developers.
fi
)--";
const char *clean_script =

View file

@ -53,7 +53,8 @@ void GccBuilder::CocoaAppBundle()
PNGEncoder().SaveFile(AppendFileName(icons, fn), Rescale(img, n, n));
}
Execute(String() << "iconutil --convert icns --output " << icns << " " << icons);
String exec = String() << "iconutil --convert icns --output \"" << icns << "\" \"" << icons << "\"";
Execute(exec);
}
if(IsNull(Info_plist)) {

View file

@ -7,11 +7,11 @@
const char *clang_bm =
R"(BUILDER = "CLANG";
COMPILER = "clang++";
COMMON_OPTIONS = "-mmacosx-version-min=10.13";
COMMON_OPTIONS = "$COMMON$";
COMMON_CPP_OPTIONS = "-std=c++14 -Wall -Wno-logical-op-parentheses";
COMMON_C_OPTIONS = "";
COMMON_LINK = "$COMMON$";
COMMON_FLAGS = "$COMMON$";
COMMON_FLAGS = "";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
@ -28,7 +28,7 @@ ALLOW_PRECOMPILED_HEADERS = "0";
DISABLE_BLITZ = "0";
PATH = "";
INCLUDE = "$INCLUDE$";
LIB = "$LIB$;
LIB = "$LIB$";
LINKMODE_LOCK = "0";)";
#elif PLATFORM_SOLARIS