Jump to content
sztupy

New tools for ROM builders - ROM package <--> cab converters and more

Recommended Posts

now I tried pkg2cab with a simple folder to test: bubblebreaker.exe

here's the output, not sure if I could do something..

SztupYs pkg2cab tool 0.1

 Checking for registry entries

 Registry entries found:


 Converting registry entries to INF format

 Warning: Error occured while converting registry files!

 Done


 Copying files to temporary directory

 Creating INF file

 E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\app\pkg2cab.rb:141:in `initialize': No su

 ch file or directory - _out/initflashfiles.txt (Errno::ENOENT)

		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\app\pkg2cab.rb:141:in `open'


		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\app\pkg2cab.rb:141

		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\app\pkg2cab.rb:113:in `open'


		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\app\pkg2cab.rb:113

		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\bootstrap.rb:77:in `load'

		 from E:\DOCUME~1\niko\eee\eee.pkg2cab.exe.2\bootstrap.rb:77

could you zip up the whole directory and send it to me?

Share this post


Link to post
Share on other sites
pkg2cab does only support "flat" directories, so if your directory contains modules (directories that look like files), then you have to copy the file out of them manually, and delete the directory

and because you don't have initflashfiles and registry files it will crash.

Edited by sztupy

Share this post


Link to post
Share on other sites

I don't understand.. it IS a flat dir, doesn't have any folder that looks like a file into it !

there is only one initflashfiles, I don't get this neither..

so it doesn't support apps without registry needs ? Should I add a fake one for it to work ?

Share this post


Link to post
Share on other sites
I don't understand.. it IS a flat dir, doesn't have any folder that looks like a file into it !

there is only one initflashfiles, I don't get this neither..

so it doesn't support apps without registry needs ? Should I add a fake one for it to work ?

pkg2cab works with oem packages. but what you wanted to cab up, was a module. A package has a .dsm a .rgu and (optionally) an initflashiles.txt (which can be empty). To get a package use cab2pkg, extractpkg or ervius package creator

Share this post


Link to post
Share on other sites

Hi,

I'm using the sztupy's cab2pkg 0.3 and the extraction process is too slow... taking so much time...

I'm extracting a 42kb CAB and the process is still running for 10 or more minutes and doesn't ends...

Is it normal?

SztupYs cab2pkg tool 0.3

Extracting cab

Install section

FileOperation section

Skipping Registry section for now...

Extractring registry entries

Edited by s0cks

Share this post


Link to post
Share on other sites

Some .CAB's have this issue.

The files are extracted, the registry information is extracted, but the program (cab2pkg) doesn't terminate...

And I don't know if the files extracted are OK... but seems yes...

I got a OUT_ directory and the PROGRAM (of cab) directory...

But the cab2pkg never ends...

It's like an infinite loop...

Does anyone know why this happen?

Edited by s0cks

Share this post


Link to post
Share on other sites
Some .CAB's have this issue.

The files are extracted, the registry information is extracted, but the program (cab2pkg) doesn't terminate...

And I don't know if the files extracted are OK... but seems yes...

I got a OUT_ directory and the PROGRAM (of cab) directory...

But the cab2pkg never ends...

It's like an infinite loop...

Does anyone know why this happen?

xml2reg sometimes waits for an enter to finish, but this means some error int he files usually, or in your environment

Share this post


Link to post
Share on other sites

Hi guys, not sure if this is best place to ask but I got 2 questions...

1. What's the best and easiest way to create a cab?

2. What's the best and easiest way to create a package?

In both cases I have a bunch of files that I want to end up in \windows and a .rgu registry file...

How can I then extend the above to move some files from \windows into another directory without specifying each file? Is it possible to use wildcards?

Thanks

Steven

Share this post


Link to post
Share on other sites
Hi guys, not sure if this is best place to ask but I got 2 questions...

1. What's the best and easiest way to create a cab?

2. What's the best and easiest way to create a package?

In both cases I have a bunch of files that I want to end up in \windows and a .rgu registry file...

How can I then extend the above to move some files from \windows into another directory without specifying each file? Is it possible to use wildcards?

Thanks

Steven

Neither initflashfiles nor provxml files allow the use of wildcards. Of course you might write a small program that would to the job. For example here is a small ruby script that would create an initflashfiles.dat to stdout from a Directory structure (located in the packagedir directory):

(written by hearth, untested, might not even compile)

 require 'fileutils'


 puts ";-------------------------------------------"

 puts "; package created with an untested tool"

 Dir.glob("packagedir/**/*").each do |filename|

   if File.directory?(filename) then

	  delements = filename.gsub("packagedir/").split(/[\\\/]/)

	  delements.delete_if { |e| e=="" }

	  delements.each_index do |i|

		if i==0 then

		  puts("root:-Directory(\"#{delements[0]}\")")

		else

		  puts("Directory(\"\\#{delements[0..i-1].join("\\")}\"):-Directory(\"#{delements[i]}\")")

	   end

	 end

   else

	 dirname = File.split(filename)[0].gsub("packagedir/","")

	 winfn = File.split(filename)[1]

	 puts("Directory(\"#{dirname}\"):-File(\"#{winfn}\",\"\\Windows\\#{winfn}\")");

   end

 end

Share this post


Link to post
Share on other sites

I never liked the pkg2cab or vice versa....

There are certain elements you need to make a CAB from the files..If you dont know, please google.

Also, try getting a cab, making pkg, then making cab from pkg......

I used to use Ervius tools....cant remember exactly, but i know that pkg2cab worked as i used that a few times too.

Good luck. It could just be a simple thing like the rgu not being in the right format. It usually is something so simple.

:rolleyes:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.