This guide will walk you through the process of setting up and customizing the INI Configurator to create your own configuration editor application. The configurator allows you to design a custom graphical interface for managing .ini files by modifying fields and constants.
git clone -b dev https://github.com/<your-username>/ini-configurator.git cd ini-configurator
git branch
The src/lib/fields.json file defines the sections and fields displayed in the configurator. Update this file to specify the .ini configuration options you want to manage.
Example:
Here’s an example of a fields.json entry:
{
"General": {
"appName": {
"label": "Application Name",
"tooltip": "The name of your application",
"type": "text",
"default": "MyApp",
"required": true
},
"debugMode": {
"label": "Enable Debugging",
"tooltip": "Enable or disable debug mode",
"type": "checkbox",
"default": "false",
"required": false
}
}
}
At the start of the src/configurator.py script, modify the constants to set your application name, .ini file name, and debugging preferences:
# Declare Constants APP_NAME = "INI Configurator" INI_FILE = "conf.ini" LOG_FILE = "log.log" ENCODING = "mbcs" if sys.platform == "win32" else "utf-8" DEBUG = False
.ini file that will be managed..ini file.
This script converts your src/icons/icon.png file into icon formats suitable for Windows and macOS.
Usage:
src/icons/icon.png../iconset.sh
This script compiles the configurator for macOS. Usage: Run the script:
./build.sh
The compiled macOS .app file will be created in the dist/macos directory.
To compile the .exe file for Windows:
git add . git commit -m "Customize fields.json and constants" git push origin dev
.exe file. It uses the build.yml workflow in the .github/workflows/ directory..exe or .app files to ensure everything works as expected.
If you encounter issues during development, set DEBUG = True in src/configurator.py. This enables logging of additional details to help troubleshoot problems.
self.resource_directory constant in src/configurator.py to access files dynamically.By following this guide, you can easily set up, customize, and build your own version of the INI Configurator. Enjoy creating your custom configuration editor!
Once you’ve finished customizing and testing your configurator, follow these steps to create a release version:
git checkout stable git pull origin stable
git tag v1.0.0 git push origin v1.0.0
v1.0.0 with your desired version number following semantic versioning conventions (e.g., v1.1.0, v2.0.0).
The push of a version tag (e.g., v1.0.0) to the stable branch will automatically trigger the GitHub Actions workflow for creating a release. This workflow will:
v1.0.0).Configurator.exe for Windows and Configurator.app for macOS).By following these steps, you’ll ensure a smooth release process and maintain a clear separation between development and production code.