Jump to content

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


Guest sztupy

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?

Link to comment
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
Link to comment
Share on other sites

Guest lastnikita

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 ?

Link to comment
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

Link to comment
Share on other sites

  • 1 month later...
Guest s0cks

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
Link to comment
Share on other sites

Guest s0cks

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
Link to comment
Share on other sites

Guest sztupy
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

Link to comment
Share on other sites

Guest Stevenh

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

Link to comment
Share on other sites

Guest sztupy
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

Link to comment
Share on other sites

  • 1 year later...
Guest shokka9

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:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

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