BuildScript

From REALbasicWiki

Jump to: navigation, search

Contents

[edit] Description

Used to further automate application builds. The script is simply stored in the project root folder, and can be executed using IDE Script.

[edit] Commands

  • NEWDIR $name
 Creates a new directory at the given path.
  • MOVE $file $destination
 Moves the file to the destination folder.
  • COPY $file $destination
 Copies the file to the destination folder.
  • DELETE $file
 Deletes the given file.
  • RENAME $file $newname
 Renames the file.
  • ZIP $file
 Compresses the given file/folder, and outputs a ZIP archive.
  • RUN $file
 Launches the given file.
  • SHELL $command
 Executes a shell command.

[edit] Examples

The following script creates a folder called "TextEditor", moves the newly built application to the folder, and compresses it into a ZIP file.

 NEWDIR TextEditor
 MOVE TextEditor.exe /TextEditor/
 ZIP TextEditor

This IDE script opens the texteditor project, builds a windows version, and executes the build script.

 // put the project path here
 Const ProjectPath = "\Projects\TextEditor\"
 Const ProjectFile = "TextEditor.rbp"
 
 // open the project
 OpenFile(ProjectPath+ProjectFile)
 
 // build the application
 DoCommand "BuildApp"
 
 // run the build script
 call DoShellCommand(""""+ProjectPath+"run.exe"" -r """+ProjectPath+"build""")

[edit] Versions

  • Version 1.0
    • Windows
      • The windows version should work for all platforms with some small modifications.
    • Mac
    • Linux

Note: You may need to run the build.rbs file twice the first time you want to build a release.

Personal tools
related