sudo-give-me-coffee / wine32-deploy

A tool to creating AppImages for 32-bit Microsoft Windows® applications
Other
61 stars 2 forks source link

Apply themes #26

Open KelvinNovais opened 2 years ago

KelvinNovais commented 2 years ago

Hello!

I tried to use themes, but it was unsuccessful: I applied the pre-installed kupofl theme. It works when I simply run the project. However, when I generate the AppDir or create the AppImage, it doesn't work anymore - the theme returns to the default. I also tried to enable and disable the flags "disable-kupofl-theme" and "disable-window-decoration".

When I check the file "default.reg" in the .AppDir, I find the correct theme:

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager]
"ColorName"="NormalColor"
"DllName"="C:\\windows\\Resources\\Themes\\kupofl\\kupofl.msstyles"
"ThemeActive"="1"
"SizeName"="LargeFonts"

Steps to reproduce:

# Copy the .exe file to prefix/drive_c/Program Files/
# Set it as the main executable 
# Run
./Wine-4.21-x86_64.AppImage winecfg "Bottle name"
# and change the theme
# Create the AppDir
./Wine-4.21-x86_64.AppImage create-appdir "Bottle name"
# Test it
./Wine-4.21-x86_64.AppImage test "Bottle name"

This issue doesn't cause any problem to the application, but I would like to make the software more beautiful.

Thank you!

KelvinNovais commented 2 years ago

Since I didn't developed this tool, it is a little difficult to review all the code... However, I found a workaround to solve the theme problem:

After creating the AppDir with

./Wine-4.21-x86_64.AppImage create-appdir "Bottle_name"

Access the folder

cd Bottle_name.AppDir

And change the file "executable" to C:/windows/system32/winecfg.exe

gedit executable
# You can choose your favorite text editor

Run the application INSIDE THE APPDIR with

./AppRun

A window with the winecfg will open. There, you can choose the theme and the configuration you want After closing and saving the new configuration, re-edit the "executable" file to the first state (with the path to your program .exe)

gedit executable

Now, with this AppDir, you (probably) can package you application with the theme applied