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

Doesnt work correctly when I run script via CMake #148

Open
fameowner99 opened this issue Jul 24, 2023 · 0 comments
Open

Doesnt work correctly when I run script via CMake #148

fameowner99 opened this issue Jul 24, 2023 · 0 comments

Comments

@fameowner99
Copy link

fameowner99 commented Jul 24, 2023

I guess the problem is because script need UI to be shown.

how to reproduce:

in cmake:

add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND rm -rf ${DMG_FILE_PATH} COMMAND ${CMAKE_SOURCE_DIR}/tools/create_dmg.sh ${APP} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Packing build...")

create_dmg.sh file:

bundle_path=$1;
bundle_name="$(basename ${bundle_path} .app)"
bundle_arch=$(lipo -archs ${bundle_path}/Contents/MacOS/${bundle_name})
disk_image_name="${bundle_name}-${bundle_arch}.dmg";

create-dmg --volname "app installer" --window-size 500 300 --window-pos 200 120 --app-drop-link 300 110 --icon ${bundle_path} 50 112 --icon-size 120 "${disk_image_name}" ${bundle_path};

.dmg creates after build but has wrong window size.
If I execute script without cmake everythng works correctly.

Difference between run script via cmake and run script via terminal is that when I run script via terminal UI windows creates for create-dmg but via cmake - not.

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

No branches or pull requests

1 participant