Skip to content

Conversation

@Myoldmopar
Copy link
Member

Pull request overview

I'll itemize things once I'm done...

@Myoldmopar Myoldmopar added the DoNotPublish Includes changes that shouldn't be reported in the changelog label Mar 24, 2025
@Myoldmopar Myoldmopar added this to the EnergyPlus 25.1 milestone Mar 24, 2025
@Myoldmopar Myoldmopar self-assigned this Mar 24, 2025
Copy link
Member Author

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One walkthrough done.


# expecting one command line argument - the path to the python_lib folder to place the pip package
pkgs = {'energyplus_launch': '3.7.2', 'energyplus_transition_tools': '2.1.3'}
pkgs = {'energyplus_launch': '3.7.4', 'energyplus_transition_tools': '2.1.3'}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped launch version to 3.7.4 which now has an optional argument just for EnergyPlus!

set(APP_ICON "${PROJECT_SOURCE_DIR}/release/ep.ico")
set(RESOURCE_FILE "${PROJECT_BINARY_DIR}/resource.rc")
file(GENERATE OUTPUT ${RESOURCE_FILE} CONTENT "IDI_ICON1 ICON \"${APP_ICON}\"\n")
add_executable(windows_gui_launcher WIN32 WindowsGuiLauncher.cc ${RESOURCE_FILE})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an untested attempt to embed the E+ icon into the windows_gui_launcher.exe program, which should get icons showing up on the shortcuts in the install folder as well as on the start menu. Let's see...I'm only like 67% confident.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked great! Icons look good.

One quick and very odd note. @mjwitte and I both experienced this. When you open EP-Launch (Python) for the first time on Windows, you get a leaf, or feather, or quill icon showing up in the taskbar (I didn't look close). I confirmed my code was doing the right thing. Then noticed that on subsequent openings, the icon was the right E+ icon!? So weird, and Windows fault not mine. Maybe.

cmd += R"python(
from eplaunch.tk_runner import main_gui
main_gui()
main_gui(True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Truth!

Copy link
Member Author

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, another code walkthrough done. It's possible the only piece left is testing and documenting all these changes in as many places as possible for the users to find.

install(FILES "${PROJECT_BINARY_DIR}/doc/pdf/PlantApplicationGuide.pdf" DESTINATION "./Documentation" COMPONENT Documentation)
install(FILES "${PROJECT_BINARY_DIR}/doc/pdf/UsingEnergyPlusForCompliance.pdf" DESTINATION "./Documentation" COMPONENT Documentation)
install(FILES "${PROJECT_BINARY_DIR}/doc/pdf/index.html" DESTINATION "./Documentation" COMPONENT Documentation)
if(WIN32)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so on Windows, I added some new .url files that point to the docs on RTD. These will show up in the install/Documentation folder right next to the PDFs so it shouldn't really affect the user much. It will just open the default browser instead of the default PDF viewer.


# expecting one command line argument - the path to the python_lib folder to place the pip package
pkgs = {'energyplus_launch': '3.7.2', 'energyplus_transition_tools': '2.1.3'}
pkgs = {'energyplus_launch': '3.7.4', 'energyplus_transition_tools': '2.1.4'}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bumping versions to get the latest tweaks.

component.addOperation("CreateShortcut", "@TargetDir@/windows_gui_launcher.exe", target_dir + "/EP-Launch.lnk", "eplaunch");
component.addOperation("CreateShortcut", "@TargetDir@/windows_gui_launcher.exe", target_dir + "/IDFVersionUpdater.lnk", "updater");
component.addOperation("CreateShortcut", "@TargetDir@/windows_gui_launcher.exe", target_dir + "/EP-Launch-Python.lnk", "eplaunch");
component.addOperation("CreateShortcut", "@TargetDir@/windows_gui_launcher.exe", target_dir + "/IDFVersionUpdater-Python.lnk", "updater");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the new Python based tools with -Python suffix to differentiate them and not disturb the legacy tools for now.

component.addOperation("CreateShortcut", "@TargetDir@/ExampleFiles/ExampleFiles-ObjectsLink.html", target_dir + "/ExampleFiles Link to Objects.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFEditor/IDFEditor.exe", target_dir + "/IDFEditor.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFVersionUpdater/IDFVersionUpdater.exe", target_dir + "/IDFVersionUpdater-Classic.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFVersionUpdater/IDFVersionUpdater.exe", target_dir + "/IDFVersionUpdater.lnk");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the -Classic suffix from the legacy tools to avoid breaking anything. This should make it an easier transition for users.

@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://energyplus.readthedocs.io/en/stable/acknowledgments/acknowledgments.html No newline at end of file
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New .url files for the RTD docs. Note that right now these urls will fail because they point to /stable/. The /stable/ build will be available once we make a real release of EnergyPlus with the RTD conversions done. (The current /stable/ is 24.2.0). If you want to try these out, just open them, which will give a 404, and change /stable/ in the URL to /latest/. It should work fine and the /stable/ will be happy once we make the release.

set(APP_ICON "${PROJECT_SOURCE_DIR}/release/ep.ico")
set(RESOURCE_FILE "${PROJECT_BINARY_DIR}/resource.rc")
file(GENERATE OUTPUT ${RESOURCE_FILE} CONTENT "IDI_ICON1 ICON \"${APP_ICON}\"\n")
add_executable(windows_gui_launcher WIN32 WindowsGuiLauncher.cc ${RESOURCE_FILE})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked great! Icons look good.

One quick and very odd note. @mjwitte and I both experienced this. When you open EP-Launch (Python) for the first time on Windows, you get a leaf, or feather, or quill icon showing up in the taskbar (I didn't look close). I confirmed my code was doing the right thing. Then noticed that on subsequent openings, the icon was the right E+ icon!? So weird, and Windows fault not mine. Maybe.

install(CODE "execute_process(COMMAND powershell.exe -ExecutionPolicy Bypass -File ${PROJECT_SOURCE_DIR}/scripts/dev/create_shortcut.ps1 -TargetPath \"$<TARGET_FILE_DIR:energyplus>/windows_gui_launcher.exe\" -ShortcutPath \"$<TARGET_FILE_DIR:energyplus>/EPLaunch.lnk\" -Arguments \"eplaunch\")" COMPONENT Auxiliary)
install(CODE "execute_process(COMMAND powershell.exe -ExecutionPolicy Bypass -File ${PROJECT_SOURCE_DIR}/scripts/dev/create_shortcut.ps1 -TargetPath \"$<TARGET_FILE_DIR:energyplus>/windows_gui_launcher.exe\" -ShortcutPath \"$<TARGET_FILE_DIR:energyplus>/VersionUpdater.lnk\" -Arguments \"updater\")" COMPONENT Auxiliary)
install(CODE "execute_process(COMMAND powershell.exe -ExecutionPolicy Bypass -File ${PROJECT_SOURCE_DIR}/scripts/dev/create_shortcut.ps1 -TargetPath \"$<TARGET_FILE_DIR:energyplus>/windows_gui_launcher.exe\" -ShortcutPath \"$<TARGET_FILE_DIR:energyplus>/EPLaunch_Python.lnk\" -Arguments \"eplaunch\")" COMPONENT Auxiliary)
install(CODE "execute_process(COMMAND powershell.exe -ExecutionPolicy Bypass -File ${PROJECT_SOURCE_DIR}/scripts/dev/create_shortcut.ps1 -TargetPath \"$<TARGET_FILE_DIR:energyplus>/windows_gui_launcher.exe\" -ShortcutPath \"$<TARGET_FILE_DIR:energyplus>/VersionUpdater_Python.lnk\" -Arguments \"updater\")" COMPONENT Auxiliary)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Named the new Python tools with _Python suffix. For now.

cmd += R"python(
from eplaunch.tk_runner import main_gui
main_gui()
main_gui(True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Truth!

@Myoldmopar
Copy link
Member Author

Aaand that should do it. Readme and Deprecation files updated with more information about all the Python changes, and some minor other cleanup. Dev reports back to me confirm things look good and play nicely. There is no reason this should fail on CI, but I'm going to be intentional here. First let CI run on this PR. If happy, then second kick off RC5. If happy, then kick off the official release. I think we'll be done this afternoon.

@Myoldmopar Myoldmopar merged commit 68a4a7c into develop Mar 26, 2025
24 checks passed
@Myoldmopar Myoldmopar deleted the PrepForV251 branch March 26, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DoNotPublish Includes changes that shouldn't be reported in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants