alexey-t / cudatext_up Goto Github PK
View Code? Open in Web Editor NEWBash script to download CudaText sources (all packages) and compile them. Requires Lazarus 2.0+.
License: MIT License
Bash script to download CudaText sources (all packages) and compile them. Requires Lazarus 2.0+.
License: MIT License
Line 121 in 5182c76
the reason why i need it is because in my fork i renamed "origin" to "upstream".
git pull
will do almost the same, but it will use whatever remote is specified for current branch.
@Artem3213212 @fedan У меня такое с скриптом. Убунту 19.4 х64. при пуске он создает src с правами d------ и не может в нее зайти. Потом плодит папки выше src. и не видит их. поправить бы
cudaup.packets lists the package for bgrabitmap as:
bgrabitmap/bgrabitmappack.lpk
However, the correct one seems to be:
bgrabitmap/bgrabitmap/bgrabitmappack.lpk
Not sure if it is related to my issue here that I solved using stable instead of trunk though, but this is the error I'm gettting
atsynedit.pas(10244) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile package atsynedit_package 2.10: stopped with exit code 1
Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1"
rm: cannot remove './src/CudaText/app/cudatext': No such file or directory
Error: (lazbuild) Broken dependency: atsynedit_cmp_package
cp: cannot stat './src/CudaText/app/cudatext': No such file or directory
[giulio@fedora CudaText_up]$
From the readme.md for CudaText_up:
Better run script via "sudo", otherwise new folders will have
mode rw-r--r-- and resulting CudaText binary cannot create
its config settings/user.json
Is this simply a folder/file permission issue? Should not a setting a different umask or folder perm fixup suffice without resorting to something so drastic as running a build script as root?
What exactly needs to be accomplished here? If this is just about file/folder permission, sudo is obviously not necessary, and should not be recommended, as there are much safer ways to address this.
If this is about file/folder ownership, that is a separate issue, and is usually in regard to building an archive, and fakeroot is typically used there to avoid using sudo or some other running as root.
I'm working on CudaText_up_py and need to know specifically what needs to be addressed here in regard to file/folder permissions, as I will not be recommending it be run as root or via sudo, but of course I need the resulting files/folders to have the correct permissions.
@veksha I made last commit which changes current branch for 'bgrabitmap'. after cloning. i don't know how to fix code to keep that branch after pulling too. i am weak in bash.
/home/system/Downloads/CudaText_up/src/CudaText/app/formmain.pas(3549,3) Error: (3026) Wrong number of parameters specified for call to "QTimer_singleShot"
/usr/lib/lazarus/lcl/units/aarch64-linux/qt5/qt5.ppu:qt56.pas(2535,11) Error: (5088) Found declaration: QTimer_singleShot(LongInt;QObjectH;PChar); CDecl;
/usr/lib/lazarus/lcl/units/aarch64-linux/qt5/qt5.ppu:qt56.pas(2536,11) Error: (5088) Found declaration: QTimer_singleShot(LongInt;QtTimerType;QObjectH;PChar); CDecl;
Maybe my lazarus version (2.2.1) is too old?
linux.org.ru
не собирается на арче через ./cudaup.sh -g -p -m -w gtk2, ошибки https://pastebin.com/raw/t5Xmjybc
Error: (lazbuild) Package ./src/EncConv/encconv/encconv_package.lpk is only for runtime.
Error: (lazbuild) Package ./src/ATSynEdit_Cmp/atsynedit_cmp/atsynedit_cmp_package.lpk is only for runtime.
Error: (lazbuild) Package ./src/EControl/econtrol/econtrol_package.lpk is only for runtime.
Error: (lazbuild) Package ./src/ATSynEdit_Ex/atsynedit_ex/atsynedit_ex_package.lpk is only for runtime.
Error: (lazbuild) Package ./src/Emmet-Pascal/emmet/emmet_package.lpk is only for runtime.
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Fr/usr/lib/lazarus/components/codetools/fpc.errore.msg" "-Fr/usr/lib/lazarus/components/codetools/fpc.errore.msg"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Fr/usr/lib/lazarus/components/codetools/fpc.errore.msg" "-Fr/usr/lib/lazarus/components/codetools/fpc.errore.msg"
Hint: (lazarus) [CalcTargets] Lazarus directory is readonly, using fallback target directory: /home/arch/.lazarus/bin
Note: (lazarus) renamed file "/home/arch/.lazarus/bin/lazarus" to "/home/arch/.lazarus/bin/lazarus.old"
Hint: (lazarus) [CalcTargets] Lazarus directory is readonly, using fallback target directory: /home/arch/.lazarus/bin
make: Entering directory '/usr/lib/lazarus'
/usr/bin/make -C ide idepkg
make[1]: Entering directory '/usr/lib/lazarus/ide'
/usr/bin/make --assume-new=lazarus.pp lazarus OPT=' @/home/arch/.lazarus/idemake.cfg'
make[2]: Entering directory '/usr/lib/lazarus/ide'
/usr/bin/fpc -gl -vbqewnhi -Sci -dlclgtk2 -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuframes -Fu. -Fu/usr/lib/fpc/3.0.4/units/x86_64-linux/rtl -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/x86_64-linux/gtk2 -Cg -Fl/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0 -Flinclude -Fl/etc/ld.so.conf.d/*.conf @/home/arch/.lazarus/idemake.cfg -dx86_64 lazarus.pp
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Hint: (11030) Start of reading config file /home/arch/.lazarus/idemake.cfg
Hint: (11031) End of reading config file /home/arch/.lazarus/idemake.cfg
Free Pascal Compiler version 3.0.4 [2019/05/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling lazarus.pp
(9022) Compiling resource /home/arch/.lazarus/units/x86_64-linux/gtk2/lazarus.or
(9015) Linking /home/arch/.lazarus/bin/lazarus
/usr/bin/ld: warning: /home/arch/.lazarus/bin/link.res contains output sections; did you forget -T?
(1008) 235 lines compiled, 7.9 sec
(1022) 4 hint(s) issued
make[2]: Leaving directory '/usr/lib/lazarus/ide'
make[1]: Leaving directory '/usr/lib/lazarus/ide'
make: Leaving directory '/usr/lib/lazarus'
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Note: (11046) DWARF debug information cannot be used with smart linking on this target, switching to static linking
Free Pascal Compiler version 3.0.4 [2019/05/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling cudatext.lpr
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(11,43) Hint: (5023) Unit "formconsole" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(12,3) Hint: (5023) Unit "proc_str" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(12,22) Hint: (5023) Unit "proc_py_const" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(12,52) Hint: (5023) Unit "FormFrame" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(13,3) Hint: (5023) Unit "form_menu_commands" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(13,23) Hint: (5023) Unit "formgoto" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(13,33) Hint: (5023) Unit "proc_cmd" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(13,43) Hint: (5023) Unit "form_menu_list" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(13,59) Hint: (5023) Unit "formsavetabs" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(14,3) Hint: (5023) Unit "formconfirmrep" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(15,3) Hint: (5023) Unit "formcolorsetup" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(15,19) Hint: (5023) Unit "formabout" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(15,30) Hint: (5023) Unit "formkeys" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(15,40) Hint: (5023) Unit "formcharmaps" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(15,54) Hint: (5023) Unit "proc_keysdialog" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(16,3) Hint: (5023) Unit "proc_customdialog" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(16,22) Hint: (5023) Unit "proc_miscutils" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(17,3) Hint: (5023) Unit "formkeyinput" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(17,17) Hint: (5023) Unit "proc_scrollbars" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(18,3) Hint: (5023) Unit "form_addon_report" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(18,22) Hint: (5023) Unit "fix_focus_window" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(18,59) Hint: (5023) Unit "proc_lexer_styles" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(19,3) Hint: (5023) Unit "form_choose_theme" not used in cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(19,39) Hint: (5023) Unit "proc_windows_link" not used in cudatext
(9022) Compiling resource /home/arch/src/cudatext/CudaText_up/src/CudaText/app/lib/x86_64-linux/cudatext.or
(9015) Linking /home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(36,1) Warning: (9034) "crtbeginS.o" not found, this will probably cause a linking failure
/home/arch/src/cudatext/CudaText_up/src/CudaText/app/cudatext.lpr(36,1) Warning: (9034) "crtendS.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: /home/arch/src/cudatext/CudaText_up/src/CudaText/app/link.res contains output sections; did you forget -T?
(1008) 37 lines compiled, 4.4 sec
(1021) 2 warning(s) issued
(1022) 26 hint(s) issued
(1023) 1 note(s) issued
When making changes for #17 I noticed an error. Running ./cudaup.sh -g -m
I got a (line number could be approximate):
./cudaup.sh: line 164: [: !=: unary operator expected
This probably happens because I haven't set --ws
or -w
param, so $WS
is empty. So the line if [ $WS != "" ]
raises this error. Adding double quotes to variable, like if [ "$WS" != "" ]
will fix it. I've seen people suggesting to add double quotes inside single brackets ([ ... ]
) for this reason. This should be fixed throughout the script.
Edit: Add "throughout the script"
from opennet.ru. @Artem3213212 может ты можешь посмотреть.
https://www.opennet.ru/openforum/vsluhforumID3/122286.html#88
[оверквотинг удален]
скрипта if [ ! -x "$lazdir/lazbuild" ]; then echo "Couldn't find lazbuild" echo "Use -l option" exit 1 fi do "$lazdir/lazbuild" -q --lazarusdir="$lazdir" "./src/$i" "$lazdir/lazbuild" -q --lazarusdir="$lazdir" --add-package "./src/$i" done
Я видел это. Он не нужен для того, чтобы искать lazbuild, sh легко находит lazbuild через
PATH, и более того, именно через PATH он и находится в скрипте, и потом ищется директория
где lazarus. lazdir нужен чтобы для --lazarusdir указать значение. Я это одолел всё.
Но нашлась опция --verbose-pkgsearch для lzbuild, он находит депендансы! По-крайней мере
все, кроме bgrabitmappack
lazbuild --ws=gtk3 -q --lazarusdir=/usr/share/lazarus --pcp=$HOME/.lazarus
--verbose-pkgsearch ./src/CudaText/app/cudatext.lpi | grep -i bgra
Info: (lazarus) Open dependency Проект: cudatext uses BGRABitmapPack ...
Info: (lazarus) Open dependency [BGRABitmapPack]: trying in owner directory
"/home/ordu/src/CudaText_up/src/CudaText/app/" ...
Info: (lazarus) Open dependency Пакет: atsynedit_package 1.6 uses BGRABitmapPack ...
Info: (lazarus) Open dependency [BGRABitmapPack]: trying in owner directory
"/home/ordu/src/CudaText_up/src/ATSynEdit/atsynedit/" ...
Error: (lazbuild) Broken dependency: BGRABitmapPack
Хз, что это значит. Наверное, не находит, но я не уверен. Он не про все пакеты пишет, что
он их нашёл:
lazbuild --ws=gtk3 -q --lazarusdir=/usr/share/lazarus --pcp=$HOME/.lazarus
--verbose-pkgsearch ./src/CudaText/app/cudatext.lpi | grep -i encconv
Info: (lazarus) Open dependency Проект: cudatext uses encconv_package ...
Info: (lazarus) Open dependency [encconv_package]: trying in owner directory
"/home/ordu/src/CudaText_up/src/CudaText/app/" ...
Info: (lazarus) Open dependency Пакет: atsynedit_package 1.6 uses encconv_package ...
Info: (lazarus) Open dependency [encconv_package]: trying in owner directory
"/home/ordu/src/CudaText_up/src/ATSynEdit/atsynedit/" ...
Info: (lazarus) Open dependency Пакет: atbinhex_package 1.1 uses encconv_package ...
Info: (lazarus) Open dependency [encconv_package]: trying in owner directory
"/home/ordu/src/CudaText_up/src/ATBinHex-Lazarus/atbinhex/" ...
Хотя про некоторые пишет:
lazbuild --ws=gtk3 -q --lazarusdir=/usr/share/lazarus --pcp=$HOME/.lazarus
--verbose-pkgsearch ./src/CudaText/app/cudatext.lpi | grep -i emmet
Info: (lazarus) Open dependency Проект: cudatext uses emmet_package ...
Info: (lazarus) Open dependency: trying "emmet_package" in 2 links:
"/home/ordu/src/CudaText_up/src/Emmet-Pascal/emmet/emmet_package.lpk" ...
Info: (lazarus) Open dependency: package file found:
"/home/ordu/src/CudaText_up/src/Emmet-Pascal/emmet/emmet_package.lpk". Parsing lpk ...
Info: (lazarus) Open dependency [emmet_package]: Success: "/home/ordu/src/CudaText_up/src/Emmet-Pascal/emmet/emmet_package.lpk"
Info: (lazarus) Open dependency Пакет: emmet_package 1.0 uses LCL ...
Info: (lazarus) Open dependency Пакет: emmet_package 1.0 uses FCL ...
I got cudatext to build on freebsd by hacking cudaup.sh in a non-maintainable way.
diff --git a/cudaup.sh b/cudaup.sh
index 03ba3bd..d418e90 100755
--- a/cudaup.sh
+++ b/cudaup.sh
@@ -1,4 +1,6 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+set -euo pipefail
#set -e
OS="linux"
@@ -29,17 +31,17 @@ Options:
[ $# -eq 0 ] && { echo "$usage"; exit 0; }
-OPTIONS=hgpml:o:c:w:
-LONGOPTS=clean,help,get,packs,make,lazdir:,os:,cpu:,ws:
-! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
-if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
- echo "$usage"
- exit 2
-fi
-eval set -- "$PARSED"
+#OPTIONS=hgpml:o:c:w:
+#LONGOPTS=clean,help,get,packs,make,lazdir:,os:,cpu:,ws:
+#! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
+#if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
+# echo "$usage"
+# exit 2
+#fi
+#eval set -- "$PARSED"
while true; do
- case "$1" in
+ case "${1:-__NONE__}" in
--clean)
DoClean=true
shift
@@ -80,6 +82,9 @@ while true; do
shift
break
;;
+ __NONE__)
+ break
+ ;;
esac
done
@@ -162,7 +167,7 @@ then
"$lazdir/lazbuild" $inc -q --lazarusdir="$lazdir" "./src/$i"
done
fi
- rm "./src/CudaText/app/cudatext"
+ rm -f "./src/CudaText/app/cudatext"
"$lazdir/lazbuild" $inc -q --lazarusdir="$lazdir" "./src/CudaText/app/cudatext.lpi"
OUTDIR="./bin/$OS-$CPU-$WS"
mkdir -pv $OUTDIR
Only needed to install a few packages to get the build via ./cudaup.sh -o freebsd -m
to complete
sudo pkg ins lazarus-gtk2
sudo pkg ins fpc
sudo pkg ins fpc-fcl-stl
...
(9022) Compiling resource /usr/home/dwight/build/cudatext/CudaText_up/src/CudaText/app/lib/x86_64-freebsd/cudatext.or
(9015) Linking /usr/home/dwight/build/cudatext/CudaText_up/src/CudaText/app/cudatext
(1008) 939 lines compiled, 11.4 sec
(1021) 42 warning(s) issued
(1022) 27 hint(s) issued
(1023) 1 note(s) issued
I would like to fix this and submit a PR that makes cudaup portable on Linux and FreeBSD, but I'd almost prefer to rewrite it in python (so it is not relying on external commands like getopt that may not be portable between Linux and FreeBSD) and just have cudaup.sh be a wrapper for cudaup.py, and determine which python to execute by checking which python versions are installed, and choosing the latest (or something like that, to be determined...).
So I'd like to discuss the most agreeable way to proceed on this.
I see in the README.md file the repo is MIT. A LICENSE file would make this shown within the first page of the repo.
Steps to resolve:
Add file
button and select Create new file
.Name of your file...
text box, type in LICENSE.md
and a new button will appear.Choose a license template
button.Copyright 2018-2021 John Doe
.Review and Submit
button.Commit new file
enter a commit description. I like to use the precise SPDX short identifier for the commit such as MIT
.Commit directly to the x branch.
radio button.Commit new file
button.I'm trying to flatpak Cuda text and one of the requirements is that during the build stage there is no requests to external urls. would it be possible to say pre clone repos and have cuda text pick them up?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.