News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

pelles c portable

Started by czerny, May 29, 2012, 11:33:30 AM

Previous topic - Next topic

czerny

It would be very handy to have a relocatable portable version of pelles c to carry it with a usb stick.

AlexN

Quote from: czerny on May 29, 2012, 11:33:30 AM
It would be very handy to have a relocatable portable version of pelles c to carry it with a usb stick.

I use Pelles C also as portable. Look at the POIDE command line option /xml and copy sysdefs.tag into the bin directory.
I have on a stick Pelles C 5.01, 6.00, 6.50 and 7.00 as portable. ;)
best regards
Alex ;)

czerny

Quote from: AlexN on May 29, 2012, 05:12:45 PM
I use Pelles C also as portable. Look at the POIDE command line option /xml and copy sysdefs.tag into the bin directory.
I have on a stick Pelles C 5.01, 6.00, 6.50 and 7.00 as portable. ;)
Do you have solved your problems with addins?

Vortex

Hi czerny,

You would like to have a look at this registry setting :

HKEY_CURRENT_USER\Software\Pelle Orinius

The Directories subkey points the PellesC directories. Moving this registry key should not be a problem in my opinion.
Code it... That's all...

czerny

Quote from: Vortex on May 29, 2012, 08:05:01 PM
You would like to have a look at this registry setting :
HKEY_CURRENT_USER\Software\Pelle Orinius
The Directories subkey points the PellesC directories. Moving this registry key should not be a problem in my opinion.
I do not like to use the registry. In order to check if the registry is used i have deleted this key.
Most of the time the ide writes in the xml file. But sometimes the registry is used. This is     inconsequent in my opinion.

AlexN

Quote from: czerny on May 29, 2012, 07:56:24 PM
Do you have solved your problems with addins?
Not really. I use my stick (J:) and externe HD (M:) usually with the same drive letter and so there is no problem. If I forgot to change the drive letter, I have to reactivate all addins which I want to use.
best regards
Alex ;)

CommonTater

Just a question... are you copying the AddIns to the memory stick (etc.) or still trying to use them from the default location on the hard disk?


AlexN

Quote from: CommonTater on May 29, 2012, 09:00:00 PM
Just a question... are you copying the AddIns to the memory stick (etc.) or still trying to use them from the default location on the hard disk?
I copy the complete installed Pelles C to the USB-Stick. Start it there with poide.exe /x /n /xml my7.xml and exit poide again. Then I replace with an editor all drive letters "C:" with "J:" in the my7.xml.
best regards
Alex ;)

CommonTater

Thanks... got it working!  :D


czerny

What about multiple xml files

pelles-C.xml
pelles-D.xml
...


and


@echo off
set DRIVE=%cd:~0,1%
%DRIVE%:\PellesC\bin\poide.exe /xml pelles-%DRIVE%.xml


AlexN

#10
I don't if is a good idea. In the xml file there are stored the all options, window positions and much more. So it will be a suprise where the IDE and the windows arise.

If I would use your script, I would change it a little bit.

@echo off
set _DRIVE=%~d0
set DRIVE=%_DRIVE:~0,1%
%DRIVE%:\PellesC\bin\poide.exe /xml pelles-%DRIVE%.xml


where %~d0 is the drive of the bat file. (if you want to see more such macros, look at the attached test.bat)

But the best to fix this problem is to write a portable_poide.exe which replaces macros with paths in the xml - start the poide - when poide ends, replace the strings with the actual path to macros.
No great thing, but I don't have enough time on a piece to start this project (and I use each stick usually with the same drive letter).
Perhaps I use this discussion to start it anyway.
best regards
Alex ;)

czerny

sorry, but I can not see any difference to my batch.

And you are right. There is more to do and a wrapper to poide would be nice.

AlexN

#12
Quote from: czerny on May 31, 2012, 11:16:08 AM
sorry, but I can not see any difference to my batch.
You use the macro %cd%, which contains the current path.
I use a variant of the macro %~0, which contains the path and name of the bat file. So you can start it from everywhere and it gets the correct drive.

Quote from: czerny on May 31, 2012, 11:16:08 AM
And you are right. There is more to do and a wrapper to poide would be nice.
The easiest way would be, when Pelle decides to use relative pathes instead of absolute pathes, then all would work fine.
best regards
Alex ;)

TimoVJL

If you just want INCLUDE and LIB working somehow, try this
Use empty directories in PellesC.xml like
   <category name="Directories" />
then environment variables are used.
@echo off
set PellesCDir=%~d0%\PellesC
echo Setting 32-bit environment for Pelles C...
set PATH=%PellesCDir%\Bin;%PATH%
set INCLUDE=%PellesCDir%\Include;%PellesCDir%\Include\Win;%INCLUDE%
set LIB=%PellesCDir%\Lib;%PellesCDir%\Lib\Win;%LIB%
start %PellesCDir%\bin\poide.exe -x -xml PellesC.xml
May the source be with you

czerny

#14
Quote from: AlexN on May 31, 2012, 12:37:31 PM
The easiest way would be, when Pelle decides to use relative pathes instead of absolute pathes, then all would work fine.
That's why I have written this feature request.
I would prefere relative pathes (relative to PellesC) AND absolute pathes.