Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Can I generate parameters for UMK?
Can I generate parameters for UMK? [message #43538] Wed, 27 August 2014 09:42 Go to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 736
Registered: January 2008
Location: Moscow, Russia
Contributor

Can I generate command-line parameters for umk like export makefile for the package compiling.
Maybe it's not difficult to adding to ide...


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: Can I generate parameters for UMK? [message #43944 is a reply to message #43538] Sun, 23 November 2014 20:58 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Sergey.

I proposed this feature on Redmine. You could try to use attached patch.
Currently, it looks like follows, after using "Build -> Output mode.." menu for umk package and click on "Command line options.." button:
index.php?t=getfile&id=4688&private=0


Edit (2014.12.19): Updated link for new patch (for "Output mode" window).
Edit (2015.02.19): Implemented in 8021 revision.

[Updated on: Thu, 19 February 2015 13:35]

Report message to a moderator

Re: Can I generate parameters for UMK? [message #44371 is a reply to message #43944] Mon, 02 March 2015 04:15 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 736
Registered: January 2008
Location: Moscow, Russia
Contributor

Thank you, dear friend!


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: Can I generate parameters for UMK? [message #44372 is a reply to message #44371] Mon, 02 March 2015 05:51 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 736
Registered: January 2008
Location: Moscow, Russia
Contributor

By the way, one more question:
Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?

(I try to config automatic build farm on Teamcity, but building envirenment every time is path like:
/home/build/agent/2015-01-15/ag0123654/MyApps/

Every time I must recreate MyApps.var with actual path
/home/build/agent/2015-01-15/ag0123654/MyApps/
)

There is second form of umk-parameters set, where not need to point of name of Package-Assembly.

May be, you have idea, how to simplest way transform command-line parameters of umk to second form?

How to specify umk to make as Makefile, path-independent (proceeding from the current path).

May be, you have idea, how to simplest way transform commited decision to suggested form ?


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Mon, 02 March 2015 06:06]

Report message to a moderator

Re: Can I generate parameters for UMK? [message #44373 is a reply to message #44372] Mon, 02 March 2015 05:55 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 736
Registered: January 2008
Location: Moscow, Russia
Contributor

One more fantastic idea!
May be, We can generate Makefile based on umk calls, but not on gcc calls?


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: Can I generate parameters for UMK? [message #44378 is a reply to message #44373] Mon, 02 March 2015 11:48 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
sergeynikitin wrote on Mon, 02 March 2015 04:51
Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?

I didn't find such command line option(s).
There is a possibility to create a different assemblies with these paths and use them instead.
The current version of umk searches assemblies and build methods in the following directories (in order):
${HOME}/.upp/umk
${HOME}/.upp/theide
${HOME}/.upp/ide
${HOME}
executable directory
So, it is possible to create (unique) assemblies (and/or build methods) in these directories.

sergeynikitin wrote on Mon, 02 March 2015 04:55
May be, We can generate Makefile based on umk calls, but not on gcc calls?

This is possible, if you want to use umk (or theide) to build different packages. But I think, this is out of scope of current version, which might be used to understand about possible command line options, related to building.

I can give you examples, which you might adapt to your needs. They build some packages from examples assembly.

The batch file example (build.bat, e.g. for Windows operating system(s)):
@echo off
setlocal

set CURDIR=%~dp0
set UPPDIR=C:\upp
set BUILDMETHOD=MSC9
set BUILDOPTIONS=-r
rem Empty to default package configuration
set MAINCONF=
set ASSEMBLY=examples
set PACKAGES=AddressBook;Puzzle;UWord
set OUTPUTDIR=%CURDIR%build
rem theide or umk
set BUILDER=theide

if exist "%OUTPUTDIR%" (rmdir /S /Q "%OUTPUTDIR%")
mkdir "%OUTPUTDIR%"

cd "%UPPDIR%"
for %%P in (%PACKAGES%) do (
	%BUILDER% %ASSEMBLY% %%P %BUILDMETHOD% %BUILDOPTIONS% %MAINCONF% "%OUTPUTDIR%" || exit /B
)


The shell file example (build.sh, e.g. for Unix-like operating system(s)):
#!/bin/sh

CURDIR=${PWD}
BUILDMETHOD=GCC
BUILDOPTIONS=-rs
# Empty to default package configuration
MAINCONF=
ASSEMBLY=examples
PACKAGES="AddressBook Puzzle UWord"
OUTPUTDIR=${CURDIR}/build
# theide or umk
BUILDER=theide

# Remove output directory
if [ -e "${OUTPUTDIR}" ]; then
	rm -rf "${OUTPUTDIR}"
fi;

# Create output directory with intermediate directories, if needed
mkdir -p "${OUTPUTDIR}"

for P in ${PACKAGES}; do 
	${BUILDER} ${ASSEMBLY} ${P} ${BUILDMETHOD} ${BUILDOPTIONS} ${MAINCONF} "${OUTPUTDIR}" || break
done;


The Makefile example:
CURDIR=	$(PWD)
BUILDMETHOD=	GCC
BUILDOPTIONS=	-rs
# Empty to default package configuration
MAINCONF=
ASSEMBLY=	examples
PACKAGES=	AddressBook Puzzle UWord
OUTPUTDIR=	$(CURDIR)/build
# theide or umk
BUILDER=	theide

all: clean build

build: create_output_dir $(PACKAGES)

$(PACKAGES):
	${BUILDER} ${ASSEMBLY} $@ ${BUILDMETHOD} ${BUILDOPTIONS} ${MAINCONF} "${OUTPUTDIR}"

create_output_dir:
	mkdir -p "$(OUTPUTDIR)"

clean:
	rm -rf "$(OUTPUTDIR)"

.PHONY: all

The more advanced build files need to create in case of build packages with different main configuration(s).

[Updated on: Mon, 02 March 2015 14:43]

Report message to a moderator

Re: Can I generate parameters for UMK? [message #44491 is a reply to message #44372] Tue, 17 March 2015 09:54 Go to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
sergeynikitin wrote on Mon, 02 March 2015 04:51
Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?

Looks like, it's possible to specify nest directories of assembly instead of assembly name, in case of umk. It's called "Inline assembly".
For example, there is a possibility to use following ASSEMBLY value (in case of U++ local installation to "${HOME}/upp" directory) for above (Unix-like) examples:
ASSEMBLY=	"${HOME}/upp/examples,${HOME}/upp/uppsrc"

i.e. nest directories per ',' (and/or ':' for Unix-like).
Previous Topic: TheIDE doesn't compile since version 7972 2014-12-13
Next Topic: Saving the last project
Goto Forum:
  


Current Time: Thu Jun 04 06:47:12 CEST 2020

Total time taken to generate the page: 0.01119 seconds