diff --git a/.gitignore b/.gitignore index d5036a609..caed69009 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ eepp.geany /projects/osx/ecode/ecode.app /bin/assets/icon/ee.iconset ecode.dmg +/projects/linux/ecode/ecode.app +*.AppImage \ No newline at end of file diff --git a/projects/linux/ecode/AppRun b/projects/linux/ecode/AppRun new file mode 100755 index 000000000..5a31ee753 --- /dev/null +++ b/projects/linux/ecode/AppRun @@ -0,0 +1,7 @@ +#!/bin/sh +CANONPATH=`readlink -f "$0"` +DIRPATH="`dirname "$CANONPATH"`" +cd $DIRPATH + +LD_LIBRARY_PATH=./libs ./ecode + diff --git a/projects/linux/ecode/build.app.sh b/projects/linux/ecode/build.app.sh new file mode 100755 index 000000000..0301bba8d --- /dev/null +++ b/projects/linux/ecode/build.app.sh @@ -0,0 +1,36 @@ +#!/bin/sh +CANONPATH=`readlink -f "$0"` +DIRPATH="`dirname "$CANONPATH"`" +cd $DIRPATH +cd ../../../ +premake4 --with-mojoal gmake +cd make/linux +make -j$(nproc) config=release ecode +cd $DIRPATH +rm -rf ./ecode.app +mkdir -p ecode.app/assets +mkdir -p ecode.app/libs +chmod +x AppRun +cp AppRun ecode.app/ +cp ecode.desktop ecode.app/ +cp ../../../bin/assets/icon/ee.png ecode.app/ecode.png +cp ../../../libs/linux/libeepp.so ecode.app/libs/ +cp ../../../bin/ecode ecode.app/ +cp -L $(whereis libSDL2-2.0.so.0 | awk '{print $NF}') ecode.app/libs/ +strip ecode.app/libs/libSDL2-2.0.so.0 +#cp -r ../../../bin/assets ecode.app/assets +mkdir -p ecode.app/assets/colorschemes +mkdir -p ecode.app/assets/fonts +cp -r ../../../bin/assets/colorschemes ecode.app/assets/ +#cp -r ../../../bin/assets/fonts ecode.app/assets/ +cp -r ../../../bin/assets/fonts/DejaVuSansMono.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/nonicons.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoSans-Regular.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/remixicon.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoEmoji-Regular.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoColorEmoji.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/plugins ecode.app/assets/ +cp -r ../../../bin/assets/icon ecode.app/assets/ +mkdir ecode.app/assets/ui +cp ../../../bin/assets/ui/breeze.css ecode.app/assets/ui/ +appimagetool ecode.app diff --git a/projects/linux/ecode/ecode.desktop b/projects/linux/ecode/ecode.desktop new file mode 100644 index 000000000..d93d460b4 --- /dev/null +++ b/projects/linux/ecode/ecode.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Comment= +Exec=ecode +Icon=ecode +Name=ecode +NoDisplay=false +StartupNotify=true +Type=Application +X-KDE-SubstituteUID=false +X-KDE-Username= +Categories=Utility;TextEditor; diff --git a/projects/osx/ecode/build.app.sh b/projects/osx/ecode/build.app.sh index 2c4331aa0..6756db86b 100755 --- a/projects/osx/ecode/build.app.sh +++ b/projects/osx/ecode/build.app.sh @@ -15,7 +15,13 @@ install_name_tool -change libeepp.dylib @executable_path/libeepp.dylib ecode.app #cp -r ../../../bin/assets ecode.app/Contents/MacOS/assets mkdir -p ecode.app/Contents/MacOS/assets/colorschemes cp -r ../../../bin/assets/colorschemes/ ecode.app/Contents/MacOS/assets/colorschemes/ -cp -r ../../../bin/assets/fonts ecode.app/Contents/MacOS/assets/ +#cp -r ../../../bin/assets/fonts ecode.app/assets/ +cp -r ../../../bin/assets/fonts/DejaVuSansMono.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/nonicons.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoSans-Regular.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/remixicon.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoEmoji-Regular.ttf ecode.app/assets/fonts/ +cp -r ../../../bin/assets/fonts/NotoColorEmoji.ttf ecode.app/assets/fonts/ cp -r ../../../bin/assets/plugins ecode.app/Contents/MacOS/assets/ cp -r ../../../bin/assets/icon ecode.app/Contents/MacOS/assets/ mkdir ecode.app/Contents/MacOS/assets/ui diff --git a/src/eepp/ui/css/stylesheetlength.cpp b/src/eepp/ui/css/stylesheetlength.cpp index 9e0d68e6a..a38a42214 100644 --- a/src/eepp/ui/css/stylesheetlength.cpp +++ b/src/eepp/ui/css/stylesheetlength.cpp @@ -230,9 +230,12 @@ StyleSheetLength StyleSheetLength::fromString( std::string str, const Float& def } std::string StyleSheetLength::toString() const { + std::string res; if ( (Int64)mValue == mValue ) - return String::format( "%lld%s", (Int64)mValue, unitToString( mUnit ).c_str() ); - return String::format( "%.2f%s", mValue, unitToString( mUnit ).c_str() ); + res = String::format( "%lld%s", (Int64)mValue, unitToString( mUnit ).c_str() ); + res = String::format( "%.2f%s", mValue, unitToString( mUnit ).c_str() ); + String::replace( res, ",", "." ); + return res; } }}} // namespace EE::UI::CSS diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index 55c5cf757..e30e33ae9 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -2760,6 +2760,12 @@ void App::init( std::string file, const Float& pidelDensity, const std::string& FileSystem::dirAddSlashAtEnd( mResPath ); mIsBundledApp = true; } +#elif EE_PLATFORM == EE_PLATFORM_LINUX + if ( String::contains( mResPath, ".mount_" ) ) { + mResPath = FileSystem::getCurrentWorkingDirectory(); + FileSystem::dirAddSlashAtEnd( mResPath ); + mIsBundledApp = true; + } #endif mResPath += "assets"; FileSystem::dirAddSlashAtEnd( mResPath );