I'm developing an app for macOS and created an installation wizard using Objective-c and pack it with packages to create the pkg bundle.
The wizard is collecting some configuration that needs to be set on the application after the files have been installed, I'm doing the configuration in the post-installation script of the package so I need to pass all the configurations from the Objective-c wizard to the script.
I have tried to use launchctl setenv <key> <value> to set the configurations and read them in the post-installation script but it does not work, I think it is executed in a different context so the varaiables are not there.
Currently, I'm writing all the configuration to a file and parse it after but I assume there is a better way.
Related
Since I'm required to work on both PHP5.x and PHP7.x projects in Yii framework, I've installed WAMP.
I've also set up my environment variables to link to both paths containing php.exe and for just working with the projects, that's just fine.
However, whenever I need to run migrations, there's a problem: if PHP7 path is defined first, PHP5 migrations won't run and if PHP5 path is listed first, PHP7 migrations won't work anymore.
Error message for PHP5:
'yii' is not recognized as an internal or external command, operable program or batch file.
Error message for PHP7:
Parse error: syntax error, unexpected '?' in C:\wamp64\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php on line 822
Is there a clean way to be able to define which PHP version you wish to use when running migrations, without having to reconfigure your environment variables again and again?
Thank you #RiggsFolly for your help. Based on the link you provided, I compiled a handy solution:
I started off by creating 2 new files in C:\Windows\System32 (since this path is already included in the environment variables):
startphp5.cmd and startphp7.cmd.
startphp5.cmd contains just this (start7.php is obviously almost the same):
PATH=%PATH%;C:\wamp64\bin\php\php5.6.31
php -v
Before running my migrations in my command prompt, all I have to do now is run either "startphp5" or "startphp7".
I'm trying to compile custom ejabberd module which has multiple files in src/ and include/.
My module is conforming to https://github.com/processone/ejabberd-contrib guidelines and using ejabberdctl module_check produces "ok".
When I'm compiling and installing module with only one source, everything works as expected and ejabberdctl module_install installs module.
But when I have multiple source files, ejabberdctl module_install doesn't compile anything but file with exact name of my module.
I want to avoid manual compilation and rebar if possible. So my question is how to configure my module and where so that ejabberdctl module_install can build and install my module.
If that is not possible could you point me to some rebar script that can serve that purpose.
And finally can someone point me to some resource that explains why Erlang/OTP projects seem to have rigid file structure (I'm coming form c++ world and there IMO, tools and projects are way more forgiving in respect to file structure)
Details:
Erlang 18
ejabberd 15.11.120 (built from source)
if you install module by "ejabberdctl" you don't have to config in ejabberd.yml
other way is install module with source, you must copy file beam to lib/ejabberd... and config file config like README.TXT
When building the project from command line using mvn clean install everything builds without any issues.
When running some tests that use precompiled C libraries from IntelliJ, tests fail with java.lang.UnsatisfiedLinkError
I may be completely off here, but does IntelliJ not see the .so file? Is so, how can it be added please?
Shared library fails to load with UnsatisfiedLinkError if:
it's not in the working directory configured in the test run configuration.
it's not in PATH environment (on Mac Terminal and GUI apps have different environment, see this answer). Run IDEA from the Terminal open -a /Applications/IntelliJ\ IDEA\ 12.app/ to make environment the same.
it's not in the location specified using -Djava.library.path VM option.
.so depends on some other library that is not found for any of the 1-3 reasons (or the dependency of that dependency is not found, etc).
I would like to create a setup project based on WiX which does the following (as well as creating the installation package):
callable from msbuild running on a CI build server (Hudson)
take a version number from some asset in either the setup project or the main assembly
take the current build number from the CI system
create a full product version number [version].[build] such as 1.3.432
store this value in an asset (e.g. the main assembly) is such a way that it can be read out at run time and displayed on the splash window
I have tried a number of approaches and googled a lot but have not found a workable solution. Can anyone help?
The WiX toolset does this by creating a version.cs, a version.h and a version.wxi during the MSBuild then including those files in all the projects. That way our executable can print out their version when you run something like candle.exe -? and all of the bundles and .msi packages have their versions set correctly.
You can see how we do this in tools\WixBuild.Version.targets (here). It would straight forward to override the properties in WixBuild.Version.targets with properties passed via the command-line to MSBuild via Hudson if you wanted.
I'm using PMEase QuickBuild to perform automated builds of our Maven2 projects and a nightly sanity test to ensure nothing is broken.
The test needs to untar packages which are created by the automated Maven2 projects. The problem is that the package names change frequently due to project versions being incremented all the time.
Does anyone know how I can configure QuickBuild to pick up the version (ideally from the POM file of the individual components), if this is possible at all?
I don't know if this is an option for you but it looks like you can do it the other way around. Quoting Build with Maven:
Control build version
If you want to control the build
version from QuickBuild side, please
follow below steps:
Change the POM file and define the project version as
${buildVersion}. Do not forget to
commit the file into your SCM after
change.
Define a build property like below when define the Maven build
step:
buildVersion=${build.version}
There are maybe other options but I must admit that my knowledge (zero) of QuickBuild is very limited
I created a work around to this issue by having QuickBuild execute a shell script which did the untarring by using wildcards, similar to the following (to avoid computing the exact version):
tar xzf filename-*.tar.gz
I couldn't figure out how to do this in QuickBuild, so I offloaded the work to the shell script.