If I compile this Delphi 2007 project
program MyProject;
{$APPTYPE CONSOLE}
procedure Test;
var
i: Integer;
begin
if i = 666 then
i := 42;
end;
begin
Test;
end.
from the command line like
MSBuild MyProject.dproj /t:Rebuild /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=log.txt;verbosity=minimal
I get this log file:
__________________________________________________
Projekt C:\Documents and Settings\pcbs1251\My Documents\RAD Studio\Projekte\MyProject\MyProject.dproj (Rebuild-Ziel(e)):
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dcc32.exe -B -DRELEASE [SNIP] MyProject.dpr
CodeGear Delphi für Win32 Compiler-Version 18.5
Copyright (c) 1983,2007 CodeGear
MyProject.dpr(10) Hinweis: H2077 Auf 'i' zugewiesener Wert wird niemals benutzt
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets : warning : MyProject.dpr(9) Warnung: W1036 Variable 'i' ist möglicherweise nicht initialisiert worden
MyProject.dpr(9) Warnung: W1036 Variable 'i' ist möglicherweise nicht initialisiert worden
17 Zeilen, 0.00 Sekunden, 11016 Byte-Code, 12156 Byte-Daten.
Erstellen des Projekts MyProject.dproj beendet.
Now I would like to trim this to
MyProject.dpr(10) Hinweis: H2077 Auf 'i' zugewiesener Wert wird niemals benutzt
MyProject.dpr(9) Warnung: W1036 Variable 'i' ist möglicherweise nicht initialisiert worden
Are there any FileLoggerParameters to do this?
Update: As there seems no way to make MSBuild do what I want I finally wrote a little Delphi program to format the MSBuild output to my needs.
I generally use grep, sed and awk to do things like this.
Try msbuild /v:m. This sets msbuild command line verbosity to "minimal". It may give you something closer to what you want. See 'msbuild /?' for help on that.
Many command line tools have a '/nologo' option that could help. Maybe you can get that passed to dcc. Maybe you'll have to edit the .targets files.
Related
I tried setting up a Docker environment for my developing ventures:
I installed docker using the docs "Install docker engine" from their website and receive the following output:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
containerd.io ist schon die neueste Version (1.6.13-1).
docker-ce-cli ist schon die neueste Version (5:20.10.22~3-0~ubuntu-jammy).
docker-ce ist schon die neueste Version (5:20.10.22~3-0~ubuntu-jammy).
docker-compose-plugin ist schon die neueste Version (2.14.1~ubuntu-jammy).
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
cpu-checker ibverbs-providers ipxe-qemu ipxe-qemu-256k-compat-efi-roms libaio1
libbrlapi0.8 libcacard0 libfdt1 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0
libibverbs1 libiscsi7 libpmemobj1 librados2 librbd1 librdmacm1 libspice-server1
libusbredirparser1 libvirglrenderer1 msr-tools ovmf pass qemu-block-extra
qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 qemu-utils
qrencode seabios tree uidmap xclip
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 9 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
then nothing more.
(well, my nvidia drivers are running bonkers at the moment.)
sudo docker run hello-world sudo: docker: Befehl nicht gefunden
I reinstalled maybe ten times now and have not a single clue how to pursue this further.
We run a dev-environment in docker that emulates a rather complex working environment, where servers push things to other servers etc. so I am depending on docker a lot and cannot work at the moment.
By now I am so confused, that I think starting from the beginning works best, thus I tried uninstalling following this one: https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker
Now nothing works, not even installing ...
any hint is highly appreciated
my aim is to install cjson with luarocks on Windows 10 (64 Bit), what i've done so far:
Try the installation via make:
put this luajit installation on the path "C:\torch" and set all the following path variables manually (see issues)
Path = "C:\torch\bin;"%PATH%
LUA_CPATH="C:\torch\bin\?.dll;;"
LUA_DEV="C:\torch;"
LUA_PATH="C:\torch\lua\?;C:\torch\lua\?.lua;C:\torch\lua\?\init.lua;;"
put this version of lua-cjson-2.1.0 on the following folder: "C:\Users\username\Desktop\lua-cjson-2.1.0"
install mingw with make version 3.81, cmake 3.13.2 and add "C:\MinGW\msys\1.0\bin\" and "C:\Program Files\CMake\bin\" to the Path variable
uncomment variables for Windows(MingGW) and setting the PREFIX = C:\torch\ in the Makefile of lua-cjson-2.1.0
go via admin-shell to "C:\Users\username\Desktop\lua-cjson-2.1.0"
"make install" yields the following output:
cc -c -O3 -Wall -pedantic -DNDEBUG -IC:\torch CJSON_CFLAGS = -DDISABLE_INVALID_NUMBERS/include -fpic -o lua_cjson.o lua_cjson.c
make: cc: Command not found
make: *** [lua_cjson.o] Error 127`
Another try with luarocks doesn´t work too:
call ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64"
then call "luarocks make" as described in the cjson-manual
this yields the following output:
cl /nologo /MD /O2 -c -Folua_cjson.obj -IC:/torch/include lua_cjson.c -DDISABLE_INVALID_NUMBERS lua_cjson.c
cl /nologo /MD /O2 -c -Fostrbuf.obj -IC:/torch/include strbuf.c -DDISABLE_INVALID_NUMBERS strbuf.c
strbuf.c(98): warning C4311: "type conversion": pointer truncation from "strbuf_t *" to "long"
strbuf.c(172): warning C4311: "type conversion": pointer truncation from "strbuf_t *" to"long"
cl /nologo /MD /O2 -c -Fofpconv.obj -IC:/torch/include fpconv.c -DDISABLE_INVALID_NUMBERS fpconv.c
link -dll -def:cjson.def -out:cjson.dll C:/torch/lib/libluajit.lib lua_cjson.obj strbuf.obj fpconv.obj
Microsoft (R) Incremental Linker Version 14.10.25019.0
Copyright (C) Microsoft Corporation. All rights reserved.
Bibliothek "cjson.lib" und Objekt "cjson.exp" werden erstellt.
lua_cjson.obj : error LNK2019: Reference to unresolved external symbol "strncasecmp" in function "json_is_invalid_number".
cjson.dll : fatal error LNK1120: 1 nicht aufgelöste Externe
Error: Build error: Failed compiling module cjson.dll`
Whats wrong with the installation procedure?
I created a new Rmd file in the latest R and Rstudio version, and with the complete version of MiKTeX installed. In my windows 10 machine.
When I tried to knit it I got the following error
! LaTeX Error: File `fancyvrb.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.34 \newcommand
pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
Además: Warning message:
comando ejecutado '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS pdfprueba.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pdfprueba.pdf --template "C:\Users\karin\Documents\R\win-library\3.3\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in"' tiene estatus 43
Ejecución interrumpida
I suspected that it could have been that I didn't have the package fancyvrb in MiKTeX , so I followed these instructions but I still get the same error.
Try the same using
Miktex package manager (admin)
Under > repository check that your package repository is up to date.
In the name box type the name of your package
Then filter
then add your package
To test if your package is installed in dos CMD type
kpsewhich fancyvrb.sty. you should be able to see the path to your package.
Microsoft Windows [version 10.0.15063]
(c) 2017 Microsoft Corporation. Tous droits réservés.
C:\>kpsewhich fancyvrb.sty
C:/Users/me/AppData/Roaming/MiKTeX/2.9/tex/latex/fancyvrb/fancyvrb.sty
I'm a beginner about Inno Setup.
I want create an installer which copy two .exe files and append a value to the PATH environment variable.
Particularly I have to copy two executable files, called pandoc.exe and pandoc-citeproc.exe which are previously changed by me with visual studio developer prompt to don't have problem of Memory with large file conversions.
So I wrote this script with Inno Setup:
[Setup]
AppName=My Program
AppVersion=1.16.0.2
DefaultDirName={pf}\pandocX64
[Files]
Source: "pandoc.exe"; DestDir: "{app}";
Source: "pandoc-citeproc.exe"; DestDir: "{app}";
[Setup]
; Tell Windows Explorer to reload the environment
ChangesEnvironment=yes
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
ValueType: expandsz; ValueName: "PATH"; ValueData: "{olddata};{pf}\pandocX64";
Check: NeedsAddPath('{pf}\pandocX64')
[Code]
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
// look for the path with leading and trailing semicolon
// Pos() returns 0 if not found
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;
So, If I don't use the part of code to update the PATH variable, the installer copy the two executable files in C:\Program Files (x86)\pandocX64, and this is correct.
But I want also append that directory to the PATH system environment variable.
I read these threads:
How to set a global environment variable from Inno Setup installer?
How do I modify the PATH environment variable when running an Inno Setup Installer?
and I tried to write the code above.
Note that I put PATH as ValueName, and {olddata};{pf}\pandocX64 as ValueData to append to the current PATH value the directory in which the executable files are copied.
If I try to run this code, an error on line 17 is displayed
Required parameter "Root" not specified.
I think that Inno Setup expects the Root keyword in the line with code:
ValueType: expandsz; ValueName: "PATH"; ValueData: "{olddata};{pf}\pandocX64";
More precisely, I think that Inno Setup expects something like Inno Setup - Setting Java Environment Variable, but if I use that code, the PATH variable will be set to the {pf}\pandocX64 value, and no append operation will be performed.
Can someone help me?
Thank you
When you want to break a section entry to multiple lines for readability, you have to add \ at the end of the lines to escape the new-line character(s). A good practice is also to indent the lines, to make it clear to a human reader.
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PATH"; ValueData: "{olddata};{pf}\pandocX64"; \
Check: NeedsAddPath('{pf}\pandocX64')
Otherwise the Inno Setup compiler treats each line as a separate, and consequently an incomplete, entry.
I've corrected the answer to How do I modify the PATH environment variable when running an Inno Setup Installer? to include the \'s.
Here is my assembly code
section .data
msg: db "hello"
section .text
global _start
_start:
nop
mov rax,23
nop
can i access the data located in 'msg' with gdb
The command x/5cb &msg should dump five bytes at the correct address, in both decimal and character notation.
Alternatively, you should be able to use printf "%5.5s\n", &msg as well, substituting in whatever format string you need for other data (a null terminated string, for example, would need only "%s").
This was all tested under CygWin with the following program:
section .data
msg: db "hello"
section .text
global _start
_start: mov eax, 42
ret
When you compile and run that, you get the expected 42 as a return code:
pax> nasm -f elf -o prog.o prog.asm
pax> ld -o prog.exe prog.o
pax> ./prog.exe ; echo $?
42
Starting it in the debugger, you can see the commands needed to get at msg:
pax> gdb prog.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
<blah blah blah>
Reading symbols from prog.exe...(no debugging symbols found)...done.
(gdb) b start
Breakpoint 1 at 0x401000
(gdb) r
Starting program: /cygdrive/c/pax/prog.exe
[New Thread 7416.0x20c0]
Breakpoint 1, 0x00401000 in start ()
(gdb) x/5cb &msg
0x402000 <msg>: 104 'h' 101 'e' 108 'l' 108 'l' 111 'o'
(gdb) printf "%5.5s\n", &msg
hello