## #CPCtelera 1.4.2. release

Started by ronaldo, 13:59, 11 May 15

0 Members and 1 Guest are viewing this topic.

#### mahlemiut

Yeah, I only have Mono 2.6.  I could install .NET 4.0 via Wine, which should get around Wine telling you that you should use Mono for .NET apps.
- Barry Rodewald

#### ronaldo

@mahlemiut: I don't recommend you doing that. If you have limited resources, it could be better for you to find different tools to use, or use them under Windows. RGAS works well under wine, but Arkos Tracker does not.

#### mahlemiut

Yeah, WYZTracker runs fine in Mono for me, I could use that as a replacement.
- Barry Rodewald

#### TFM

@ronaldo : One question: Does the CPCtelera need parts of the OS or does it run independent?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

#### ronaldo

#54
It runs independent from OS and firmware. As one of its aims is maximizing performance, it runs completely low-level: directly over hardware.

However, you may write software that uses firmware aswell: all you have to do is not calling cpct_disableFirmware() . In fact, you have a little example using printf and the standard library included.

#### TFM

Sounds pretty cool! I think you can guess why I ask. It would be ideal for FutureOS, which provides any kind of freedom to the user (free zero page and RSTs, free usage of 2nd Z80 register set, free selection of IM and so on). It would be great to make it target OS regarding disc speed and memory management.    Just wished I had more time .
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

#### ronaldo

So, do you mean having some specific, say "API calls" to ask OS for memory and resource access? That could be really nice. If anyone wants to implement them, they could be like a new module inside CPCtelera, available for those wanting to use it.

The way CPCtelera is designed, it could be expanded ad-infinitum. In the end, only the functions that you use are included in the final binary. Therefore, if CPCtelera is to include modules for FutureOS, CP/M or any other OS or Middleware, it is always possible without affecting the rest of its functionalities .

#### TFM

Yes, things like:
- How much Expansion RAM is there?
- Allocate RAM and tell me where it is (physical I/O address etc.)
- Free RAM
- Load data bigger than 64 KB in one piece
- and so on...

But also stuff like clear screen very quick (using PUSH) and other API functions just to speed it up and keep CPCtelera lighter (which is only needed when RAM is small).
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

#### ronaldo

#58
CPCtelera github master version now:
Version 1.1. has been released

#### ervin

#59
FINALLY managed to get cpctelera installed successfully (on Windows 7)!
Took some messing about with Cygwin, but I got there in the end.

I've had a look at some of the examples so far... this is REALLY impressive stuff.
I can't wait to start coding in it!

Thanks so much for your amazing efforts in creating this incredible tool.
Just wondering, what does "telera" mean?

[EDIT] One more question, if I may!
When a new version of cpctelera is released, do we need to run setup.sh again?

#### ervin

#60
Well, so far I have been unable to run cpct_mkproject (in windows 7).
It's as if no paths have been set in my system, and the cygwin window doesn't know where to find anything.

I don't know anything about linux, so I'm a bit hesitant to create a virtual linux system just for cpctelera...
Has anyone here successfully got cpctelera running properly under windows? Anyone got any tips?

[EDIT] I can get cpct_mkproject running when I give bash the full path to it, but that's not what the cpctelera docs say...
Even after I get cpct_mkproject working, and create a new project folder, I can't run Makefile in that folder - it says "command not found" for the lines with "include".

I had similar problems just getting setup.sh to work when I first installed cpctelera.

This section:
## Main Paths
SETUP_PATH=j:/dropbox/cpctelera
CPCT_MAIN_DIR=${SETUP_PATH}/cpctelera CPCT_TOOLS_DIR=${CPCT_MAIN_DIR}/tools
CPCT_SCRIPTS_DIR=${CPCT_TOOLS_DIR}/scripts I had to change the SETUP_PATH to explicitly point to the location where cpctelera is installed, in order for anything in the script to run. Is this normal behaviour for a correctly installed cygwin? I have no idea what I'm doing wrong. Can anyone help? [EDIT #2] I successfully compiled a test program! Silly me - I missed the bit in the docs that say, type "make". I tried that, and it worked! Sorry everyone for the confusion. I guess this is a good example of what happens when instructions aren't followed accurately. I'm going to restore the original setup.sh, and run it from within the cygwin window, as per the instructions in cpctelera's documentation. Hopefully that will fix my path problems. Fingers crossed! This has all been quite embarrassing... I consider myself to be an above-average computer user, yet I stumbled with this. Ah well, you live and you learn, eh? #### ronaldo #61 Sorry @Ervin, I'm out and was waiting to properly answer your questions when arriving home. I'll try to answer you from my mobile: • CPCtelera comes from the Spanish word coctelera (changing o by p) which means "cocktail shaker". That's the reason for the logo (it's a cocktail) • It's preferably to run setup.sh for each new version of CPCtelera, unless you perfectly know how everything works. Setup.sh compiles everything (and won't compile it again unless required) and sets up your environment for the scripts and makefiles to work properly. • When you run setup.sh it sets up default paths for scripts to work. You have to take 2 things into account: you have to close and reopen the terminal after running setup.sh for profiles to be reloaded (or reload them manually if you know how to do it). Also, you shouldn't change directory structure after running setup.sh. If you move CPCtelera main directory or rename it, you should run setup.sh again for paths to be updated. • The first time you run setup.sh you have to enter the folder an type ./setup.sh ( ./ is required to tell the system that file setup.sh is inside the present folder). If you modify path variables that can affect configuration and would prevent scripts from working later on. • Also remember that, on Linux, names are case-sensitive. Try to not be confused by that. Please, feel free to ask anything you need. Sometimes it will take me some time to reply, but I'll try to reply to everything #### ervin That's ok, no problems at all regarding the wait. We've all got lots of things to attend to outside of this forum - there's no rush. Thanks for your reply - that's very useful information. The reason for the name is very interesting too. I'm comfortable now with the environment, and "make" works very nicely. I still need to explicitly tell bash where to find cpct_mkproject, but I can deal with that. It's not a command I'll need daily, so it's no big deal. Thanks once again. #### ronaldo You're welcome . Please, have a look at my last post, as I was editing it while you posted #### ervin Ah, ok. Because I had originally modified setup.sh, it may be possible that I messed up path associations? I'll do a full cpctelera reinstall tomorrow night (with the correct steps!), and let you know how I go. Thanks again! #### ronaldo I'd have to carefully look at it to ensure that was actually the problem, but I'd bet on it. Did you run setup.sh from outside it's folder the first time? (Like running the command cpctelera/setup.sh) It's important to run it from inside its path, as stated in the how to, to ensure paths are properly detected and set up. #### ervin #66 Alrighty, I've deleted the cpctelera folder (is that all that is required to uninstall it?), and now I'm installing it to a different drive. I ran setup.sh the correct way, but, just as before, I've had to run it twice, as the first time I get an unrecoverable error when it gets to Building Compilation Tools. On the 2nd run, it is now on the way to a successful installation. I'll report back when it has finished, after I've tried cpct_mkproject. [EDIT] Ok, setup completed successfully, but I still need to use the full path to cpct_mkproject for it to run. But that's ok, no big deal. Once the new project was created, "make" worked perfectly inside the project folder. I'm very excited to start creating stuff with this! #### ronaldo So, you are using Cygwin under Windows 7, isn't it? Where is Cygwin installed? And where is CPCtelera installed? Cygwin32 or Cygwin64? Could you please tell me which is the unrecoverable error that you mention? Could you please paste the result of this commands?  cat ~/.bashrc  echo$PATH

If you could provide me with this information, I could continue tracking what happens and that may help other users .

(Note: you can install another CPCtelera in a different folder and run setup, as CPCtelera is only its folder and contents. Uninstalling is just deleting the folder).

#### ervin

#68
Yes, I'm using cygwin under windows 7 (32-bit).

Cygwin is in C:\cygwin\
If I remember correctly, it was the default installation location offered during cygwin's install.

cpctelera is installed on another drive in D:\cpctelera\

For the unrecoverable error, have a look at the first screenshot in this section of your website:
CPCtelera Reference Manual - . .

In that screenshot, it is up to 11% of the "Building compilation tools" process.
The first time I ran setup.sh, it was on 0% for a short while, then it reported an unrecoverable error.
The 2nd time I ran setup.sh, it successfully got through the "Building compilation tools" process.

Here are the results of the 1st command you asked me to try:

# To the extent possible under law, the author(s) have dedicated all# copyright and related and neighboring rights to this software to the# public domain worldwide. This software is distributed without any warranty.# You should have received a copy of the CC0 Public Domain Dedication along# with this software.# If not, see <[url=http://creativecommons.org/publicdomain/zero/1.0/>]http://creativecommons.org/publicdomain/zero/1.0/>[/url];;;;.# base-files version 4.2-3# ~/.bashrc: executed by bash(1) for interactive shells.# The latest version as installed by the Cygwin Setup program can# always be found at /etc/defaults/etc/skel/.bashrc# Modifying /etc/skel/.bashrc directly will prevent# setup from updating it.# The copy in your home directory (~/.bashrc) is yours, please# feel free to customise it to create a shell# environment to your liking.  If you feel a change# would be benifitial to all, please feel free to send# a patch to the cygwin mailing list.# User dependent .bashrc file# If not running interactively, don't do anything[[ "$-" != *i* ]] && return# Shell Options## See man bash for more options...## Don't wait for job termination notification# set -o notify## Don't use ^D to exit# set -o ignoreeof## Use case-insensitive filename globbing# shopt -s nocaseglob## Make bash append rather than overwrite the history on disk# shopt -s histappend## When changing directory small typos can be ignored by bash# for example, cd /vr/lgo/apaache would find /var/log/apache# shopt -s cdspell# Completion options## These completion tuning parameters change the default behavior of bash_completion:## Define to access remotely checked-out files over passwordless ssh for CVS# COMP_CVS_REMOTE=1## Define to avoid stripping description in --option=description of './configure --help'# COMP_CONFIGURE_HINTS=1## Define to avoid flattening internal contents of tar files# COMP_TAR_INTERNAL_PATHS=1## Uncomment to turn on programmable completion enhancements.# Any completions you add in ~/.bash_completion are sourced last.# [[ -f /etc/bash_completion ]] && . /etc/bash_completion# History Options## Don't put duplicate lines in the history.# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups## Ignore some controlling instructions# HISTIGNORE is a colon-delimited list of patterns which should be excluded.# The '&' is a special pattern which suppresses duplicate entries.# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit'# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls' # Ignore the ls command as well## Whenever displaying the prompt, write the previous line to disk# export PROMPT_COMMAND="history -a"# Aliases## Some people use a different file for aliases# if [ -f "${HOME}/.bash_aliases" ]; then#   source "${HOME}/.bash_aliases"# fi## Some example alias instructions# If these are enabled they will be used instead of any instructions# they may mask. For example, alias rm='rm -i' will mask the rm# application. To override the alias instruction use a \ before, ie# \rm will call the real rm not the alias.## Interactive operation...# alias rm='rm -i'# alias cp='cp -i'# alias mv='mv -i'## Default to human readable figures# alias df='df -h'# alias du='du -h'## Misc# alias less='less -r' # raw control characters# alias whence='type -a' # where, of a sort# alias grep='grep --color' # show differences in colour# alias egrep='egrep --color=auto' # show differences in colour# alias fgrep='fgrep --color=auto' # show differences in colour## Some shortcuts for different directory listings# alias ls='ls -hF --color=tty' # classify files in colour# alias dir='ls --color=auto --format=vertical'# alias vdir='ls --color=auto --format=long'# alias ll='ls -l' # long list# alias la='ls -A' # all but . and ..# alias l='ls -CF' ## Umask## /etc/profile sets 022, removing write perms to group + others.# Set a more restrictive umask: i.e. no exec perms for others:# umask 027# Paranoid: neither group nor others have any perms:# umask 077# Functions## Some people use a different file for functions# if [ -f "${HOME}/.bash_functions" ]; then#   source "${HOME}/.bash_functions"# fi## Some example functions:## a) function settitle# settitle ()# {# echo -ne "\e]2;$@\a\e]1;$@\a";# }## b) function cd_func# This function defines a 'cd' replacement function capable of keeping,# displaying and accessing history of visited directories, up to 10 entries.# To use it, uncomment it, source this file and try 'cd --'.# acd_func 1.0.5, 10-nov-2004# Petar Marinov, http:/geocities.com/h2428, this is public domain# cd_func ()# {# local x2 the_new_dir adir index# local -i cnt## if [[$1 ==  "--" ]]; then#     dirs -v#     return 0#   fi##   the_new_dir=$1# [[ -z$1 ]] && the_new_dir=$HOME## if [[${the_new_dir:0:1} == '-' ]]; then#     ##     # Extract dir N from dirs#     index=${the_new_dir:1}# [[ -z$index ]] && index=1#     adir=$(dirs +$index)#     [[ -z $adir ]] && return 1# the_new_dir=$adir#   fi##   ##   # '~' has to be substituted by ${HOME}# [[${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"##   ##   # Now change to the new dir and add to the top of the stack#   pushd "${the_new_dir}" > /dev/null# [[$? -ne 0 ]] && return 1#   the_new_dir=$(pwd)## ## # Trim down everything beyond 11th entry# popd -n +11 2>/dev/null 1>/dev/null## ## # Remove any other occurence of this dir, skipping the top of the stack# for ((cnt=1; cnt <= 10; cnt++)); do# x2=$(dirs +${cnt} 2>/dev/null)# [[$? -ne 0 ]] && return 0#     [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"# if [[ "${x2}" == "${the_new_dir}" ]]; then# popd -n +$cnt 2>/dev/null 1>/dev/null#       cnt=cnt-1#     fi#   done##   return 0# }## alias cd=cd_func

And here are the results of the 2nd command:

/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files/AMD APP/bin/x86:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Smart Projects/DVDVob2Mpg:/cygdrive/c/Program Files/Git/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/nodejs/bin:/cygdrive/c/Program Files/QuickTime/QTSystem:/cygdrive/c/Program Files/Skype/Phone:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Users/Ervin Pajor/AppData/Roaming/npm:%%%CPCTELERA_PATH%%%

I hope that helps.

#### ronaldo

#69
Yes, it helps. I see what is the origin of the problem: installing CPCtelera on a folder outside Cygwin. The natural way to install software that is going to be used under Cygwin is inside c:\cygwin, which is a folder that mimics Linux folder structure. Although it is possible for Cygwin to access folders outside its folder structre (using the route /cygdrive), it is generally a bad idea. I'm going to test it now to reproduce the problem and decide if I can do something.

You have an aditional problem with your folders, as your user name has a space in the middle. If you see your $PATH variable contents, you'll see things like this: /cygdrive/c/Users/Ervin Pajor/ This will lead to problems under Cygwin, cause all POSIX operative systems use spaces as parameter separators. So, if some command receives the previous path as parameter it will interpret it as 2 parameters ("/cygdrive/c/Users/Ervin" and "Pajor/"). While I check for a more general solution, you can solve your problem changing your Cygwin$HOME folder to a spaces-free one, and then installing CPCtelera under it. I tell you how to do it.

To change your $HOME, first create a new$HOME folder:

• Open a cygwin terminal
• type "make ../mynewhome" to create mynewhome/ folder at the same folder level that your previous $HOME, hence the ".." (you can change mynewhome for whatever you like) Then edit your /etc/passwd file (which should be located at c:/cygwin/etc/passwd. Preferably use a nice editor, something like sublime, notepad++, code::blocks... notepad.exe is not recommended. • Inside the file, you should see a line similar to this one: • Erwin Pajor:unused:1001:513:U-YourMachineName\Erwin Pajor,S-1-5-21-2509020925-448908704-405948793-1001:/home/Erwin Pajor:/bin/bash • Change /home/Erwin Pajor by /home/mynewhome • Close Cygwin terminal and open a new one • If you did it well, the command "pwd" should tell you that you are now at "/home/mynewhome" Once you have done this, you can now download CPCtelera to c:\cygwin\home\mynewhome, uncompress and install it normally. Then everything should work as expected. If you wanted to have thins in another drive (like D:), I suggest you to directly install Cygwin to that new drive, then follow this process. #### arnoldemu How about a installer for windows? The current setup seems quite complex. There are free installer making tools for windows. My games. My Games My website with coding examples: Unofficial Amstrad WWW Resource #### arnoldemu Quote from: arnoldemu on 15:08, 20 June 15 How about a installer for windows? The current setup seems quite complex. There are free installer making tools for windows. inno setup is the one I am thinking of. My games. My Games My website with coding examples: Unofficial Amstrad WWW Resource #### ronaldo A setup for Windows will be nice, but someone should have enough time for creating and maintaining it. If you like to create it, you have my deepest blessing . The only problem you have here is being careful to respect cygwin intellectual property. I'm unsure on the correct way to manage it. I think you should ask the user for downloading and installing it, and you may have to interface with the installer. Actually, @Ervin problems are not due to a complex setup, but to his customized installation. In a normal installation you only have 3 steps: install cygwin along with required libraries, downloading CPCtelera and running setup.sh. #### arnoldemu Understood. My experience shows that having an installer for windows makes it really easy. I know it takes time to make one. I have made some before.. I have just installed cpctelera on linux. It was a good experience. The installation script is really nice. It checked all the necessary libs and told me if I had any missing. It told me which lib to install and I followed the instructions. It then built the tools. It was painless and didn't require sudo My games. My Games My website with coding examples: Unofficial Amstrad WWW Resource #### ervin #74 Quote from: ronaldo on 14:44, 20 June 15 Yes, it helps. I see what is the origin of the problem: installing CPCtelera on a folder outside Cygwin. The natural way to install software that is going to be used under Cygwin is inside c:\cygwin, which is a folder that mimics Linux folder structure. Although it is possible for Cygwin to access folders outside its folder structre (using the route /cygdrive), it is generally a bad idea. I'm going to test it now to reproduce the problem and decide if I can do something. You have an aditional problem with your folders, as your user name has a space in the middle. If you see your$PATH variable contents, you'll see things like this: /cygdrive/c/Users/Ervin Pajor/
This will lead to problems under Cygwin, cause all POSIX operative systems use spaces as parameter separators. So, if some command receives the previous path as parameter it will interpret it as 2 parameters ("/cygdrive/c/Users/Ervin" and "Pajor/").

While I check for a more general solution, you can solve your problem changing your Cygwin $HOME folder to a spaces-free one, and then installing CPCtelera under it. I tell you how to do it. To change your$HOME, first create a new $HOME folder: • Open a cygwin terminal • type "make ../mynewhome" to create mynewhome/ folder at the same folder level that your previous$HOME, hence the ".." (you can change mynewhome for whatever you like)
Then edit your /etc/passwd file (which should be located at c:/cygwin/etc/passwd. Preferably use a nice editor, something like sublime, notepad++, code::blocks... notepad.exe is not recommended.

• Inside the file, you should see a line similar to this one:
• Erwin Pajor:unused:1001:513:U-YourMachineName\Erwin Pajor,S-1-5-21-2509020925-448908704-405948793-1001:/home/Erwin Pajor:/bin/bash
• Change /home/Erwin Pajor by /home/mynewhome
• Close Cygwin terminal and open a new one
• If you did it well, the command "pwd" should tell you that you are now at "/home/mynewhome"
Once you have done this, you can now download CPCtelera to c:\cygwin\home\mynewhome, uncompress and install it normally. Then everything should work as expected.
If you wanted to have thins in another drive (like D:), I suggest you to directly install Cygwin to that new drive, then follow this process.

Thanks so much for taking the time to put all that information together.

Unfortunately I had all sorts of problems with the home folder in cygwin.

After a quick bit of research, I learned that "mkdir" is the command to create a new folder.
Then I couldn't find the /etc/passwd file. It turns out that it is no longer created during cygwin installation. I managed to find a page that talked about being able to generate it, but that gave me problems as well.

In the end I gave up on that idea, and decided to change my windows account name. This involved further research, as it's not as simple as just changing the account name.
I now have a home folder called "ErvinPajor", without the space.

Then I unzipped cpctelera into C:\cygwin\home\ErvinPajor\cpctelera\
In the cygwin terminal I navigated to that folder and typed /.setup.sh

Setup began running nicely until it got to the "Building compilation tools" step, where it again failed with this error:

#########################
## UNRECOVERABLE ERROR ##
#########################
##> There was an error building CPCtelera tools. Please, check '/home/ErvinPajor/cpctelera/cpctelera/logs/tool_building.log' for details. Aborting.

Typing ./setup.sh one more time allowed it to continue successfully. It is up to 7% right now...
(Unfortunately I foolishly forgot to take a copy of tool_building.log before re-running setup.sh - and now of course the log contains info about the successful install).

[EDIT] It has finished installing.
I immediately tried cpct_mkproject (without the full path to it), and it worked! YES!!!
Then I navigated inside the newly created folder, typed "make", and that worked as well!

So, apart from the problems with the space in my windows user account name, and then having to run setup.sh twice, it looks like things should be ok now!

Thanks again for all of your help.