-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from sunnamed434/updates
Updates
- Loading branch information
Showing
25 changed files
with
461 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COMPOSE_PROJECT_NAME=bitmono-docs-project |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Use a base image with Python | ||
FROM python:3.10-slim | ||
|
||
# Set working directory | ||
WORKDIR /docs | ||
|
||
# Copy the documentation source into the container | ||
COPY . /docs | ||
|
||
# Install Sphinx and build the documentation | ||
RUN pip install sphinx sphinx-rtd-theme | ||
RUN sphinx-build -b html source build | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 8000 | ||
|
||
# Command to run the HTTP server and output instructions | ||
CMD echo "Documentation is available at http://localhost:8000" && \ | ||
python -m http.server 8000 --directory build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
How to Run BitMono Docs Locally | ||
|
||
Prerequisites: | ||
- Ensure Docker is installed on your machine. If not, install Docker from https://docs.docker.com/get-docker/. | ||
|
||
Running Locally: | ||
1. Start Docker if it’s not already running. | ||
2. Open a terminal and navigate to the directory containing your docker-compose.yml file. | ||
3. Execute the following command to build and start the container: | ||
docker-compose up --build | ||
4. Open your browser and go to: http://localhost:8000 to view the documentation. | ||
|
||
Restarting the Container: | ||
1. To stop the container, press CTRL + C in the terminal where Docker is running, or close the terminal window. | ||
2. To restart the container and apply any changes, execute: | ||
docker-compose up --build | ||
3. Refresh the browser page at http://localhost:8000 to see the latest updates. | ||
|
||
To edit/update docs: | ||
Prerequisites: | ||
- Use Visual Studio Code, or any other tool. https://code.visualstudio.com/ | ||
|
||
Go to `source` folder and do your magic! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
docs: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: bitmono-docs-image:latest | ||
ports: | ||
- "8000:8000" | ||
entrypoint: ["sh", "-c", "echo 'Documentation is available at http://localhost:8000' && python -m http.server 8000 --directory build"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
The module is built for ... | ||
=========================== | ||
|
||
`The module is built for .NET (Core), but you're using a version of BitMono intended for .NET Framework.` - this message is very important because if your app is built on .NET Core but BitMono on .NET Framework after obfuscation your app just won't work. | ||
Understanding Compatibility | ||
--------------------------- | ||
|
||
Examples | ||
-------- | ||
When using BitMono for obfuscation, it's critical to ensure that the version of BitMono matches the framework your application is built on. | ||
|
||
Good: | ||
For example, if your application is built on .NET Core, you **must** use the version of BitMono that is also built for .NET Core. Using an incompatible version will result in your application not functioning after obfuscation. | ||
|
||
- BitMono on .NET Core and your app on .NET Core | ||
- BitMono on .NET Framework and your app on .NET Framework | ||
.. note:: | ||
A common error message you may encounter is: | ||
``The module is built for .NET (Core), but you're using a version of BitMono intended for .NET Framework.`` | ||
This indicates a mismatch between your app's framework and BitMono's version. | ||
|
||
Bad (IT WON'T WORK!!!): | ||
Examples of Compatibility | ||
-------------------------- | ||
|
||
- BitMono on .NET Core and your app on .NET Framework | ||
- BitMono on .NET Framework and your app on .NET Core | ||
Here are some examples of correct and incorrect configurations: | ||
|
||
**✅ Good Configurations:** | ||
|
||
- **BitMono for .NET Core** with an application built on **.NET Core** | ||
- **BitMono for .NET Framework** with an application built on **.NET Framework** | ||
|
||
**❌ Bad Configurations (These Won't Work!):** | ||
|
||
- **BitMono for .NET Core** with an application built on **.NET Framework** | ||
- **BitMono for .NET Framework** with an application built on **.NET Core** | ||
|
||
Key Takeaways | ||
------------- | ||
|
||
- Always ensure that **BitMono's framework version** matches the **framework version** of your application. | ||
- Incompatible configurations will break your app after obfuscation. | ||
- Carefully check the framework version of both your app and the BitMono release you are using. | ||
|
||
.. warning:: | ||
Mixing framework versions (e.g., using BitMono for .NET Framework with a .NET Core app) will cause the app to fail after obfuscation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
ReadyToRun | ||
========== | ||
|
||
If you're encountering an error from BitMono regarding ReadyToRun, or your application is built using ReadyToRun, it means that your application is "protected" by being compiled into native code. However, BitMono cannot obfuscate it because it requires "managed" code. | ||
|
||
To solve this issue, you can do the following: | ||
|
||
Disable ReadyToRun | ||
------------------ | ||
|
||
Simply go to your `.csproj` file, add the `PublishReadyToRun` option and set it to `false`. This will look like the following: | ||
|
||
.. code-block:: xml | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<PublishReadyToRun>false</PublishReadyToRun> <!-- Add this option and set to false --> | ||
</PropertyGroup> | ||
</Project> | ||
Now, build the project and use `.dll` file that has a managed code, instead of native code. | ||
|
||
`For more information, visit: <https://learn.microsoft.com/en-us/dotnet/core/deploying/ready-to-run>`_ | ||
|
||
Use .dll File with Managed Code Instead of .exe File | ||
---------------------------------------------------- | ||
|
||
Usually, in the output folder of your project (if it's a `.exe`), there should be a `.dll` file with managed code. Use this `.dll` file for obfuscation instead, if there's no such file or it has a native code then use upper solution. | ||
|
||
Didn't Help? | ||
------------ | ||
|
||
If none of the solutions worked, it likely means your file is either protected or broken. If this isn't the case, please open an issue on the BitMono GitHub repository or reach out to us on Discord for further assistance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.