Building using windows powershell
#1

Hey,

I struggle to build using windows powershell. Does anyone here have any idea?

Код:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

At line:1 char:66
+ ... sers\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 ...
+                                                                  ~
Missing expression after unary operator '+'.
At line:1 char:68
+ ... rs\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 - ...
+                                                                  ~
You must provide a value expression following the '=' operator.
At line:1 char:68
+ ... s\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -i ...
+                                                                 ~
Unexpected token ')' in expression or statement.
At line:1 char:70
+ ... \sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic ...
+                                                                  ~
Missing expression after unary operator '+'.
At line:1 char:71
+ ... ndr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\U ...
+                                                                ~~
Unexpected token '-v' in expression or statement.
At line:1 char:73
+ ... dr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Us ...
+                                                                 ~
Unexpected token '2' in expression or statement.
At line:1 char:75
+ ... it\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\ ...
+                                                               ~~~
Unexpected token '-ic' in expression or statement.
At line:1 char:78
+ ... emodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\sondr\git\lsrcr/pawno/include
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I understand there might be an error there, the arguments above is just what I've tried after hours of trying to make this work.

This is what I've normally tried to use:

Код:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Missing closing ')' in expression.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndParenthesisInExpression

The terminal process terminated with exit code: 1
Does anyone understand why I get this error? I am trying to build via power shell using VScode.

This last part is something I've tried doing through powershell to see if the arguments are even listed up, and they are.

Код:
PS C:\Users\sondr\git\lsrcr> pawno\pawncc gamemodes\lsrcr.pwn -; -v2
>>
Pawn compiler 3.10.20160907                     Copyright © 1997-2006, ITB CompuPhase

Usage:   pawncc <filename> [filename...] [options]

Options:
         -A<num>  alignment in bytes of the data segment and the stack
         -a       output assembler code
         -C[+/-]  compact encoding for output file (default=+)
         -c<name> codepage name or number; e.g. 1252 for Windows Latin-1
         -Dpath   active directory path
         -d<num>  debugging level (default=-d1)
             0    no symbolic information, no run-time checks
             1    run-time checks, no symbolic information
             2    full debug information and dynamic checking
             3    same as -d2, but implies -O0
         -e<name> set name of error file (quiet compile)
         -H<hwnd> window handle to send a notification message on finish
         -i<name> path for include files
         -l       create list file (preprocess only)
         -o<name> set base name of (P-code) output file
         -O<num>  optimization level (default=-O1)
             0    no optimization
             1    JIT-compatible optimizations only
             2    full optimizations
         -p<name> set name of "prefix" file
         -r[name] write cross reference report to console or to specified file
         -S<num>  stack/heap size in cells (default=4096)
         -s<num>  skip lines from the input file
         -t<num>  TAB indent size (in character positions, default=8)
         -v<num>  verbosity level; 0=quiet, 1=normal, 2=verbose (default=1)
         -w<num>  disable a specific warning by its number
         -X<num>  abstract machine size limit in bytes
         -XD<num> abstract machine data/stack size limit in bytes
         -Z[+/-]  run in compatibility mode (default=+)
         -\       use '\' for escape characters
         -^       use '^' for escape characters
         -;[+/-]  require a semicolon to end each statement (default=-)
         -([+/-]  require parantheses for function invocation (default=-)
         sym=val  define constant "sym" with value "val"
         sym=     define constant "sym" with value 0

Options may start with a dash or a slash; the options "-d0" and "/d0" are
equivalent.

Options with a value may optionally separate the value from the option letter
with a colon (":") or an equal sign ("="). That is, the options "-d0", "-d=0"
and "-d:0" are all equivalent.
-v2 : The term '-v2' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:37
+ pawno\pawncc gamemodes\lsrcr.pwn -; -v2
+                                     ~~~
    + CategoryInfo          : ObjectNotFound: (-v2:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
This is all very confusing to me. I am using Zeex's compiler by the way. I hope anyone here has an idea.
Reply
#2

I would like to add that if I use cmd or the type "process" when building in VScode it struggles to read from my modular files. The directory is fine because it compiles perfectly in atom with the following build code:

Код:
module.exports = {
  cmd: '{PROJECT_PATH}/pawno/pawncc',
  name: 'build',
  args: ['{FILE_ACTIVE}', '-;', '-(', '-v2', '-d2', '-i{PROJECT_PATH}/pawno/include'],
  sh: false,
  cwd: '{FILE_ACTIVE_PATH}',
  errorMatch: [
    '(?<file>[a-zA-Z0-9\\/\\\\:_\\.-]+)\\((?<line>[0-9]+)\\)\\s:\\s(?<message>.*)',
  ],
};
This is the current build command and error I'm getting with cmd:

Код:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Pawn compiler 3.10.20160907                     Copyright © 1997-2006, ITB CompuPhase

gamemodes/lsrcr.pwn(23) : fatal error 100: cannot read from file: "global/definitions.pwn"

Compilation aborted.
Reply
#3

For anyone who has the same issue trying to build using VScode, please note the path here:

> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

I used ${relativeFile} rather than ${file}.

By using file, I get the full directory like this:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe c:\Users\sondr\git\lsrcr\gamemodes\lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Which seems to solve the problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)