build: linuxbuild public beta

This commit is contained in:
Andreas Stallinger
2016-02-24 13:39:22 +01:00
parent c5b96a63ba
commit 2a932d80b5
23 changed files with 427 additions and 103 deletions
+1 -2
View File
@@ -34,7 +34,7 @@ if (WIN32)
elseif (APPLE)
set(PLATFORM_INCLUDE "includesMac.h")
else ()
set(PLATFORM_INCLUDE "includesDefault.h")
set(PLATFORM_INCLUDE "includesLinux.h")
endif ()
# Settings ---------------------------------------------------------------------
@@ -332,7 +332,6 @@ endif ()
add_subdirectory(src/app)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
+72
View File
@@ -0,0 +1,72 @@
Coati
Software License Agreement
Effective 1.1.2016
BY INSTALLING OR USING THIS SOFTWARE, YOU ARE BECOMING A PARTY TO, AND ARE CONSENTING TO BE BOUND BY, THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, DO NOT INSTALL OR USE THIS SOFTWARE.
DEFINITIONS
"Software" means:
·0 A major version of Coati in executable form. The major version is defined by the leading number of the version string (e.g. the major version of Coati 1.x.x.x is version 1);
·1 documentation for that major version of Coati;
·2 minor updates included in software maintenance which are indicated by an increase in the numbers that follow the major version number (e.g. the update from Coati 1.0.0.0 to Coati 1.0.1.4).
"Licensor" means:
·3 Coati Software OG, having a place of business at Schlossallee 7/1, 5412 Puch/Hallein, Austria.
"Licensee" means:
·4 the individual evaluating the trial version of the Software;
·5 the company, corporation, or organization that purchased a License(s) for the Software;
·6 the individual who purchased a License for the Software.
"Activation Key" means:
·7 the name of the Licensee, the kind of license, the major version of the software that is licensed, and a hashcode; the combination of these values allows the Licensee to activate a genuine copy of the Software.
"Authorized User" means:
·8 the individual evaluating the Software during a trial;
·9 an employee or independent contractor who might at any time use the Software, of the company, corporation, or organization that purchased a License(s) for the Software; an entity has one Authorized User for each License purchased;
·10 the individual who purchased a License for the Software; the individual is the only Authorized User.
GRANT
·11 Subject to the terms of this Agreement, the Licensor hereby grants the Licensee a non-transferable, non-exclusive, non-sub-licensable, limited license that allows:
·12 the Licensee to distribute (an) Activation Key(s) to Authorized User(s);
·13 Authorized User(s) to install the licensed version of the Software on computer PCs where potential use of the Software is restricted exclusively to Authorized User(s);
·14 Authorized User(s) to use the Software on computer PCs, in virtual machines, in combination with multiple IDEs, and in combination with multiple instances of an IDE;
·15 Authorized User(s) to use the trial version of the software in order to examine the provided example projects;
·16 Licensee to make a copy of the Software for archival purposes provided the copy contains all of the proprietary notices of the Software.
·17 In case the Licensee of the software is a company, corporation, or organization the Licensor has the right to mention this usage of the Software on its own website.
RESTRICTIONS
Licensee will not, and will have no right to:
·18 use the trial version of the software in order to examine project other than the provided examples;
·19 use a private/academic license of the software for any commercial purposes;
·20 distribute, use, or transfer an Activation Key(s) that has been superseded by an Activation Key(s) provided with software maintenance;
·21 modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), create derivative works based on, or otherwise attempt to discover the source code or underlying ideas or algorithms of the Software;
·22 sell, rent, lease, distribute, or otherwise transfer rights to the Software without prior written consent from Licensor;
·23 remove any proprietary notices or labels from the Software.
TITLE AND COPYRIGHT
Title, ownership rights, intellectual property rights, and copyright to the Software, and any copies or portions thereof, shall remain in Licensor. The Software is protected by European copyright directives, Austrian copyright laws as well as United States copyright laws and international treaty provisions.
DISCLAIMER OF WARRANTY
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. LICENSOR HEREBY DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS AGREEMENT. SOME U.S. STATES DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO LICENSEE. LICENSEE MAY HAVE OTHER LEGAL RIGHTS THAT VARY FROM STATE TO STATE OR BY JURISDICTION.
LIMITATION OF LIABILITY
LICENSEE ASSUMES THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. LICENSOR ASSUMES NO LIABILITY FOR THE COST OF ANY SERVICE OR REPAIR IF THE SOFTWARE IS DEFECTIVE. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, STRICT LIABILITY, OR OTHERWISE, SHALL LICENSOR, OR ITS LICENSORS, SUPPLIERS OR RESELLERS, BE LIABLE TO LICENSEE OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES IN EXCESS OF THE MONEY PAID FOR THE SOFTWARE, EVEN IF LICENSOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. FURTHERMORE, SOME U.S. STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO LICENSEE.
TERMINATION
The license granted herein shall be perpetual. If Licensee fails to comply with any of the terms of this Agreement, this Agreement and the rights granted herein will terminate immediately. Licensor may, at its sole discretion and at any time, terminate this Agreement. On termination, Licensee must cease using and destroy all copies of the Software.
EXPORT CONTROLS
Licensee shall comply with all export laws, restrictions and regulations of the United States, the Directive 2009/428/EC of the European Parliament and of the Council and the Austrian Außenwirtschaftsgesetz 2011, BGBl I No. 26/2011. Licensee shall not export, re-export or otherwise transfer the Software to any country for which the United States or the European Union or Austria maintains an embargo, or to any person or entity on the U.S. Department of Treasury List of Specially Designated Nationals or the U.S. Department of Commerce Denied Persons List or Entity List. Licensee represents and warrants that licensee is not located in, under the control of, or a national or resident of any restricted country or on any such list.
THIRD PARTY CREDITS
Portions of the Software utilize or include third party software and other copyrighted materials. Credits, licensing terms, and disclaimers for such materials are contained in the installation directory for the Software, and are accessible via the “Licenses” dialog for the Software. Licensee agrees that use of such copyrighted materials is governed by their respective terms.
ENTIRE AGREEMENT
This Agreement represents the complete agreement concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only in writing executed by both parties. Coati Software OG reserves the exclusive right to periodically update this EULA at its discretion at any time, with reasonable notice to you by posting the new EULA at the following URL: http://www.coati.io/. Any action arising out of or relating to this Agreement may be brought exclusively in Salzburg, Austria, and Coati Software OG and you irrevocably consent to the jurisdiction of such courts and venue in Salzburg, Austria.
CONTACT
If you have questions regarding this agreement, contact:
Coati Software OG
Schlossallee 7/1
5412 Puch/Hallein
Austria
support@coati.io
+130 -57
View File
@@ -3,72 +3,144 @@
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# )
# INSTALL(CODE "
# execute_process(
# COMMAND upx --best ${CMAKE_SOURCE_DIR}/bin/app/Release/Coati)"
# )
#INSTALL(CODE
#"execute_process(COMMAND \"${APP_PROJECT_NAME}
#-d ${CMAKE_SOURCE_DIR}/bin/app/data/projects/tictactoe/tictactoe.coatiproject\")"
#)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data
DESTINATION .
PATTERN "log/*" EXCLUDE
PATTERN "projects/ignored" EXCLUDE
PATTERN "data/src" EXCLUDE
PATTERN "*.sqlite" EXCLUDE
PATTERN "ApplicationSettings.xml" EXCLUDE
PATTERN "ApplicationSettings_for_package.xml" EXCLUDE
PATTERN "ProjectSettings_template.xml" EXCLUDE
PATTERN "ApplicationSettings_template.xml" EXCLUDE
#INSTALL(CODE
#"execute_process(COMMAND ${APP_PROJECT_NAME}
#-d ${CMAKE_SOURCE_DIR}/bin/app/data/projects/tutorial/tutorial.coatiproject)"
#)
function(AddSharedToComponent componentName)
INSTALL(DIRECTORY
${CMAKE_SOURCE_DIR}/bin/app/data
DESTINATION .
COMPONENT ${componentName}
PATTERN "log/*" EXCLUDE
PATTERN "projects/ignored" EXCLUDE
PATTERN "data/src" EXCLUDE
PATTERN "data/gui/installer" EXCLUDE
PATTERN "data/install" EXCLUDE
PATTERN "ApplicationSettings.xml" EXCLUDE
PATTERN "ApplicationSettings_for_package.xml" EXCLUDE
PATTERN "ProjectSettings_template.xml" EXCLUDE
PATTERN "ApplicationSettings_template.xml" EXCLUDE
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/user/ApplicationSettings_for_package.xml
DESTINATION user
COMPONENT ${componentName}
RENAME ApplicationSettings.xml
)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/bin/app/data/gui/installer/EULA.txt
COMPONENT ${componentName}
DESTINATION .
)
INSTALL(FILES
#Qt libs
# FIXME need a better solution for that
${EXTERNAL_BUILD}/qt/lib/libQt5Gui.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5Gui.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5Gui.so.5.5.1
${EXTERNAL_BUILD}/qt/lib/libQt5Core.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5Core.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5Core.so.5.5.1
${EXTERNAL_BUILD}/qt/lib/libQt5Network.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5Network.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5Network.so.5.5.1
${EXTERNAL_BUILD}/qt/lib/libQt5XcbQpa.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5XcbQpa.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5XcbQpa.so.5.5.1
${EXTERNAL_BUILD}/qt/lib/libQt5Widgets.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5Widgets.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5Widgets.so.5.5.1
${EXTERNAL_BUILD}/qt/lib/libQt5DBus.so.5
${EXTERNAL_BUILD}/qt/lib/libQt5DBus.so.5.5
${EXTERNAL_BUILD}/qt/lib/libQt5DBus.so.5.5.1
#C++
${LIBSTDCPP}
DESTINATION lib
COMPONENT ${componentName}
)
INSTALL(FILES
${EXTERNAL_BUILD}/qt/plugins/platforms/libqxcb.so
DESTINATION platforms
COMPONENT ${componentName}
)
INSTALL(DIRECTORY
${CMAKE_SOURCE_DIR}/bin/app/data/projects
DESTINATION user
COMPONENT ${componentName}
)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/user
DESTINATION .
COMPONENT ${componentName}
PATTERN "ApplicationSettings.xml" EXCLUDE
PATTERN "ApplicationSettings_for_package.xml" EXCLUDE
PATTERN "ProjectSettings_template.xml" EXCLUDE
PATTERN "ApplicationSettings_template.xml" EXCLUDE
PATTERN "window_settings.ini_for_package" EXCLUDE
)
endfunction(AddSharedToComponent)
execute_process(
COMMAND clang -print-file-name=libstdc++.so
OUTPUT_VARIABLE LIBSTDCPP
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Add shared files to full and trial version
AddSharedToComponent(FULLVERSION)
AddSharedToComponent(TRIALVERSION)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/ide_plugins/vs
INSTALL(DIRECTORY
${CMAKE_SOURCE_DIR}/ide_plugins/sublime_text
DESTINATION plugin
PATTERN "vs2012" EXCLUDE
)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/ide_plugins/sublime_text
DESTINATION plugin
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/ApplicationSettings_for_package.xml
DESTINATION data
RENAME ApplicationSettings.xml
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup/Linux/coati.desktop
DESTINATION .
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/gui/icon/logo_1024_1024.png
DESTINATION .
RENAME coati.png
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/web/coati_manual.pdf
DESTINATION .
)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/setup/Linux/lib
DESTINATION .
COMPONENT FULLVERSION
)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/setup/Linux/libqxcb.so
DESTINATION platforms
${CMAKE_SOURCE_DIR}/setup/Linux/coati.desktop
${CMAKE_SOURCE_DIR}/setup/Linux/application-x-coati.xml
DESTINATION setup
COMPONENT FULLVERSION
)
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/setup/Linux/install.sh
${CMAKE_SOURCE_DIR}/setup/Linux/deinstall.sh
${CMAKE_SOURCE_DIR}/setup/Linux/removeConfigs.sh
${CMAKE_SOURCE_DIR}/setup/Linux/Coati_trial.sh
DESTINATION .
COMPONENT TRIALVERSION
)
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/setup/Linux/Coati.sh
DESTINATION .
COMPONENT FULLVERSION
)
# INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/setup/Linux/coati
# DESTINATION bin/
# )
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
INSTALL(TARGETS ${APP_PROJECT_NAME}
DESTINATION .
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_upx
DESTINATION .
COMPONENT FULLVERSION
RENAME Coati
)
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_trial_upx
DESTINATION .
COMPONENT TRIALVERSION
RENAME Coati_trial
)
# SET(CPACK_GENERATOR "DEB;TGZ")
@@ -78,16 +150,17 @@ SET(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_VERSION_NUMBER}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_VERSION_NUMBER}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_VERSION_NUMBER}")
set(VERSION_NUMBER "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(VERSION_NUMBER "${VERSION_MAJOR}_${VERSION_MINOR}_${VERSION_PATCH}")
SET(CPACK_PACKAGE_NAME "Coati")
SET(CPACK_PACKAGING_INSTALL_PREFIX "")
SET(CPACK_PACKAGING_INSTALL_DIRECTORY "Coati")
SET(CPACK_PACKAGE_VERSION ${VERSION_NUMBER})
SET(CPACK_PACKAGE_VENDOR "Coati Software")
# SET(CPACK_PACKAGE_VERSION ${GIT_VERSION_NUMBER})
SET(CPACK_PACKAGE_EXECUTABLES "Coati")
SET(CPACK_INSTALL_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/pre_install_linux.cmake")
SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}")
#SET(CPACK_PACKAGE_EXECUTABLES "Coati")
SET(CPACK_STRIP_FILES "coati/Coati")
SET(CPACK_PACKAGE_CONTACT "astallinger@coati.io")
MESSAGE(STATUS "${CMAKE_SYSTEM}")
INCLUDE(CPack)
+11
View File
@@ -0,0 +1,11 @@
# upx
execute_process(
COMMAND upx --brute ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release/Coati -o ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release/Coati_upx
)
execute_process(
COMMAND upx --brute ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release/Coati_trial -o
${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release/Coati_trial_upx
)
+9 -9
View File
@@ -12,38 +12,38 @@ then
if [ "$2" = "test" ]
then
#echo "release test"
ninja -C build/Release Coati_test && cd bin/test && Release/Coati_test
cmake --build build/Release --target Coati_test && cd bin/test && Release/Coati_test
elif [ "$2" = "trial" ]
then
ninja -C build/Release Coati_trial && cd bin/app && Release/Coati_trial
cmake --build build/Release --target Coati_trial && cd bin/app && Release/Coati_trial
elif [ "$2" = "keygen" ]
then
#echo "release keygen"
ninja -C build/Release Coati_license_generator && cd bin/license_generator && Release/Coati_license_generator
cmake --build build/Release --target Coati_license_generator && cd bin/license_generator && Release/Coati_license_generator
else
#echo "release app"
ninja -C build/Release Coati && cd bin/app && Release/Coati
cmake --build build/Release --target Coati && cd bin/app && Release/Coati
fi
elif [ "$1" = "debug" ] || [ "$1" = "d" ]
then
if [ "$2" = "test" ]
then
#echo "debug test"
ninja -C build/Debug Coati_test && cd bin/test && Debug/Coati_test
cmake --build build/Debug --target Coati_test && cd bin/test && Debug/Coati_test
elif [ "$2" = "trial" ]
then
ninja -C build/Debug Coati_trial && cd bin/app && Debug/Coati_trial
cmake --build build/Debug --target Coati_trial && cd bin/app && Debug/Coati_trial
elif [ "$2" = "keygen" ]
then
#echo "debug keygen"
ninja -C build/Debug Coati_license_generator && cd bin/license_generator && Debug/Coati_license_generator_d
cmake --build build/Debug --target Coati_license_generator && cd bin/license_generator && Debug/Coati_license_generator_d
else
#echo "debug app"
ninja -C build/Debug Coati && cd bin/app && Debug/Coati
cmake --build build/Debug --target Coati && cd bin/app && Debug/Coati
fi
elif [ "$1" = "package" ] || [ "$1" = "p" ]
then
ninja package -C build/Release Coati
cmake --build build/Release --target package
mkdir -p distr && cp build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr
echo "Packages copied into the distr folder"
else
+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build target
if [ "$1" = "release" ] || [ "$1" = "r" ]
then
if [ "$2" = "test" ]
then
#echo "release test"
cmake --build build/Release --target Coati_test
elif [ "$2" = "trial" ]
then
cmake --build build/Release --target Coati_trial
elif [ "$2" = "keygen" ]
then
#echo "release keygen"
cmake --build build/Release --target Coati_license_generator
else
#echo "release app"
cmake --build build/Release --target Coati
fi
elif [ "$1" = "debug" ] || [ "$1" = "d" ]
then
if [ "$2" = "test" ]
then
#echo "debug test"
cmake --build build/Debug --target Coati_test
elif [ "$2" = "trial" ]
then
cmake --build build/Debug --target Coati_trial
elif [ "$2" = "keygen" ]
then
#echo "debug keygen"
cmake --build build/Debug --target Coati_license_generator
else
#echo "debug app"
cmake --build build/Debug --target Coati
fi
elif [ "$1" = "package" ] || [ "$1" = "p" ]
then
cmake --build build/Release --target package
mkdir -p distr && cp build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr
echo "Packages copied into the distr folder"
else
echo "no arguments: first argument 'release' or 'debug', second argument 'test' for tests"
fi
+17 -4
View File
@@ -1,11 +1,24 @@
#!/bin/sh
COATI_PATH=`dirname "$0"`
# get the current directory
SOURCE="${0}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
COATI_PATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
#setup data folder
echo $COATI_PATH
if [ ! -d "${HOME}/.config/coati" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
cp -r $COATI_PATH/coati/data ${HOME}/.config/coati
mkdir ${HOME}/.config/coati
cp $COATI_PATH/user/* ${HOME}/.config/coati/
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
fi
export LD_LIBRARY_PATH=$COATI_PATH/coati/lib
cd ~/.config/coati && exec $COATI_PAT/coati/Coati
export LD_LIBRARY_PATH="$COATI_PATH/lib:LD_LIBRARY_PATH"
export QT_XKB_CONFIG_ROOT="/usr/share/X11/xkb:$QT_XKB_CONFIG_ROOT"
export QT_QPA_FONTDIR="$COATI_PATH/data/fonts:$QT_QPA_FONTDIR"
exec $COATI_PATH/Coati
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
# get the current directory
SOURCE="${0}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
COATI_PATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
#setup data folder
echo $COATI_PATH
if [ ! -d "${HOME}/.config/coatitrial" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
mkdir ${HOME}/.config/coatitrial
cp $COATI_PATH/user/* ${HOME}/.config/coatitrial/
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
fi
export LD_LIBRARY_PATH="$COATI_PATH/lib:LD_LIBRARY_PATH"
export QT_XKB_CONFIG_ROOT="/usr/share/X11/xkb:$QT_XKB_CONFIG_ROOT"
export QT_QPA_FONTDIR="$COATI_PATH/data/fonts:$QT_QPA_FONTDIR"
exec $COATI_PATH/Coati_trial
-2
View File
@@ -1,2 +0,0 @@
export LD_LIBRARY_PATH=$PWD/lib
exec ./Coati
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-coati">
<comment>Coati Project File</comment>
<icon name="project-coati"/>
<glob-deleteall/>
<glob pattern="*.coatiproject"/>
</mime-type>
<mime-type type="application/x-coati">
<comment>Coati Database</comment>
<glob-deleteall/>
<glob pattern="*.coatidb"/>
</mime-type>
</mime-info>
+1 -1
View File
@@ -3,7 +3,7 @@ Name=Coati
GenericName=Coati
X-GNOME-FullName=Coati
Comment=Code Explorer
Exec=/usr/local/bin/coati
Exec=/usr/bin/coati
Icon=coati
Terminal=true
Type=Application
+18
View File
@@ -0,0 +1,18 @@
MY_PATH=`dirname "$0"`
MY_PATH=../$MY_PATH
echo "Remove coati form system"
printf 'enter [y/n] '
read ans
case ${ans:=y} in [yY]*) ;; *) exit ;; esac
echo "Run this script as root"
rm /usr/bin/Coati
rm /usr/share/mime/packages/application-x-coatiproject
rm /usr/share/applications/coati.desktop
rm /usr/share/icons/coati.png
rm /usr/share/icons/project-coati.png
update-mime/database /usr/share/mime
+19 -1
View File
@@ -1 +1,19 @@
sudo ln -s ./Coati /bin/Coati
MY_PATH=`dirname "$0"`
MY_PATH=../$MY_PATH
cat EULA.txt
echo "Agree to the EULA"
printf 'enter [y/n] '
read ans
case ${ans:=y} in [yY]*) ;; *) exit ;; esac
echo "Run this script as root"
ln -s $MY_PATH/Coati.sh /usr/bin/Coati
cp $MY_PATH/setup/application-x-coatiproject /usr/share/mime/packages
cp $MY_PATH/setup/coati.desktop /usr/share/applications/
cp $MY_PATH/data/gui/icon/logo_1024_1024.png /usr/share/icon/coati.png
cp $MY_PATH/data/gui/icon/project_256_256.png /usr/share/icons/project-coati.png
update-mime-database /usr/share/mime
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
MY_PATH=`dirname "$0"`
echo "Are you sure to delete your coait configs"
printf 'enter [y/n] '
read ans
case ${ans:=y} in [yY]*) ;; *) exit ;; esac
rm -rf ~/.config/coati
+4 -5
View File
@@ -41,6 +41,10 @@ int main(int argc, char *argv[])
Version version = Version::fromString(GIT_VERSION_NUMBER);
QApplication::setApplicationVersion(version.toDisplayString().c_str());
if(AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString());
}
setup(argc, argv);
QtApplication qtApp(argc, argv);
@@ -55,11 +59,6 @@ int main(int argc, char *argv[])
QtViewFactory viewFactory;
QtNetworkFactory networkFactory;
if(AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString());
}
LicenseChecker checker;
std::shared_ptr<Application> app = Application::create(version, &viewFactory, &networkFactory);
+10
View File
@@ -164,6 +164,16 @@ void FileSystem::createDirectory(const FilePath& path)
boost::filesystem::create_directories(path.str());
}
bool FileSystem::copy_directory(const FilePath& from, const FilePath& to)
{
if(!from.exists() || to.exists())
{
return false;
}
boost::filesystem::copy_directory(boost::filesystem::path(from.str()),boost::filesystem::path(to.str()));
return true;
}
std::vector<FilePath> FileSystem::getSubDirectories(const FilePath &path)
{
std::vector<FilePath> v;
+2
View File
@@ -30,6 +30,8 @@ public:
static std::string fileName(const std::string& path);
static std::string absoluteFilePath(const std::string& path);
static bool copy_directory(const FilePath& from, const FilePath& to);
static std::string extension(const std::string& path);
static std::string filePathWithoutExtension(const std::string& path);
static bool hasExtension(const std::string& filepath, const std::vector<std::string>& extensions);
@@ -407,7 +407,6 @@ TiXmlElement* SolutionParserVisualStudio::getFirstTagByName(TiXmlElement* root,
{
if (element == NULL)
{
int foo = 0;
}
std::string value = element->Value();
@@ -432,7 +431,6 @@ TiXmlElement* SolutionParserVisualStudio::getFirstTagByName(TiXmlElement* root,
{
if (element == NULL)
{
int foo = 0;
}
while (element->Parent()->ToElement() != NULL && element->Parent()->NextSiblingElement() == NULL)
@@ -441,7 +439,6 @@ TiXmlElement* SolutionParserVisualStudio::getFirstTagByName(TiXmlElement* root,
if (newElement == NULL)
{
int foo = 0;
}
element = newElement;
@@ -487,7 +484,6 @@ std::vector<TiXmlElement*> SolutionParserVisualStudio::getAllTagsByName(TiXmlEle
{
if (element == NULL)
{
int foo = 0;
}
while (element->Parent()->ToElement() != NULL && element->Parent()->NextSiblingElement() == NULL)
@@ -496,7 +492,6 @@ std::vector<TiXmlElement*> SolutionParserVisualStudio::getAllTagsByName(TiXmlEle
if (newElement == NULL)
{
int foo = 0;
}
element = newElement;
@@ -523,7 +518,6 @@ TiXmlElement* SolutionParserVisualStudio::getFirstTagByNameWithAttribute(TiXmlEl
{
if (element == NULL)
{
int foo = 0;
}
std::string value = element->Value();
@@ -700,4 +694,4 @@ std::vector<std::string> SolutionParserVisualStudio::makePathsCanonical(const st
}
return canonicalPaths;
}
}
+1 -1
View File
@@ -2,7 +2,7 @@ add_files(
LIB_GUI_FILES
platform_includes/deploy.h
platform_includes/includesDefault.h
platform_includes/includesLinux.h
platform_includes/includesMac.h
platform_includes/includesWindows.h
@@ -1,13 +0,0 @@
#ifndef INCLUDES_DEFAULT_H
#define INCLUDES_DEFAULT_H
#include "utility/UserPaths.h"
void setup(int argc, char *argv[])
{
std::string userdir(std::getenv("HOME"));
userdir.append("/.config/coati/");
UserPaths::setUserDataPath(userdir);
}
#endif // INCLUDES_DEFAULT_H
@@ -0,0 +1,31 @@
#ifndef INCLUDES_DEFAULT_H
#define INCLUDES_DEFAULT_H
#include "utility/AppPath.h"
#include "utility/UserPaths.h"
#include "utility/file/FilePath.h"
#include "utility/file/FileSystem.h"
#include "isTrial.h"
void setup(int argc, char *argv[])
{
std::string userdir(std::getenv("HOME"));
if(isTrial())
{
userdir.append("/.config/coatitrial/");
}
else
{
userdir.append("/.config/coati/");
}
UserPaths::setUserDataPath(userdir);
FilePath userDataPath(userdir);
//copy default user folder to .config/coati if it does not exist
if (!userDataPath.exists())
{
FilePath from(AppPath::getAppPath() + "user");
FileSystem::copy_directory(from, userDataPath);
}
}
#endif // INCLUDES_DEFAULT_H
-1
View File
@@ -63,7 +63,6 @@ bool process_command_line(int argc, char** argv)
if(vm.count("generate"))
{
bool fail = false;
if(!vm.count("version"))
{
std::cout << "Version of Coati is needed to generate a License" << std::endl;