build: Fixes for trial release on MacOS
This commit is contained in:
@@ -494,6 +494,12 @@ if (APPLE)
|
||||
@ONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/setup/MacOSX/Info_trial.plist.in
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bundle_info_trial.plist
|
||||
@ONLY
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
# License Generator --------------------------------------------------------
|
||||
|
||||
+1
-3
@@ -48,7 +48,7 @@ if [ $PLATFORM == "Windows" ]; then
|
||||
|
||||
echo -e $INFO "creating program icon"
|
||||
sh script/create_windows_icon.sh
|
||||
|
||||
|
||||
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Debug\data '.$MY_PATH.'\..\bin\app\data' &
|
||||
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Debug\user '.$MY_PATH.'\..\bin\app\user' &
|
||||
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Release\data '.$MY_PATH.'\..\bin\app\data' &
|
||||
@@ -69,5 +69,3 @@ if [ $PLATFORM == "Linux" ] || [ $PLATFORM == "MacOS" ]; then
|
||||
fi
|
||||
|
||||
echo -e $SUCCESS "setup complete"
|
||||
|
||||
sleep 5
|
||||
|
||||
@@ -13,6 +13,15 @@ BUNDLE_NAME="@MACOSX_BUNDLE_NAME@"
|
||||
APP_NAME="@MACOSX_BINARY_NAME@"
|
||||
DYNLIB_PATHS=(@MACOSX_DYNAMIC_LIBRARIES@)
|
||||
|
||||
if [ "$1" = "trial" ]
|
||||
then
|
||||
echo -e $INFO "Trial bundle"
|
||||
BUNDLE_NAME="${BUNDLE_NAME}_Trial"
|
||||
APP_NAME="${APP_NAME}_trial"
|
||||
echo $BUNDLE_NAME
|
||||
echo $APP_NAME
|
||||
fi
|
||||
|
||||
VERSION_STRING=$(git describe)
|
||||
VERSION_STRING="${VERSION_STRING//-/_}"
|
||||
VERSION_STRING="${VERSION_STRING//./_}"
|
||||
@@ -58,8 +67,6 @@ mkdir -p $FRAMEWORK_DIR
|
||||
mkdir -p $RES_DIR
|
||||
|
||||
echo -e $INFO "Copying top level contents."
|
||||
cp ../../../web/coati_manual.pdf $PACKAGE_DIR/coati_manual.pdf
|
||||
|
||||
mkdir -p $PACKAGE_DIR/plugins/visual_studio/
|
||||
cp -r ../../../ide_plugins/vs/coati_plugin_vs_2012.vsix $PACKAGE_DIR/plugins/visual_studio/
|
||||
cp -r ../../../ide_plugins/vs/coati_plugin_vs_2013.vsix $PACKAGE_DIR/plugins/visual_studio/
|
||||
@@ -71,7 +78,13 @@ ln -s /Applications $PACKAGE_DIR/Applications
|
||||
|
||||
echo -e $INFO "Copying bundle contents."
|
||||
cp $APP_NAME $APP_PATH
|
||||
cp bundle_info.plist $BUNDLE_PATH/Contents/Info.plist
|
||||
|
||||
if [ "$1" = "trial" ]
|
||||
then
|
||||
cp bundle_info_trial.plist $BUNDLE_PATH/Contents/Info.plist
|
||||
else
|
||||
cp bundle_info.plist $BUNDLE_PATH/Contents/Info.plist
|
||||
fi
|
||||
|
||||
mkdir -p $RES_DIR/data
|
||||
mkdir -p $RES_DIR/data/projects
|
||||
@@ -83,8 +96,11 @@ cp -R ../data/gui $RES_DIR/data/gui
|
||||
cp -R ../data/projects/tictactoe $RES_DIR/data/projects/tictactoe
|
||||
cp -R ../data/projects/tutorial $RES_DIR/data/projects/tutorial
|
||||
|
||||
rm $RES_DIR/data/projects/tictactoe/tictactoe.coatidb
|
||||
rm $RES_DIR/data/projects/tutorial/tutorial.coatidb
|
||||
if [ ! "$1" = "trial" ]
|
||||
then
|
||||
rm $RES_DIR/data/projects/tictactoe/tictactoe.coatidb
|
||||
rm $RES_DIR/data/projects/tutorial/tutorial.coatidb
|
||||
fi
|
||||
|
||||
mkdir -p $RES_DIR/user
|
||||
mkdir -p $RES_DIR/user/log
|
||||
@@ -199,11 +215,11 @@ convert $ICON -resize 1024x1024 $ICON_SET/icon_512x512@2x.png
|
||||
|
||||
iconutil -c icns -o $RES_DIR/project.icns $ICON_SET
|
||||
|
||||
echo -e $INFO "Obfuscate binary"
|
||||
# echo -e $INFO "Obfuscate binary"
|
||||
# upx -1 $APP_PATH
|
||||
upx --best $APP_PATH
|
||||
# upx --best $APP_PATH
|
||||
|
||||
echo -e $INFO "create DMG"
|
||||
hdiutil create ${PACKAGE_DIR}.dmg -volname ${PACKAGE_DIR} -srcfolder ${PACKAGE_DIR}
|
||||
# echo -e $INFO "create DMG"
|
||||
# hdiutil create ${PACKAGE_DIR}.dmg -volname ${PACKAGE_DIR} -srcfolder ${PACKAGE_DIR}
|
||||
|
||||
echo -e $SUCCESS "Installed bundle successfully!"
|
||||
|
||||
@@ -33,7 +33,6 @@ void init()
|
||||
|
||||
utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), ".otf");
|
||||
}
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -47,9 +46,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
qtApp.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
QPixmap whitePixmap(500, 500);
|
||||
whitePixmap.fill(Qt::white);
|
||||
|
||||
init();
|
||||
|
||||
QtCommandLineParser commandLineParser;
|
||||
|
||||
+1
-15
@@ -13,7 +13,6 @@
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "qt/view/QtViewFactory.h"
|
||||
#include "qt/window/QtMainWindow.h"
|
||||
#include "qt/window/QtSplashScreen.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
@@ -33,7 +32,7 @@ void init()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication::setApplicationName("Coati");
|
||||
QApplication::setApplicationName("Coati Trial");
|
||||
|
||||
Version version = Version::fromString(GIT_VERSION_NUMBER);
|
||||
QApplication::setApplicationVersion(version.toDisplayString().c_str());
|
||||
@@ -44,14 +43,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
qtApp.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
QPixmap whitePixmap(500, 500);
|
||||
whitePixmap.fill(Qt::white);
|
||||
|
||||
QtSplashScreen* splash = new QtSplashScreen(whitePixmap, Qt::WindowStaysOnTopHint);
|
||||
splash->setMessage("Loading UI");
|
||||
splash->setVersion(version.toDisplayString().c_str());
|
||||
splash->exec(qtApp);
|
||||
|
||||
init();
|
||||
|
||||
QtViewFactory viewFactory;
|
||||
@@ -59,10 +50,5 @@ int main(int argc, char *argv[])
|
||||
|
||||
std::shared_ptr<Application> app = Application::create(version, &viewFactory, &networkFactory);
|
||||
|
||||
if (splash)
|
||||
{
|
||||
delete splash;
|
||||
}
|
||||
|
||||
return qtApp.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user