Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fab217d267fe
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6f03562fd508
Choose a head ref
  • 11 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 22, 2020

  1. Copy the full SHA
    7d7f258 View commit details
  2. Copy the full SHA
    47755ec View commit details
  3. Merge pull request #2478 from pleroy/Frobenius

    Next release is Frobenius and remove the frobenioid UI
    pleroy authored Feb 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1143705 View commit details
  4. libc++ version.

    pleroy committed Feb 22, 2020
    Copy the full SHA
    492cdbd View commit details
  5. Revert #2344.

    pleroy committed Feb 22, 2020
    Copy the full SHA
    4b5be04 View commit details
  6. More reverting of #2344.

    pleroy committed Feb 22, 2020
    Copy the full SHA
    250cca9 View commit details
  7. Merge pull request #2479 from pleroy/2345

    Upgrade to Xcode 11 and revert #2344
    pleroy authored Feb 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f9d1326 View commit details

Commits on Feb 23, 2020

  1. Announcing Frenet.

    pleroy authored Feb 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    04e5956 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7efbde0 View commit details
  3. Merge pull request #2480 from pleroy/Releasing

    Releasing with Azure pipelines
    pleroy authored Feb 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4ceffea View commit details
  4. Copy the full SHA
    6f03562 View commit details
Showing with 24 additions and 38 deletions.
  1. +1 −1 Makefile
  2. +3 −3 README.md
  3. +6 −15 documentation/Releasing.md
  4. +5 −15 ksp_plugin/plugin.cpp
  5. +9 −4 ksp_plugin_adapter/main_window.cs
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ ifeq ($(UNAME_S),Linux)
endif
ifeq ($(UNAME_S),Darwin)
INCLUDES += -I$(DEP_DIR)compatibility/filesystem -I$(DEP_DIR)compatibility/optional -I$(DEP_DIR)Optional
SHARED_ARGS += -mmacosx-version-min=10.12 -arch x86_64
SHARED_ARGS += -mmacosx-version-min=10.12 -arch x86_64 -D_LIBCPP_STD_VER=16
MDTOOL ?= "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool"
SHAREDFLAG := -dynamiclib
endif
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Principia

**[Frege](https://github.com/mockingbirdnest/Principia/wiki/Change-Log#frege), the January version of Principia, is available with a number of bug fixes. Download it [here for 1.5.1, 1.6.1 and 1.7.x](https://bit.ly/2RJumaP), and [here for 1.8.1](https://bit.ly/3aFiRtB).**
**[Frenet](https://github.com/mockingbirdnest/Principia/wiki/Change-Log#frenet), the February version of Principia, is available. Download it [here for 1.5.1, 1.6.1 and 1.7.x](https://bit.ly/2HL0hmL), and [here for 1.8.1](https://bit.ly/32hCUe1).**

**For the convenience of Chinese users, downloads from 腾讯微云: [Principia Frege for 1.5.1-1.7.3](https://share.weiyun.com/5q7Cgcw), [Principia Frege for 1.8.1](https://share.weiyun.com/5uxy0OG), [Trappist-1 for Principia](https://share.weiyun.com/5wVtWYQ).**
**For the convenience of Chinese users, downloads from 腾讯微云: [Principia Frenet for 1.5.1-1.7.3](https://share.weiyun.com/5uta0Re), [Principia Frenet for 1.8.1](https://share.weiyun.com/589R2ZD), [Trappist-1 for Principia](https://share.weiyun.com/5wVtWYQ).**

Principia is a mod for Kerbal Space Program (KSP) which implements N-body and extended body gravitation. Instead of being within the sphere of influence of a single celestial body at any point in time, your vessels are influenced by all the celestials. This makes it possible to implement missions that are more complex and more realistic than in the stock game, especially if used in conjunction with a mod like RealSolarSystem which has real-life celestials.

@@ -18,4 +18,4 @@ The [change log](https://github.com/mockingbirdnest/Principia/wiki/Change-Log) g

Principia is released on every [new moon](https://en.wikipedia.org/wiki/New_moon) with whatever features and bug fixes are ready at the time. This ensures relatively timely improvements and bug fixes.

Download the binary (Ubuntu, macOS, and Windows) [here for 1.5.1, 1.6.1 and 1.7.x](https://bit.ly/2RJumaP), and [here for 1.8.1](https://bit.ly/3aFiRtB). Download the [“Trappist-1 for Principia”](https://github.com/mockingbirdnest/Principia/wiki/Installing,-reporting-bugs,-and-frequently-asked-questions#installing-trappist-1-for-principia) mini-mod [here](https://bit.ly/2ZHf3Tt). Or, if you don't trust our binary, [build the mod](https://github.com/mockingbirdnest/Principia/blob/master/documentation/Setup.md) from the [Frege](https://github.com/mockingbirdnest/Principia/releases/tag/2020012422-Frege) release.
Download the binary (Ubuntu, macOS, and Windows) [here for 1.5.1, 1.6.1 and 1.7.x](https://bit.ly/2HL0hmL), and [here for 1.8.1](https://bit.ly/32hCUe1). Download the [“Trappist-1 for Principia”](https://github.com/mockingbirdnest/Principia/wiki/Installing,-reporting-bugs,-and-frequently-asked-questions#installing-trappist-1-for-principia) mini-mod [here](https://bit.ly/2ZHf3Tt). Or, if you don't trust our binary, [build the mod](https://github.com/mockingbirdnest/Principia/blob/master/documentation/Setup.md) from the [Frenet](https://github.com/mockingbirdnest/Principia/releases/tag/2020022316-Frenet) release.
21 changes: 6 additions & 15 deletions documentation/Releasing.md
Original file line number Diff line number Diff line change
@@ -7,25 +7,16 @@ is called `la-vache`. `<Mathematician>` and `<mathematician>` stand for the ver
names with the appropriate cases.
- [ ] Make sure that the fingerprints for detecting and fixing the stock system are up-to-date.
- [ ] Check that the release name, release date, and lunation number for the following update, used by the update reminder, are correctly set in the main window.
- [ ] Make sure that the project can be built and tested under Linux.
- [ ] Make sure that the latest runs of the [Azure pipelines](https://dev.azure.com/mockingbirdnest/Principia/_build) for Ubuntu and MacOS are [green](https://www.youtube.com/watch?v=lFeLDc2CzOs&feature=youtu.be&t=61).
- [ ] Run the following command, where:
- `yyyyMMddHH` is the date of the new moon in UT1,
- `<language>` is the language code for the language in which `<Mathematician>` is written,
- `1.x.y` is the primary KSP version (the latest version targeted by the `Release` configuration), and
- `"1.u.v"…` is the (possibly empty) comma-separated list of supported KSP versions that require a separate build, where each version number is quoted.
- `"1.u.v"…` is the (possibly empty) comma-separated list of supported KSP versions that require a separate build, where each version number is quoted.
```powershell
.\make_principia_release "<Mathematician>" "<language>" "yyyyMMddHH" "1.x.y" @("1.u.v"…)
.\make_principia_release "<Mathematician>" "<language>" "yyyyMMddHH" "1.x.y" @("1.u.v"…)
```
This creates `<root>\principia <mathematician> for 1.x.y.zip`, as well as `<root>\principia <mathematician> for 1.u.v.zip` as appropriate.
- [ ] Go to a Linux machine and checkout the newly created tag:
```shell
git fetch la-vache
git checkout $(git tag | tail -1)
```
- [ ] Build the Linux binary:
```shell
make test
make release
```
- [ ] Get the binary from the Linux machine and add the `Linux64` directory to the zip files (next to `x64`).
- [ ] Repeat the previous three steps on a Mac.
- [ ] The Azure pipelines will start building the Ubuntu and MacOS releases as soon as the new tag is pushed. This should take about 1 hour.
- [ ] Download the artifacts produced by each pipeline: go to the run for the tag, click on the published artifact, expand `Principia` and `Release`, then download `principia_Linux-yyyyMMddHH-Mathematician-0-g*.tar.gz` and `principia_Darwin-yyyyMMddHH-Mathematician-0-g*.tar.gz`, respectively.
- [ ] Open the `.tar.gz` files and move the `Linux64` and `MacOS64` directories to the `Principia` directory of the `<root>\principia <mathematician> for 1.x.y.zip` archive, and of the `<root>\principia <mathematician> for 1.u.v.zip` as appropriate.
20 changes: 5 additions & 15 deletions ksp_plugin/plugin.cpp
Original file line number Diff line number Diff line change
@@ -244,9 +244,7 @@ void Plugin::EndInitialization() {
}

// Establish the parent relationships between the celestials.
for (auto const& pair : celestials_) {
Index const celestial_index = pair.first;
auto const& celestial = pair.second;
for (auto const& [celestial_index, celestial] : celestials_) {
auto const& parent_index = FindOrDie(parents_, celestial_index);
if (parent_index) {
not_null<Celestial const*> parent =
@@ -1266,14 +1264,10 @@ void Plugin::WriteToMessage(
CHECK(!initializing_);
ephemeris_->Prolong(current_time_);
std::map<not_null<Celestial const*>, Index const> celestial_to_index;
for (auto const& pair : celestials_) {
Index const index = pair.first;
auto const& owned_celestial = pair.second;
for (auto const& [index, owned_celestial] : celestials_) {
celestial_to_index.emplace(owned_celestial.get(), index);
}
for (auto const& pair : celestials_) {
Index const index = pair.first;
auto const& owned_celestial = pair.second.get();
for (auto const& [index, owned_celestial] : celestials_) {
auto* const celestial_message = message->add_celestial();
celestial_message->set_index(index);
if (owned_celestial->has_parent()) {
@@ -1308,9 +1302,7 @@ void Plugin::WriteToMessage(
vessel_message->set_loaded(Contains(loaded_vessels_, vessel.get()));
vessel_message->set_kept(Contains(kept_vessels_, vessel.get()));
}
for (auto const& pair : part_id_to_vessel_) {
PartId const part_id = pair.first;
not_null<Vessel*> const vessel = pair.second;
for (auto const& [part_id, vessel] : part_id_to_vessel_) {
(*message->mutable_part_id_to_vessel())[part_id] = vessel_to_guid[vessel];
}
for (auto const& [guid, parameters] :
@@ -1392,9 +1384,7 @@ not_null<std::unique_ptr<Plugin>> Plugin::ReadFromMessage(
CHECK(inserted);
}

for (auto const& pair : message.part_id_to_vessel()) {
PartId const part_id = pair.first;
GUID const guid = pair.second;
for (auto const& [part_id, guid] : message.part_id_to_vessel()) {
auto const& vessel = FindOrDie(plugin->vessels_, guid);
plugin->part_id_to_vessel_.emplace(part_id, vessel.get());
}
13 changes: 9 additions & 4 deletions ksp_plugin_adapter/main_window.cs
Original file line number Diff line number Diff line change
@@ -5,10 +5,10 @@ namespace ksp_plugin_adapter {

internal class MainWindow : SupervisedWindowRenderer {
// Update this section before each release.
private const string next_release_name_ = "Frenet";
private const int next_release_lunation_number_ = 249;
private const string next_release_name_ = "Frobenius";
private const int next_release_lunation_number_ = 250;
private readonly DateTimeOffset next_release_date_ =
new DateTimeOffset(2020, 02, 23, 15, 32, 00, TimeSpan.Zero);
new DateTimeOffset(2020, 03, 24, 09, 28, 00, TimeSpan.Zero);

public delegate Vessel PredictedVessel();

@@ -272,11 +272,13 @@ private void RenderKSPFeatures() {
}

private void RenderLoggingSettings() {
#if FROBENIOID
string trace = "";
if (FlightGlobals.ActiveVessel &&
adapter_.PluginRunning() &&
plugin.HasVessel(FlightGlobals.ActiveVessel.id.ToString())) {
trace = plugin.VesselGetPileUpTrace(FlightGlobals.ActiveVessel.id.ToString());
trace =
plugin.VesselGetPileUpTrace(FlightGlobals.ActiveVessel.id.ToString());
}
UnityEngine.GUILayout.TextArea(
trace,
@@ -285,6 +287,7 @@ private void RenderLoggingSettings() {
conserve_angular_momentum_,
"Conserve angular momentum");
Interface.SetAngularMomentumConservation(conserve_angular_momentum_);
#endif
using (new UnityEngine.GUILayout.HorizontalScope()) {
UnityEngine.GUILayout.Label(text : "Verbose level:");
if (UnityEngine.GUILayout.Button(text : "←",
@@ -545,7 +548,9 @@ private void RenderToggleableSection(string name,
// Whether a journal is currently being recorded.
private static bool journaling_ = false;

#if FROBENIOID
private static bool conserve_angular_momentum_ = false;
#endif

private Vessel vessel_;
}