Skip to content

Repository files navigation

Ecopath with Ecosim (EwE) - Source Code

This repository contains the source code for Ecopath with Ecosim (EwE), an ecosystem modeling software suite developed by the Ecopath International Initiative (EII).

2026 migration from SVN to GitHub

Our old and beloved EwE soruces server is no more. We transferred to a much more mature development backend, GitHub. The EwE source code is now really open source, and you can extract the source code without any user account. However, if you want to contrite to EwE, contact us and we'll allow your GitHub account into the EwE repo.

GitHub code layout

The master branch contains the latest stable release of EwE.

  • You can not commit directly to the master branch!!
  • A Build Check will be performed before you can merge a PR into master!!

More information about working with Git

Ecopath with Ecosim Project

Other items related to the Ecopath with Ecosim project can be found in the Project repo

The project repo contais:

  • The Scrum board with all issues
  • The EwE Wiki with developer documentation
  • Definitely NO CODE!

Configuring GitHub as a package source

The EwE source code obtains packages from GitHub. This requires some configuration. First, obtain a GitHub classic access token from https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens. Then, configure NuGet. As the configuration will contain your classic access token, we recommend making the following changes in a configuration file local to your machine which will not be stored with the code.

The way to do this is described in the EwE Wiki, package source secrets.

This describes how you can run a CLI command to encrypt your access token and store it in your local NuGet.config file.

In AppData\Roaming\NuGet\NuGet.config, the EwE package source is shown as follows:

<packageSources>
  <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  <add key="github-Official-EwE" value="https://nuget.pkg.github.com/Official-EwE/index.json" />
</packageSources>

In AppData\Roaming\NuGet\NuGet.config, your GitHub access token is shown as an encrypted secret as follows:

<packageSourceCredentials>
    <github>
	    <add key="Username" value="your github username" />
	    <add key="ClearTextPassword" value="your github access key" />
    </github>
</packageSourceCredentials>

Creating and pushing NuGet packages to GitHub

This solution contains 3 NuGet packages:

  • EwECore
  • EwEUtils
  • ScientificInterfaceShared

Created automatically after merging to master

The easy way is to let the CI/CD pipeline create and push those packages automatically after merging a PR into master.

Creating and pushing manually

These packages can be created and pushed to GitHub using the CreateAndPushNugetPackage.ps1 Powershell file located in the Sources directory of the repository. To push those packages you will need to have a Personal Access Token (PAT) with write:packages scope. (Also known as an ApiKey)

For example, to create and push the ScientificInterfaceShared package, follow these steps:

  • In Visual Studio, open the Developer PowerShell window
  • Navigate to the Sources directory of the repository
  • Type .\CreateAndPushNugetPackage.ps1 -ProjectPath ScientificInterfaceShared\ScientificInterfaceShared.vbproj -ApiKey <ApiKey>

Creating an EwE6 installer

The installer is created using Inno Setup. The script is located in the Deployment folder of the repository.

Creating the installer automatically after merging to master

The easy way is to let the CI/CD pipeline create the installer automatically after merging a PR into master.

Creating the installer manually

To be able to use the Inno Setup compiler, you have to install it. It is recommended to install Inno Setup as a CLI tool. This is the way the tool is used in the build check and CI/CD pipelines.

Install Chocolatey and Inno Setup

And to do that, you probably have to install chocolatey first.

  • Open a PowerShell window as Administrator

  • Execute the following command to install chocolatey:

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

    When Chocolatey is installed, you can install Inno Setup:

    choco install innosetup -y

Compile the installer

To compile the installer, you can use the iscc command from Inno Setup. First, decide on the version number you want to use for the installer, e.g. 1.0.9.

In the Visual Studio open the Developer PowerShell window and navigate to the Sources folder of the repository.

For the 32-bit installer, type:

  • Type iscc /DCompile64Bit=0 /DSemVersion="1.0.9" /O"ScientificInterface\bin\x86\publish" "..\Deployment\EwE6_relpath.iss"
  • A ScientificInterface\bin\x86\publish\ewe_1.0.9_32-bit_setup.exe will be created.

For the 64-bit installer, type:

  • Type iscc /DCompile64Bit=1 /DSemVersion="1.0.9" /O"ScientificInterface\bin\x64\publish" "..\Deployment\EwE6_relpath.iss"
  • A ScientificInterface\bin\x64\publish\ewe_1.0.9_64-bit_setup.exe will be created.

About

Ecopath with Ecosim (EwE) is a free ecological/ecosystem modeling software suite

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages