Getting Started - Couch-Potato/cyberscript GitHub Wiki

Getting started

Using pre-compiled cyberscript

if you are running a fresh download of cyberscript.exe then you will first need to install it into your script development directory. To do so, just type the command cyberscript install after navigating in command prompt to your cyberscript project folder. There you can create your project script. We have an example script that will allow you to download the latest update of cyberscript on runtime, use it if you want.

@echo off
var versionLocal "cyberscript version short"
var versionServer "cs.internet downloadString http://version.server/"
IF NOT var.verisonLocal==var.versionServer (
echo "Attempting to download cyberscript updates"
var updateResponse "cyberscript update short"
IF var.updateResponse=="false" (echo Update Failed!) ELSE (echo Update Successful)
) ELSE
(
echo Cyberscript is up to date!
)
echo Script started
pause

To run this script simply type in the same command window you had open earlier

cyberscript run script.bat

This should be only used for debugging your script. When ready, continue on to make your script an executable.

Compiling script to exe

To compile your script you should type the following command

cyberscript compile script.bat myScript

Once it is done compiling (if you get errors, try, try again.) Navigate to the "bin" directory and now you should see "myScript.exe". Its important that you do not include the exe file extension "myScript.exe" in the command as the output file would be "myScript.exe.exe"

Compiling Cyberscript


If you have edited the cyberscript source, you may find it puzzling to actually compile it in a way where those changes take effect.

first, do an initial build in visual studio, getting lots of errors is quite normal, as the references don't sync somehow.

Below is a list of where which goes in which project.

cyberscript

  • bpp_bpp.dll (bpp_bpp/bin/Debug/bpp_bpp.dll) in solution root
  • bpp_env.dll (bpp_env/bin/Debug/bpp_env.dll) in solution root

secpol

  • cs_secpol.dll (cs_secpol/bin/Debug/cs_secpol.dll) in solution root

next, once you are able to build the project with no reference error, navigate to the solution root, and look for the cyberBuild folder. In that, run the build.bat file, this will place all of the dlls in the places where they need to go.

finally, you will have your completed build in the CyberScript_build directory. Follow the instructions at the top don't add the installer or the auto updater script.