Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise project structure #3

Merged
merged 3 commits into from Feb 15, 2017
Merged

Standardise project structure #3

merged 3 commits into from Feb 15, 2017

Conversation

Pathoschild
Copy link
Contributor

The project structure is a bit complicated and non-standard.

This pull request...

  • copies the mod into the game's Mods folder automatically on build;
  • removes custom build configurations and assembly attributes;
  • simplifies TimeSpeed.csproj and .gitignore;
  • switches Json.NET to the version used by SMAPI;
  • targets .NET Framework 4.5 for crossplatform compatibility;
  • exports .pdb files in release builds;
  • removes logic that blocks SMAPI when running a debug build without a debugger attached;
  • and updates the readme to document the simplified crossplatform build steps.

This is part I of the update to the latest SMAPI interfaces; let me know if you disagree with any of the changes.

The project structure was unnecessarily custom. This commit...

- removes custom build configurations and assembly attributes;
- simplifies the TimeSpeed.csproj and .gitignore files;
- switches Json.NET to the version used by SMAPI;
- exports pdb files in release builds;
- copies the mod into the game's Mods folder automatically on build;
- targets .NET Framework 4.5 for crossplatform compatibility.
…ebugger

This was presumably needed to attach a debugger manually, which is no longer needed. The new build configuration copies the build files into the game folder and attaches a debugger automatically if applicable.
@alexb5dh
Copy link
Owner

Thanks. Everything looks perfect.

@alexb5dh alexb5dh merged commit a22c619 into alexb5dh:master Feb 15, 2017
@alexb5dh
Copy link
Owner

alexb5dh commented Feb 16, 2017

Actually, @Pathoschild, how can I build mod for Linux or Mac while being on Windows with new build config? Previously I copied platform specific binaries to internal directory.
Did I miss it in config doc?

@Pathoschild
Copy link
Contributor Author

@alexb5dh You don't need to anymore. Just build it once on Windows, and SMAPI will rewrite it automatically when it's loaded on Linux/Mac. :)

@Pathoschild Pathoschild deleted the feature/update-to-latest-SMAPI branch February 16, 2017 16:34
@alexb5dh
Copy link
Owner

That sounds really awesome! Can you point me to the SMAPI code where this magic is done?

@Pathoschild
Copy link
Contributor Author

The magic happens in SMAPI's AssemblyLoader, which reads the assemblies with Mono.Cecil and rewrites them for compatibility if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants