Giter Site home page Giter Site logo

girishkvs / princeton-java-installers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hmartiro/princeton-java-installers

0.0 2.0 0.0 3.13 MB

A set of installers for Windows and OS X that set up the programming environment used in Princeton's introductory computer science classes (COS 126 and COS 226).

princeton-java-installers's Introduction

princeton-java-installers

A set of installers for Windows and OS X that set up the programming environment used in Princeton's introductory computer science classes (COS 126 and COS 226).

Anatomy of the installation scripts:

  • Windows: * * introcs.exe is made from four files: a core PowerShell script, a launcher batch file, an icon, and an unzip utility * The core script, introcs.ps1 (423 lines), is written in PowerShell, a pretty cool .NET scripting language which is very simple to use: http://ss64.com/ps/. There is a free IDE which comes with windows (Windows PowerShell ISE) that I used to edit it. * The launcher script launcher.bat (10-15 lines) basically just invokes the PowerShell script, or provides a helpful error message if it can't find PowerShell. I used a program called Quick Batch File Compiler to turn the batch file into an executable, and within that program included the introcs icon and an unzip utility unzip.exe (PowerShell was extremely slow to unzip). * To compile introcs.exe, open QuickBFC, load the batch script, add the icon and unzip.exe in the embedded files, and hit build. The embedded file is accessed in the PowerShell script with the environment variable %MYFILES%, which QuickBFC creates.

    • OS X:

      • introcs.app is made from three files: an applescript app, a core bash script, and a launcher bash script
      • The core script introcs.sh (346 lines) is written in bash and has the exact same functionality as the PowerShell script.
      • The launcher script (25 lines), launcher.sh executes and logs the core script and sets some permissions
      • The .app directory is created through Applescript. You can open it directly using applescript, and see the applescript code that invokes the bash scripts in a terminal window. The icon and bash scripts are included, and you can save as an application diretly from applescript.
      • To compile introcs.app, no work is needed. You can change the bash scripts directly, and the applescript code in applescript.
    • I created functions with identical names at the start of the two core scripts, so 90% of the code should look the same between the Windows and OSX versions.

    • The algs4 versions have only a few differences: the icons, the filenames, the fact that java3d installation is commented out, and now that only the algs4 version includes algs4.jar.

princeton-java-installers's People

Contributors

hmartiro avatar

Watchers

James Cloos avatar Venkata Sai Girish Konda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.