meson: generate osx-bundle.sed
This commit is contained in:
parent
dc3ffa30af
commit
8fa0fa352b
3 changed files with 13 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,7 +10,6 @@ src/libresrc/default_config_platform.json
|
||||||
tests/*.json
|
tests/*.json
|
||||||
tests/run
|
tests/run
|
||||||
tools/osx-bundle-restart-helper
|
tools/osx-bundle-restart-helper
|
||||||
tools/osx-bundle.sed
|
|
||||||
tools/repack-thes-dict
|
tools/repack-thes-dict
|
||||||
tools/repack-thes-dict.dSYM
|
tools/repack-thes-dict.dSYM
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@ if host_machine.system() == 'windows'
|
||||||
run_target('win-installer',
|
run_target('win-installer',
|
||||||
command: [installer_setup, meson.project_build_root(), meson.project_source_root()])
|
command: [installer_setup, meson.project_build_root(), meson.project_source_root()])
|
||||||
elif host_machine.system() == 'darwin'
|
elif host_machine.system() == 'darwin'
|
||||||
# temporary hack until version.sh generates this properly
|
|
||||||
run_command('cp', meson.project_source_root() / 'tools' / 'osx-bundle.sed', meson.project_build_root())
|
|
||||||
fontconfig_conf = run_command('pkg-config', '--variable=confdir', 'fontconfig').stdout().strip()
|
fontconfig_conf = run_command('pkg-config', '--variable=confdir', 'fontconfig').stdout().strip()
|
||||||
run_target('osx-bundle',
|
run_target('osx-bundle',
|
||||||
command: ['../tools/osx-bundle.sh', meson.project_source_root(), meson.project_build_root(), 'wx-config', fontconfig_conf, '',
|
command: ['../tools/osx-bundle.sh', meson.project_source_root(), meson.project_build_root(), 'wx-config', fontconfig_conf, '',
|
||||||
|
|
|
@ -20,6 +20,7 @@ if ! test -d "${srcdir}/.git"; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
osx_bundle_sed_path="${builddir}/osx-bundle.sed"
|
||||||
|
|
||||||
last_svn_revision=6962
|
last_svn_revision=6962
|
||||||
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
|
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
|
||||||
|
@ -44,6 +45,7 @@ else
|
||||||
tagged_release=0
|
tagged_release=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
build_date="$(date "+%Y-%m-%d %H:%M %Z")"
|
||||||
|
|
||||||
new_version_h="\
|
new_version_h="\
|
||||||
#define BUILD_GIT_VERSION_NUMBER ${git_revision}
|
#define BUILD_GIT_VERSION_NUMBER ${git_revision}
|
||||||
|
@ -52,11 +54,21 @@ new_version_h="\
|
||||||
#define INSTALLER_VERSION \"${installer_version}\"
|
#define INSTALLER_VERSION \"${installer_version}\"
|
||||||
#define RESOURCE_BASE_VERSION ${resource_version}"
|
#define RESOURCE_BASE_VERSION ${resource_version}"
|
||||||
|
|
||||||
|
osx_bundle_sed="\
|
||||||
|
s/@PLIST_VERSION@/${git_version_str}/g
|
||||||
|
s/@PLIST_BUILD_DATE@/${build_date}/g
|
||||||
|
/ *@LOCALIZATIONS@/ {
|
||||||
|
r languages
|
||||||
|
d
|
||||||
|
}"
|
||||||
|
|
||||||
# Write it only if it's changed to avoid spurious rebuilds
|
# Write it only if it's changed to avoid spurious rebuilds
|
||||||
# This bizzare comparison method is due to that newlines in shell variables are very exciting
|
# This bizzare comparison method is due to that newlines in shell variables are very exciting
|
||||||
case "$(cat ${version_h_path} 2> /dev/null)"
|
case "$(cat ${version_h_path} 2> /dev/null)"
|
||||||
in
|
in
|
||||||
"${new_version_h}");;
|
"${new_version_h}");;
|
||||||
*) echo "${new_version_h}" > "${version_h_path}"
|
*)
|
||||||
|
echo "${new_version_h}" > "${version_h_path}"
|
||||||
|
echo "${osx_bundle_sed}" > "${osx_bundle_sed_path}"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue