NO

Author Topic: pelles c portable  (Read 29402 times)

czerny

  • Guest
pelles c portable
« 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.

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: pelles c portable
« Reply #1 on: May 29, 2012, 05:12:45 PM »
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

  • Guest
Re: pelles c portable
« Reply #2 on: May 29, 2012, 07:56:24 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?

Online Vortex

  • Member
  • *
  • Posts: 862
    • http://www.vortex.masmcode.com
Re: pelles c portable
« Reply #3 on: May 29, 2012, 08:05:01 PM »
Hi czerny,

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

Code: [Select]
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

  • Guest
Re: pelles c portable
« Reply #4 on: May 29, 2012, 08:32:37 PM »
You would like to have a look at this registry setting :
Code: [Select]
HKEY_CURRENT_USER\Software\Pelle OriniusThe 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.

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: pelles c portable
« Reply #5 on: May 29, 2012, 08:37:55 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

  • Guest
Re: pelles c portable
« Reply #6 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?


Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: pelles c portable
« Reply #7 on: May 30, 2012, 04:49:13 AM »
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

  • Guest
Re: pelles c portable
« Reply #8 on: May 30, 2012, 04:56:08 AM »
Thanks... got it working!  :D


czerny

  • Guest
Re: pelles c portable
« Reply #9 on: May 30, 2012, 05:38:16 PM »
What about multiple xml files
Code: [Select]
pelles-C.xml
pelles-D.xml
...

and

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

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: pelles c portable
« Reply #10 on: May 30, 2012, 08:38:40 PM »
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.
Code: [Select]
@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.
« Last Edit: May 30, 2012, 08:43:16 PM by AlexN »
best regards
 Alex ;)

czerny

  • Guest
Re: pelles c portable
« Reply #11 on: May 31, 2012, 11:16:08 AM »
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.

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: pelles c portable
« Reply #12 on: May 31, 2012, 12:37:31 PM »
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.

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.
« Last Edit: May 31, 2012, 12:47:42 PM by AlexN »
best regards
 Alex ;)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2112
Re: pelles c portable
« Reply #13 on: May 31, 2012, 02:12:57 PM »
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.
Code: [Select]
@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

  • Guest
Re: pelles c portable
« Reply #14 on: May 31, 2012, 08:46:38 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.
« Last Edit: May 31, 2012, 09:08:23 PM by czerny »